New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#1460 (exit code for rebuild_nemo) – NEMO

Opened 9 years ago

Closed 8 years ago

Last modified 2 years ago

#1460 closed Enhancement (fixed)

exit code for rebuild_nemo

Reported by: hulten Owned by: mchekki
Priority: low Milestone: 2015 release-3.6
Component: tools Version: trunk
Severity: Keywords: 2015 Tools v3.6
Cc:

Description

When rebuild_nemo.exe exits on error, its error code (to the shell) is still 0.

$ rebuild_nemo *_diad_T 169
file PISCES_1y_00010101_00011231_diad_T,  num_domains 169, num_threads 1
 Rebuilding the following files:
 PISCES_1y_00010101_00011231_diad_T_0000.nc
...
 ERROR! : number of files to rebuild in file does not agree with namelist
 Attribute DOMAIN_number_total is :           16
 Number of files specified in namelist is:          169
$ echo $?
0

It is useful for in submission scripts if it here returns a value different from 0.

This can be implemented for every occurrence of STOP as

STOP 1

or some other number. No patch enclosed since it would be trivial, except of the choice of return values, which I leave to the programmer.

Commit History (2)

ChangesetAuthorTimeChangeLog
6415lovato2016-04-01T10:06:28+02:00

Update rebuild_nemo: include error exit code 9 (#1460) and zero fill of output arrays (#948)

6414lovato2016-04-01T10:06:07+02:00

Update rebuild_nemo: include error exit code 9 (#1460) and zero fill of output arrays (#948)

Change History (6)

comment:1 Changed 8 years ago by clevy

  • Owner changed from NEMO team to mchekki

comment:2 Changed 8 years ago by lovato

  • Resolution set to fixed
  • Status changed from new to closed

The rebuild_nemo tool was updated to include the error exit code 9
when code encounter some error, as suggested in the text above.

It was also included the zeroing of the output arrays as reported in #948.
Changes were applied to the rebuild tool but not to the rebuild_nemo one.

Changes were applied to nemo_v3_6_STABLE r6415 and the trunk at r6414

comment:3 Changed 8 years ago by nicolasmartin

  • Keywords 2015 nemo_v3_6* added

comment:4 Changed 6 years ago by nemo

  • Keywords release-3.6* added; nemo_v3_6* removed

comment:5 Changed 6 years ago by nemo

  • Keywords release-3.6 added; release-3.6* removed

comment:6 Changed 2 years ago by nemo

  • Keywords Tools v3.6 added; release-3.6 removed
Note: See TracTickets for help on using tickets.