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.
Changeset 13011 for NEMO – NEMO

Changeset 13011 for NEMO


Ignore:
Timestamp:
2020-06-03T09:56:28+02:00 (4 years ago)
Author:
smasson
Message:

trunk: make sure error messages are visible, see #2418

Location:
NEMO/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/LBC/lib_mpp.F90

    r13009 r13011  
    11141114      ! 
    11151115      CHARACTER(LEN=8) ::   clfmt            ! writing format 
    1116       INTEGER ::   inum 
    1117       INTEGER ::   idg  ! number of digits 
     1116      INTEGER          ::   inum 
    11181117      !!---------------------------------------------------------------------- 
    11191118      ! 
    11201119      nstop = nstop + 1 
    11211120      ! 
    1122       IF( numout == 6 ) THEN                          ! force to open ocean.output file if not already opened 
    1123          CALL ctl_opn( numout, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    1124       ELSE 
    1125          IF( narea > 1 .AND. cd1 == 'STOP' ) THEN     ! add an error message in ocean.output 
    1126             CALL ctl_opn( inum,'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    1127             WRITE(inum,*) 
    1128             idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 )        ! how many digits to we need to write? min=4, max=9 
    1129             WRITE(clfmt, "('(a,i', i1, '.', i1, ')')") idg, idg            ! '(a,ix.x)' 
    1130             WRITE(inum,clfmt) ' ===>>> : see E R R O R in ocean.output_', narea - 1 
    1131          ENDIF 
     1121      IF( cd1 == 'STOP' .AND. narea /= 1 ) THEN    ! Immediate stop: add an arror message in 'ocean.output' file 
     1122         CALL ctl_opn( inum, 'ocean.output', 'APPEND', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
     1123         WRITE(inum,*) 
     1124         WRITE(inum,*) ' ==>>>   Look for "E R R O R" messages in all existing *ocean.output* files' 
     1125         CLOSE(inum) 
     1126      ENDIF 
     1127      IF( numout == 6 ) THEN                       ! force to open ocean.output file if not already opened 
     1128         CALL ctl_opn( numout, 'ocean.output', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, -1, .FALSE., narea ) 
    11321129      ENDIF 
    11331130      ! 
  • NEMO/trunk/src/OCE/nemogcm.F90

    r12933 r13011  
    232232         IF( ngrdstop > 0 ) THEN 
    233233            WRITE(ctmp9,'(i2)') ngrdstop 
    234             WRITE(ctmp2,*) '      ==>>>   Error detected in Agrif grid '//TRIM(ctmp9) 
    235             WRITE(ctmp3,*) '      ==>>>   look for error messages in '//TRIM(ctmp9)//'_ocean_output* files' 
    236             CALL ctl_stop( ctmp1, ctmp2, ctmp3 ) 
     234            WRITE(ctmp2,*) '           E R R O R detected in Agrif grid '//TRIM(ctmp9) 
     235            WRITE(ctmp3,*) '           Look for "E R R O R" messages in all existing '//TRIM(ctmp9)//'_ocean_output* files' 
     236            CALL ctl_stop( ' ', ctmp1, ' ', ctmp2, ' ', ctmp3 ) 
    237237         ELSE 
    238             CALL ctl_stop( ctmp1 ) 
     238            WRITE(ctmp2,*) '           Look for "E R R O R" messages in all existing ocean_output* files' 
     239            CALL ctl_stop( ' ', ctmp1, ' ', ctmp2 ) 
    239240         ENDIF 
    240241      ENDIF 
     
    249250#else 
    250251      IF    ( lk_oasis ) THEN   ;   CALL cpl_finalize   ! end coupling and mpp communications with OASIS 
    251       ELSEIF( lk_mpp   ) THEN   ;   CALL mppstop      ! end mpp communications 
     252      ELSEIF( lk_mpp   ) THEN   ;   CALL mppstop        ! end mpp communications 
    252253      ENDIF 
    253254#endif 
  • NEMO/trunk/src/OFF/nemogcm.F90

    r12933 r13011  
    147147      IF( nstop /= 0 .AND. lwp ) THEN                 ! error print 
    148148         WRITE(ctmp1,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found' 
    149          CALL ctl_stop( ctmp1 ) 
     149         WRITE(ctmp2,*) '           Look for "E R R O R" messages in all existing ocean_output* files' 
     150         CALL ctl_stop( ' ', ctmp1, ' ', ctmp2 ) 
    150151      ENDIF 
    151152      ! 
  • NEMO/trunk/src/SAS/nemogcm.F90

    r12933 r13011  
    162162         IF( ngrdstop > 0 ) THEN 
    163163            WRITE(ctmp9,'(i2)') ngrdstop 
    164             WRITE(ctmp2,*) '      ==>>>   Error detected in Agrif grid '//TRIM(ctmp9) 
    165             WRITE(ctmp3,*) '      ==>>>   look for error messages in '//TRIM(ctmp9)//'_ocean_output* files' 
    166             CALL ctl_stop( ctmp1, ctmp2, ctmp3 ) 
     164            WRITE(ctmp2,*) '           E R R O R detected in Agrif grid '//TRIM(ctmp9) 
     165            WRITE(ctmp3,*) '           Look for "E R R O R" messages in all existing '//TRIM(ctmp9)//'_ocean_output* files' 
     166            CALL ctl_stop( ' ', ctmp1, ' ', ctmp2, ' ', ctmp3 ) 
    167167         ELSE 
    168             CALL ctl_stop( ctmp1 ) 
     168            WRITE(ctmp2,*) '           Look for "E R R O R" messages in all existing ocean_output* files' 
     169            CALL ctl_stop( ' ', ctmp1, ' ', ctmp2 ) 
    169170         ENDIF 
    170171      ENDIF 
  • NEMO/trunk/tests/STATION_ASF/MY_SRC/nemogcm.F90

    r12933 r13011  
    100100      IF( nstop /= 0 .AND. lwp ) THEN        ! error print 
    101101         WRITE(ctmp1,*) '   ==>>>   nemo_gcm: a total of ', nstop, ' errors have been found' 
    102          CALL ctl_stop( ctmp1 ) 
     102         WRITE(ctmp2,*) '           Look for "E R R O R" messages in all existing ocean_output* files' 
     103         CALL ctl_stop( ' ', ctmp1, ' ', ctmp2 ) 
    103104      ENDIF 
    104105      ! 
Note: See TracChangeset for help on using the changeset viewer.