[MITgcm-support] a ptracers_write_checkpoint synchronization question

Gus Correa gus at ldeo.columbia.edu
Wed Jan 25 16:00:37 EST 2006


Hello MITgcm Support

I am scratching my head to try to understand why the calls
to PTRACERS_WRITE_CHECKPOINT are done *after* the
_BARRIER synchronization in subroutine PACKAGES_WRITE_PICKUP_NOW.
See the code snippet below, from CVS checkpoint57y_post,
(It seems to be the same code in checkpoint58 in your repository, though.)

The calls to all other packages'  "..._write_pickup" and similar subroutines
are done before that synchronization barrier, which sounds right to me.
The need for synchronization is also suggested by the comment in
the beginning of  PACKAGES_WRITE_PICKUP_NOW (see below).

Question:
Is this a bug or a specific feature of the ptracers package?

I am working on an unrelated problem,
and came across to this detail by chance.

Thank you,
Gus Correa

-- 
---------------------------------------------------------------------
Gustavo J. Ponce Correa - Email: gus at ldeo.columbia.edu
Lamont-Doherty Earth Observatory - Columbia University
P.O. Box 1000 [61 Route 9W] - Palisades, NY, 10964-8000 - USA
Oceanography Bldg., Rm. 103-D, ph. (845) 365-8911, fax (845) 365-8736
---------------------------------------------------------------------


################################################
code from  subroutine PACKAGES_WRITE_PICKUP_NOW
################################################

...


C     Going to really do some IO. Make everyone except master thread wait.
      _BARRIER
C     _BEGIN_MASTER( myThid )

...


#ifdef  ALLOW_GGL90
      IF ( useGGL90 ) THEN
        CALL GGL90_WRITE_CHECKPOINT(
     &       prec, lgf, permCheckPoint, myIter, myThid)
      ENDIF
#endif  /* ALLOW_GGL90 */

C     _END_MASTER( myThid )
      _BARRIER

#ifdef ALLOW_PTRACERS
C     Write restart file for passive tracers
      IF (usePTRACERS) THEN
        CALL PTRACERS_WRITE_CHECKPOINT(permCheckPoint, 
     &       fn,myIter,myTime,myThid)
      ENDIF
#endif /* ALLOW_PTRACERS */

#ifdef ALLOW_OFFLINE
C     This is quick fix for A/B checkpoints since the main model
C     checkpoint routine will not be called in OFFLINE mode and will
C     thus not have the chance to set the alternating A/B suffix
      IF ( .NOT. permCheckPoint ) THEN
        nCheckLev = MOD(nCheckLev, maxNoChkptLev)+1
      ENDIF
#endif /* ALLOW_OFFLINE */

      RETURN
      END





More information about the MITgcm-support mailing list