Skip to content

Commit

Permalink
add forpy_mod.F90 to share code and link python in ldflags
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jan 12, 2024
1 parent 72e7c51 commit 966a9bc
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 966a9bc

Please sign in to comment.