Changeset 22636
- Timestamp:
- 03/27/18 20:15:23 (7 years ago)
- Location:
- issm/trunk-jpl/test/MITgcm/code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/test/MITgcm/code/cpl_issm.F
r22629 r22636 45 45 #ifdef ALLOW_CPL_ISSM 46 46 #include "EESUPPORT.h" 47 COMMON /CPL_MPI_ID/ 48 & mpiMyWid, toissmcomm 47 COMMON /CPL_MPI_ID/ mpiMyWid, toissmcomm 49 48 INTEGER mpiMyWid, toissmcomm, mpiRC 50 integermpistatus(MPI_STATUS_SIZE)51 real*8 CouplingTime, IceModelTime52 integer i, j, bi, bj, buffsize53 Real*8xfer_array(Nx,Ny)54 _R Llocal(1:sNx,1:sNy,nSx,nSy)49 INTEGER mpistatus(MPI_STATUS_SIZE) 50 INTEGER i, j, bi, bj, buffsize 51 _R8 CouplingTime, IceModelTime 52 _R8 xfer_array(Nx,Ny) 53 _R8 local(1:sNx,1:sNy,nSx,nSy) 55 54 56 55 IF( myTime .EQ. startTime ) THEN 57 56 58 C Send deltatimestep 59 _BEGIN_MASTER( myThid ) 60 call MPI_Recv(CouplingTime,1,MPI_DOUBLE,0,10001000,toissmcomm, 61 & mpistatus,mpiRC) 62 print*, 'Ocean received CouplingTime: ', CouplingTime 63 call MPI_Recv(IceModelTime,1,MPI_DOUBLE,0,10001001,toissmcomm, 64 & mpistatus,mpiRC) 65 print*, 'Ocean received IceModelTime: ', IceModelTime 66 call MPI_Send(myTime,1,MPI_DOUBLE,0,10001002,toissmcomm, 67 & mpistatus) 68 call MPI_Send(Nx,1,MPI_INT,0,10001003,toissmcomm, 69 & mpistatus) 70 call MPI_Send(Ny,1,MPI_INT,0,10001004,toissmcomm, 71 & mpistatus) 72 _END_MASTER( myThid ) 57 C Send/receive scalar values 58 IF( myProcId .EQ. 0 ) THEN 59 _BEGIN_MASTER( myThid ) 60 call MPI_Recv(CouplingTime,1,MPI_DOUBLE,0,10001000, 61 & toissmcomm,mpistatus,mpiRC) 62 print*, 'Ocean received CouplingTime: ', CouplingTime 63 call MPI_Recv(IceModelTime,1,MPI_DOUBLE,0,10001001, 64 & toissmcomm,mpistatus,mpiRC) 65 print*, 'Ocean received IceModelTime: ', IceModelTime 66 call MPI_Send(myTime,1,MPI_DOUBLE,0,10001002, 67 & toissmcomm,mpistatus) 68 call MPI_Send(Nx,1,MPI_INT,0,10001003, 69 & toissmcomm,mpistatus) 70 call MPI_Send(Ny,1,MPI_INT,0,10001004, 71 & toissmcomm,mpistatus) 72 _END_MASTER( myThid ) 73 endif 73 74 74 75 C Send longitude East of center of cell 76 print*,'this is xC',xC 75 77 DO bj=1,nSy 76 78 DO bi=1,nSx … … 82 84 ENDDO 83 85 ENDDO 84 CDM CALL GATHER_2D_R8( xfer_array, local, myThid ) 85 _BEGIN_MASTER( myThid ) 86 buffsize = Nx*Ny 87 CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION, 88 & 0,10001005,toissmcomm,mpistatus) 89 _END_MASTER( myThid ) 90 86 print*,'this is local xC',local 87 CALL BAR2( myThid ) 88 CALL GATHER_2D_R8( xfer_array, local, Nx, Ny, 89 & .FALSE., .FALSE., myThid ) 90 print*,'this is global XC',xfer_array 91 IF( myProcId .EQ. 0 ) THEN 92 _BEGIN_MASTER( myThid ) 93 buffsize = Nx*Ny 94 CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION, 95 & 0,10001005,toissmcomm,mpistatus) 96 _END_MASTER( myThid ) 97 ENDIF 98 CALL BAR2( myThid ) 99 91 100 C Send latitude North of center of cell 101 print*,'this is yC',yC 92 102 DO bj=1,nSy 93 103 DO bi=1,nSx … … 99 109 ENDDO 100 110 ENDDO 101 CDM CALL GATHER_2D_R8( xfer_array, local, myThid ) 102 _BEGIN_MASTER( myThid ) 103 buffsize = Nx*Ny 104 CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION, 105 & 0,10001006,toissmcomm,mpistatus) 106 _END_MASTER( myThid ) 111 print*,'this is local yC',local 112 CALL BAR2( myThid ) 113 CALL GATHER_2D_R8( xfer_array, local, Nx, Ny, 114 & .FALSE., .FALSE., myThid ) 115 print*,'this is global YC',xfer_array 116 IF( myProcId .EQ. 0 ) THEN 117 _BEGIN_MASTER( myThid ) 118 buffsize = Nx*Ny 119 CALL MPI_SEND(xfer_array,buffsize,MPI_DOUBLE_PRECISION, 120 & 0,10001006,toissmcomm,mpistatus) 121 _END_MASTER( myThid ) 122 ENDIF 123 CALL BAR2( myThid ) 124 print*,'Done Sending XC/YC arrays.' 107 125 108 126 ENDIF 109 110 print*,'Done Sending XC/YC arrays.'111 127 112 128 #endif /* ALLOW_CPL_MPMICE */ -
issm/trunk-jpl/test/MITgcm/code/eeboot_minimal.F
r22532 r22636 66 66 #endif 67 67 #ifdef ALLOW_CPL_ISSM 68 COMMON /CPL_MPI_ID/ 69 & mpiMyWid, toissmcomm 70 INTEGER mpiMyWid, toissmcomm 71 integer my_local_rank,my_local_size, numprocsworld 72 integer dummy1(1),dummy2(1) 73 integer status(MPI_STATUS_SIZE) 68 COMMON /CPL_MPI_ID/ mpiMyWid, toissmcomm 69 INTEGER mpiMyWid, toissmcomm 70 INTEGER my_local_rank,my_local_size, numprocsworld 71 INTEGER dummy1(1),dummy2(1) 72 INTEGER status(MPI_STATUS_SIZE) 74 73 #endif /* ALLOW_CPL_ISSM */ 75 74 #if defined(ALLOW_NEST_PARENT) || defined(ALLOW_NEST_CHILD)
Note:
See TracChangeset
for help on using the changeset viewer.