Skip to content

Commit

Permalink
More NVidia support
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Jun 11, 2024
1 parent 399b830 commit 8a50bd0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[submodule "ccpp-framework"]
path = ccpp/framework
url = https://github.com/NCAR/ccpp-framework
branch = main
url = https://github.com/dustinswales/ccpp-framework
branch = feature/updates_for_Nvidia
[submodule "ccpp-physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = main
url = https://github.com/dustinswales/ccpp-physics
branch = feature/updates_for_Nvidia
[submodule "CMakeModules"]
path = CMakeModules
url = https://github.com/noaa-emc/CMakeModules
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 1 files
+5 −3 CMakeLists.txt
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 1 files
+5 −3 CMakeLists.txt
9 changes: 7 additions & 2 deletions scm/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ find_package(NetCDF REQUIRED COMPONENTS C Fortran)
find_package(bacio REQUIRED)
find_package(sp REQUIRED)
find_package(w3emc REQUIRED)
find_package(MPI REQUIRED Fortran)
if (NOT (${CMAKE_Fortran_COMPILER_ID} STREQUAL "NVHPC"))
find_package(MPI REQUIRED Fortran)
if(NOT MPI_Fortran_HAVE_F08_MODULE)
message(FATAL_ERROR "MPI implementation does not support the Fortran 2008 mpi_f08 interface")
endif()
endif()

SET(CCPP_FRAMEWORK_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework)
SET(CCPP_PHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics)
Expand Down Expand Up @@ -214,7 +219,7 @@ elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "NVHPC")

set(MPI_C_COMPILER nvc)
set(MPI_CXX_COMPILER nvcc)
set(MPI_Fortran_COMPILER nvfortran)
set(MPI_Fortran_COMPILER mpifort)

set(CMAKE_C_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
set(CMAKE_Fortran_FLAGS_RELEASE "-O2 -fPIC" CACHE STRING "" FORCE)
Expand Down

0 comments on commit 8a50bd0

Please sign in to comment.