From 9cfacdb76827dfc8326645dce3e89cf25a42ec93 Mon Sep 17 00:00:00 2001 From: Soren Rasmussen Date: Thu, 20 Jun 2024 13:39:30 -0600 Subject: [PATCH] Find MPI package and require mpi_f08 module. Include MPI module paths, this fixes use mpi_f08 error in framework/src/ccpp_types.F90 --- scm/src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index af7152ce3..a42583c6c 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -71,6 +71,10 @@ find_package(NetCDF REQUIRED COMPONENTS C Fortran) find_package(bacio REQUIRED) find_package(sp REQUIRED) find_package(w3emc REQUIRED) +find_package(MPI REQUIRED) +if(NOT MPI_Fortran_HAVE_F08_MODULE) + message(FATAL_ERROR "MPI_F08 Required") +endif() SET(CCPP_FRAMEWORK_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(CCPP_PHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) @@ -90,6 +94,7 @@ endif() INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/framework/src) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/physics) +include_directories(${MPI_Fortran_INCLUDE_PATH}) #------------------------------------------------------------------------------ # Add required preprocessor flags for build type