diff options
| author | Tim Rogers <[email protected]> | 2012-07-29 09:37:12 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:48:53 -0700 |
| commit | 68f25648e14ef091f873f40a4ca43aedd866c437 (patch) | |
| tree | c8f9a5bccb3cafc9415fc21343bf5043ebf2ee0c | |
| parent | 24e887cb55d7d5efb039a0828ad58f546558a517 (diff) | |
Fixing Tor's clean up. Seems like we have 2 version string kicking around One that looks like "3010" cause we have to use this value in a C macro. And one that looks like "3.1" cause that makes more sense as a stand alone string.
Removing the reference to "3.1" in the simulator code build since it just make things confusing.
The benchmarks still use the "3.1" style string but these two flows are reasonably seperate.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13574]
| -rw-r--r-- | setup_environment | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/setup_environment b/setup_environment index 3e98dbc..dbac7c6 100644 --- a/setup_environment +++ b/setup_environment @@ -26,16 +26,28 @@ export PATH=$GPGPUSIM_ROOT/bin:$CUDA_INSTALL_PATH/bin:$PATH # to run the debug build of GPGPU-Sim run: # source setup_environment debug -if [ `uname` = "Darwin" ]; then - CUDA_VERSION=`nvcc --version | grep release | sed -Ee 's/.*release ([0-9]+\.[0-9]+).*/\1/'` -else - CUDA_VERSION=`nvcc --version | grep release | sed -re 's/.*release ([0-9]+\.[0-9]+).*/\1/'` +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 + +CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`; +CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'` +if [ $CUDA_VERSION_NUMBER -gt 4000 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then + echo "ERROR ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)"; + return; fi + if [ $# == '1' ] ; then - export GPGPUSIM_CONFIG=$CUDA_VERSION/$1 + export GPGPUSIM_CONFIG=$CUDA_VERSION_NUMBER/$1 else - export GPGPUSIM_CONFIG=$CUDA_VERSION/release + export GPGPUSIM_CONFIG=$CUDA_VERSION_NUMBER/release fi export QTINC=/usr/include @@ -65,22 +77,6 @@ else fi export LD_LIBRARY_PATH=$GPGPUSIM_ROOT/lib/$GPGPUSIM_CONFIG:$LD_LIBRARY_PATH -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 - -CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`; -CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'` -if [ $CUDA_VERSION_NUMBER -gt 4000 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then - echo "ERROR ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)"; - return; -fi # The following sets OPENCL_REMOTE_GPU_HOST which is used by GPGPU-Sim to # SSH to remote node to generate PTX for OpenCL kernels when running on |
