const std::string dirForTmpFiles = params[TMPDIR];
const string fileToExecute = params[EXECUTABLE];
const string home = params[HOMEDIR];
+ const std::string queue = params[QUEUE];
std::string rootNameToExecute;
std::string fileNameToExecute;
std::string filelogtemp;
tempOutputFile.open(TmpFileName.c_str(), ofstream::out );
tempOutputFile << "#! /bin/sh -f" << endl ;
+ if (queue != "")
+ tempOutputFile << "#BSUB -q " << queue << endl;
if( edt > 0 )
tempOutputFile << "#BSUB -W " << getWallTime(edt) << endl ;
if( mem > 0 )
const std::string dirForTmpFiles = params[TMPDIR];
const string fileToExecute = params[EXECUTABLE];
const string home = params[HOMEDIR];
+ const std::string queue = params[QUEUE];
std::string rootNameToExecute;
std::string fileNameToExecute;
std::string filelogtemp;
tempOutputFile.open(TmpFileName.c_str(), ofstream::out );
tempOutputFile << "#! /bin/sh -f" << endl;
+ if (queue != "")
+ tempOutputFile << "#BSUB -q " << queue << endl;
if( edt > 0 )
tempOutputFile << "#PBS -l walltime=" << edt*60 << endl ;
if( mem > 0 )
param[MAXWALLTIME] = getWallTime(batch_params.expected_during_time);
param[MAXRAMSIZE] = getRamSize(batch_params.mem);
param[HOMEDIR] = getHomeDir(p, tmpdir);
+ param[QUEUE] = p.batchQueue;
Batch::Environnement env;
tempOutputFile << dirForTmpFiles ;
tempOutputFile << ":$PYTHONPATH" << endl ;
+ // Adding user script
+ std::string script = params.userCommands;
+ if (script != "")
+ tempOutputFile << script << endl;
// Test node rank
tempOutputFile << "if test \"" ;
tempOutputFile << mpiImpl->rank() ;
test_cpu_freq_mhz = "CPUFreqMHz";
test_nb_of_nodes = "nbOfNodes";
test_nb_of_proc_per_node = "nbOfProcPerNode";
+ test_batch_queue = "batchQueue";
+ test_user_commands = "userCommands";
}
//=============================================================================
else
_resource.Alias = "";
+ if (xmlHasProp(aCurNode, (const xmlChar*)test_batch_queue))
+ {
+ xmlChar* batch_queue = xmlGetProp(aCurNode, (const xmlChar*)test_batch_queue);
+ _resource.batchQueue = (const char*)batch_queue;
+ xmlFree(batch_queue);
+ }
+ else
+ _resource.batchQueue = "";
+
+ if (xmlHasProp(aCurNode, (const xmlChar*)test_user_commands))
+ {
+ xmlChar* user_commands= xmlGetProp(aCurNode, (const xmlChar*)test_user_commands);
+ _resource.userCommands = (const char*)user_commands;
+ xmlFree(user_commands);
+ }
+ else
+ _resource.userCommands = "";
+
if (xmlHasProp(aCurNode, (const xmlChar*)test_protocol))
{
xmlChar* protocol= xmlGetProp(aCurNode, (const xmlChar*)test_protocol);
node = xmlNewChild(root_node, NULL, BAD_CAST test_machine, NULL);
xmlNewProp(node, BAD_CAST test_hostname, BAD_CAST (*iter).second.HostName.c_str());
xmlNewProp(node, BAD_CAST test_alias, BAD_CAST (*iter).second.Alias.c_str());
-
+ xmlNewProp(node, BAD_CAST test_batch_queue, BAD_CAST (*iter).second.batchQueue.c_str());
+ xmlNewProp(node, BAD_CAST test_user_commands, BAD_CAST (*iter).second.userCommands.c_str());
+
switch ((*iter).second.Protocol)
{
case rsh:
const char *test_cpu_freq_mhz;
const char *test_nb_of_nodes;
const char *test_nb_of_proc_per_node;
+ const char *test_batch_queue;
+ const char *test_user_commands;
};
"UserName : " << UserName << endl <<
"AppliPath : " << AppliPath << endl <<
"OS : " << OS << endl <<
+ "batchQueue : " << batchQueue << endl <<
+ "userCommands : " << userCommands << endl <<
"Modules : " << endl;
for(int i=0;i<ModulesList.size();i++)
mpi = nompi;
UserName = "";
AppliPath = "";
+ batchQueue = "";
+ userCommands = "";
ModulesList.clear();
OS = "";
}
std::string AppliPath;
std::vector<std::string> ModulesList;
std::string OS;
+ std::string batchQueue;
+ std::string userCommands;
void Print() const;
void Clear();