forked from portelli/lattice-benchmarks
clean up build script a bit
This commit is contained in:
36
Quda/build-quda.sh
Executable file
36
Quda/build-quda.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
|
||||
BUILD_FLAGS="-O3 -std=c++17"
|
||||
QUDA_FLAGS="-DQUDA_MPI=ON -DQUDA_PRECISION=14 -DQUDA_RECONSTRUCT=4 -DQUDA_GPU_ARCH=sm_80"
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if (( $# != 1 )); then
|
||||
echo "usage: $(basename "$0") <environment directory>" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
env_dir=$1
|
||||
|
||||
call_dir=$(pwd -P)
|
||||
mkdir -p ${env_dir}
|
||||
cd "${env_dir}"
|
||||
env_dir=$(pwd -P)
|
||||
cd "${call_dir}"
|
||||
|
||||
build_dir="${env_dir}/build/quda"
|
||||
if [ -d "${build_dir}" ]; then
|
||||
echo "error: directory '${build_dir}' exists"
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p "${build_dir}"
|
||||
|
||||
git clone https://github.com/lattice/quda.git "${build_dir}"
|
||||
cd "${build_dir}"
|
||||
|
||||
mkdir build; cd build
|
||||
cmake .. $QUDA_FLAGS -DCMAKE_INSTALL_PREFIX=${env_dir}/prefix/quda
|
||||
make -j128
|
||||
make install
|
||||
|
||||
cd "${call_dir}"
|
Reference in New Issue
Block a user