Skip to content

Commit

Permalink
Merge pull request #23 from sfiligoi/igor_reduce_disk_221207
Browse files Browse the repository at this point in the history
Reduce disk usage of the GPU compiler
  • Loading branch information
sfiligoi authored Dec 12, 2022
2 parents 3c46739 + 9ee8cc0 commit 1679e9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
which h5c++
if [[ "$(uname -s)" == "Linux" ]];
then
./scripts/install_hpc_sdk.sh >/dev/null 2>/dev/null </dev/null
./scripts/install_hpc_sdk.sh </dev/null
source setup_nv_h5.sh
fi
df -h .
Expand Down
9 changes: 8 additions & 1 deletion scripts/install_hpc_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if [ "x${NV_URL}" == "x" ]; then
NV_URL=https://developer.download.nvidia.com/hpc-sdk/21.7/nvhpc_2021_217_Linux_x86_64_cuda_multi.tar.gz
fi

echo "Downloading the NVIDIA HPC SDK"
# Defaults to using curl
# set USE_CURL=N if you want to use aria2 or wget
if [ "x${USE_CURL}" == "x" ]; then
Expand All @@ -51,7 +52,8 @@ if [ "x${USE_CURL}" == "x" ]; then
tar xpzf nvhpc.tgz
rm -f nvhpc.tgz
else
curl "${NV_URL}" | tar xpzf -
# Do not unpack things we do not use for unifrac
curl -s "${NV_URL}" | tar xpzf - --exclude '*libcublas*' --exclude '*libcufft*' --exclude '*libcusparse*' --exclude '*libcusolver*' --exclude '*libcurand*' --exclude '*profilers*' --exclude '*comm_libs*' --exclude '*/doc/*' --exclude '*/plugin*'
fi
elif [ "x${USE_ARIA2}" == "x" ]; then
aria2c "${NV_URL}"
Expand All @@ -63,6 +65,8 @@ else
rm -f nvhpc_*.tar.gz
fi

echo "Installing NVIDIA HPC SDK"

# must patch the install scripts to find the right gcc
for f in nvhpc_*/install_components/install nvhpc_*/install_components/*/*/compilers/bin/makelocalrc nvhpc_*/install_components/install_cuda; do
sed -i -e "s#PATH=/#PATH=$PWD/conda_nv_bins:/#g" $f
Expand Down Expand Up @@ -123,4 +127,7 @@ source $PWD/setup_scripts/setup_nv_hpc_bins.sh
PATH=${PWD}/conda_h5:\$PATH
EOF

# we don't need the install dir anymore
rm -fr nvhpc_*

echo "Setup script avaiabile in $PWD/setup_nv_h5.sh"

0 comments on commit 1679e9d

Please sign in to comment.