[Mitgcm-support] Re: idkey and multi-threading
mitgcm-support at dev.mitgcm.org
mitgcm-support at dev.mitgcm.org
Wed Jul 9 15:44:27 EDT 2003
I don't think that's correct.
If you go to the start of dynamics.F you will see
the activation of ikey in which myThid is taken
into account and from which iikey is derived:
act1 = bi - myBxLo(myThid)
max1 = myBxHi(myThid) - myBxLo(myThid) + 1
act2 = bj - myByLo(myThid)
max2 = myByHi(myThid) - myByLo(myThid) + 1
act3 = myThid - 1
max3 = nTx*nTy
act4 = ikey_dynamics - 1
ikey = (act1 + 1) + act2*max1
& + act3*max1*max2
& + act4*max1*max2*max3
Patrick
Chris Hill wrote:
>
> I was doing some work with Veronique and noticed the
> the idkey mechanism that is used to control which
> block of storage TAMC will work with in IMPLDIFF.
> This mechanism will not work in a multi-threaded code.
> All threads see the same idkey, even though each thread may
> not be at the same instance of impldiff.
>
> IF (implicitViscosity.AND.momStepping) THEN
> #ifdef ALLOW_AUTODIFF_TAMC
> idkey = iikey + 3
> #endif /* ALLOW_AUTODIFF_TAMC */
> CALL IMPLDIFF(
> I bi, bj, iMin, iMax, jMin, jMax,
> I deltaTmom, KappaRU,recip_HFacW,
> U gUNm1,
> I myThid )
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Patrick Heimbach FON: +1 / 617 / 253-5259
Massachusetts Institute of Technology FAX: +1 / 617 / 253-4464
EAPS, Room 54-1518
77 Massachusetts Avenue mailto:heimbach at mit.edu
Cambridge MA 02139, U.S.A. http://www.mit.edu/~heimbach/
More information about the MITgcm-support
mailing list