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 15204 for NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2_spmd/src/OCE/nemogcm.F90 – NEMO

Ignore:
Timestamp:
2021-08-25T20:27:59+02:00 (3 years ago)
Author:
vsmart
Message:

Use variable to control MPI initialisation/finalisation rather than cpp key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.1_NGMS_couple_stage2_spmd/src/OCE/nemogcm.F90

    r14668 r15204  
    311311#endif 
    312312      ! 
    313 #if !defined key_spmd 
    314       IF(lwm) THEN 
    315          IF( nstop == 0 ) THEN    
    316                 STOP 0 
    317          ELSE         
    318                 STOP 123 
     313      IF (.NOT. mpi_pre_initialised) THEN 
     314         IF(lwm) THEN 
     315            IF( nstop == 0 ) THEN    
     316                  STOP 0 
     317            ELSE         
     318                  STOP 123 
     319            ENDIF 
    319320         ENDIF 
    320321      ENDIF 
    321 #endif 
    322322      ! 
    323323   END SUBROUTINE nemo_gcm_finalise 
     
    345345      !                             !-------------------------------------------------! 
    346346      ! 
     347      CALL set_mpi_pre_initialised() 
    347348#if defined key_iomput 
    348349!      IF( Agrif_Root() ) THEN 
     
    356357! RSRH simplify initialisaton for test 
    357358      IF( lk_oasis ) THEN 
    358 #if !defined key_spmd 
    359           CALL mpi_init(nerror) 
    360 #endif 
     359          IF (.NOT. mpi_pre_initialised) THEN 
     360              CALL mpi_init(nerror) 
     361          ENDIF 
    361362          CALL oasis_init_comp ( ncomp_id, "toyoce", nerror, .TRUE. ) 
    362363!          CALL cpl_init( "toyoce", ilocal_comm )  
Note: See TracChangeset for help on using the changeset viewer.