28 |
C == Global variables == |
C == Global variables == |
29 |
#include "SIZE.h" |
#include "SIZE.h" |
30 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
|
#include "EESUPPORT.h" |
|
31 |
|
|
32 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
33 |
C errFlag :: stop if this logical flag is true |
C errFlag :: stop if this logical flag is true |
47 |
C errCount :: error counter |
C errCount :: error counter |
48 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
49 |
INTEGER errCount |
INTEGER errCount |
|
#ifdef ALLOW_USE_MPI |
|
|
C mpiRC :: Error code reporting variable used with MPI. |
|
|
INTEGER mpiRC |
|
|
#endif /* ALLOW_USE_MPI */ |
|
50 |
|
|
51 |
C-- Collect error from all Threads and Procs |
C-- Collect error from all Threads and Procs |
52 |
errCount = 0 |
errCount = 0 |
62 |
& 'occurs', errCount, ' time(s) among all Threads and Procs' |
& 'occurs', errCount, ' time(s) among all Threads and Procs' |
63 |
CALL PRINT_ERROR( msgBuf, myThid ) |
CALL PRINT_ERROR( msgBuf, myThid ) |
64 |
C-- Finishes |
C-- Finishes |
65 |
eeEndError = .TRUE. |
CALL ALL_PROC_DIE( myThid ) |
|
fatalError = .TRUE. |
|
|
#ifdef ALLOW_USE_MPI |
|
|
#ifndef ALWAYS_USE_MPI |
|
|
IF ( usingMPI ) THEN |
|
|
#endif |
|
|
CALL MPI_FINALIZE ( mpiRC ) |
|
|
IF ( mpiRC .NE. MPI_SUCCESS ) THEN |
|
|
WRITE(msgBuf,'(A,I5)') |
|
|
& 'S/R FIN_PROCS: MPI_FINALIZE return code', mpiRC |
|
|
CALL PRINT_ERROR( msgBuf, myThid ) |
|
|
ENDIF |
|
|
#ifndef ALWAYS_USE_MPI |
|
|
ENDIF |
|
|
#endif |
|
|
#endif /* ALLOW_USE_MPI */ |
|
66 |
STOP 'ABNORMAL END: S/R STOP_IF_ERROR' |
STOP 'ABNORMAL END: S/R STOP_IF_ERROR' |
67 |
ENDIF |
ENDIF |
68 |
|
|