Relionはジョブ管理システム(SGE、Torque、PBSProら)と連携できて、
ジョブ投入画面の「Submit to queue?」をYesにすれば既設のジョブ管理システムへジョブが投入される
2018y08m03d_121758190.png

指定した「queue」の先で指定したMPI分のリソースを確保して計算するのだが、
指定先の「queue」で1台当たりのコア数を「Minimum deficated core per node」に記載する必要がある。
一様にcore数が揃ったクラスターマシンが数組なら便利です。
っが、購入時期によってcore数が異なるクラスターマシン群が複数存在すると面倒かな。

そう思って「queue指定 -> 使用するノードの数 -> 使用するMPIの数 -> MPI当たりのthreads数」で
ジョブを定義できるような変更をかつて行ってました。
2018y09m13d_053604415.png

このソース変更で RELION_QSUB_TEMPLATE(qsub.sh)も変更する必要があります。参照Relion/qsub.sh
*Relionでは qsub.csh を提供しているが、ここでは bash で書いてます

修正コード

留意
動かない場合もあります。各自の責任でお使い下さい

「git diff」の結果です

タイトル変更「src/apps/maingui.cpp」

diff --git a/src/apps/maingui.cpp b/src/apps/maingui.cpp
index b1b796c..fe7c765 100644
--- a/src/apps/maingui.cpp
+++ b/src/apps/maingui.cpp
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
 #ifdef PACKAGE_VERSION
        strcat(titletext,PACKAGE_VERSION);
 #endif
-       strcat(titletext,": ");
+       strcat(titletext,": cuda-10.1,chaperone :");
 
        strcat (titletext, short_dir);

gui_jobwindow.cpp

