X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPBS%2FTest%2FTest_ePBS.cxx;h=1040faae9374eec5b416cf263acb17e71c30f771;hb=a58d413c34de0d83ba055c56b168ad0657e92a29;hp=e6da684fb531c184acd9a94b27ca45bbb7d3a5cd;hpb=7fc98d19755f2eb2eb46ec840ae786535131a799;p=tools%2Flibbatch.git diff --git a/src/PBS/Test/Test_ePBS.cxx b/src/PBS/Test/Test_ePBS.cxx index e6da684..1040faa 100644 --- a/src/PBS/Test/Test_ePBS.cxx +++ b/src/PBS/Test/Test_ePBS.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 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 @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -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[USER] = user; p[NBPROC] = 1; p[MAXWALLTIME] = 1; - p[MAXRAMSIZE] = 1000; + p[MAXRAMSIZE] = 1; 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")); - 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); @@ -125,7 +125,7 @@ int main(int argc, char** argv) 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; @@ -142,7 +142,7 @@ int main(int argc, char** argv) // test the result file try { SimpleParser resultParser; - resultParser.parse("result.txt"); + resultParser.parse("resultdir/seconddirname/result.txt"); cout << "Result:" << endl << resultParser; const string & envvar = resultParser.getValue("MYENVVAR"); int result = resultParser.getValueAsInt("c");