Updated cuda parameters in makefiles
This commit is contained in:
parent
583df8e97c
commit
6a3a9bee12
2 changed files with 34 additions and 5 deletions
|
@ -35,6 +35,31 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check whether we will be compiling cudaSolvers
|
||||
if [ -f $CUDA_BIN_DIR/nvcc ]
|
||||
then
|
||||
echo
|
||||
echo "Cuda compiler detected at $CUDA_BIN_DIR/nvcc;"
|
||||
echo "cudaSolvers will be compiled by default."
|
||||
echo
|
||||
|
||||
# If yes, check presence of $CUDA_ARCH
|
||||
if [ -z "$CUDA_ARCH" ]
|
||||
then
|
||||
echo
|
||||
echo "\$CUDA_ARCH is required by nvcc compiler but not set."
|
||||
echo "Check section '-gpu-architecture' in 'man nvcc' for details."
|
||||
echo
|
||||
read -r -p "Proceed without compiling cudaSolvers? [Y/n] " response
|
||||
if [[ $response =~ ^([nN][oO]|[nN])$ ]]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
export CUDA_IGNORE
|
||||
fi
|
||||
echo "Cuda architecture set to: $CUDA_ARCH"
|
||||
fi
|
||||
|
||||
# wmake is required for subsequent targets
|
||||
( cd wmake/src && make )
|
||||
|
||||
|
|
|
@ -3,11 +3,15 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||
|
||||
if [ -f $CUDA_BIN_DIR/nvcc ]
|
||||
then
|
||||
echo "Found nvcc -- enabling CUDA support."
|
||||
wmake libso
|
||||
if [ -z $CUDA_IGNORE ]
|
||||
then
|
||||
echo "Found nvcc but \$CUDA_IGNORE set -- not enabling CUDA support."
|
||||
else
|
||||
echo "Found nvcc -- enabling CUDA support."
|
||||
wmake libso
|
||||
fi
|
||||
else
|
||||
echo "No nvcc - CUDA not available."
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
|
Reference in a new issue