diff --git a/components/scream/CMakeLists.txt b/components/scream/CMakeLists.txt index 6c2a460347e..eca36508540 100644 --- a/components/scream/CMakeLists.txt +++ b/components/scream/CMakeLists.txt @@ -171,7 +171,7 @@ if (NF_CONFIG_SEARCH) OUTPUT_STRIP_TRAILING_WHITESPACE ) if (NF_STATUS EQUAL 0) - set(DEFAULT_NetCDF_Fortran_PATHS ${NF_CONFIG_OUTPUT}) + set(DEFAULT_NetCDF_Fortran_PATH ${NF_CONFIG_OUTPUT}) endif() endif() @@ -183,7 +183,7 @@ if (NC_CONFIG_SEARCH) OUTPUT_STRIP_TRAILING_WHITESPACE ) if (NC_STATUS EQUAL 0) - set(DEFAULT_NetCDF_C_PATHS ${NC_CONFIG_OUTPUT}) + set(DEFAULT_NetCDF_C_PATH ${NC_CONFIG_OUTPUT}) endif() endif() @@ -201,9 +201,9 @@ set(SCREAM_MPI_EXTRA_ARGS ${DEFAULT_MPI_EXTRA_ARGS} CACHE STRING "Options for mp set(SCREAM_MPI_NP_FLAG ${DEFAULT_MPI_NP_FLAG} CACHE STRING "The mpirun flag for designating the total number of ranks") set(SCREAM_LIB_ONLY ${DEFAULT_LIB_ONLY} CACHE BOOL "Only build libraries, no exes") set(SCREAM_AUTOTESTER ${DEFAULT_AUTOTESTER} CACHE BOOL "This is an autotester run; may disable some tests") -set(NetCDF_Fortran_PATHS ${DEFAULT_NetCDF_Fortran_PATHS} CACHE FILEPATH "Path to netcdf fortran installation") -set(NetCDF_C_PATHS ${DEFAULT_NetCDF_C_PATHS} CACHE FILEPATH "Path to netcdf C installation") -set(SCREAM_MACHINE $DEFAULT_SCREAM_MACHINE CACHE STRING "The CIME/SCREAM name for the current machine") +set(NetCDF_Fortran_PATH ${DEFAULT_NetCDF_Fortran_PATH} CACHE FILEPATH "Path to netcdf fortran installation") +set(NetCDF_C_PATH ${DEFAULT_NetCDF_C_PATH} CACHE FILEPATH "Path to netcdf C installation") +set(SCREAM_MACHINE ${DEFAULT_SCREAM_MACHINE} CACHE STRING "The CIME/SCREAM name for the current machine") # Handle input root if (SCREAM_MACHINE) diff --git a/components/scream/cmake/BuildCprnc.cmake b/components/scream/cmake/BuildCprnc.cmake index 4ac51557cfa..88551963305 100644 --- a/components/scream/cmake/BuildCprnc.cmake +++ b/components/scream/cmake/BuildCprnc.cmake @@ -23,7 +23,7 @@ macro(BuildCprnc) set(SCC ${CMAKE_C_COMPILER}) set(SFC ${CMAKE_Fortran_COMPILER}) set(FFLAGS \"${CMAKE_Fortran_FLAGS}\") - set(NETCDF_PATH ${NetCDF_Fortran_PATHS}) + set(NETCDF_PATH ${NetCDF_Fortran_PATH}) " ) set(SRC_ROOT ${SCREAM_BASE_DIR}/../..) diff --git a/components/scream/cmake/machine-files/lassen.cmake b/components/scream/cmake/machine-files/lassen.cmake index 6fe9b7bd501..5600c03531d 100644 --- a/components/scream/cmake/machine-files/lassen.cmake +++ b/components/scream/cmake/machine-files/lassen.cmake @@ -2,7 +2,7 @@ set (EKAT_MACH_FILES_PATH ${CMAKE_CURRENT_LIST_DIR}/../../../../externals/ekat/cmake/machine-files) include (${EKAT_MACH_FILES_PATH}/kokkos/nvidia-v100.cmake) include (${EKAT_MACH_FILES_PATH}/kokkos/cuda.cmake) -set(NetCDF_Fortran_PATHS /usr/gdata/climdat/libs/netcdf-fortran/install/lassen/fortran CACHE STRING "") +set(NetCDF_Fortran_PATH /usr/gdata/climdat/libs/netcdf-fortran/install/lassen/fortran CACHE STRING "") set(BLAS_LIBRARIES /usr/gdata/climdat/libs/blas/libblas.a CACHE STRING "") set(LAPACK_LIBRARIES /usr/gdata/climdat/libs/lapack/liblapack.a CACHE STRING "") set(SCREAM_MPIRUN_EXE "jsrun -E LD_PRELOAD=/opt/ibm/spectrum_mpi/lib/pami_471/libpami.so" CACHE STRING "") diff --git a/components/scream/scripts/test_all_scream.py b/components/scream/scripts/test_all_scream.py index 531386beba9..9cb3d95e772 100644 --- a/components/scream/scripts/test_all_scream.py +++ b/components/scream/scripts/test_all_scream.py @@ -448,10 +448,10 @@ def generate_cmake_config(self, extra_configs, for_ctest=False): # even if no netcdf is available stat, f_path, _ = run_cmd("nf-config --prefix") if stat == 0: - result += " -DNetCDF_Fortran_PATHS={}".format(f_path) + result += " -DNetCDF_Fortran_PATH={}".format(f_path) stat, c_path, _ = run_cmd("nc-config --prefix") if stat == 0: - result += " -DNetCDF_C_PATHS={}".format(c_path) + result += " -DNetCDF_C_PATH={}".format(c_path) # Test-specific cmake options for key, value in extra_configs: diff --git a/components/scream/src/physics/rrtmgp/CMakeLists.txt b/components/scream/src/physics/rrtmgp/CMakeLists.txt index 9acafe9977d..d8e38f142ea 100644 --- a/components/scream/src/physics/rrtmgp/CMakeLists.txt +++ b/components/scream/src/physics/rrtmgp/CMakeLists.txt @@ -58,10 +58,10 @@ set(INTERFACE_SRC rrtmgp_test_utils.cpp ) add_library(scream_rrtmgp ${INTERFACE_SRC}) -find_library(NETCDF_C netcdf HINTS ${NetCDF_C_PATHS}/lib) +find_library(NETCDF_C netcdf HINTS ${NetCDF_C_PATH}/lib) target_link_libraries(scream_rrtmgp PUBLIC ${NETCDF_C} rrtmgp yakl scream_share physics_share share_util) target_include_directories(scream_rrtmgp SYSTEM PUBLIC - ${NetCDF_C_PATHS}/include ${SCREAM_BASE_DIR}/../../externals ${EAM_RRTMGP_DIR}/external) + ${NetCDF_C_PATH}/include ${SCREAM_BASE_DIR}/../../externals ${EAM_RRTMGP_DIR}/external) # Build tests if (NOT SCREAM_LIB_ONLY) diff --git a/components/scream/tests/coupled/dynamics_physics/model_restart/CMakeLists.txt b/components/scream/tests/coupled/dynamics_physics/model_restart/CMakeLists.txt index a202861e544..b74d1cc9488 100644 --- a/components/scream/tests/coupled/dynamics_physics/model_restart/CMakeLists.txt +++ b/components/scream/tests/coupled/dynamics_physics/model_restart/CMakeLists.txt @@ -5,7 +5,7 @@ include (BuildCprnc) BuildCprnc() # Needed for RRTMGP -find_library(NETCDF_C netcdf HINTS ${NetCDF_C_PATHS}/lib) +find_library(NETCDF_C netcdf HINTS ${NetCDF_C_PATH}/lib) # Get or create the dynamics lib # HOMME_TARGET NP PLEV QSIZE_D CreateDynamicsLib("theta-l_kokkos" 4 72 35) diff --git a/components/scream/tests/uncoupled/rrtmgp/CMakeLists.txt b/components/scream/tests/uncoupled/rrtmgp/CMakeLists.txt index 75ecda33703..b0a373176e1 100644 --- a/components/scream/tests/uncoupled/rrtmgp/CMakeLists.txt +++ b/components/scream/tests/uncoupled/rrtmgp/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT ${SCREAM_BASELINES_ONLY}) SET (TEST_LABELS "rrtmgp;physics") # Required libraries - find_library(NETCDF_C netcdf HINTS ${NetCDF_C_PATHS}/lib) + find_library(NETCDF_C netcdf HINTS ${NetCDF_C_PATH}/lib) set (NEED_LIBS scream_rrtmgp rrtmgp ${NETCDF_C} scream_control scream_share physics_share yakl) CreateUnitTest(