Commit 37b24a07 authored by one's avatar one
Browse files

Fix rocHPL install.sh

parent 9727a645
...@@ -131,7 +131,7 @@ index 6d6be5d..d11c01a 100644 ...@@ -131,7 +131,7 @@ index 6d6be5d..d11c01a 100644
include(ROCMSetupVersion) include(ROCMSetupVersion)
diff --git a/install.sh b/install.sh diff --git a/install.sh b/install.sh
index b30a3fb..e577627 100755 index b30a3fb..4016a90 100755
--- a/install.sh --- a/install.sh
+++ b/install.sh +++ b/install.sh
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
...@@ -174,7 +174,7 @@ index b30a3fb..e577627 100755 ...@@ -174,7 +174,7 @@ index b30a3fb..e577627 100755
printf "sudo dnf install -y ${library_dependencies_fedora[*]}\n" printf "sudo dnf install -y ${library_dependencies_fedora[*]}\n"
;; ;;
@@ -105,42 +106,62 @@ check_exit_code( ) @@ -105,42 +106,60 @@ check_exit_code( )
# Clone and build OpenMPI+UCX in rochpl/tpl # Clone and build OpenMPI+UCX in rochpl/tpl
install_openmpi( ) install_openmpi( )
{ {
...@@ -194,6 +194,24 @@ index b30a3fb..e577627 100755 ...@@ -194,6 +194,24 @@ index b30a3fb..e577627 100755
- check_exit_code 2 - check_exit_code 2
- cd ucx; - cd ucx;
- ./autogen.sh; ./autogen.sh #why do we have to run this twice? - ./autogen.sh; ./autogen.sh #why do we have to run this twice?
- check_exit_code 2
- mkdir build; cd build
- ../contrib/configure-opt --prefix=${PWD}/../ --with-rocm=${with_rocm} --without-knem --without-cuda --without-java
- check_exit_code 2
- make -j$(nproc)
- check_exit_code 2
- make install
- check_exit_code 2
- cd ../../..
- elif ([ ! -f "${ucx_lib_folder}/libucm.so" ] || [ ! -f "${ucx_lib_folder}/libucp.so" ] || \
- [ ! -f "${ucx_lib_folder}/libucs.so" ] || [ ! -f "${ucx_lib_folder}/libuct.so" ]) && \
- ([ ! -f "${ucx_lib64_folder}/libucm.so" ] || [ ! -f "${ucx_lib64_folder}/libucp.so" ] || \
- [ ! -f "${ucx_lib64_folder}/libucs.so" ] || [ ! -f "${ucx_lib64_folder}/libuct.so" ]); then
- cd tpl/ucx;
- ./autogen.sh; ./autogen.sh
- check_exit_code 2
- mkdir build; cd build
- ../contrib/configure-opt --prefix=${PWD}/../ --with-rocm=${with_rocm} --without-knem --without-cuda --without-java
+ local ucx_lib_folder=${ucx_prefix}/lib + local ucx_lib_folder=${ucx_prefix}/lib
+ local ompi_lib_folder=${ompi_prefix}/lib + local ompi_lib_folder=${ompi_prefix}/lib
+ local ucx_lib64_folder=${ucx_prefix}/lib64 + local ucx_lib64_folder=${ucx_prefix}/lib64
...@@ -210,37 +228,21 @@ index b30a3fb..e577627 100755 ...@@ -210,37 +228,21 @@ index b30a3fb..e577627 100755
+ local ompi_tarball=openmpi-${ompi_version}.tar.gz + local ompi_tarball=openmpi-${ompi_version}.tar.gz
+ +
+ # Download UCX on demand + # Download UCX on demand
+ if [ ! -d "${ucx_src}" ]; then + rm -rf ${ucx_src}
+ if [ ! -f "${ucx_tarball}" ]; then + if [ ! -f "${ucx_tarball}" ]; then
+ wget https://github.com/openucx/ucx/releases/download/v${ucx_version}/${ucx_tarball} + wget https://github.com/openucx/ucx/releases/download/v${ucx_version}/${ucx_tarball}
+ fi
check_exit_code 2
- mkdir build; cd build
- ../contrib/configure-opt --prefix=${PWD}/../ --with-rocm=${with_rocm} --without-knem --without-cuda --without-java
+ tar -zxf ${ucx_tarball}
check_exit_code 2
- make -j$(nproc)
- check_exit_code 2
- make install
+ fi + fi
+ check_exit_code 2
+ tar -zxf ${ucx_tarball}
+ check_exit_code 2
+ # Download OpenMPI on demand + # Download OpenMPI on demand
+ if [ ! -d "${ompi_src}" ]; then + rm -rf ${ompi_src}
+ if [ ! -f "${ompi_tarball}" ]; then + if [ ! -f "${ompi_tarball}" ]; then
+ wget https://download.open-mpi.org/release/open-mpi/v${ompi_version%.*}/${ompi_tarball} + wget https://download.open-mpi.org/release/open-mpi/v${ompi_version%.*}/${ompi_tarball}
+ fi
check_exit_code 2
- cd ../../..
- elif ([ ! -f "${ucx_lib_folder}/libucm.so" ] || [ ! -f "${ucx_lib_folder}/libucp.so" ] || \
- [ ! -f "${ucx_lib_folder}/libucs.so" ] || [ ! -f "${ucx_lib_folder}/libuct.so" ]) && \
- ([ ! -f "${ucx_lib64_folder}/libucm.so" ] || [ ! -f "${ucx_lib64_folder}/libucp.so" ] || \
- [ ! -f "${ucx_lib64_folder}/libucs.so" ] || [ ! -f "${ucx_lib64_folder}/libuct.so" ]); then
- cd tpl/ucx;
- ./autogen.sh; ./autogen.sh
+ tar -zxf ${ompi_tarball}
check_exit_code 2
- mkdir build; cd build
- ../contrib/configure-opt --prefix=${PWD}/../ --with-rocm=${with_rocm} --without-knem --without-cuda --without-java
+ fi + fi
+ check_exit_code 2
+ tar -zxf ${ompi_tarball}
+ check_exit_code 2
+ +
+ # Build UCX on demand + # Build UCX on demand
+ if ([ ! -f "${ucx_lib_folder}/libucm.so" ] || [ ! -f "${ucx_lib_folder}/libucp.so" ] || \ + if ([ ! -f "${ucx_lib_folder}/libucm.so" ] || [ ! -f "${ucx_lib_folder}/libucp.so" ] || \
...@@ -263,7 +265,7 @@ index b30a3fb..e577627 100755 ...@@ -263,7 +265,7 @@ index b30a3fb..e577627 100755
fi fi
# Check for successful build # Check for successful build
@@ -152,31 +173,24 @@ install_openmpi( ) @@ -152,31 +171,24 @@ install_openmpi( )
exit 3 exit 3
fi fi
...@@ -308,7 +310,7 @@ index b30a3fb..e577627 100755 ...@@ -308,7 +310,7 @@ index b30a3fb..e577627 100755
fi fi
# Check for successful build # Check for successful build
@@ -184,6 +198,13 @@ install_openmpi( ) @@ -184,6 +196,13 @@ install_openmpi( )
echo "Error: OpenMPI install unsuccessful." echo "Error: OpenMPI install unsuccessful."
exit_with_error 2 exit_with_error 2
fi fi
...@@ -322,7 +324,7 @@ index b30a3fb..e577627 100755 ...@@ -322,7 +324,7 @@ index b30a3fb..e577627 100755
} }
# ################################################# # #################################################
@@ -232,7 +253,7 @@ enable_tracing=false @@ -232,7 +251,7 @@ enable_tracing=false
# check if we have a modern version of getopt that can handle whitespace and long parameters # check if we have a modern version of getopt that can handle whitespace and long parameters
getopt -T getopt -T
if [[ $? -eq 4 ]]; then if [[ $? -eq 4 ]]; then
...@@ -331,7 +333,7 @@ index b30a3fb..e577627 100755 ...@@ -331,7 +333,7 @@ index b30a3fb..e577627 100755
else else
echo "Need a new version of getopt" echo "Need a new version of getopt"
exit_with_error 1 exit_with_error 1
@@ -263,6 +284,9 @@ while true; do @@ -263,6 +282,9 @@ while true; do
--with-mpi) --with-mpi)
with_mpi=${2} with_mpi=${2}
shift 2 ;; shift 2 ;;
...@@ -341,7 +343,7 @@ index b30a3fb..e577627 100755 ...@@ -341,7 +343,7 @@ index b30a3fb..e577627 100755
--with-mpi-gtl) --with-mpi-gtl)
with_mpi_gtl=${2} with_mpi_gtl=${2}
shift 2 ;; shift 2 ;;
@@ -294,9 +318,6 @@ printf "\033[32mCreating project build directory in: \033[33m${build_dir}\033[0m @@ -294,9 +316,6 @@ printf "\033[32mCreating project build directory in: \033[33m${build_dir}\033[0m
# ################################################# # #################################################
# prep # prep
# ################################################# # #################################################
...@@ -351,16 +353,7 @@ index b30a3fb..e577627 100755 ...@@ -351,16 +353,7 @@ index b30a3fb..e577627 100755
# Default cmake executable is called cmake # Default cmake executable is called cmake
cmake_executable=cmake cmake_executable=cmake
@@ -311,7 +332,7 @@ pushd . @@ -347,11 +366,14 @@ pushd .
# #################################################
if [[ "${with_mpi}" == tpl/openmpi ]]; then
- with_mpi=${PWD}/tpl/openmpi
+ with_mpi=${ompi_prefix}
install_openmpi
fi
@@ -347,11 +368,14 @@ pushd .
if [[ "${enable_tracing}" == on || "${enable_tracing}" == true || "${enable_tracing}" == 1 || "${enable_tracing}" == enabled ]]; then if [[ "${enable_tracing}" == on || "${enable_tracing}" == true || "${enable_tracing}" == 1 || "${enable_tracing}" == enabled ]]; then
cmake_common_options="${cmake_common_options} -DHPL_TRACING=ON" cmake_common_options="${cmake_common_options} -DHPL_TRACING=ON"
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment