Skip to content

Commit

Permalink
toolchain: add option to compile DBCSR for NVIDIA's V100
Browse files Browse the repository at this point in the history
Enables use in CP2K of support for NVIDIA's V100 introduced in DBCSR by
PR 172.

And remove dangerous manual definition of GNU compiler version.
  • Loading branch information
shoshijak authored and alazzaro committed Jul 12, 2019
1 parent 31b514a commit 3e58b4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions tools/toolchain/install_cp2k_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ OPTIONS:
switch --math-mode to the respective modes, BUT
--with-reflapack option do not have this effect.
--gpu-ver Selects the GPU architecture for which to compile. Available
options are: K20X, K40, K80, P100, no. Default: no.
options are: K20X, K40, K80, P100, V100, no. Default: no.
The script will determine the correct corresponding value for
nvcc's '-arch' flag.
--libint-lmax Maximum supported angular momentum by libint.
Expand Down Expand Up @@ -445,13 +445,16 @@ while [ $# -ge 1 ] ; do
P100)
export GPUVER=P100
;;
V100)
export GPUVER=V100
;;
no)
export GPUVER=no
;;
*)
export GPUVER=no
report_error ${LINENO} \
"--gpu-ver currently only supports K20X, K40, K80, P100 and no as options"
"--gpu-ver currently only supports K20X, K40, K80, P100, V100 and no as options"
exit 1
esac
;;
Expand Down Expand Up @@ -889,12 +892,15 @@ case $GPUVER in
P100)
export ARCH_NUM=60
;;
V100)
export ARCH_NUM=70
;;
no)
export ARCH_NUM=no
;;
*)
report_error ${LINENO} \
"--gpu-ver currently only supports K20X, K40, K80, P100 as options"
"--gpu-ver currently only supports K20X, K40, K80, P100, V100 as options"
esac

# write toolchain environment
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/generate_arch_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ gen_arch_file() {
CXX = \${CC}
CXXFLAGS = \${CXXFLAGS} -I\\\${CUDA_PATH}/include -std=c++11 IF_OMP(-fopenmp|)
GPUVER = \${GPUVER}
NVCC = \${NVCC} -D__GNUC__=4 -D__GNUC_MINOR__=9
NVCC = \${NVCC}
NVFLAGS = \${NVFLAGS}
EOF
fi
Expand Down

0 comments on commit 3e58b4d

Please sign in to comment.