Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
cd19c38
Use ip@5: if available instead of sp if available
climbfuji Oct 7, 2024
89f3bab
Adding no OpenMP flag
scrasmussen Mar 24, 2026
b97d575
sp to ip changes in ccpp-physics repo, enhancement/build-with-ip branch
scrasmussen Mar 24, 2026
f78c1dd
sp to ip changes in ccpp-physics repo, enhancement/build-with-ip branch
scrasmussen Feb 25, 2026
e8d6fa1
-O2 to -O0 changes required to get ifx 2025.2.1 to build on Derecho. …
scrasmussen Feb 26, 2026
0ff17e3
Module variables to build spack stack 2.0.0 and 1.9.3. Note 2.0.0 doe…
scrasmussen Feb 26, 2026
2e62b76
add GNU module for Ursa with spack-stack 2.0.0
grantfirl Mar 12, 2026
306607d
use intel-specific spack-stack 2.0.0 python environment in ursa intel…
grantfirl Mar 12, 2026
75a1840
Supported case arm_sgp_summer_1997_A requires SCM_GFS_v16_ps suite to…
scrasmussen Mar 28, 2026
82b1cb9
Use scm/dev ccpp-physics
scrasmussen Mar 28, 2026
d6d217a
- Using name/version format for spackstack and derecho_gnu and derech…
scrasmussen Mar 28, 2026
7d37d1f
point to ccpp-physics IP PR into scm/dev
grantfirl Mar 31, 2026
2f23c75
add run list arugment to suite_info to only compile subset of suites …
grantfirl Mar 31, 2026
47bb8b1
add rl option to CMakeLists.txt to compile smaller subset of suites i…
grantfirl Mar 31, 2026
dcd1979
remove warning prints; use default rl if no match
grantfirl Mar 31, 2026
f4904e5
revert optimization change and edit to supported_suites.py
Apr 1, 2026
92d7d44
Merge pull request #11 from grantfirl/add_rl_type
scrasmussen Apr 1, 2026
122be00
Removing supported_cases.py and supported_suites.py since they have b…
scrasmussen Apr 1, 2026
b269c26
Add emacs as a shell function, pointing to an emacs executable on Der…
scrasmussen Apr 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
branch = develop
[submodule "ccpp-physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = main
# url = https://github.com/NCAR/ccpp-physics
url = https://github.com/grantfirl/ccpp-physics
branch = scm/dev-ip_update
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 2 files
+5 −1 CMakeLists.txt
+1 −184 CODEOWNERS
1 change: 1 addition & 0 deletions scm/etc/modules/derecho_gnu/.modulerc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module_version("derecho_gnu/spack_stack_2.1.0", "default")
28 changes: 28 additions & 0 deletions scm/etc/modules/derecho_gnu/spack_stack_1.9.3.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
help([[
This module loads libraries for building the CCPP Single-Column Model on
the CISL machine Derecho (Cray) using GNU 12.4.0
]])

whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Derecho with GNU compilers]===])

prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.9.3/envs/ue-gcc-12.4.0/install/modulefiles/Core/")

load("stack-gcc/12.4.0")
load("stack-cray-mpich/8.1.29")
load("stack-python/3.11.7")
load("cmake/3.27.9")

load("hdf5/1.14.3")
load("netcdf-c/4.9.2")
load("netcdf-fortran/4.6.1")
load("bacio/2.4.1")
load("ip/5.1.0")
load("w3emc/2.10.0")

load("py-f90nml")
load("py-netcdf4/1.7.1.post2")

setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicxx")
setenv("CMAKE_Fortran_COMPILER","mpif90")
setenv("CMAKE_Platform","derecho.gnu")
32 changes: 32 additions & 0 deletions scm/etc/modules/derecho_gnu/spack_stack_2.1.0.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
help([[
This module loads libraries for building the CCPP Single-Column Model on
the CISL machine Derecho (Cray) using GNU 13.3.1
]])

whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Derecho with GNU compilers]===])

prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-2.1.0/envs/ue-gcc-13.3.1/modules/Core/")

load("stack-gcc/13.3.1")
load("stack-cray-mpich/8.1.32")
load("python/3.11.11")
load("cmake/3.31.8")

load("hdf5/1.14.5")
load("netcdf-c/4.9.2")
load("netcdf-fortran/4.6.1")
load("bacio/2.6.0")
load("ip/5.4.0")
load("w3emc/2.13.0")

load("py-f90nml/1.4.3")
load("py-netcdf4/1.7.2")

