Salome HOME
projects
/
tools
/
libbatch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f3403f9
)
Fix bug with WallTime in OAR (minutes instead of seconds)
V2_0_0
V2_0_0b1
V2_0_0rc1
author
barate
<barate>
Wed, 3 Apr 2013 08:06:39 +0000
(08:06 +0000)
committer
barate
<barate>
Wed, 3 Apr 2013 08:06:39 +0000
(08:06 +0000)
src/COORM/BatchManager_COORM.cxx
patch
|
blob
|
history
src/COORM/BatchManager_COORM.hxx
patch
|
blob
|
history
src/OAR/BatchManager_OAR.cxx
patch
|
blob
|
history
src/OAR/BatchManager_OAR.hxx
patch
|
blob
|
history
diff --git
a/src/COORM/BatchManager_COORM.cxx
b/src/COORM/BatchManager_COORM.cxx
index 9e50e5be96a3d3d4cdb371a88786324034c2da05..7873bc98c6b966e6cc0d2e3a2978db70fcd3edcd 100644
(file)
--- a/
src/COORM/BatchManager_COORM.cxx
+++ b/
src/COORM/BatchManager_COORM.cxx
@@
-224,18
+224,6
@@
namespace Batch
return remoteFileName;
}
return remoteFileName;
}
- const string BatchManager_COORM::convertSecTo_H_M_S(const long seconds)
- {
- int h(seconds / 3600);
- int m((seconds % 3600) / 60);
- int s((seconds % 3600) % 60);
-
- stringstream ss;
- ss << h << ":" << m << ":" << s;
-
- return ss.str();
- }
-
void BatchManager_COORM::exportInputFiles(const Job & job)
{
BatchManager::exportInputFiles(job);
void BatchManager_COORM::exportInputFiles(const Job & job)
{
BatchManager::exportInputFiles(job);
diff --git
a/src/COORM/BatchManager_COORM.hxx
b/src/COORM/BatchManager_COORM.hxx
index 33790b2c6a96bdf8125aa964875e445a986aabbc..037eaf3ddad09eda11e8bb15d03ab94b660f18e3 100644
(file)
--- a/
src/COORM/BatchManager_COORM.hxx
+++ b/
src/COORM/BatchManager_COORM.hxx
@@
-56,7
+56,6
@@
namespace Batch
protected:
std::string buildBatchScript(const Job & job);
protected:
std::string buildBatchScript(const Job & job);
- const std::string convertSecTo_H_M_S(const long seconds);
void exportInputFiles(const Job & job);
#ifdef SWIG
void exportInputFiles(const Job & job);
#ifdef SWIG
diff --git
a/src/OAR/BatchManager_OAR.cxx
b/src/OAR/BatchManager_OAR.cxx
index 5c050a92c915a05273441cbcce6a945522e5b96e..6b28be0a1a2c7708f39443281612a4dc22a81e92 100644
(file)
--- a/
src/OAR/BatchManager_OAR.cxx
+++ b/
src/OAR/BatchManager_OAR.cxx
@@
-134,7
+134,6
@@
namespace Batch
string fileToExecute = "";
string tmpDir = "";
int nbproc = 0;
string fileToExecute = "";
string tmpDir = "";
int nbproc = 0;
- int edt = 0;
int mem = 0;
string queue = "";
int mem = 0;
string queue = "";
@@
-154,8
+153,9
@@
namespace Batch
int nbprocpernode = 1;
if (params.find(NBPROCPERNODE) != params.end())
nbprocpernode = params[NBPROCPERNODE];
int nbprocpernode = 1;
if (params.find(NBPROCPERNODE) != params.end())
nbprocpernode = params[NBPROCPERNODE];
+ long walltimeSecs = 0;
if (params.find(MAXWALLTIME) != params.end())
if (params.find(MAXWALLTIME) != params.end())
-
edt = params[MAXWALLTIME]
;
+
walltimeSecs = (long)params[MAXWALLTIME] * 60
;
if (params.find(MAXRAMSIZE) != params.end())
mem = params[MAXRAMSIZE];
if (params.find(QUEUE) != params.end())
if (params.find(MAXRAMSIZE) != params.end())
mem = params[MAXRAMSIZE];
if (params.find(QUEUE) != params.end())
@@
-191,9
+191,9
@@
namespace Batch
if (nb_full_nodes > 0)
{
tempOutputFile << "#OAR -l nodes=" << nb_full_nodes;
if (nb_full_nodes > 0)
{
tempOutputFile << "#OAR -l nodes=" << nb_full_nodes;
- if (
edt
> 0)
+ if (
walltimeSecs
> 0)
{
{
- tempOutputFile << ",walltime=" << convertSecTo_H_M_S(
edt
) << endl;
+ tempOutputFile << ",walltime=" << convertSecTo_H_M_S(
walltimeSecs
) << endl;
}
else
{
}
else
{
@@
-202,9
+202,9
@@
namespace Batch
}
else
{
}
else
{
- if (
edt
> 0)
+ if (
walltimeSecs
> 0)
{
{
- tempOutputFile << "#OAR -l walltime=" << convertSecTo_H_M_S(
edt
) << endl;
+ tempOutputFile << "#OAR -l walltime=" << convertSecTo_H_M_S(
walltimeSecs
) << endl;
}
}
}
}
@@
-237,7
+237,7
@@
namespace Batch
return remoteFileName;
}
return remoteFileName;
}
- const string BatchManager_OAR::convertSecTo_H_M_S(const long seconds)
+ string BatchManager_OAR::convertSecTo_H_M_S(long seconds) const
{
int h(seconds / 3600);
int m((seconds % 3600) / 60);
{
int h(seconds / 3600);
int m((seconds % 3600) / 60);
diff --git
a/src/OAR/BatchManager_OAR.hxx
b/src/OAR/BatchManager_OAR.hxx
index eef325bcb3400585410556e8acdf47f55272b816..482a4e562127a7e3e2b90dee215917c7c8ab264a 100644
(file)
--- a/
src/OAR/BatchManager_OAR.hxx
+++ b/
src/OAR/BatchManager_OAR.hxx
@@
-56,7
+56,7
@@
namespace Batch
protected:
std::string buildBatchScript(const Job & job);
protected:
std::string buildBatchScript(const Job & job);
-
const std::string convertSecTo_H_M_S(const long seconds)
;
+
std::string convertSecTo_H_M_S(long seconds) const
;
#ifdef SWIG
public:
#ifdef SWIG
public: