Skip to content

Commit

Permalink
fix Hera gnu build (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
TingLei-daprediction authored Feb 3, 2025
1 parent e374f91 commit ef42dfe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modulefiles/gsi_hera.gnu.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
help([[
]])

prepend_path("MODULEPATH", "/contrib/spack-stack/spack-stack-1.6.0/envs/gsi-addon-dev-rocky8/install/modulefiles/Core")
--Needed for openmpi build
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")
prepend_path("MODULEPATH", "/scratch4/NCEPDEV/stmp/role.epic/spack-stack/spack-stack-1.6.0/envs/gsi-addon-dev-rocky8/install/modulefiles/Core")

local python_ver=os.getenv("python_ver") or "3.11.6"
local stack_gnu_ver=os.getenv("stack_gnu_ver") or "9.2.0"
local stack_openmpi_ver=os.getenv("stack_openmpi_ver") or "4.1.5"
local stack_openmpi_ver=os.getenv("stack_openmpi_ver") or "4.1.6"
local cmake_ver=os.getenv("cmake_ver") or "3.23.1"
local prod_util_ver=os.getenv("prod_util_ver") or "2.1.1"
local openblas_ver=os.getenv("openblas_ver") or "0.3.24"
Expand Down
4 changes: 4 additions & 0 deletions src/mgbf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ endif()
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
add_definitions(-DNDEBUG)
endif()
# Find MPI Package
find_package(MPI REQUIRED)

list(APPEND MGBF_SRC
kinds.f90
Expand Down Expand Up @@ -63,6 +65,8 @@ add_library(${PROJECT_NAME}::mgbf ALIAS mgbf)
set_target_properties(mgbf PROPERTIES Fortran_MODULE_DIRECTORY "${module_dir}")
target_include_directories(mgbf PUBLIC $<BUILD_INTERFACE:${module_dir}>
$<INSTALL_INTERFACE:include/mgbf>)
target_link_libraries(mgbf PUBLIC MPI::MPI_Fortran)


install(DIRECTORY ${module_dir} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)

Expand Down

0 comments on commit ef42dfe

Please sign in to comment.