local bashStr = '/glade/u/apps/derecho/25.10/opt/view/bin/emacs -nw "$@"'
local cshStr = '/glade/u/apps/derecho/25.10/opt/view/bin/emacs -nw $*'
set_shell_function("emacs", bashStr, cshStr)

setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicxx")
setenv("CMAKE_Fortran_COMPILER","mpif90")
setenv("CMAKE_Platform","derecho.gnu")
1 change: 1 addition & 0 deletions scm/etc/modules/derecho_intel/.modulerc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module_version("derecho_intel/spack_stack_2.0.0", "default")
29 changes: 29 additions & 0 deletions scm/etc/modules/derecho_intel/spack_stack_2.0.0.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
help([[
This module loads libraries for building the CCPP Single-Column Model on
the CISL machine Derecho (Cray) using Intel oneAPI 2025.2.1
]])

whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Derecho with Intel compilers]===])


prepend_path("MODULEPATH","/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-2.0.0/envs/ue-oneapi-2025.2.1/modules/Core/")

load("stack-intel-oneapi-compilers/2025.2.1")
load("stack-cray-mpich/8.1.32")
load("python/3.11.11")
load("cmake/3.31.8")

load("hdf5/1.14.5")
load("netcdf-c/4.9.2")
load("netcdf-fortran/4.6.1")
load("bacio/2.6.0")
load("ip/5.4.0")
load("w3emc/2.11.0")

load("py-f90nml")
load("py-netcdf4/1.7.2")

setenv("CMAKE_C_COMPILER","cc")
setenv("CMAKE_CXX_COMPILER","CC")
setenv("CMAKE_Fortran_COMPILER","ftn")
setenv("CMAKE_Platform","derecho.intel")
31 changes: 31 additions & 0 deletions scm/etc/modules/ursa_gnu_spack_stack_2.0.0.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
help([[
This module loads libraries for building the CCPP Single-Column Model on
the NOAA RDHPC machine Ursa using GNU 12.4
]])

whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Ursa with Intel compilers ]===])

prepend_path("MODULEPATH","/contrib/spack-stack/spack-stack-2.0.0/envs/ue-gcc-12.4.0/modules/Core")

load("stack-gcc/12.4.0")
load("stack-openmpi/4.1.6")
load("python/3.11.11")
load("cmake/3.31.8")

load("hdf5/1.14.5")
load("netcdf-c/4.9.2")
load("netcdf-fortran/4.6.1")
load("bacio/2.6.0")
load("ip/5.4.0")
load("w3emc/2.11.0")
load("esmf/8.8.0")

load("py-f90nml")
load("py-netcdf4/1.7.2")

setenv("CMAKE_C_COMPILER","mpicc")
setenv("CMAKE_CXX_COMPILER","mpicxx")
setenv("CMAKE_Fortran_COMPILER","mpif90")
setenv("CMAKE_Platform","ursa.gnu")

execute{cmd="source /scratch3/BMC/gmtb/ccpp-scm-software/spack-stack-2.0.0-gnu/bin/activate", modeA={"load"}}
31 changes: 31 additions & 0 deletions scm/etc/modules/ursa_intel_spack_stack_2.0.0.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
help([[
This module loads libraries for building the CCPP Single-Column Model on
the NOAA RDHPC machine Ursa using Intel oneAPI 2025.2.1
]])

whatis([===[Loads spack-stack libraries needed for building the CCPP SCM on Ursa with Intel compilers ]===])

prepend_path("MODULEPATH","/contrib/spack-stack/spack-stack-2.0.0/envs/ue-oneapi-2025.2.1/modules/Core")

load("stack-intel-oneapi-compilers/2025.2.1")
load("stack-intel-oneapi-mpi/2021.13")
load("python/3.11.11")
load("cmake/3.31.8")

load("hdf5/1.14.5")
load("netcdf-c/4.9.2")
load("netcdf-fortran/4.6.1")
load("bacio/2.6.0")
load("ip/5.4.0")
load("w3emc/2.11.0")
load("esmf/8.8.0")

load("py-f90nml")
load("py-netcdf4/1.7.2")

setenv("CMAKE_C_COMPILER","cc")
setenv("CMAKE_CXX_COMPILER","CC")
setenv("CMAKE_Fortran_COMPILER","ftn")
setenv("CMAKE_Platform","ursa.intel")

