Skip to content
Snippets Groups Projects
Commit fa321c14 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fix missing return in SlurmWrapper

parent 55856098
No related branches found
No related tags found
No related merge requests found
......@@ -13,19 +13,21 @@
// LCOV_EXCL_START
class SlurmWrapper
{
private:
private:
int m_slurm_job_id = -1;
public:
bool mustStop() const
public:
bool
mustStop() const
{
if (m_slurm_job_id == -1) {
false;
return false;
} else {
return slurm_get_rem_time(m_slurm_job_id) < 150;
}
}
SlurmWrapper()
{
char* env = getenv("SLURM_JOB_ID");
......@@ -62,7 +64,7 @@ stop()
stop = elapse_time > stop_file_age;
}
#ifdef PUGS_HAS_SLURM
#ifdef PUGS_HAS_SLURM
// LCOV_EXCL_START
static SlurmWrapper slurm_wrapper;
if (slurm_wrapper.mustStop()) {
......@@ -71,7 +73,6 @@ stop()
// LCOV_EXCL_STOP
#endif // PUGS_HAS_SLURM
}
parallel::broadcast(stop, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment