Skip to content

Commit

Permalink
Merge branch 'master' into darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
jahn committed Sep 8, 2024
2 parents 93f4e5f + b537eb4 commit cd81edd
Show file tree
Hide file tree
Showing 32 changed files with 1,498 additions and 938 deletions.
25 changes: 25 additions & 0 deletions doc/tag-index
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
Notes on tags used in MITgcmUV
==============================

checkpoint69a (2024/09/08)
o tools/genmake2:
- list of src files to Differentiate: change from simply "*.list" to commonly
adopted "*_ad_diff.list" (to avoid accidents).
- change Makefile to enable TAF to generate Tangent-Linear code from a mix
of fixed-form (.F) and free-form (.F90) src code.
- test free format *.F90 code in hs94.1x64x5/code_ad/ exp. for AD and TLM.
o pkg/dic:
- save 3D pH (for calcite saturation calculation, useCalciteSaturation=T)
for next time-step and store it in pickup files (for restart).
o eesupp/src:
- new set of Global-Sum vector routines working with shared buffer
(=> no needs for input/output to be in common block) and with
GLOBAL_SUM_ORDER_TILES implemented ; and remove older versions.
o tools/genmake2:
- change Makefile to enable TAF to generate adjoint from a mix of fixed-form
(.F) and free-form (.F90) src code. Also fix for alternative suffix (e.g.,
used on MacOS) to work without -ncad.
o tools/adjoint_options:
- allow to pass -f08 flag to TAF by setting TAF_FORTRAN_VERS to "F08".
o pkg/mom_vecinv:
- add more 3-D momentum tendency diagnostics (originally from Helen Pillar)
for harmonic/bi-harmonic dissipation and for bottom + top friction
tendency (under new CPP option: ALLOW_MOM_TEND_EXTRA_DIAGS).

checkpoint68z (2024/07/27)
o pkg/diagnostics:
- to allow to use ADJ-diags in DIVA runs, change call sequence regarding
Expand Down
17 changes: 4 additions & 13 deletions eesupp/inc/EEPARAMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ C MAX_LEN_PREC :: Default rec len for reading "parameter" files
PARAMETER ( MAX_LEN_PREC = 200 )

C MAX_NO_THREADS :: Maximum number of threads allowed.
CC MAX_NO_PROCS :: Maximum number of processes allowed.
CC MAX_NO_BARRIERS :: Maximum number of distinct thread "barriers"
C GSVec_size :: Maximum buffer size for Global Sum Vector array
INTEGER MAX_NO_THREADS
PARAMETER ( MAX_NO_THREADS = 4 )
c INTEGER MAX_NO_PROCS
c PARAMETER ( MAX_NO_PROCS = 70000 )
c INTEGER MAX_NO_BARRIERS
c PARAMETER ( MAX_NO_BARRIERS = 1 )
INTEGER GSVec_size
PARAMETER ( GSVec_size = 1024 )

C Particularly weird and obscure voodoo numbers
C lShare :: This wants to be the length in
Expand All @@ -58,10 +55,6 @@ C one dimensional.
PARAMETER ( lShare4 = cacheLineSize/4 )
PARAMETER ( lShare8 = cacheLineSize/8 )

CC MAX_VGS :: Maximum buffer size for Global Vector Sum
c INTEGER MAX_VGS
c PARAMETER ( MAX_VGS = 8192 )

C ======== EESIZE.h ========================================

C Symbolic values
Expand Down Expand Up @@ -263,6 +256,4 @@ C by one every time an IO error occurs.
INTEGER numberOfProcs
INTEGER pidIO

CEH3 ;;; Local Variables: ***
CEH3 ;;; mode:fortran ***
CEH3 ;;; End: ***
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
17 changes: 8 additions & 9 deletions eesupp/inc/GLOBAL_SUM.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@ C *==========================================================*
CEOP

COMMON / GSUM_COMMON_R8 / phiGSR8, shareBufGSR8
c & , phiVGSR8
Real*8 phiGSR8 (lShare8, 0:MAX_NO_THREADS )
Real*8 shareBufGSR8 ( nSx, nSy )
c Real*8 phivGSR8(MAX_VGS, 0:MAX_NO_THREADS )

COMMON / GSUM_COMMON_R4 / phiGSR4
c & , phiVGSR4
Real*4 phiGSR4 (lShare4, 0:MAX_NO_THREADS )
c Real*4 phivGSR4(MAX_VGS, 0:MAX_NO_THREADS )

COMMON / GSUM_COMMON_I / phiGSI
c & , phiVGSI
INTEGER phiGSI (lShare4, 0:MAX_NO_THREADS )
c INTEGER phivGSI (MAX_VGS, 0:MAX_NO_THREADS )

CEH3 ;;; Local Variables: ***
CEH3 ;;; mode:fortran ***
CEH3 ;;; End: ***
COMMON / GLBSUM_VECTOR_RL / shareBufGSVec, shareGSVector
Real*8 shareBufGSVec( nSx, nSy, GSVec_size )
Real*8 shareGSVector( GSVec_size )

COMMON / GLBSUM_VECTOR_I / shareBufGSVecI, shareGSVectInt
INTEGER shareBufGSVecI( nSx, nSy, GSVec_size )
INTEGER shareGSVectInt( GSVec_size )
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
27 changes: 13 additions & 14 deletions eesupp/src/global_sum.F
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

C-- File global_sum.F: Routines that perform global sum on an array
C of thread values.
C Contents
C o GLOBAL_SUM_R4
C o GLOBAL_SUM_R8
C o GLOBAL_SUM_INT
C-- Contents
C-- o GLOBAL_SUM_R4
C-- o GLOBAL_SUM_R8
C-- o GLOBAL_SUM_INT

C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
Expand Down Expand Up @@ -50,7 +50,7 @@ SUBROUTINE GLOBAL_SUM_R4(
C == Local variables ==
C I :: Loop counters
C mpiRC :: MPI return code
INTEGER I
INTEGER i
Real*4 tmp
#ifdef ALLOW_USE_MPI
INTEGER mpiRC
Expand All @@ -66,8 +66,8 @@ SUBROUTINE GLOBAL_SUM_R4(
C-- Sum within the process first
_BEGIN_MASTER( myThid )
tmp = 0.
DO I=1,nThreads
tmp = tmp + phiGSR4(1,I)
DO i=1,nThreads
tmp = tmp + phiGSR4(1,i)
ENDDO
sumPhi = tmp
#ifdef ALLOW_USE_MPI
Expand All @@ -89,7 +89,6 @@ SUBROUTINE GLOBAL_SUM_R4(
RETURN
END


C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
C !ROUTINE: GLOBAL_SUM_R8
Expand Down Expand Up @@ -133,7 +132,7 @@ SUBROUTINE GLOBAL_SUM_R8(
C === Local variables ===
C I :: Loop counters
C mpiRC :: MPI return code
INTEGER I
INTEGER i
Real*8 tmp
#ifdef ALLOW_USE_MPI
INTEGER mpiRC
Expand All @@ -154,8 +153,8 @@ SUBROUTINE GLOBAL_SUM_R8(
C-- Sum within the process first
_BEGIN_MASTER( myThid )
tmp = 0. _d 0
DO I=1,nThreads
tmp = tmp + phiGSR8(1,I)
DO i=1,nThreads
tmp = tmp + phiGSR8(1,i)
ENDDO
sumPhi = tmp
#ifdef ALLOW_USE_MPI
Expand Down Expand Up @@ -224,7 +223,7 @@ SUBROUTINE GLOBAL_SUM_INT(
C === Local variables ===
C I :: Loop counters
C mpiRC :: MPI return code
INTEGER I
INTEGER i
INTEGER tmp
#ifdef ALLOW_USE_MPI
INTEGER mpiRC
Expand All @@ -240,8 +239,8 @@ SUBROUTINE GLOBAL_SUM_INT(
C-- Sum within the process first
_BEGIN_MASTER( myThid )
tmp = 0
DO I=1,nThreads
tmp = tmp + phiGSI(1,I)
DO i=1,nThreads
tmp = tmp + phiGSI(1,i)
ENDDO
sumPhi = tmp
#ifdef ALLOW_USE_MPI
Expand Down
6 changes: 3 additions & 3 deletions eesupp/src/global_sum_singlecpu.F
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

C-- File global_sum_singlecpu.F: Routines that perform global sum
C on a single CPU
C Contents
C o GLOBAL_SUM_SINGLECPU_RL
C o GLOBAL_SUM_SINGLECPU_RS <- not yet coded
C-- Contents
C-- o GLOBAL_SUM_SINGLECPU_RL
C-- o GLOBAL_SUM_SINGLECPU_RS <- not yet coded

C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
Expand Down
10 changes: 5 additions & 5 deletions eesupp/src/global_sum_tile.F
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

C-- File global_sum_tile.F: Routines that perform global sum
C on a tile array
C Contents
C o GLOBAL_SUM_TILE_RL
C o GLOBAL_SUM_TILE_RS <- not yet coded
C-- Contents
C-- o GLOBAL_SUM_TILE_RL
C-- o GLOBAL_SUM_TILE_RS <- not yet coded

C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
CBOP
Expand Down Expand Up @@ -82,7 +82,7 @@ SUBROUTINE GLOBAL_SUM_TILE_RL(
CALL BAR2( myThid )
_BEGIN_MASTER( myThid )

#if (defined (GLOBAL_SUM_SEND_RECV) && defined (ALLOW_USE_MPI) )
#if (defined GLOBAL_SUM_SEND_RECV && defined ALLOW_USE_MPI )
IF ( usingMPI ) THEN

lbuff = nSx*nSy
Expand Down Expand Up @@ -158,7 +158,7 @@ SUBROUTINE GLOBAL_SUM_TILE_RL(
ENDIF

ELSE
#elif (defined (GLOBAL_SUM_ORDER_TILES) && defined (ALLOW_USE_MPI) )
#elif (defined GLOBAL_SUM_ORDER_TILES && defined ALLOW_USE_MPI )
IF ( usingMPI ) THEN

C-- Initialise local buffer
Expand Down
Loading

0 comments on commit cd81edd

Please sign in to comment.