execute{cmd="source /scratch3/BMC/gmtb/ccpp-scm-software/spack-stack-2.0.0-intel/bin/activate", modeA={"load"}}
63 changes: 46 additions & 17 deletions scm/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,23 @@ if(DEFINED CCPP_SUITES)
endif()
unset(CCPP_SUITES CACHE)
else()
execute_process(
COMMAND scm/src/suite_info.py --fc "${CMAKE_Fortran_COMPILER_ID}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
OUTPUT_VARIABLE suite_string
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(_ccpp_suites_arg "--suites=${suite_string}")
message("Calling CCPP code generator (ccpp_prebuild.py) for suites listed in scm/src/suite_info.py: ${_ccpp_suites_arg}.")
if(DEFINED RL)
execute_process(
COMMAND scm/src/suite_info.py --fc "${CMAKE_Fortran_COMPILER_ID}" --rl ${RL}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
OUTPUT_VARIABLE suite_string
OUTPUT_STRIP_TRAILING_WHITESPACE
)
else()
execute_process(
COMMAND scm/src/suite_info.py --fc "${CMAKE_Fortran_COMPILER_ID}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../..
OUTPUT_VARIABLE suite_string
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
set(_ccpp_suites_arg "--suites=${suite_string}")
message("Calling CCPP code generator (ccpp_prebuild.py) for suites listed in scm/src/suite_info.py: ${_ccpp_suites_arg}.")
endif()
# Run CCPP prebuild.py
message (STATUS "Running ccpp_prebuild.py for CCPP")
Expand Down Expand Up @@ -69,7 +78,11 @@ SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/../../CMakeModule

find_package(NetCDF REQUIRED COMPONENTS C Fortran)
find_package(bacio REQUIRED)
find_package(sp REQUIRED)
# Use ip@5 or later if available, fall back to sp
find_package(ip 5)
if(NOT ip_FOUND)
find_package(sp REQUIRED)
endif()
find_package(w3emc REQUIRED)
find_package(MPI REQUIRED)
if(NOT MPI_Fortran_HAVE_F08_MODULE)
Expand Down Expand Up @@ -156,6 +169,7 @@ endif()
if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message(STATUS "Compile using GNU")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ggdb -fbacktrace -cpp -fcray-pointer -ffree-line-length-none -fno-range-check")
set(CMAKE_Fortran_FLAGS_OPENMP_OFF "-fno-openmp")

if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
Expand Down Expand Up @@ -184,6 +198,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message(STATUS "Compile using Intel OneAPI")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -align array64byte -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source")
set(CMAKE_Fortran_FLAGS_OPENMP_OFF "-fno-openmp")

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
Expand Down Expand Up @@ -223,6 +238,7 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
message(STATUS "Compile using Intel Classic")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source")
set(CMAKE_Fortran_FLAGS_OPENMP_OFF "-fno-openmp")

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -real-size 64")
Expand All @@ -233,11 +249,11 @@ if (${CMAKE_Fortran_COMPILER_ID} MATCHES "GNU")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ftrapuv")
else()
if(32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3")
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O2 -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3 -no-prec-div -no-prec-sqrt")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -debug minimal -fp-model source -qoverride-limits -qopt-prefetch=3 -no-prec-div")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -debug minimal")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -debug minimal")
set(FAST "-fast-transcendentals")
if(AVX2)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -march=core-avx2")
Expand Down Expand Up @@ -268,6 +284,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "NVHPC")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
set(CMAKE_Fortran_FLAGS_OPENMP_OFF "-nomp")

