Skip to content
Snippets Groups Projects
Commit 30c19d4c authored by Ruud Overeem's avatar Ruud Overeem
Browse files

BugID: 826

Passing the number of processes to the PR_MPI object so that the object
does not have to recalculate it again.
parent a95ff444
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,8 @@ public: ...@@ -52,7 +52,8 @@ public:
const string& aJobName, const string& aJobName,
const vector<string>& nodes, const vector<string>& nodes,
const string& aExecutable, const string& aExecutable,
const string& aParamfile); const string& aParamfile,
uint16 nrProcs);
PR_MPI(const PR_MPI& other); PR_MPI(const PR_MPI& other);
......
...@@ -263,7 +263,7 @@ void ApplController::createParSubsets() ...@@ -263,7 +263,7 @@ void ApplController::createParSubsets()
// by a python script, for final LOFAR we need to do this in SAS. // by a python script, for final LOFAR we need to do this in SAS.
if (procPrefix == "InputAppl.Transpose") { if (procPrefix == "InputAppl.Transpose") {
LOG_DEBUG("CS1_SPECIAL: calling prepare_CS1_InputSection.py"); LOG_DEBUG("CS1_SPECIAL: calling prepare_CS1_InputSection.py");
nrProcs = system("/opt/lofar/bin/prepare_CS1_InputSection.py"); nrProcs = system("/opt/lofar/bin/prepare_CS1_InputSection.py")/256;
LOG_DEBUG_STR("nrOfProcesses calculated by script = " << nrProcs); LOG_DEBUG_STR("nrOfProcesses calculated by script = " << nrProcs);
} }
...@@ -361,7 +361,8 @@ void ApplController::createParSubsets() ...@@ -361,7 +361,8 @@ void ApplController::createParSubsets()
procName, procName,
nodes, nodes,
basePS.getString(procPrefix + "._executable"), basePS.getString(procPrefix + "._executable"),
fileName)); fileName,
nrProcs));
writeParSubset(basePS, procName, fileName); writeParSubset(basePS, procName, fileName);
} }
......
...@@ -39,7 +39,8 @@ PR_MPI::PR_MPI(const string& aHostName, ...@@ -39,7 +39,8 @@ PR_MPI::PR_MPI(const string& aHostName,
const string& aJobName, const string& aJobName,
const vector<string>& nodes, const vector<string>& nodes,
const string& aExecutable, const string& aExecutable,
const string& aParamFile) const string& aParamFile,
uint16 nrProcs)
: ProcRule("MPIjob", aJobName, aExecutable, aParamFile) : ProcRule("MPIjob", aJobName, aExecutable, aParamFile)
{ {
LOG_TRACE_OBJ_STR ("PR_MPI: constructor"); LOG_TRACE_OBJ_STR ("PR_MPI: constructor");
...@@ -66,7 +67,7 @@ PR_MPI::PR_MPI(const string& aHostName, ...@@ -66,7 +67,7 @@ PR_MPI::PR_MPI(const string& aHostName,
machinefileName.c_str(), machinefileName.c_str(),
aExecutable.c_str(), aExecutable.c_str(),
aParamFile.c_str(), aParamFile.c_str(),
nodes.size()); nrProcs);
itsStopCmd = formatString("ssh %s \"( cd /opt/lofar/bin ; ./stopMPI.sh %s ) \"", itsStopCmd = formatString("ssh %s \"( cd /opt/lofar/bin ; ./stopMPI.sh %s ) \"",
aHostName.c_str(), aHostName.c_str(),
aExecutable.c_str()); aExecutable.c_str());
...@@ -77,7 +78,7 @@ PR_MPI::PR_MPI(const string& aHostName, ...@@ -77,7 +78,7 @@ PR_MPI::PR_MPI(const string& aHostName,
machinefileName.c_str(), machinefileName.c_str(),
aExecutable.c_str(), aExecutable.c_str(),
aParamFile.c_str(), aParamFile.c_str(),
nodes.size()); nrProcs);
itsStopCmd = formatString("./stopMPI.sh %s", itsStopCmd = formatString("./stopMPI.sh %s",
aExecutable.c_str()); aExecutable.c_str());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment