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/SAS_SRC – 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.

Location:
trunk/NEMOGCM/NEMO/SAS_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r4319 r4624  
    168168      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    169169      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    170       CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    171170      ! 
    172171      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     
    177176      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    178177902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    179       WRITE( numond, namctl ) 
    180178 
    181179      ! 
     
    187185      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    188186904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
    189       WRITE( numond, namcfg ) 
    190187 
    191188      !                             !--------------------------------------------! 
    192189      !                             !  set communicator & select the local node  ! 
     190      !                             !  NB: mynode also opens output.namelist.dyn ! 
     191      !                             !      on unit number numond on first proc   ! 
    193192      !                             !--------------------------------------------! 
    194193#if defined key_iomput 
     
    203202      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
    204203 
     204      lwm = (narea == 1)                                    ! control of output namelists 
    205205      lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
     206 
     207      IF(lwm) THEN 
     208         ! write merged namelists from earlier to output namelist now that the 
     209         ! file has been opened in call to mynode. nammpp has already been 
     210         ! written in mynode (if lk_mpp_mpi) 
     211         WRITE( numond, namctl ) 
     212         WRITE( numond, namcfg ) 
     213      ENDIF 
    206214 
    207215      ! If dimensions of processor grid weren't specified in the namelist file  
     
    405413      IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    406414      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
    407       IF( numond          /= -1 )   CLOSE( numond          )   ! oce output namelist 
     415      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist 
    408416      IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist 
    409417      IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist 
    410       IF( numoni          /= -1 )   CLOSE( numoni          )   ! ice output namelist 
     418      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist 
    411419      IF( numevo_ice      /= -1 )   CLOSE( numevo_ice  )   ! ice variables (temp. evolution) 
    412420      IF( numout          /=  6 )   CLOSE( numout      )   ! standard model output file 
  • trunk/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90

    r4186 r4624  
    150150      READ  ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 ) 
    151151902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist', lwp ) 
    152       WRITE ( numond, namsbc_sas ) 
     152      IF(lwm) WRITE ( numond, namsbc_sas ) 
    153153 
    154154      !                                         ! store namelist information in an array 
Note: See TracChangeset for help on using the changeset viewer.