diff options
| author | Tor Aamodt <[email protected]> | 2012-06-13 15:25:33 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:47:32 -0700 |
| commit | 77649b0b8448a5305034a2007d29c06410585e26 (patch) | |
| tree | b5e9069dbb5e7d8ff7a83eca9806732930d3b670 | |
| parent | 07cf089e9d81e71c104ee81c63ee5d8be904d1b0 (diff) | |
make sure CUDA_INSTALL_PATH points to a valid directory and that "which" can find nvcc
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13084]
| -rw-r--r-- | Makefile | 12 | ||||
| -rw-r--r-- | setup_environment | 13 |
2 files changed, 24 insertions, 1 deletions
@@ -70,7 +70,17 @@ check_setup_environment: @if [ ! -n "$(GPGPUSIM_ROOT)" ]; then \ echo "ERROR *** run 'source setup_environment' before 'make'; please see README."; \ exit 101; \ - else true; \ + else \ + NVCC_PATH=`which nvcc`; \ + if [ $$? = 1 ]; then \ + echo ""; \ + echo "ERROR ** nvcc (from CUDA Toolkit) was not found in PATH but required to build GPGPU-Sim."; \ + echo " Try adding $(CUDA_INSTALL_PATH)/bin/ to your PATH environment variable."; \ + echo " Please also be sure to read the README file if you have not done so."; \ + echo ""; \ + exit 102; \ + else true; \ + fi \ fi no_opencl_support: diff --git a/setup_environment b/setup_environment index c805ada..066714e 100644 --- a/setup_environment +++ b/setup_environment @@ -4,6 +4,19 @@ if [ ! -n "$CUDA_INSTALL_PATH" ]; then echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; return; fi +if [ ! -d "$CUDA_INSTALL_PATH" ]; then + echo "ERROR ** CUDA_INSTALL_PATH=$CUDA_INSTALL_PATH invalid (directory does not exist)"; + return; +fi +NVCC_PATH=`which nvcc`; +if [ $? = 1 ]; then + echo ""; + echo "ERROR ** nvcc (from CUDA Toolkit) was not found in PATH but required to build GPGPU-Sim."; + echo " Try adding $CUDA_INSTALL_PATH/bin/ to your PATH environment variable."; + echo " Please also be sure to read the README file if you have not done so."; + echo ""; + return; +fi # to run the debug build of GPGPU-Sim run: # source setup_environment debug |
