Skip to content

Commit

Permalink
Merge pull request #609 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Sync develop into main
  • Loading branch information
sdrabenh authored Jul 22, 2022
2 parents 430790f + 71e1e65 commit 886623b
Show file tree
Hide file tree
Showing 24 changed files with 2,823 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
version: 2.1

# Anchors to prevent forgetting to update a version
baselibs_version: &baselibs_version v7.5.0
bcs_version: &bcs_version v10.22.3

orbs:
ci: geos-esm/circleci-tools@1

Expand All @@ -14,6 +18,7 @@ workflows:
matrix:
parameters:
compiler: [gfortran, ifort]
baselibs_version: *baselibs_version
repo: GEOSgcm
checkout_fixture: true
mepodevelop: true
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')"
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env-mkl:v6.2.13-openmpi_4.1.2-gcc_11.2.0
image: gmao/ubuntu20-geos-env-mkl:v7.5.0-openmpi_4.1.2-gcc_11.2.0
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -35,10 +35,13 @@ jobs:
with:
access_token: ${{ github.token }}
- name: Checkout GCM
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: GEOS-ESM/GEOSgcm
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Versions etc.
run: |
gfortran --version
Expand Down
8 changes: 7 additions & 1 deletion GEOSagcm_GridComp/GEOS_AgcmGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,8 @@ subroutine SetServices ( GC, RC )
VERIFY_(STATUS)
call MAPL_TimerAdd(GC, name="RUN" ,RC=STATUS)
VERIFY_(STATUS)
call MAPL_TimerAdd(GC, name="AGCM_BARRIER" ,RC=STATUS)
VERIFY_(STATUS)

! All done
!---------
Expand Down Expand Up @@ -1361,6 +1363,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )

! Local derived type aliases

type (ESMF_VM) :: VMG
type (MAPL_MetaComp), pointer :: STATE
type (ESMF_GridComp), pointer :: GCS(:)
type (ESMF_State), pointer :: GIM(:)
Expand Down Expand Up @@ -1554,7 +1557,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
! -----------------------------------------------------------

Iam = "Run"
call ESMF_GridCompGet ( GC, name=COMP_NAME, RC=STATUS )
call ESMF_GridCompGet ( GC, VM=VMG, name=COMP_NAME, RC=STATUS )
VERIFY_(STATUS)
Iam = trim(COMP_NAME) // trim(Iam)

Expand Down Expand Up @@ -2399,6 +2402,9 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
call DO_UPDATE_PHY ('DPEDT')
call DO_UPDATE_PHY ('DTDT' )

call MAPL_TimerOn (STATE,"AGCM_BARRIER" )
call ESMF_VMBarrier(VMG, rc=status); VERIFY_(STATUS)
call MAPL_TimerOff(STATE,"AGCM_BARRIER" )

! Run RUN2 of SuperDynamics (ADD_INCS) to add Physics Diabatic Tendencies
!------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ install( FILES ${resource_files}
)

set (srcs
getids.F90
StieglitzSnow.F90
SurfParams.F90)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC)
list(APPEND srcs findloc.F90)
endif ()

esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL GEOS_LandShared esmf NetCDF::NetCDF_Fortran OpenMP::OpenMP_Fortran OpenMP::OpenMP_C)
esma_add_library(${this} SRCS ${srcs} DEPENDENCIES MAPL GEOS_SurfaceShared GEOS_LandShared esmf NetCDF::NetCDF_Fortran OpenMP::OpenMP_Fortran OpenMP::OpenMP_C)

if(NOT FORTRAN_COMPILER_SUPPORTS_FINDLOC)
target_compile_definitions(${this} PRIVATE USE_EXTERNAL_FINDLOC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
esma_set_this ()

set(srcs
getids.F90
CatchmentRst.F90
CatchmentCNRst.F90
)

set (exe_srcs
Expand All @@ -16,18 +17,28 @@ set (exe_srcs
mk_LakeLandiceSaltRestarts.F90
mk_RouteRestarts.F90
mk_GEOSldasRestarts.F90
mk_catchANDcnRestarts.F90
)

esma_add_library (${this}
SRCS ${srcs}
DEPENDENCIES MAPL esmf NetCDF::NetCDF_Fortran)
DEPENDENCIES MAPL GEOS_SurfaceShared GEOS_LandShared esmf NetCDF::NetCDF_Fortran)

foreach (src ${exe_srcs})
string (REGEX REPLACE ".F90" "" exe ${src})
string (REGEX REPLACE ".F90" ".x" exe ${src})
ecbuild_add_executable (
TARGET ${exe}
SOURCES ${src}
LIBS MAPL GFTL_SHARED::gftl-shared GEOS_SurfaceShared GEOSroute_GridComp GEOS_LandShared ${this})
endforeach ()

install(PROGRAMS mk_Restarts DESTINATION bin)
foreach (src ${exe_srcs})
string (REGEX REPLACE ".F90" ".x" exe ${src})
string (REGEX REPLACE ".F90" "" lname ${src})
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
${CMAKE_INSTALL_PREFIX}/bin/${exe} \
${CMAKE_INSTALL_PREFIX}/bin/${lname} \
)")
endforeach ()
Loading

0 comments on commit 886623b

Please sign in to comment.