Skip to content

Commit

Permalink
Merge pull request #1 from jedwards4b/forpy_cime_jpe
Browse files Browse the repository at this point in the history
add forpy_mod.F90 to share code and link python in ldflags
  • Loading branch information
WillyChap authored Jan 13, 2024
2 parents 72e7c51 + 966a9bc commit 817cff1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
32 changes: 29 additions & 3 deletions config/cesm/machines/config_compilers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -746,18 +746,44 @@ using a fortran linker.
</compiler>

<compiler MACH="derecho">
<NETCDF_PATH>$ENV{NETCDF}</NETCDF_PATH>
<PNETCDF_PATH>$ENV{PNETCDF}</PNETCDF_PATH>
<SLIBS>
<append> -lnetcdff -lnetcdf </append>
</SLIBS>
</compiler>

<compiler MACH="derecho" COMPILER="intel">
<CFLAGS>
<base> -qno-opt-dynamic-align -fp-model precise -std=gnu99 </base>
<append MODEL="mpi-serial"> -std=gnu89 </append>
<append> -march=core-avx2 -no-fma</append>
</CFLAGS>
<FFLAGS>
<append> -march=core-avx2 -no-fma</append>
</FFLAGS>
<LDFLAGS>
<append>-L/glade/u/apps/derecho/23.09/spack/opt/spack/python/3.10.12/gcc/7.5.0/lmsy/lib -lpython3.10</append>
</LDFLAGS>
</compiler>

<compiler MACH="perlmutter" >
<FFLAGS>
<append> -march=core-avx2 -no-fma</append>
</FFLAGS>
<CFLAGS>
<append> -march=core-avx2 -no-fma -qno-opt-dynamic-align -fp-model precise -std=gnu99 </append>
<append MODEL="mpi-serial"> -std=gnu89 </append>
</CFLAGS>
<NETCDF_PATH>$ENV{NETCDF}</NETCDF_PATH>
<PNETCDF_PATH>$ENV{PNETCDF}</PNETCDF_PATH>
<SLIBS>
<append> -lnetcdff -lnetcdf </append>
<append> -L$(NETCDF_PATH)/lib -lnetcdff -lnetcdf </append>
<append MODEL="^mpi-serial"> -L$(PNETCDF_PATH)/lib -lpnetcdf</append>
</SLIBS>
</compiler>




<compiler MACH="eastwind" COMPILER="intel">
<CFLAGS>
<append DEBUG="FALSE"> -O2 </append>
Expand Down
2 changes: 2 additions & 0 deletions src/build_scripts/buildlib.csm_share
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def buildlib(bldroot, installpath, caseroot):
###############################################################################
with Case(caseroot, read_only=False) as case:
cimeroot = case.get_value("CIMEROOT")
srcroot = case.get_value("SRCROOT")
filepath = [os.path.join(caseroot,"SourceMods","src.share"),
os.path.join(srcroot, "forpy"),
os.path.join(cimeroot,"src","drivers","mct","shr"),
os.path.join(cimeroot,"src","share","streams"),
os.path.join(cimeroot,"src","share","util"),
Expand Down

0 comments on commit 817cff1

Please sign in to comment.