--- MITgcm/eesupp/src/eedie.F 1998/10/28 03:11:34 1.3 +++ MITgcm/eesupp/src/eedie.F 2003/01/20 03:05:54 1.6.14.1 @@ -1,6 +1,7 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/eesupp/src/eedie.F,v 1.3 1998/10/28 03:11:34 cnh Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/eesupp/src/eedie.F,v 1.6.14.1 2003/01/20 03:05:54 dimitri Exp $ +C $Name: $ -#include "CPP_EEOPTIONS.h" +#include "CPP_OPTIONS.h" CStartOfInterface SUBROUTINE EEDIE @@ -13,6 +14,7 @@ C | directives set so that no multi-processing is initialised| C | This is OK and should work fine. | C \==========================================================/ + IMPLICIT NONE C == Global variables == #include "SIZE.h" @@ -45,12 +47,12 @@ IF ( threadIsComplete(I) ) nThreadsDone = nThreadsDone+1 ENDDO IF ( nThreadsDone .LT. nThreads ) THEN - WRITE(msgBuf,'(A,I,A,I,A)') + WRITE(msgBuf,'(A,I5,A,I5,A)') & 'S/R EEDIE: Only ',nThreadsDone, & ' threads have completed, ',nThreads, & ' are expected for this configuration!' - WRITE(0,*) msgBuf - WRITE(0,*) + WRITE(*,*) msgBuf + WRITE(*,*) & 'Possibly you have different setenv PARALLEL and nThreads?' eeEndError = .TRUE. fatalError = .TRUE. @@ -63,16 +65,21 @@ #ifndef ALWAYS_USE_MPI IF ( usingMPI ) THEN #endif + +#if !defined(COUPLED_UCLA) || defined(COUPLED_DEBUG) + CALL MPI_FINALIZE ( mpiRC ) IF ( mpiRC .NE. MPI_SUCCESS ) THEN eeEndError = .TRUE. fatalError = .TRUE. - WRITE(msgBuf,'(A,I)') + WRITE(msgBuf,'(A,I5)') & 'S/R FIN_PROCS: MPI_FINALIZE return code', & mpiRC CALL PRINT_ERROR( msgBuf, 1 ) ENDIF -C + +#endif COUPLED_UCLA + #ifndef ALWAYS_USE_MPI ENDIF #endif