#1689: Cactus should exit with a nonzero exit code if an error occurs --------------------+------------------------------------------------------- Reporter: hinder | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Keywords: | --------------------+------------------------------------------------------- In WarnLevel.c, in CCTK_VWarn (called by CCTK_Warn), it says
if (level <= error_level) { CCTK_Abort (NULL, 0); }
The second argument to CCTK_Abort is the exit code of the process. So if there is an "error" warning, the process exits with 0 exit code; i.e. success! This happens in several places in this file.
The user guide does not say anything about the exit code of Cactus. I think that if Cactus has a level-0 warning, i.e. an error, then it should exit with a non-zero exit code, and Erik agrees.
See http://lists.einsteintoolkit.org/pipermail/users/2014-November/003878.html
#1689: Cactus should exit with a nonzero exit code if an error occurs ---------------------+------------------------------------------------------ Reporter: hinder | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by rhaas):
Fine with me.
#1689: Cactus should exit with a nonzero exit code if an error occurs ---------------------+------------------------------------------------------ Reporter: hinder | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------
Comment (by knarf):
Fine with me too. Related: even if Cactus exits with non-zero, this might not be handed correctly down to the runscript. We should think about letting Cactus indicate a successful exit by writing a special file. Any crash or other unsuccessful exit would not generate this file, and it would be easy to check for the existence of that file - easier than for an exit code, routed through mpirun and possibly other helper scripts on various machines.
#1689: Cactus should exit with a nonzero exit code if an error occurs ---------------------+------------------------------------------------------ Reporter: hinder | Owner: Type: defect | Status: confirmed Priority: major | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by hinder):
* priority: minor => major * status: new => confirmed
Comment:
Setting priority to major due to potential impact on the test system, and causing tests to appear to have passed when in fact there were fatal errors.
#1689: Cactus should exit with a nonzero exit code if an error occurs ---------------------+------------------------------------------------------ Reporter: hinder | Owner: Type: defect | Status: closed Priority: major | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by hinder):
* status: confirmed => closed * resolution: => fixed
Comment:
Implemented in [[https://bitbucket.org/cactuscode/cactus/commits/1cde3115d3c00ffee89e2b605ed8... | 1cde3115]]. Note that CCTK_Abort ignores this if asserts are enabled, as it just triggers an assert, so this change should have no effect on the operation of the system in most cases.
trac@lists.einsteintoolkit.org