gdcarver / openifs

Instructions and code for controlling ECMWF OpenIFS application in climateprediction.net (CPDN)
Apache License 2.0
0 stars 0 forks source link

Task works correctly but registered as fail with 9 (0x00000009) Unknown error code? #22

Closed gdcarver closed 1 year ago

gdcarver commented 1 year ago

See this task: https://www.cpdn.org/result.php?resultid=22303620

From the stderr.txt, everything worked as it should have:

===-=== END   OF TIMING STATISTICS ===-===
FORECAST DAYS PER DAY      278.2
  *** END CNT0 *** 
------------------------------------------------
Moving to projects directory: /var/lib/boinc-client/slots/0/ICMGGhq0f+002952
Moving to projects directory: /var/lib/boinc-client/slots/0/ICMSHhq0f+002952
Moving to projects directory: /var/lib/boinc-client/slots/0/ICMUAhq0f+002952
Adding to the zip: /var/lib/boinc-client/slots/0/NODE.001_01
Adding to the zip: /var/lib/boinc-client/slots/0/ifs.stat
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMSHhq0f+002952
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMGGhq0f+002952
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMGGhq0f+002928
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMSHhq0f+002940
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMUAhq0f+002952
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMUAhq0f+002940
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMSHhq0f+002928
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMGGhq0f+002940
Adding to the zip: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_12201255/ICMUAhq0f+002928
Zipping up the final file: /var/lib/boinc-client/projects/climateprediction.net/oifs_43r3_ps_0611_2015050100_123_984_12201255_1_r1389536741_122.zip
Uploading the final file: upload_file_122.zip
Uploading trickle at timestep: 10623600
05:48:37 (214734): called boinc_finish(0)

</stderr_txt>
]]>

and yet for some odd reason, the task was considered a fail:

<core_client_version>7.18.1</core_client_version>
<![CDATA[
<message>
process exited with code 9 (0x9, -247)</message>

What caused the fail?

gdcarver commented 1 year ago

One possible explanation is the use of the exit() call after the boinc_finish() in the control code. exit() behaves differently in C++ than C, it does not guarantee closing all files nor releasing local objects. It's possible(?) this might be generating the error codes reported by the client.

exit() call removed, control code now calls return().

Close for now. If it recurs, either reopen or create new issue linking to this one.