Ignore:
Timestamp:
2014-04-28T14:09:03+02:00 (7 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/OOO_SRC/nemogcm.F90

    r4319 r4624  
    141141      CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    142142      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    143       CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 ) 
    144143      ! 
    145144      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark 
     
    150149      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    151150902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    152       WRITE( numond, namctl ) 
    153151 
    154152      ! 
     
    160158      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    161159904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
    162       WRITE( numond, namcfg ) 
    163160 
    164161      !                             !--------------------------------------------! 
    165162      !                             !  set communicator & select the local node  ! 
     163      !                             !  NB: mynode also opens output.namelist.dyn ! 
     164      !                             !      on unit number numond on first proc   ! 
    166165      !                             !--------------------------------------------! 
    167166#if defined key_iomput 
     
    174173# endif 
    175174      ENDIF 
    176       narea = mynode( cltxt, numnam, nstop, ilocal_comm )   ! Nodes selection 
     175      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection 
    177176#else 
    178177# if defined key_oasis3 || defined key_oasis4 
     
    180179         CALL cpl_prism_init( ilocal_comm )                 ! nemo local communicator given by oasis 
    181180      ENDIF 
    182       narea = mynode( cltxt, numnam, nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt) 
     181      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt) 
    183182# else 
    184183      ilocal_comm = 0 
    185       narea = mynode( cltxt, numnam, nstop )                 ! Nodes selection (control print return in cltxt) 
     184      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt) 
    186185# endif 
    187186#endif 
    188187      narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 ) 
    189188 
     189      lwm = (narea == 1)                                    ! control of output namelists 
    190190      lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print 
     191 
     192      IF(lwm) THEN 
     193         ! write merged namelists from earlier to output namelist now that the 
     194         ! file has been opened in call to mynode. nammpp has already been 
     195         ! written in mynode (if lk_mpp_mpi) 
     196         WRITE( numond, namctl ) 
     197         WRITE( numond, namcfg ) 
     198      ENDIF 
    191199 
    192200      ! If dimensions of processor grid weren't specified in the namelist file 
Note: See TracChangeset for help on using the changeset viewer.