Skip to content

Commit 9938cbf

Browse files
andyclaude
andcommitted
eccejobstore: restartFlag was uninitialised, failing completed jobs
Reported as "MOPAC geovib + thermo leads to a monitor error". The job ran fine; storing its results died with Fatal eccejobstore: Cannot re-parse frequency 'last' type properties eccejobstore terminating abnormally, exit status 3 That message comes from initMon(), which only looks at the bookmark file when restartFlag is set. On a restart it finds the "EOF" bookmark the previous monitor wrote on normal completion and refuses, because a Frequency=last property cannot be recovered by re-reading from EOF. Correct behaviour -- for an actual restart. bool restartFlag; // never initialised ... else if (strcmp(argv[it], "-restart") == 0) restartFlag = true; Without -restart the flag kept whatever was on the stack, so an ordinary launch could be treated as a monitoring restart. Undefined behaviour that reads as an intermittent, code-agnostic "the job ran and produced nothing", since the job really has finished by then and only the storing of its properties fails. Initialised to false. Found while investigating the MOPAC work, but nothing about it is MOPAC-specific: any code's job could hit it, and whether it did depended on the stack. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
1 parent 06cc507 commit 9938cbf

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/apps/jobstore/eccejobstore.C‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ int main(int argc, char** argv)
3232
const string& configFileName, const bool& restartFlag);
3333

3434
string jobId, configFileName;
35-
bool restartFlag;
35+
// MUST be initialized. Without -restart this was whatever happened to
36+
// be on the stack, and a true reading makes jobstore_main() treat an
37+
// ordinary launch as a monitoring restart: it then reads the bookmark
38+
// file, finds "EOF" from the run that just finished, and dies with
39+
// "Cannot re-parse frequency 'last' type properties". The job itself
40+
// has completed fine at that point; only the storing of its results
41+
// fails, which presents as a job that ran and produced nothing.
42+
bool restartFlag = false;
3643

3744
for (int it = 1; it < argc; it++) {
3845
if (strcmp(argv[it], "-pipe") == 0)

0 commit comments

Comments
 (0)