From 6f5bfd86507b5bf4153fb3193c656d9de45049df Mon Sep 17 00:00:00 2001 From: Aarya Chaumal Date: Thu, 27 Jul 2023 01:19:58 -0500 Subject: [PATCH 1/4] Add HPX and HPXC build scripts --- build-hpx.sh | 30 ++++++++++++++++++++++++++++++ build-hpxc.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100755 build-hpx.sh create mode 100755 build-hpxc.sh diff --git a/build-hpx.sh b/build-hpx.sh new file mode 100755 index 0000000..cb0275d --- /dev/null +++ b/build-hpx.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +module load gcc/12.3.0 boost + +CURRENT_DIR=$1 +PREFIX="${CURRENT_DIR:=$(pwd)}" + +BUILD_TYPE=Debug +HPX_DIR=${PREFIX}/hpx/ + + +mkdir -p ${PREFIX} + +git clone git@github.com:STEllAR-GROUP/hpx.git ${HPX_DIR} + +cd ${HPX_DIR} +cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DCMAKE_CXX_FLAGS="-std=c++17" \ + -DCMAKE_CXX_COMPILER=g++ \ + -DHPX_WITH_THREAD_IDLE_RATES=ON \ + -DHPX_WITH_MALLOC=tcmalloc \ + -DHPX_WITH_EXAMPLES=OFF \ + -DHPX_WITH_APEX=ON \ + -DHPX_WITH_FETCH_ASIO=ON \ + -DHPX_WITH_DYNAMIC_HPX_MAIN=OFF \ + -Wdev -S ${HPX_DIR} -B ${HPX_DIR}/cmake-build/${BUILD_TYPE} + +cmake --build ${HPX_DIR}/cmake-build/${BUILD_TYPE}/ --parallel 2> hpx_err_log +cmake --install ${HPX_DIR}/cmake-build/${BUILD_TYPE}/ --prefix ${HPX_DIR}/cmake-install/${BUILD_TYPE} 2> hpx_err + diff --git a/build-hpxc.sh b/build-hpxc.sh new file mode 100755 index 0000000..7fd720d --- /dev/null +++ b/build-hpxc.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +module load gcc/12.3.0 boost + +set -e + +CURRENT_DIR=$1 +PREFIX="${CURRENT_DIR:=$(pwd)}" + +BUILD_TYPE=Debug +HPXC_DIR=${PREFIX}/hpxc +HPX_DIR=${PREFIX}/hpx/cmake-install/${BUILD_TYPE}/lib64/cmake/HPX + + +mkdir -p ${PREFIX} + +if [ ! -d ${HPXC_DIR} ]; then + git clone -b hpxmp git@github.com:rtohid/hpxc.git ${HPXC_DIR} +fi + +cmake \ + -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DHPX_DIR=${HPX_DIR} \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DCMAKE_CXX_FLAGS="-std=c++17" \ + -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_C_COMPILER=gcc \ + -Wdev -S ${HPXC_DIR} -B ${HPXC_DIR}/cmake-build/${BUILD_TYPE} \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + # -DHPXC_WITH_RW_LOCK=ON \ + +cmake --build ${HPXC_DIR}/cmake-build/${BUILD_TYPE}/ --parallel +cmake --install ${HPXC_DIR}/cmake-build/${BUILD_TYPE}/ --prefix ${HPXC_DIR}/cmake-install/${BUILD_TYPE} + From 22409ebab62bdc6442b772f9cb43242b94fcf9c5 Mon Sep 17 00:00:00 2001 From: Aarya Chaumal Date: Thu, 27 Jul 2023 01:27:05 -0500 Subject: [PATCH 2/4] Fix clone URL for hpx and hpxc --- build-hpx.sh | 2 +- build-hpxc.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build-hpx.sh b/build-hpx.sh index cb0275d..85f27e0 100755 --- a/build-hpx.sh +++ b/build-hpx.sh @@ -11,7 +11,7 @@ HPX_DIR=${PREFIX}/hpx/ mkdir -p ${PREFIX} -git clone git@github.com:STEllAR-GROUP/hpx.git ${HPX_DIR} +git clone https://github.com/STEllAR-GROUP/hpx.git ${HPX_DIR} cd ${HPX_DIR} cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ diff --git a/build-hpxc.sh b/build-hpxc.sh index 7fd720d..9efd402 100755 --- a/build-hpxc.sh +++ b/build-hpxc.sh @@ -15,7 +15,7 @@ HPX_DIR=${PREFIX}/hpx/cmake-install/${BUILD_TYPE}/lib64/cmake/HPX mkdir -p ${PREFIX} if [ ! -d ${HPXC_DIR} ]; then - git clone -b hpxmp git@github.com:rtohid/hpxc.git ${HPXC_DIR} + git clone https://github.com/STEllAR-GROUP/hpxc.git ${HPXC_DIR} fi cmake \ From 7d12a04212be93715a2a84b0695f2aafce377807 Mon Sep 17 00:00:00 2001 From: Aarya Chaumal Date: Thu, 27 Jul 2023 01:29:19 -0500 Subject: [PATCH 3/4] Dont redirect HPX build error to file --- build-hpx.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-hpx.sh b/build-hpx.sh index 85f27e0..2935d60 100755 --- a/build-hpx.sh +++ b/build-hpx.sh @@ -25,6 +25,6 @@ cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DHPX_WITH_DYNAMIC_HPX_MAIN=OFF \ -Wdev -S ${HPX_DIR} -B ${HPX_DIR}/cmake-build/${BUILD_TYPE} -cmake --build ${HPX_DIR}/cmake-build/${BUILD_TYPE}/ --parallel 2> hpx_err_log -cmake --install ${HPX_DIR}/cmake-build/${BUILD_TYPE}/ --prefix ${HPX_DIR}/cmake-install/${BUILD_TYPE} 2> hpx_err +cmake --build ${HPX_DIR}/cmake-build/${BUILD_TYPE}/ --parallel +cmake --install ${HPX_DIR}/cmake-build/${BUILD_TYPE}/ --prefix ${HPX_DIR}/cmake-install/${BUILD_TYPE} From d80fd864595070324d515b77fcad7ca14a2b8f71 Mon Sep 17 00:00:00 2001 From: Aarya Chaumal Date: Thu, 27 Jul 2023 01:34:28 -0500 Subject: [PATCH 4/4] Fix hpxmp and omp build scripts --- build-hpxmp.sh | 2 +- build-omp.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-hpxmp.sh b/build-hpxmp.sh index 86405c8..ff5e73f 100755 --- a/build-hpxmp.sh +++ b/build-hpxmp.sh @@ -25,7 +25,7 @@ BUILD_DIR=${OMP_DIR}/cmake-build-${PROJECT}/${BUILD_TYPE}/ mkdir -p ${PREFIX} if [ ! -d ${LLVM_DIR} ]; then - git clone --depth=1 -b hpxc git@github.com:light2802/llvm-project.git ${LLVM_DIR} + git clone --depth=1 -b hpxmp-v16 https://github.com/light2802/llvm-project.git ${LLVM_DIR} fi rm -rf ${BUILD_DIR} diff --git a/build-omp.sh b/build-omp.sh index 4efc64a..f628564 100755 --- a/build-omp.sh +++ b/build-omp.sh @@ -23,8 +23,8 @@ BUILD_DIR=${OMP_DIR}/cmake-build-${PROJECT}/${BUILD_TYPE}/ mkdir -p ${PREFIX} if [ ! -d ${LLVM_DIR} ]; then - git clone --depth=1 -b llvmorg-${LLVM_VERSION} git@github.com:llvm/llvm-project.git ${LLVM_DIR} - #git clone --depth=1 -b hpxc git@github.com:light2802/llvm-project.git ${LLVM_DIR} + #git clone --depth=1 -b llvmorg-${LLVM_VERSION} git@github.com:llvm/llvm-project.git ${LLVM_DIR} + git clone --depth=1 -b hpxmp-v16 https://github.com/light2802/llvm-project.git ${LLVM_DIR} fi rm -rf ${BUILD_DIR}