-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #647 from GEOS-ESM/feature/aoloso/CICE4_RUN1_load_…
…balance Modified RUN1 to load balance
- Loading branch information
Showing
11 changed files
with
2,745 additions
and
3,293 deletions.
There are no files selected for viewing
290 changes: 143 additions & 147 deletions
290
...GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/BufferPacking.h
Large diffs are not rendered by default.
Oops, something went wrong.
442 changes: 442 additions & 0 deletions
442
...omp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/BufferPacking_RUN1.h
Large diffs are not rendered by default.
Oops, something went wrong.
214 changes: 107 additions & 107 deletions
214
...idComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/BufferUnpacking.h
Large diffs are not rendered by default.
Oops, something went wrong.
211 changes: 211 additions & 0 deletions
211
...p/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSsaltwater_GridComp/BufferUnpacking_RUN1.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
! This section reverses what was done in BufferPacking by redistributing the | ||
! the updated 1D buffer back to the original distribution and then map relevant | ||
! portions to the original pointers in the INTERNAL and EXPORT fields. | ||
! There is no need to do IMPORT on exit. | ||
! ***CRITTICAL*** For any changes (pointer variable name change, field addition or | ||
! deletion) made in BufferPacking, corresponding changes need to be made here | ||
! as well. | ||
|
||
! retrieve real4 internal | ||
call MAPL_BalanceWork(BUFINT, NUMMAX, Direction=MAPL_Retrieve, Handle=CICECOREBalanceHandle, _RC) | ||
L1 = 1 | ||
call MAPL_GetPointer(INTERNAL,PTR2,'TSKINI', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'QS', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'CH', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'CM', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'CQ', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'WW', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'Z0', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2,'TAUAGE', _RC) | ||
call CICEReorder(BUFINT(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
call MAPL_GetPointer(INTERNAL,PTR1,'SLMASK', _RC) | ||
call CICEReorder(BUFINT(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
|
||
! retrieve real8 internal | ||
call MAPL_BalanceWork(BUFINT8, NUMMAX, Direction=MAPL_Retrieve, Handle=CICECOREBalanceHandle, _RC) | ||
L1 = 1 | ||
call MAPL_GetPointer(INTERNAL,PTR2R8,'FR', _RC) | ||
call CICEReorder8(BUFINT8(L1),PTR2R8,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2R8,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2R8,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2R8,'VOLICE', _RC) | ||
call CICEReorder8(BUFINT8(L1),PTR2R8,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2R8,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2R8,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2R8,'VOLSNO', _RC) | ||
call CICEReorder8(BUFINT8(L1),PTR2R8,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2R8,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2R8,2) | ||
call MAPL_GetPointer(INTERNAL,PTR2R8,'VOLPOND', _RC) | ||
call CICEReorder8(BUFINT8(L1),PTR2R8,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2R8,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2R8,2) | ||
call MAPL_GetPointer(INTERNAL,PTR3R8,'ERGICE', _RC) | ||
call CICEReorder8(BUFINT8(L1),PTR3R8,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR3R8,2)*size(PTR3R8,3),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR3R8,2)*size(PTR3R8,3) | ||
call MAPL_GetPointer(INTERNAL,PTR3R8,'ERGSNO', _RC) | ||
call CICEReorder8(BUFINT8(L1),PTR3R8,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR3R8,2)*size(PTR3R8,3),UNPACKIT) | ||
|
||
! retrieve export | ||
call MAPL_BalanceWork(BUFEXP, NUMMAX, Direction=MAPL_Retrieve, Handle=CICECOREBalanceHandle, _RC) | ||
L1 = 1 | ||
call MAPL_GetPointer(EXPORT,PTR1,'QH', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'TH', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'UH', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'VH', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'QST', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'TST', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'CHT', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'CMT', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'CQT', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'CNT', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'RIT', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'RET', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'Z0', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'Z0H', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOT2M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOQ2M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOU2M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOV2M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOT10M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOQ10M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOU10M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOV10M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOU50M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'MOV50M', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'GUST', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'VENT', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'TFREEZE', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR1,'FRACI', _RC) | ||
if ( associated(PTR1) ) then | ||
call CICEReorder(BUFEXP(L1),PTR1,TILE_WITH_ICE,NUMMAX,HorzDims,1,UNPACKIT) | ||
L1 = L1 + NUMMAX | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR2,'QSAT1', _RC) | ||
if ( associated(PTR2) ) then | ||
call CICEReorder(BUFEXP(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
L1 = L1 + NUMMAX*size(PTR2,2) | ||
end if | ||
call MAPL_GetPointer(EXPORT,PTR2,'QSAT2', _RC) | ||
if ( associated(PTR2) ) then | ||
call CICEReorder(BUFEXP(L1),PTR2,TILE_WITH_ICE,NUMMAX,HorzDims,size(PTR2,2),UNPACKIT) | ||
end if |
Oops, something went wrong.