diff --git a/bin/build_emissary.sh b/bin/build_emissary.sh deleted file mode 100755 index bea946e1a..000000000 --- a/bin/build_emissary.sh +++ /dev/null @@ -1,173 +0,0 @@ -#!/bin/bash -# -# File: build_emissary.sh with symlink to build_emissary_mpi.sh -# -# MIT License -# -# Copyright (c) 2017 Advanced Micro Devices, Inc. All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, copy, -# modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# --- Start standard header to set AOMP environment variables ---- -realpath=$(realpath "$0") -thisdir=$(dirname "$realpath") -. "$thisdir/aomp_common_vars" -# --- end standard header ---- - -_sname=${0##*/} -BUILD_DIR=${BUILD_AOMP} -declare -a extra_cmake_opts=() - -if [ "$_sname" == "build_emissary_mpi.sh" ] ; then - EMISSARY_REPO_DIR=$AOMP_REPOS/emissary/MPI - extra_cmake_opts+=("-DLLVM_EXTERNAL_EMISSARY_MPI_INSTALL=$HOME/local/rocmopenmpi") - BUILD_EMISSARY_DIR="$BUILD_DIR/build/emissary_mpi" -elif [ "$_sname" == "build_emissary_hdf5.sh" ] ; then - EMISSARY_REPO_DIR=$AOMP_REPOS/emissary/HDF5 - BUILD_EMISSARY_DIR="$BUILD_DIR/build/emissary_hdf5" -else - echo "ERROR: You must run build_emissary_mpi.sh" - echo " or build_emissary_hdf5.sh" - exit -fi -echo "BUILD_EMISSARY_DIR=$BUILD_EMISSARY_DIR" - -echo "INFO: Getting latest sources for emissary in dir \"$EMISSARY_REPO_DIR\"" -if [ -d "$EMISSARY_REPO_DIR" ] ; then - echo cd "$EMISSARY_REPO_DIR" - cd "$EMISSARY_REPO_DIR" || exit - echo git pull - git pull -else - echo cd "$AOMP_REPOS" - cd "$AOMP_REPOS" || exit - echo git clone git@github.com:rocm/emissary - git clone git@github.com:rocm/emissary - cd "$EMISSARY_REPO_DIR" || exit -fi - - -BUILDTYPE="Release" - -# Install EMISSARY in the compiler directory of ROCm -INSTALL_EMISSARY=${INSTALL_EMISSARY:-$AOMP_INSTALL_DIR}/lib/llvm - -if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then - echo " " - echo "Example commands and actions: " - echo " ./build_emissary_mpi.sh cmake, make, NO Install " - echo " ./build_emissary_mpi.sh nocmake NO cmake, make, NO install " - echo " ./build_emissary_mpi.sh install NO Cmake, make install " - echo " " - exit -fi - -if [ ! -d "$EMISSARY_REPO_DIR" ] ; then - echo "ERROR: Missing repository $EMISSARY_REPO_DIR/" - exit 1 -fi - -if [ ! -f "$LLVM_INSTALL_LOC/bin/clang" ] ; then - echo "ERROR: Missing file $LLVM_INSTALL_LOC/bin/clang" - echo " Build the AOMP llvm compiler in $AOMP first" - echo " This is needed to build the emissary libraries" - echo " " - exit 1 -fi - -check_writable_installdir "$1" "$INSTALL_EMISSARY" - -export OPENMPI_DIR=$HOME/local/rocmopenmpi - -patchrepo "$AOMP_REPOS/emissary" - -if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then - if [ -d "$BUILD_EMISSARY_DIR" ] ; then - echo - echo "FRESH START , CLEANING UP FROM PREVIOUS BUILD" - echo "rm -rf $BUILD_EMISSARY_DIR" - rm -rf "$BUILD_EMISSARY_DIR" - fi - - declare -a MYCMAKEOPTS - -# MYCMAKEOPTS=("${AOMP_ORIGIN_RPATH[@]}" -DCMAKE_BUILD_TYPE="$BUILDTYPE" -# -DCMAKE_INSTALL_PREFIX="$INSTALL_EMISSARY" -# -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -# -DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" -# -DCMAKE_EXE_LINKER_FLAGS='-Wl,--disable-new-dtags') - - MYCMAKEOPTS=( - -DCMAKE_BUILD_TYPE="$BUILDTYPE" - "${extra_cmake_opts[@]}" - "-DLLVM_MAIN_SRC_DIR=$AOMP_REPOS/llvm-project" - -DCMAKE_INSTALL_PREFIX="$INSTALL_EMISSARY") - - - mkdir -p "$BUILD_EMISSARY_DIR" - cd "$BUILD_EMISSARY_DIR" || exit - echo - echo " ---- Running ${AOMP_CMAKE} for emissary ---- " - echo "${AOMP_CMAKE}" -B . "${MYCMAKEOPTS[@]}" -S "$EMISSARY_REPO_DIR" - - if ! ${AOMP_CMAKE} -B . "${MYCMAKEOPTS[@]}" -S "$EMISSARY_REPO_DIR" ; then - echo "ERROR emissary cmake failed. Cmake flags" - echo " $(shquot "${MYCMAKEOPTS[@]}")" - exit 1 - fi -fi - -if [ "$1" = "cmake" ]; then - exit 0 -fi - -cd "$BUILD_EMISSARY_DIR" || exit -echo -echo " ---- Running $AOMP_CMAKE -j $AOMP_JOB_THREADS for emissary ---- " - -if ! ${AOMP_CMAKE} --build . --target all -j "$AOMP_JOB_THREADS" ; then - echo " " - echo "ERROR: ${AOMP_CMAKE} -j $AOMP_JOB_THREADS FAILED" - echo "To restart:" - echo " cd $BUILD_EMISSARY_DIR" - echo " $AOMP_CMAKE " - exit 1 -else - if [ "$1" != "install" ] ; then - echo - echo " BUILD COMPLETE! To install emissary component run this command:" - echo " $0 install" - echo - fi -fi - -# ----------- Install only if asked ---------------------------- -if [ "$1" == "install" ] ; then - cd "$BUILD_EMISSARY_DIR" || exit - echo - echo " -----Installing to $INSTALL_EMISSARY ----- " - - if ! $SUDO make install; then - echo "ERROR make install failed " - exit 1 - fi - removepatch "$AOMP_REPOS/emissary" -fi diff --git a/bin/build_emissary_mpi.sh b/bin/build_emissary_mpi.sh deleted file mode 120000 index a63faa71c..000000000 --- a/bin/build_emissary_mpi.sh +++ /dev/null @@ -1 +0,0 @@ -build_emissary.sh \ No newline at end of file diff --git a/bin/build_supp.sh b/bin/build_supp.sh index ee4f1fa2d..da7714141 100755 --- a/bin/build_supp.sh +++ b/bin/build_supp.sh @@ -52,7 +52,7 @@ $ $AOMP_SUPP/build/cmdlog File with log of all components built EOF } -SUPPLEMENTAL_COMPONENTS=${SUPPLEMENTAL_COMPONENTS:-openmpi silo hdf5 fftw ninja rocmopenmpi xpmem ucx ucc} +SUPPLEMENTAL_COMPONENTS=${SUPPLEMENTAL_COMPONENTS:-openmpi silo hdf5 fftw ninja} PREREQUISITE_COMPONENTS=${PREREQUISITE_COMPONENTS:-cmake rocmsmilib hwloc aqlprofile rocm-core} # --- Start standard header to set AOMP environment variables ---- @@ -136,233 +136,36 @@ function checkversion(){ fi fi } - -function derive_rocm_path(){ - # Derive ROCM_PATH - for AOMP installations, AOMP itself is the ROCm root - # Check if AOMP has ROCm headers (include/hip, include/rocm-core, etc.) - if [ -d "$AOMP/include/hip" ] || [ -d "$AOMP/include/rocm-core" ] ; then - ROCM_PATH=$AOMP - elif [ -d "$AOMPHIP/include/hip" ] || [ -d "$AOMPHIP/include/rocm-core" ] ; then - ROCM_PATH=$AOMPHIP - elif [ -n "$LLVM_INSTALL_LOC" ] && [ -d "$LLVM_INSTALL_LOC/../../../include/hip" ] ; then - # For standard ROCm installations: LLVM at $ROCM/lib/llvm - ROCM_PATH=$(realpath "$LLVM_INSTALL_LOC/../../..") - elif [ -d "$(realpath -m "$AOMP")/../../include/hip" ] ; then - # Fallback: check parent of AOMP - ROCM_PATH=$(realpath -m "$(realpath -m "$AOMP")"/../..) - else - echo "Error: Cannot determine ROCM_PATH." - echo " Expected ROCm headers at \$AOMP/include/hip or similar." - echo " AOMP=$AOMP" - return 1 - fi - ROCM_PATH=$(realpath "$ROCM_PATH") - export HIPCC="$ROCM_PATH/bin/amdclang" - return 0 -} - -################################################################################ -# XPMEM - Cross-Process Memory Access for high-performance shared memory -################################################################################ -function buildxpmem(){ - _cname="xpmem" - _version=2.7.4 - _installdir=$AOMP_SUPP_INSTALL/$_cname-$_version - _linkfrom=$AOMP_SUPP/$_cname - _builddir=$AOMP_SUPP_BUILD/$_cname - - SKIPBUILD="FALSE" - checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then - return - fi - if [ -d "$_builddir" ] ; then - runcmd "rm -rf $_builddir" - fi - runcmd "mkdir -p $_builddir" - runcmd "cd $_builddir" - runcmd "wget https://github.com/openucx/xpmem/archive/refs/tags/v$_version.tar.gz" - runcmd "tar -xzf v$_version.tar.gz" - runcmd "cd xpmem-$_version" - if [ -d "$_installdir" ] ; then - runcmd "rm -rf $_installdir" - fi - runcmd "mkdir -p $_installdir" - runcmd "./autogen.sh" - runcmd "./configure --prefix=$_installdir" - runcmd "make -j${AOMP_JOB_THREADS}" - runcmd "make install" - if [ -L "$_linkfrom" ] ; then - runcmd "rm $_linkfrom" - fi - runcmd "ln -sfr $_installdir $_linkfrom" - echo "# $_linkfrom is now symbolic link to $_installdir " >>"$CMDLOGFILE" -} - -################################################################################ -# UCX - Unified Communication X for high-performance networking -################################################################################ -function builducx(){ - _cname="ucx" - _version=1.20.0 - _installdir=$AOMP_SUPP_INSTALL/$_cname-$_version - _linkfrom=$AOMP_SUPP/$_cname - _builddir=$AOMP_SUPP_BUILD/$_cname - - SKIPBUILD="FALSE" - checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then - return - fi - - derive_rocm_path || return - - # Check if XPMEM is available - if [ ! -d "$AOMP_SUPP/xpmem" ] ; then - echo "Info: XPMEM not found at $AOMP_SUPP/xpmem, building it first..." - buildxpmem - fi - XPMEM_PATH=$AOMP_SUPP/xpmem - - SKIPBUILD="FALSE" - checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then - return - fi - if [ -d "$_builddir" ] ; then - runcmd "rm -rf $_builddir" - fi - runcmd "mkdir -p $_builddir" - runcmd "cd $_builddir" - runcmd "wget https://github.com/openucx/ucx/releases/download/v$_version/ucx-$_version.tar.gz" - runcmd "tar -xzf ucx-$_version.tar.gz" - runcmd "cd ucx-$_version" - runcmd "mkdir -p build" - runcmd "cd build" - if [ -d "$_installdir" ] ; then - runcmd "rm -rf $_installdir" - fi - runcmd "mkdir -p $_installdir" - - # Configure UCX with ROCm and XPMEM support - runcmd "../contrib/configure-release \ - --prefix=$_installdir \ - --with-rocm=$ROCM_PATH \ - --with-xpmem=$XPMEM_PATH \ - --without-cuda \ - --enable-mt \ - --enable-optimizations \ - --disable-logging \ - --disable-debug \ - --enable-assertions \ - --enable-params-check \ - --enable-examples" - - runcmd "make -j${AOMP_JOB_THREADS}" - runcmd "make install" - if [ -L "$_linkfrom" ] ; then - runcmd "rm $_linkfrom" - fi - runcmd "ln -sfr $_installdir $_linkfrom" - echo "# $_linkfrom is now symbolic link to $_installdir " >>"$CMDLOGFILE" -} - -################################################################################ -# UCC - Unified Collective Communication for collective operations -################################################################################ -function builducc(){ - _cname="ucc" - _version=1.6.0 - _installdir=$AOMP_SUPP_INSTALL/$_cname-$_version - _linkfrom=$AOMP_SUPP/$_cname - _builddir=$AOMP_SUPP_BUILD/$_cname - - SKIPBUILD="FALSE" - checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then - return - fi - - derive_rocm_path || return - - # Check if UCX is available - if [ ! -d "$AOMP_SUPP/ucx" ] ; then - echo "Info: UCX not found at $AOMP_SUPP/ucx, building it first..." - builducx - fi - UCX_PATH=$AOMP_SUPP/ucx - - SKIPBUILD="FALSE" - checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then - return - fi - if [ -d "$_builddir" ] ; then - runcmd "rm -rf $_builddir" - fi - runcmd "mkdir -p $_builddir" - runcmd "cd $_builddir" - runcmd "wget https://github.com/openucx/ucc/archive/refs/tags/v$_version.tar.gz" - runcmd "tar -xzf v$_version.tar.gz" - runcmd "cd ucc-$_version" - if [ -d "$_installdir" ] ; then - runcmd "rm -rf $_installdir" - fi - runcmd "mkdir -p $_installdir" - runcmd "./autogen.sh" - - # Configure UCC with ROCm and UCX support - runcmd "./configure \ - --prefix=$_installdir \ - --with-rocm=$ROCM_PATH \ - --with-ucx=$UCX_PATH" - - runcmd "make -j${AOMP_JOB_THREADS}" - runcmd "make install" - if [ -L "$_linkfrom" ] ; then - runcmd "rm $_linkfrom" - fi - runcmd "ln -sfr $_installdir $_linkfrom" - echo "# $_linkfrom is now symbolic link to $_installdir " >>"$CMDLOGFILE" -} - -################################################################################ -# OpenMPI build helper - shared infrastructure for openmpi and rocmopenmpi -# Usage: _buildopenmpi_impl [extra_configure_opts...] -################################################################################ -function _buildopenmpi_impl(){ - local _cname="$1" - local _version="$2" - shift 2 - local _extra_configure_opts="$*" - local _release=v5.0 - local _installdir=$AOMP_SUPP_INSTALL/$_cname-$_version - local _linkfrom=$AOMP_SUPP/$_cname - local _builddir=$AOMP_SUPP_BUILD/$_cname - +function buildopenmpi(){ # Not all builds, trunk for example, install clang into lib/llvm/bin. Fall back on $AOMP/bin. if [ ! -f "$LLVM_INSTALL_LOC/bin/${FLANG}" ] ; then LLVM_INSTALL_LOC=$AOMP if [ ! -f "$LLVM_INSTALL_LOC/bin/${FLANG}" ] ; then LLVM_INSTALL_LOC=$AOMP/lib/llvm if [ ! -f "$LLVM_INSTALL_LOC/bin/${FLANG}" ] ; then - echo "Error: $_cname build cannot find ${FLANG} executable. Set AOMP to location of $FLANG " + echo "Error: buildopenmpi cannot find ${FLANG} executable. Set AOMP to location of $FLANG " exit 1 fi fi fi if [ ! -d "$AOMP_SUPP/hwloc" ] ; then - echo "Error: 'build_supp.sh $_cname' requires that hwloc is installed at $AOMP_SUPP/hwloc" + echo "Error: 'build_supp.sh openmpi' requires that hwloc is installed at $AOMP_SUPP/hwloc" echo " Please run 'build_supp.sh hwloc' " exit 1 fi + _cname="openmpi" + _version=5.0.8 + _release=v5.0 + _installdir=$AOMP_SUPP_INSTALL/$_cname-$_version + _linkfrom=$AOMP_SUPP/$_cname + _builddir=$AOMP_SUPP_BUILD/$_cname + SKIPBUILD="FALSE" checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then + if [ "$SKIPBUILD" == "TRUE" ] ; then return fi - if [ -d "$_builddir" ] ; then runcmd "rm -rf $_builddir" fi @@ -376,30 +179,11 @@ function _buildopenmpi_impl(){ runcmd "rm -rf $_installdir" fi runcmd "mkdir -p $_installdir" - - # Update configure to recognize flang + ### update configure to recognize flang runcmd "cp configure configure-orig" runcmdout "sed -e s/flang\s*)/flang*)/ configure-orig" configure - - # Configure with common options plus any extra options - runcmd "./configure \ - --prefix=$_installdir \ - --with-hwloc=$AOMP_SUPP/hwloc \ - --with-hwloc-libdir=$AOMP_SUPP/hwloc/lib \ - OMPI_CC=$LLVM_INSTALL_LOC/bin/clang \ - OMPI_CXX=$LLVM_INSTALL_LOC/bin/clang++ \ - OMPI_F90=$LLVM_INSTALL_LOC/bin/${FLANG} \ - CXX=$LLVM_INSTALL_LOC/bin/clang++ \ - CC=$LLVM_INSTALL_LOC/bin/clang \ - FC=$LLVM_INSTALL_LOC/bin/${FLANG} \ - $_extra_configure_opts" - - if [[ "$_version" == "5.0.10" ]] ; then - if [ -f "$thisdir/patches/ompi.patch" ] ; then - runcmdin "patch --merge -p1" "$thisdir/patches/ompi.patch" - fi - fi - + ### + runcmd "./configure --with-hwloc=$AOMP_SUPP/hwloc --with-hwloc-libdir=$AOMP_SUPP/hwloc/lib OMPI_CC=$LLVM_INSTALL_LOC/bin/clang OMPI_CXX=$LLVM_INSTALL_LOC/bin/clang++ OMPI_F90=$LLVM_INSTALL_LOC/bin/${FLANG} CXX=$LLVM_INSTALL_LOC/bin/clang++ CC=$LLVM_INSTALL_LOC/bin/clang FC=$LLVM_INSTALL_LOC/bin/${FLANG} --prefix=$_installdir" runcmd "make -j${AOMP_JOB_THREADS}" runcmd "make install" if [ -L "$_linkfrom" ] ; then @@ -409,71 +193,6 @@ function _buildopenmpi_impl(){ echo "# $_linkfrom is now symbolic link to $_installdir " >>"$CMDLOGFILE" } -################################################################################ -# OpenMPI (standard build without ROCm support) -################################################################################ -function buildopenmpi(){ - _cname="openmpi" - _version=5.0.8 - _buildopenmpi_impl $_cname $_version -} - -################################################################################ -# ROCm OpenMPI - OpenMPI with ROCm/GPU-aware MPI support -# This builds OpenMPI with UCX, UCC, and ROCm support for GPU-aware MPI -################################################################################ -function buildrocmopenmpi(){ - _cname="rocmopenmpi" - _version=5.0.10 - _installdir=$AOMP_SUPP_INSTALL/$_cname-$_version - _linkfrom=$AOMP_SUPP/$_cname - _builddir=$AOMP_SUPP_BUILD/$_cname - - SKIPBUILD="FALSE" - checkversion - if [ "$SKIPBUILD" == "TRUE" ] ; then - return - fi - - derive_rocm_path || return - echo "Info: Using ROCM_PATH=$ROCM_PATH" - - # Check and build dependencies if needed - if [ ! -d "$AOMP_SUPP/ucx" ] ; then - echo "Info: UCX not found at $AOMP_SUPP/ucx, building it first..." - builducx - fi - UCX_PATH=$AOMP_SUPP/ucx - - if [ ! -d "$AOMP_SUPP/ucc" ] ; then - echo "Info: UCC not found at $AOMP_SUPP/ucc, building it first..." - builducc - fi - UCC_PATH=$AOMP_SUPP/ucc - - # Build OpenMPI with ROCm-specific configure options - _buildopenmpi_impl $_cname $_version \ - "--with-rocm=$ROCM_PATH" \ - "--with-ucx=$UCX_PATH" \ - "--with-ucc=$UCC_PATH" \ - "--enable-mca-no-build=btl-uct" \ - "--enable-mpi" \ - "--enable-mpi-fortran" \ - "--disable-debug" - - # Configure default MCA parameters for UCX - local _installdir=$AOMP_SUPP_INSTALL/rocmopenmpi-5.0.10 - if [ -d "$_installdir/etc" ] ; then - echo "# Setting UCX as default point-to-point and one-sided communication" - { - echo "pml = ucx" - echo "osc = ucx" - echo "coll_ucc_enable = 1" - echo "coll_ucc_priority = 100" - } >> "${_installdir}/etc/openmpi-mca-params.conf" - echo "# MCA params configured for UCX default" >>"$CMDLOGFILE" - fi -} function buildninja(){ _cname="ninja" _version=1.13.2 @@ -546,9 +265,13 @@ function getrocmpackage(){ deb_version="24" os_version=$(grep VERSION_ID /etc/os-release | cut -d"\"" -f2) [ "$os_version" == "22.04" ] && deb_version="22" + #https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hsa-amd-aqlprofile6.1.0/hsa-amd-aqlprofile6.1.0_1.0.0.60100.60100-82~${deb_version}_amd64.deb + #https://repo.radeon.com/rocm/apt/6.1/pool/main/h/hsa-amd-aqlprofile6.1.0/hsa-amd-aqlprofile6.1.0_1.0.0.60100.60100-82~22.04_amd64.deb runcmd "wget https://repo.radeon.com/rocm/apt/$_version/pool/main/$_directory/$_packagename$_packageversion/$_packagename${_packageversion}_${_componentversion}.${_fullversion}-${_buildnumber}~${deb_version}.04_amd64.deb" + runcmd "dpkg -x $_packagename${_packageversion}_${_componentversion}.${_fullversion}-${_buildnumber}~${deb_version}.04_amd64.deb $_builddir" elif [[ $osname =~ "SLES" ]]; then + #https://repo.radeon.com/rocm/yum/6.1/main/hsa-amd-aqlprofile6.1.0-1.0.0.60100.60100-82.el7.x86_64.rpm runcmd "wget https://repo.radeon.com/rocm/zyp/$_version/main/$_packagename$_packageversion-$_componentversion.$_fullversion-sles156.$_buildnumber.x86_64.rpm" echo "$_packagename$_packageversion-$_componentversion.$_fullversion-sles156.$_buildnumber.x86_64.rpm | cpio -idm" rpm2cpio "$_packagename$_packageversion-$_componentversion.$_fullversion-sles156.$_buildnumber.x86_64.rpm" | cpio -idm @@ -574,6 +297,7 @@ function getrocmpackage(){ runcmd "rm $_linkfrom" fi runcmd "ln -sfr $_installdir $_linkfrom" + #runcmd "rm -rf $_builddir" echo "# $_linkfrom is now symbolic link to $_installdir " >>"$CMDLOGFILE" } @@ -630,6 +354,9 @@ function buildsilo(){ fi runcmd "mkdir -p $_builddir" runcmd "cd $_builddir" + # runcmd "wget https://wci.llnl.gov/sites/wci/files/2021-01/silo-$_version.tgz" + # runcmd "tar -xzf silo-$_version.tgz" + #runcmd "wget https://software.llnl.gov/Silo/ghpages/releases/silo-$_version.tar.xz" runcmd "wget https://github.com/LLNL/Silo/releases/download/$_version/silo-$_version.tar.xz" runcmd "tar -x --xz -f silo-$_version.tar.xz" runcmd "cd silo-$_version" @@ -830,14 +557,6 @@ for _component in $_components ; do } >> "$CMDLOGFILE" if [ "$_component" == "openmpi" ] ; then buildopenmpi - elif [ "$_component" == "rocmopenmpi" ] ; then - buildrocmopenmpi - elif [ "$_component" == "xpmem" ] ; then - buildxpmem - elif [ "$_component" == "ucx" ] ; then - builducx - elif [ "$_component" == "ucc" ] ; then - builducc elif [ "$_component" == "silo" ] ; then buildsilo elif [ "$_component" == "hdf5" ] ; then diff --git a/bin/build_xio.sh b/bin/build_xio.sh deleted file mode 100755 index 2662a138d..000000000 --- a/bin/build_xio.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/bash -# -# File: build_xio.sh -# Build the rocm-xio library librocm-xio.a -# The install option will install components into the aomp installation. -# -# MIT License -# -# Copyright (c) 2017 Advanced Micro Devices, Inc. All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person -# obtaining a copy of this software and associated documentation -# files (the "Software"), to deal in the Software without -# restriction, including without limitation the rights to use, copy, -# modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -# --- Start standard header to set AOMP environment variables ---- -realpath=$(realpath "$0") -thisdir=$(dirname "$realpath") -. "$thisdir/aomp_common_vars" -# --- end standard header ---- - -XIO_REPO_DIR=$AOMP_REPOS/rocm-xio -echo "INFO: Getting latest sources for rocm-xio in dir \"$XIO_REPO_DIR\"" -if [ -d "$XIO_REPO_DIR" ] ; then - echo cd "$XIO_REPO_DIR" - cd "$XIO_REPO_DIR" || exit - echo git pull https://github.com/ROCm/rocm-xio.git - git pull https://github.com/ROCm/rocm-xio.git -else - echo cd "$AOMP_REPOS" - cd "$AOMP_REPOS" || exit - echo git clone https://github.com/ROCm/rocm-xio.git - git clone https://github.com/ROCm/rocm-xio.git - cd "$XIO_REPO_DIR" || exit -fi - -BUILD_DIR=${BUILD_AOMP} - -BUILDTYPE="Release" - -# Install XIO in the compiler directory of ROCm -INSTALL_XIO=${INSTALL_XIO:-$AOMP_INSTALL_DIR}/lib/llvm - -if [ "$1" == "-h" ] || [ "$1" == "help" ] || [ "$1" == "-help" ] ; then - echo " " - echo "Example commands and actions: " - echo " ./build_xio.sh cmake, make, NO Install " - echo " ./build_xio.sh nocmake NO cmake, make, NO install " - echo " ./build_xio.sh install NO Cmake, make install " - echo " " - exit -fi - -if [ ! -d "$XIO_REPO_DIR" ] ; then - echo "ERROR: Missing repository $XIO_REPO_DIR/" - exit 1 -fi - -if [ ! -f "$LLVM_INSTALL_LOC/bin/clang" ] ; then - echo "ERROR: Missing file $LLVM_INSTALL_LOC/bin/clang" - echo " Build the AOMP llvm compiler in $AOMP first" - echo " This is needed to build the xio libraries" - echo " " - exit 1 -fi - -check_writable_installdir "$1" "$INSTALL_XIO" - -patchrepo "$AOMP_REPOS/rocm-xio" - -if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then - if [ -d "$BUILD_DIR/build/rocm-xio" ] ; then - echo - echo "FRESH START , CLEANING UP FROM PREVIOUS BUILD" - echo "rm -rf $BUILD_DIR/build/rocm-xio" - rm -rf "$BUILD_DIR/build/rocm-xio" - fi - - declare -a MYCMAKEOPTS - - MYCMAKEOPTS=("${AOMP_ORIGIN_RPATH[@]}" -DCMAKE_BUILD_TYPE="$BUILDTYPE" - -DCMAKE_INSTALL_PREFIX="$INSTALL_XIO" - -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON - -DCMAKE_INSTALL_RPATH="\$ORIGIN/../lib" - -DCMAKE_EXE_LINKER_FLAGS='-Wl,--disable-new-dtags') - - mkdir -p "$BUILD_DIR/build/rocm-xio" - cd "$BUILD_DIR/build/rocm-xio" || exit - echo - echo " -----Running ${AOMP_CMAKE} for xio ---- " - echo "${AOMP_CMAKE} -B . $(shquot "${MYCMAKEOPTS[@]}") -S $XIO_REPO_DIR" - - if ! ${AOMP_CMAKE} -B . "${MYCMAKEOPTS[@]}" -S "$XIO_REPO_DIR" ; then - echo "ERROR xio cmake failed. Cmake flags" - echo " $(shquot "${MYCMAKEOPTS[@]}")" - exit 1 - fi -fi - -if [ "$1" = "cmake" ]; then - exit 0 -fi - -cd "$BUILD_DIR/build/rocm-xio" || exit -echo -echo " -----Running $AOMP_CMAKE -j $AOMP_JOB_THREADS for xio ---- " - -if ! ${AOMP_CMAKE} --build . --target all -j "$AOMP_JOB_THREADS" ; then - echo " " - echo "ERROR: ${AOMP_CMAKE} -j $AOMP_JOB_THREADS FAILED" - echo "To restart:" - echo " cd $BUILD_DIR/build/rocm-xio" - echo " $AOMP_CMAKE " - exit 1 -else - if [ "$1" != "install" ] ; then - echo - echo " BUILD COMPLETE! To install xio component run this command:" - echo " $0 install" - echo - fi -fi - -# ----------- Install only if asked ---------------------------- -if [ "$1" == "install" ] ; then - cd "$BUILD_DIR/build/rocm-xio" || exit - echo - echo " -----Installing to $INSTALL_XIO ----- " - - if ! $SUDO make install; then - echo "ERROR make install failed " - exit 1 - fi - removepatch "$AOMP_REPOS/rocm-xio" -fi