From 966a9bce9882e57747052d09feeb1925e161226e Mon Sep 17 00:00:00 2001 From: James Edwards Date: Fri, 12 Jan 2024 15:08:09 -0700 Subject: [PATCH] add forpy_mod.F90 to share code and link python in ldflags --- config/cesm/machines/config_compilers.xml | 32 ++++++++++++++++++++--- src/build_scripts/buildlib.csm_share | 2 ++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/config/cesm/machines/config_compilers.xml b/config/cesm/machines/config_compilers.xml index e79e6561fa3..185a07eba94 100644 --- a/config/cesm/machines/config_compilers.xml +++ b/config/cesm/machines/config_compilers.xml @@ -746,18 +746,44 @@ using a fortran linker. + $ENV{NETCDF} + $ENV{PNETCDF} + + -lnetcdff -lnetcdf + + + + -qno-opt-dynamic-align -fp-model precise -std=gnu99 -std=gnu89 + -march=core-avx2 -no-fma + + + -march=core-avx2 -no-fma + + + -L/glade/u/apps/derecho/23.09/spack/opt/spack/python/3.10.12/gcc/7.5.0/lmsy/lib -lpython3.10 + + + + + + -march=core-avx2 -no-fma + + + -march=core-avx2 -no-fma -qno-opt-dynamic-align -fp-model precise -std=gnu99 + -std=gnu89 - $ENV{NETCDF} - $ENV{PNETCDF} - -lnetcdff -lnetcdf + -L$(NETCDF_PATH)/lib -lnetcdff -lnetcdf + -L$(PNETCDF_PATH)/lib -lpnetcdf + + -O2 diff --git a/src/build_scripts/buildlib.csm_share b/src/build_scripts/buildlib.csm_share index a16975c7a0e..3598a5ed18c 100755 --- a/src/build_scripts/buildlib.csm_share +++ b/src/build_scripts/buildlib.csm_share @@ -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"),