From c4cc48c9882283d61dbdc2c0a8c7d38e3e180c02 Mon Sep 17 00:00:00 2001 From: Tom Benson Date: Tue, 3 Sep 2024 18:42:39 -0400 Subject: [PATCH] Remove some logic from the superbuild (#2469) * Remove some logic that shouldn't have been in the superbuild CMake in the first place. * Fixed whitespace. --------- Co-authored-by: Brian C. Van Essen --- .gitlab/build-and-test.sh | 4 ++++ scripts/superbuild/CMakeLists.txt | 21 ++----------------- scripts/superbuild/ci/ci_core_dependencies.sh | 1 + 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/.gitlab/build-and-test.sh b/.gitlab/build-and-test.sh index 530595a570..a2fe5c65d1 100755 --- a/.gitlab/build-and-test.sh +++ b/.gitlab/build-and-test.sh @@ -179,6 +179,10 @@ then cmake --build build-deps ninja -C build-deps gather-all + # Copy the suggested cmake prefix path to the install tree. + mkdir ${prefix}/logs + cp ${build_dir}/build-deps/lbann_sb_suggested_cmake_install_prefix.sh ${prefix}/logs + # Stamp these commits cd ${build_dir}/build-deps/aluminum/src && git rev-parse HEAD > ${prefix}/al-prebuilt-hash.txt cd ${build_dir}/build-deps/hydrogen/src && git rev-parse HEAD > ${prefix}/h-prebuilt-hash.txt diff --git a/scripts/superbuild/CMakeLists.txt b/scripts/superbuild/CMakeLists.txt index 549add11d2..cab2d726ca 100644 --- a/scripts/superbuild/CMakeLists.txt +++ b/scripts/superbuild/CMakeLists.txt @@ -154,25 +154,8 @@ if (LBANN_SB_BUILD_AWS_OFI_RCCL) message("export LD_LIBRARY_PATH=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib:\$\{LD_LIBARY_PATH\}\n") message("-----------------------------------------------------------------\n") file(APPEND "${CMAKE_BINARY_DIR}/lbann_sb_suggested_cmake_prefix_path.sh" - "export AWS_OFI_RCCL_LIBDIR=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib\n") - file(APPEND "${CMAKE_BINARY_DIR}/lbann_sb_suggested_cmake_prefix_path.sh" - "export LD_LIBRARY_PATH=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib:\$\{LD_LIBRARY_PATH\}\n") - file(APPEND "${CMAKE_INSTALL_PREFIX}/logs/lbann_sb_suggested_cmake_prefix_path.sh" - "export AWS_OFI_RCCL_LIBDIR=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib\n") - file(APPEND "${CMAKE_INSTALL_PREFIX}/logs/lbann_sb_suggested_cmake_prefix_path.sh" - "export LD_LIBRARY_PATH=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib:\$\{LD_LIBRARY_PATH\}\n") -endif () - -if (LBANN_SB_FWD_LBANN_LBANN_WITH_PYTHON_FRONTEND) - message("-----------------------------------------------------------------\n") - message("LBANN was built with support for the Python Front End (PFE) (If you need to install it via pip you can in the LBANN site-packages with):") - message(" python3 -m pip install --target \$\{LBANN_PYTHON_SITE_PACKAGES\} pytest") - message(" python3 -m pip install --target \$\{LBANN_PYTHON_SITE_PACKAGES\} protobuf") - if (LBANN_SB_FWD_LBANN_LBANN_WITH_CNPY) - message("\nLBANN was built with support for the NumPy (If you need to install it via pip you can in the LBANN site-packages with):") - message(" python3 -m pip install --target \$\{LBANN_PYTHON_SITE_PACKAGES\} numpy") - endif () - message("\n-----------------------------------------------------------------\n") + "export AWS_OFI_RCCL_LIBDIR=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib +export LD_LIBRARY_PATH=${LBANN_SB_AWS_OFI_RCCL_PREFIX}/lib:\$\{LD_LIBRARY_PATH\}\n") endif () # Add a custom target for bundling all things up diff --git a/scripts/superbuild/ci/ci_core_dependencies.sh b/scripts/superbuild/ci/ci_core_dependencies.sh index fe17d2d9ab..424d3a39bc 100755 --- a/scripts/superbuild/ci/ci_core_dependencies.sh +++ b/scripts/superbuild/ci/ci_core_dependencies.sh @@ -162,6 +162,7 @@ if [ ! -e ${INSTALL_PREFIX}/logs ]; then mkdir -p ${INSTALL_PREFIX}/logs fi module -t list 2> ${INSTALL_PREFIX}/logs/modules.txt +cp ${BUILD_DIR}/lbann_sb_suggested_cmake_prefix_path.sh ${INSTALL_PREFIX}/logs pushd ${BUILD_DIR} ninja