diff --git a/src/gui_jobwindow.cpp b/src/gui_jobwindow.cpp
index 6ca986a..dd2dd91 100644
--- a/src/gui_jobwindow.cpp
+++ b/src/gui_jobwindow.cpp
@@ -38,16 +38,6 @@ void JobWindow::setupTabs(int nr_tabs)
 {
        current_y = y; // top of the GUI
 
-       char * my_allow_change_dedicated = getenv ("RELION_ALLOW_CHANGE_MINIMUM_DEDICATED");
-       if (my_allow_change_dedicated == NULL)
-       {
-               do_allow_change_minimum_dedicated = DEFAULTMININIMUMDEDICATED;
-       }
-       else
-       {
-               int check_allow =  textToInteger(my_allow_change_dedicated);
-               do_allow_change_minimum_dedicated = (check_allow == 0) ? false : true;
-       }
 
        // Set up tabs
        if (nr_tabs >= 1) // there is always the running tab, which is not counted on the input nr_tabs!
@@ -131,6 +121,7 @@ void JobWindow::setupRunTab()
 
        if (myjob.joboptions.find("nr_mpi") != myjob.joboptions.end())
        {
+               if (myjob.joboptions.find("nr_nodes") != myjob.joboptions.end()) place("nr_nodes", TOGGLE_LEAVE_ACTIVE);
                place("nr_mpi", TOGGLE_LEAVE_ACTIVE);
                has_parallel = true;
        }
@@ -172,11 +163,6 @@ void JobWindow::setupRunTab()
 
        place("qsubscript");
 
-       place("min_dedicated");
-       if (do_allow_change_minimum_dedicated)
-               guientries["min_dedicated"].deactivate(false);
-       else
-               guientries["min_dedicated"].deactivate(true);
 
        queue_group->end();
        guientries["do_queue"].cb_menu_i(); // This is to make the default effective

pipeline_jobs.cpp

diff --git a/src/pipeline_jobs.cpp b/src/pipeline_jobs.cpp
index 619752f..ca0aae5 100644
--- a/src/pipeline_jobs.cpp
+++ b/src/pipeline_jobs.cpp
@@ -501,28 +501,26 @@ bool RelionJob::saveJobSubmissionScript(std::string newfilename, std::string out
                int nthr = (joboptions.find("nr_threads") != joboptions.end()) ? joboptions["nr_threads"].getNumber(error_message) : 1;
                if (error_message != "") return false;
 
-               int ncores = nmpi * nthr;
-               int ndedi = joboptions["min_dedicated"].getNumber(error_message);
+               int nr_nodes = (joboptions.find("nr_nodes") != joboptions.end()) ? joboptions["nr_nodes"].getNumber(error_message) : 1;
                if (error_message != "") return false;
 
-               float fnodes = (float)ncores / (float)ndedi;
-               int nnodes = CEIL(fnodes);
-               if (fmod(fnodes, 1) > 0)
-               {
-                       std:: cout << std::endl;
-                       std::cout << " Warning! You're using " << nmpi << " MPI processes with " << nthr << " (略
-                       std::cout << " It is more efficient to make the number of cores (i.e. mpi*threads) a (略
-               }
+               int ncores = nmpi * nthr;
+
+               int nsum = nr_nodes * ncores;
+               int nmpiproc = nr_nodes * nmpi;
 
                fh.clear(); // reset eof if happened...
                fh.seekg(0, std::ios::beg);
                std::string line;
                std::map<std::string, std::string> replacing;
+               replacing["XXXversionXXX"] = RELION_SHORT_VERSION;
+               replacing["XXXsumXXX"] = floatToString(nsum);
+               replacing["XXXmpiprocXXX"] = floatToString(nmpiproc);
+
                replacing["XXXmpinodesXXX"] = floatToString(nmpi);
                replacing["XXXthreadsXXX"] = floatToString(nthr);
                replacing["XXXcoresXXX"] = floatToString(ncores);
-               replacing["XXXdedicatedXXX"] = floatToString(ndedi);
-               replacing["XXXnodesXXX"] = floatToString(nnodes);
+               replacing["XXXnodesXXX"] = floatToString(nr_nodes);
                replacing["XXXnameXXX"] = outputname;
                replacing["XXXerrfileXXX"] = outputname + "run.err";
                replacing["XXXoutfileXXX"] = outputname + "run.out";
@@ -821,7 +819,8 @@ void RelionJob::initialise(int _job_type)
        const char qsub_nrmpi_val = (qsub_nrmpi_text ? atoi(qsub_nrmpi_text) : DEFAULTNRMPI);
        if (has_mpi)
        {
-               joboptions["nr_mpi"] = JobOption("Number of MPI procs:", qsub_nrmpi_val , 1, mpi_max, 1, (略
+               joboptions["nr_mpi"] = JobOption("Number of MPI procs per node:", qsub_nrmpi_val , 1, mpi(略
+               joboptions["nr_nodes"] = JobOption("Number of nodes:", 1, 1, 8 , 1, "Number of nodes");
        }
 
 
        const char *thread_max_input = getenv("RELION_THREAD_MAX");
@@ -908,11 +907,12 @@ Its default location may be changed by setting the environment variable RELION_Q
 In the template script a number of variables will be replaced: \n \
 XXXcommandXXX = relion command + arguments; \n \
 XXXqueueXXX = The queue name; \n \
-XXXmpinodesXXX = The number of MPI nodes; \n \
-XXXthreadsXXX = The number of threads; \n \
+XXXmpinodesXXX = The number of MPI per node; \n \
+XXXmpiprocXXX = The total number of MPI; \n \
+XXXthreadsXXX = The number of threads per MPI; \n \
 XXXcoresXXX = XXXmpinodesXXX * XXXthreadsXXX; \n \
-XXXdedicatedXXX = The minimum number of dedicated cores on each node; \n \
-XXXnodesXXX = The number of requested nodes = CEIL(XXXcoresXXX / XXXdedicatedXXX); \n \
+XXXsumXXX = The total number of core; \n \
+XXXnodesXXX = The number of requested nodes \n \
 If these options are not enough for your standard jobs, you may define a user-specified number of extr(略
 The number of extra variables is controlled through the environment variable RELION_QSUB_EXTRA_COUNT. \
 Their help text is set by the environment variables RELION_QSUB_EXTRA1, RELION_QSUB_EXTRA2, etc \
@@ -922,9 +922,6 @@ Likewise, default values for the extra entries can be set through environment va
 But note that (unlike all other entries in the GUI) the extra values are not remembered from one run (略
 
        // Check for environment variable RELION_QSUB_TEMPLATE
-       char * my_minimum_dedicated = getenv ("RELION_MINIMUM_DEDICATED");
-       int minimum_nr_dedicated = (my_minimum_dedicated == NULL) ? DEFAULTMININIMUMDEDICATED : textTo(略
-       joboptions["min_dedicated"] = JobOption("Minimum dedicated cores per node:", minimum_nr_dedica(略
        // Need the std::string(), as otherwise it will be overloaded and passed as a boolean....
        joboptions["other_args"] = JobOption("Additional arguments:", std::string(""), "In this box comm(略

タイトル変更を除くdiffファイル filerelion3.1.diff
上記diffファイルを入手して/tmpらに配置します。
そして、適用方法は

[root@c ~]# cd /apps/src/
[root@c src]# git clone https://github.com/3dem/relion
[root@c src]# cd relion
[root@c relion]# git checkout ver3.1
[root@c relion]# git branch
  master
* ver3.1
[root@c relion]# 
[root@c relion]# patch -p1 < /tmp/relion3.1.diff
patching file src/gui_jobwindow.cpp
patching file src/pipeline_jobs.cpp
[root@c relion]#

で適用されます。その後にコンパイル、インストールしてください。
もし適用した後で外したいのなら、

[root@c relion]# git checkout .

で元の状態に戻ります。


トップ   編集 添付 複製 名前変更     ヘルプ   最終更新のRSS
Last-modified: 2019-10-18 (金) 22:25:28 (30d)