Salome HOME
projects
/
tools
/
libbatch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major refactoring in classes Versatile, Parametre and Swig wrappings.
[tools/libbatch.git]
/
src
/
PBS
/
Test
/
Test_ePBS.cxx
diff --git
a/src/PBS/Test/Test_ePBS.cxx
b/src/PBS/Test/Test_ePBS.cxx
index e6da684fb531c184acd9a94b27ca45bbb7d3a5cd..1040faae9374eec5b416cf263acb17e71c30f771 100644
(file)
--- a/
src/PBS/Test/Test_ePBS.cxx
+++ b/
src/PBS/Test/Test_ePBS.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
0
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
1
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-31,6
+31,7
@@
#include <fstream>
#include <cstring>
#include <fstream>
#include <cstring>
+#include <Batch_Constants.hxx>
#include <Batch_Job.hxx>
#include <Batch_BatchManagerCatalog.hxx>
#include <Batch_FactBatchManager.hxx>
#include <Batch_Job.hxx>
#include <Batch_BatchManagerCatalog.hxx>
#include <Batch_FactBatchManager.hxx>
@@
-96,10
+97,9
@@
int main(int argc, char** argv)
p[INFILE] += Couple("setb.sh", "tmp/Batch/setb.sh");
p[OUTFILE] = Couple("result.txt", "tmp/Batch/result.txt");
p[TMPDIR] = "tmp/Batch/";
p[INFILE] += Couple("setb.sh", "tmp/Batch/setb.sh");
p[OUTFILE] = Couple("result.txt", "tmp/Batch/result.txt");
p[TMPDIR] = "tmp/Batch/";
- p[USER] = user;
p[NBPROC] = 1;
p[MAXWALLTIME] = 1;
p[NBPROC] = 1;
p[MAXWALLTIME] = 1;
- p[MAXRAMSIZE] = 1
000
;
+ p[MAXRAMSIZE] = 1;
p[HOMEDIR] = homedir;
p[QUEUE] = queue;
job.setParametre(p);
p[HOMEDIR] = homedir;
p[QUEUE] = queue;
job.setParametre(p);
@@
-114,7
+114,7
@@
int main(int argc, char** argv)
// Create a BatchManager of type ePBS on localhost
FactBatchManager_eClient * fbm = (FactBatchManager_eClient *)(c("ePBS"));
// Create a BatchManager of type ePBS on localhost
FactBatchManager_eClient * fbm = (FactBatchManager_eClient *)(c("ePBS"));
- BatchManager_eClient * bm = (*fbm)(host.c_str(),
protocol, "lam"
);
+ BatchManager_eClient * bm = (*fbm)(host.c_str(),
user.c_str(), protocol, "nompi", 8
);
// Submit the job to the BatchManager
JobId jobid = bm->submitJob(job);
// Submit the job to the BatchManager
JobId jobid = bm->submitJob(job);
@@
-125,7
+125,7
@@
int main(int argc, char** argv)
if (state == FINISHED || state == FAILED) {
cout << "Job " << jobid.__repr__() << " is done" << endl;
if (state == FINISHED || state == FAILED) {
cout << "Job " << jobid.__repr__() << " is done" << endl;
- bm->importOutputFiles(job, "
.
");
+ bm->importOutputFiles(job, "
resultdir/seconddirname
");
} else {
cerr << "Timeout while executing job" << endl;
return 1;
} else {
cerr << "Timeout while executing job" << endl;
return 1;
@@
-142,7
+142,7
@@
int main(int argc, char** argv)
// test the result file
try {
SimpleParser resultParser;
// test the result file
try {
SimpleParser resultParser;
- resultParser.parse("result.txt");
+ resultParser.parse("result
dir/seconddirname/result
.txt");
cout << "Result:" << endl << resultParser;
const string & envvar = resultParser.getValue("MYENVVAR");
int result = resultParser.getValueAsInt("c");
cout << "Result:" << endl << resultParser;
const string & envvar = resultParser.getValue("MYENVVAR");
int result = resultParser.getValueAsInt("c");