Skip to content

Commit

Permalink
Update test_prebuild/test_blocked_data test_prebuild/test_chunked_dat…
Browse files Browse the repository at this point in the history
…a now that mpi_f08 is a mandatory dependency
  • Loading branch information
climbfuji committed Feb 23, 2024
1 parent 2cee086 commit a4524b5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
10 changes: 9 additions & 1 deletion test_prebuild/test_blocked_data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ cmake_minimum_required(VERSION 3.0)

project(ccpp_blocked_data
VERSION 1.0.0
LANGUAGES Fortran)
LANGUAGES C Fortran)

#------------------------------------------------------------------------------
# Request a static build
option(BUILD_SHARED_LIBS "Build a shared library" OFF)

#------------------------------------------------------------------------------
# Set MPI flags for C/C++/Fortran with MPI F08 interface
find_package(MPI REQUIRED C Fortran)
if(NOT MPI_Fortran_HAVE_F08_MODULE)
message(FATAL_ERROR "MPI implementation does not support the Fortran 2008 mpi_f08 interface")
endif()

#------------------------------------------------------------------------------
# Set the sources: physics type definitions
set(TYPEDEFS $ENV{CCPP_TYPEDEFS})
Expand Down Expand Up @@ -57,6 +64,7 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -fno-unsafe-math-optimizatio

#------------------------------------------------------------------------------
add_library(ccpp_blocked_data STATIC ${SCHEMES} ${CAPS} ${API})
target_link_libraries(ccpp_blocked_data PRIVATE MPI::MPI_Fortran)
# Generate list of Fortran modules from defined sources
foreach(source_f90 ${CAPS} ${API})
get_filename_component(tmp_source_f90 ${source_f90} NAME)
Expand Down
3 changes: 3 additions & 0 deletions test_prebuild/test_blocked_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ mkdir build
cd build
cmake .. 2>&1 | tee log.cmake
make 2>&1 | tee log.make
./test_blocked_data.x
# On systems where linking against the MPI library requires a parallel launcher,
# use 'mpirun -np 1 ./test_blocked_data.x' or 'srun -n 1 ./test_blocked_data.x' etc.
```
10 changes: 9 additions & 1 deletion test_prebuild/test_chunked_data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@ cmake_minimum_required(VERSION 3.0)

project(ccpp_chunked_data
VERSION 1.0.0
LANGUAGES Fortran)
LANGUAGES C Fortran)

#------------------------------------------------------------------------------
# Request a static build
option(BUILD_SHARED_LIBS "Build a shared library" OFF)

#------------------------------------------------------------------------------
# Set MPI flags for C/C++/Fortran with MPI F08 interface
find_package(MPI REQUIRED C Fortran)
if(NOT MPI_Fortran_HAVE_F08_MODULE)
message(FATAL_ERROR "MPI implementation does not support the Fortran 2008 mpi_f08 interface")
endif()

#------------------------------------------------------------------------------
# Set the sources: physics type definitions
set(TYPEDEFS $ENV{CCPP_TYPEDEFS})
Expand Down Expand Up @@ -57,6 +64,7 @@ set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -fno-unsafe-math-optimizatio

#------------------------------------------------------------------------------
add_library(ccpp_chunked_data STATIC ${SCHEMES} ${CAPS} ${API})
target_link_libraries(ccpp_chunked_data PRIVATE MPI::MPI_Fortran)
# Generate list of Fortran modules from defined sources
foreach(source_f90 ${CAPS} ${API})
get_filename_component(tmp_source_f90 ${source_f90} NAME)
Expand Down
3 changes: 3 additions & 0 deletions test_prebuild/test_chunked_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ mkdir build
cd build
cmake .. 2>&1 | tee log.cmake
make 2>&1 | tee log.make
./test_chunked_data.x
# On systems where linking against the MPI library requires a parallel launcher,
# use 'mpirun -np 1 ./test_chunked_data.x' or 'srun -n 1 ./test_chunked_data.x' etc.
```

0 comments on commit a4524b5

Please sign in to comment.