if(NOT 32BIT)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -r8")
Expand Down Expand Up @@ -302,7 +319,7 @@ if(32BIT)
message(STATUS "Compile CCPP slow physics with 64-bit precision, fast physics with 32-bit precision")
add_definitions(-DOVERLOAD_R4)
if(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
# set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64 -no-prec-div -no-prec-sqrt")
# set(CMAKE_Fortran_FLAGS_PHYSICS "-real-size 64 -no-prec-div")
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
# set(CMAKE_Fortran_FLAGS_PHYSICS "-fdefault-real-8 -fdefault-double-8")
endif()
Expand Down Expand Up @@ -367,11 +384,23 @@ SET(scm_source_files scm.F90
ADD_EXECUTABLE(scm ${scm_source_files} ccpp_static_api.F90)

if(OPENMP)
TARGET_LINK_LIBRARIES(scm PUBLIC OpenMP::OpenMP_Fortran)
target_link_libraries(scm OpenMP::OpenMP_Fortran)
endif()
target_link_libraries(scm NetCDF::NetCDF_Fortran)
if(TARGET bacio::bacio)
set(BACIO_TARGET bacio::bacio)
elseif(TARGET bacio::bacio_4)
set(BACIO_TARGET bacio::bacio_4)
else()
message(FATAL_ERROR
"bacio found but expected target not exported (bacio::bacio or bacio::bacio_4)")
endif()
target_link_libraries(scm ${BACIO_TARGET})
if(ip_FOUND)
target_link_libraries(scm ip::ip_d)
else()
target_link_libraries(scm sp::sp_d)
endif()
TARGET_LINK_LIBRARIES(scm NetCDF::NetCDF_Fortran)
TARGET_LINK_LIBRARIES(scm bacio::bacio_4)
TARGET_LINK_LIBRARIES(scm sp::sp_d)
TARGET_LINK_LIBRARIES(scm w3emc::w3emc_d)
TARGET_LINK_LIBRARIES(scm ccpp_framework)
TARGET_LINK_LIBRARIES(scm ccpp_physics)
Expand Down
45 changes: 30 additions & 15 deletions scm/src/suite_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#DEFAULT_SUITE_BEHAVIOR = 'supported'
DEFAULT_SUITE_BEHAVIOR = 'regression_test'

DEFAULT_RUN_LIST = 'all'

class suite(object):

DEFAULT_MAX_TIMESTEP = 1800.0
Expand Down Expand Up @@ -83,12 +85,20 @@ def timestep(self, value):
def main():
# find which compiler is being used
parser = argparse.ArgumentParser()
parser.add_argument("--fc")
parser.add_argument("--fc", help='Fortran compiler being used (e.g. gnu, intel, intelllvm, nvhpc)', required=False)
parser.add_argument("--rl", help='run list type in rt_test_cases.py (e.g. supported, dev, legacy, sp)', required=False)
args = parser.parse_args()


fc = args.fc
rl = args.rl

if not rl or rl.lower() not in ['all','supported','legacy','dev', 'sp']:
#printing a warning will mess up the cmake process because it passes in everything printed out by this script to the '--suites' argument of ccpp_prebuild.py
rl = DEFAULT_RUN_LIST

#print supported suites separated by commas
suite_string = ''

if DEFAULT_SUITE_BEHAVIOR == 'regression_test':
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(1, dir_path + '/../../test/')
Expand All @@ -98,27 +108,32 @@ def main():
import rt_test_cases

# choose correct compiler
if 'gnu' in args.fc.lower():
if 'gnu' in fc.lower():
rttc = rt_test_cases.gnu_test_cases
elif 'intel' in args.fc.lower():
elif 'intel' in fc.lower():
rttc = rt_test_cases.intel_test_cases
elif 'nvhpc' in args.fc.lower():
elif 'nvhpc' in fc.lower():
rttc = rt_test_cases.nvhpc_test_cases
else:
print("Warning: suite_info.py was unable to match CMAKE_Fortran_COMPILER string, using default gnu rt test cases")
#printing a warning will mess up the cmake process because it passes in everything printed out by this script to the '--suites' argument of ccpp_prebuild.py
#print("Warning: suite_info.py was unable to match CMAKE_Fortran_COMPILER string, using default gnu rt test cases")
rttc = rt_test_cases.gnu_test_cases

for item in rttc.run_list_supported:
rt_suite_list.append(item.get("suite"))
if 'supported' in rl.lower() or 'all' in rl.lower():
for item in rttc.run_list_supported:
rt_suite_list.append(item.get("suite"))

for item in rttc.run_list_legacy:
rt_suite_list.append(item.get("suite"))
if 'legacy' in rl.lower() or 'all' in rl.lower():
for item in rttc.run_list_legacy:
rt_suite_list.append(item.get("suite"))

for item in rttc.run_list_dev:
rt_suite_list.append(item.get("suite"))
if 'dev' in rl.lower() or 'all' in rl.lower():
for item in rttc.run_list_dev:
rt_suite_list.append(item.get("suite"))

for item in rttc.run_list_sp:
rt_suite_list.append(item.get("suite"))
if 'sp' in rl.lower() or 'all' in rl.lower():
for item in rttc.run_list_sp:
rt_suite_list.append(item.get("suite"))

unique_suite_list = list(set(rt_suite_list))

Expand Down
1 change: 0 additions & 1 deletion scm/src/supported_cases.py

This file was deleted.

2 changes: 0 additions & 2 deletions scm/src/supported_suites.py

This file was deleted.

Loading