Skip to content

Commit

Permalink
update to fix installation
Browse files Browse the repository at this point in the history
  • Loading branch information
FindHao committed Mar 20, 2023
1 parent 1c6984b commit dc10bd2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
23 changes: 13 additions & 10 deletions bin/install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash

if [ $# -lt 1 ];then
echo "usage: bin/build.sh target_install_path"
exit -1
fi
# usage: install_path=/path/to/install CUDA_PATH=/scratch/opt/cuda-11.8 ./install.sh

current_path=$(dirname $(readlink -f $0))
# if current_path ends with gpupunk/bin, then source_path is gpupunk
if [[ $current_path =~ .*gpupunk/bin$ ]];then
Expand Down Expand Up @@ -38,15 +36,20 @@ function check_status {

echo "GPUPUNK-> install dependencies"
cd $install_path
git clone --depth 1 https://github.com/spack/spack.git
# if spack doesn't exist, then clone it
if [ ! -d spack ];then
git clone --depth 1 https://github.com/spack/spack.git
fi
export SPACK_ROOT=$(pwd)/spack
source ${SPACK_ROOT}/share/spack/setup-env.sh
# This is necessary and used when statically compiling redshow.
# mbedtls has to older than 2.28.0
spack install [email protected] [email protected] libs=shared [email protected]
# spack install [email protected] [email protected] libs=shared [email protected]
# spack install boost mbedtls libs=shared elfutils
check_status "spack install"
# TODO: find a better solution for those packages' installation
spack load [email protected] [email protected] [email protected]
# spack load [email protected] [email protected] [email protected]
spack load boost mbedtls elfutils

# Find spack and boost dir
B=$(spack find --path boost | tail -n 1 | cut -d ' ' -f 3)
Expand All @@ -67,16 +70,16 @@ cd ${source_path}/libmonitor
make clean
./configure --prefix=${install_path}/libmonitor/
make -j 12
make install
check_status "libmonitor install"
make install

cd ${source_path}/gputrigger
rm -rf ${source_path}/gputrigger/build
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=${install_path}/gputrigger -Dgpu_patch_path=${install_path}/gpu-patch
cmake .. -DCMAKE_INSTALL_PREFIX=${install_path}/gputrigger -Dgpu_patch_path=${install_path}/gpu-patch -Dredshow_path=${install_path}/redshow
make -j 16
make install -j 4
check_status "gputrigger install"
make install -j 4

export ENABLE_GPUTRIGGER=1
export REDSHOW_PATH=${install_path}/redshow
Expand Down
2 changes: 1 addition & 1 deletion gpu-patch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ INCLUDE_DIRS := -I$(CUDA_PATH)/include -I$(SANITIZER_PATH)/include -I$(CUPTI_PAT
SRC_DIR := src
CXXFLAGS := $(INCLUDE_DIRS) -O3 --fatbin

ARCHS := 60 70 72 75 80 86 87
ARCHS := 70 72 75 80 86 87

# Generate SASS code for each SM architectures
$(foreach sm,$(ARCHS),$(eval GENCODE_FLAGS += -gencode arch=compute_$(sm),code=sm_$(sm)))
Expand Down
2 changes: 1 addition & 1 deletion gputrigger
2 changes: 1 addition & 1 deletion redshow
Submodule redshow updated 1 files
+0 −11 CMakeLists.txt

0 comments on commit dc10bd2

Please sign in to comment.