Updated cuda parameters in makefiles
This commit is contained in:
parent
583df8e97c
commit
6a3a9bee12
2 changed files with 34 additions and 5 deletions
|
@ -33,7 +33,32 @@ then
|
||||||
then
|
then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
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
|
# wmake is required for subsequent targets
|
||||||
( cd wmake/src && make )
|
( cd wmake/src && make )
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
if [ -f $CUDA_BIN_DIR/nvcc ]
|
if [ -f $CUDA_BIN_DIR/nvcc ]
|
||||||
then
|
then
|
||||||
echo "Found nvcc -- enabling CUDA support."
|
if [ -z $CUDA_IGNORE ]
|
||||||
wmake libso
|
then
|
||||||
|
echo "Found nvcc but \$CUDA_IGNORE set -- not enabling CUDA support."
|
||||||
|
else
|
||||||
|
echo "Found nvcc -- enabling CUDA support."
|
||||||
|
wmake libso
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "No nvcc - CUDA not available."
|
echo "No nvcc - CUDA not available."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------- end-of-file
|
# ----------------------------------------------------------------- end-of-file
|
||||||
|
|
Reference in a new issue