correct date in in "Simfactory Done" message

Create issue
Issue #2458 resolved
Roland Haas created an issue

At the end of (every) *.out file simfactory currently outputs:

Mon Jan 20 09:34:59 CST 2020
Simfactory Done at date: 0

where the first is the date as produced by the date command and the 0 in the second line is date's exit code. This is due to this Python code

display("Simfactory Done at date: %s" % simenv.system("date")) # This is wrong because system doesn't return the command output

(comment present in source code).

Pull request https://bitbucket.org/simfactory/simfactory2/pull-requests/44/fix-incorrect-use-of-system-date fixes this.

Comments (11)

  1. Roland Haas reporter

    Note that this might change how code that tries to find the end time has to parse output files since this bug (and the comment) have existed since git hash 65d9b5d "show-output has been added" of simfactory2 about 10 years ago and @Ian Hinder pointed that it is wrong in git hash 5b28622 "Add more comments and function documentation" of simfactory2 about 9 years ago.

  2. Bill Gabella

    Testing on my laptop, with Pull Request changes and with the gcc 10 patches. I see the done timestamp when…

    • sim create-run helloworld gives the right timestamp.

      ``` INFO (HelloWorld): Hello World!

      Done. + echo Stopping: + date Stopping: Fri 11 Sep 2020 10:29:07 AM CDT + echo Done. Done. Simfactory Done at date: Fri 11 Sep 2020 10:29:07 AM CDT ```

    • sim create-submit the poisson gallery example, which fails (unable to allocate some memory) BUT prints out the date-time correctly.

      ``` -> Refusing to allocate 60840728 bytes (60.841 MB) of memory for type CCTK_REAL8. 12230150056 bytes (12230.150 MB) are currently allocated in 1311 objects. The parameter file specifies a maximum of 12288 MB Simfactory Done at date: Fri 11 Sep 2020 11:06:25 AM CDT

      ```

    • sim create-submit the tov gallery finished successfully and the tail tov_gal.out shows

      ```

      128000 1000.000 | 0.6648458 0.9974485 | 1.000000e-10 0.0012855 INFO (Carpet): Terminating due to cctk_final_time at t = 1000.000000


      Done. Stopping: Fri 11 Sep 2020 12:09:44 PM CDT Done. Simfactory Done at date: Fri 11 Sep 2020 12:09:44 PM CDT ```

  3. Log in to comment