return oss.str();
}
+string MpiImpl_LAM::name()
+{
+ return "lam";
+}
+
// mpich1 implementation
// Constructor
MpiImpl_MPICH1::MpiImpl_MPICH1() : MpiImpl()
return "";
}
+string MpiImpl_MPICH1::name()
+{
+ return "mpich";
+}
+
// mpich2 implementation
// Constructor
MpiImpl_MPICH2::MpiImpl_MPICH2() : MpiImpl()
return oss.str();
}
+string MpiImpl_MPICH2::name()
+{
+ return "mpich";
+}
+
// openmpi implementation
// Constructor
MpiImpl_OPENMPI::MpiImpl_OPENMPI() : MpiImpl()
return "";
}
+string MpiImpl_OPENMPI::name()
+{
+ return "openmpi";
+}
+
// slurm implementation
// Constructor
MpiImpl_SLURM::MpiImpl_SLURM() : MpiImpl()
return "";
}
+string MpiImpl_SLURM::name()
+{
+ return "slurm";
+}
+
// prun implementation
// Constructor
MpiImpl_PRUN::MpiImpl_PRUN() : MpiImpl()
{
return "";
}
+
+string MpiImpl_PRUN::name()
+{
+ return "prun";
+}
virtual std::string boot(const std::string machinefile, const unsigned int nbnodes) = 0; // get boot command
virtual std::string run(const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute) = 0; // get run command
virtual std::string halt() = 0; // get stop command
+ virtual std::string name() = 0; // name of mpi implementation
protected:
std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
std::string halt(); // get stop command
+ std::string name(); // name of mpi implementation
protected:
std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
std::string halt(); // get stop command
+ std::string name(); // name of mpi implementation
protected:
std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
std::string halt(); // get stop command
+ std::string name(); // name of mpi implementation
protected:
std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
std::string halt(); // get stop command
+ std::string name(); // name of mpi implementation
protected:
std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
std::string halt(); // get stop command
+ std::string name(); // name of mpi implementation
protected:
std::string boot( const std::string machinefile, const unsigned int nbnodes); // get boot command
std::string run( const std::string machinefile, const unsigned int nbproc, const std::string fileNameToExecute); // get run command
std::string halt(); // get stop command
+ std::string name(); // name of mpi implementation
protected:
string logFile = generateTemporaryFileName("SGE-submitlog");
// define command to submit batch
- string subCommand = string("cd ") + workDir + "; qsub " + fileNameToExecute + "_Batch.sh";
+ string subCommand = string("bash -l -c \"cd ") + workDir + "; qsub " + fileNameToExecute + "_Batch.sh\"";
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " > ";
command += logFile;
iss >> ref;
// define command to delete batch
- string subCommand = string("qdel ") + iss.str();
+ string subCommand = string("bash -l -c \"qdel ") + iss.str() + string("\"");
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
cerr << command.c_str() << endl;
status = system(command.c_str());
string logFile = generateTemporaryFileName(string("SGE-querylog-id") + jobid.getReference());
// define command to query batch
- string subCommand = string("qstat | grep ") + iss.str();
+ string subCommand = string("bash -l -c \"qstat | grep ") + iss.str() + string("\"");
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " > ";
command += logFile;
tempOutputFile << "#! /bin/sh -f" << endl;
if (queue != "")
tempOutputFile << "#$ -q " << queue << endl;
- tempOutputFile << "#$ -pe mpich " << nbproc << endl;
+ tempOutputFile << "#$ -pe " << _mpiImpl->name() << " " << nbproc << endl;
if( edt > 0 )
tempOutputFile << "#$ -l h_rt=" << getWallTime(edt) << endl ;
if( mem > 0 )