Skip to content
Merged
Changes from all commits
Commits
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 libs/build_mapl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ if $MODULES; then
module load esma_cmake
module load cmakemodules
module load ecbuild
# module exports ecbuild_ROOT, but when building without modules ECBUILD_ROOT is set
export ECBUILD_ROOT=$ecbuild_ROOT
module load gftl-shared
module load yafyaml
module load netcdf
Expand Down Expand Up @@ -61,13 +63,12 @@ CMAKE_OPTS=${STACK_mapl_cmake_opts:-""}

cmake .. \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_MODULE_PATH="${CMAKEMODULES_ROOT}/Modules;${ESMA_CMAKE_ROOT}" \
-DCMAKE_MODULE_PATH="${ESMA_CMAKE_ROOT};${CMAKEMODULES_ROOT}/Modules;${ECBUILD_ROOT}/share/ecbuild/cmake" \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds fine on Hera

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is a good idea to send the esma cmake and ecbuild from here. I am sure it is explicitly included in mapl.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESMA_CMAKE_ROOT is required to find ESMA_cmake. The esma.cmake script (included in MAPL/CmakeLists.txt) uses find_package(ecbuild) to load ecBuild.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ecbuild is handled internally, but if you set it here then it doesn't get set again when ecbuild is loaded and override FindNetCDF.

-DCMAKE_BUILD_TYPE=Release \
-DBUILD_WITH_FLAP=OFF \
-DBUILD_WITH_PFLOGGER=OFF \
-DESMA_USE_GFE_NAMESPACE=ON \
-DBUILD_SHARED_MAPL=OFF \
-DNetCDF_Fortran_EXTRA_LIBRARIES="`nc-config --libs`" \
${CMAKE_OPTS}

VERBOSE=$MAKE_VERBOSE make -j${NTHREADS:-4} install
Expand Down