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 4624 for trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2014-04-28T14:09:03+02:00 (10 years ago)
Author:
acc
Message:

#1305. Fix slow start-up problems on some systems by introducing and using lwm logical to restrict output of merged namelists to the first (or only) processor. lwm is true only on the first processor regardless of ln_ctl. Small changes to all flavours of nemogcm.F90 are also required to write namctl and namcfg after the call to mynode which now opens output.namelist.dyn and writes nammpp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90

    r4328 r4624  
    170170      INTEGER                      , INTENT(in   ) ::   kumnam_ref     ! logical unit for reference namelist 
    171171      INTEGER                      , INTENT(in   ) ::   kumnam_cfg     ! logical unit for configuration namelist 
    172       INTEGER                      , INTENT(in   ) ::   kumond         ! logical unit for namelist output 
     172      INTEGER                      , INTENT(inout) ::   kumond         ! logical unit for namelist output 
    173173      INTEGER                      , INTENT(inout) ::   kstop          ! stop indicator 
    174174      INTEGER, OPTIONAL            , INTENT(in   ) ::   localComm 
     
    193193      READ  ( kumnam_cfg, nammpp, IOSTAT = ios, ERR = 902 ) 
    194194902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nammpp in configuration namelist', lwp ) 
    195       WRITE(kumond, nammpp)       
    196195 
    197196      !                              ! control print 
     
    293292      CALL mpi_comm_size( mpi_comm_opa, mppsize, ierr ) 
    294293      mynode = mpprank 
     294 
     295      IF( mynode == 0 ) THEN 
     296        CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
     297        WRITE(kumond, nammpp)       
     298      ENDIF 
    295299      ! 
    296300      CALL MPI_OP_CREATE(DDPDD_MPI, .TRUE., MPI_SUMDD, ierr) 
     
    29242928      IF( PRESENT( localComm ) .OR. .NOT.PRESENT( localComm ) )   function_value = 0 
    29252929      IF( .FALSE. )   ldtxt(:) = 'never done' 
     2930      CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    29262931   END FUNCTION mynode 
    29272932 
Note: See TracChangeset for help on using the changeset viewer.