diff options
| author | Tim Rogers <[email protected]> | 2013-06-25 13:19:58 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:57 -0700 |
| commit | 5d69aa95a9ea9ac326c34c4842b87e8123a77186 (patch) | |
| tree | bd10eeda9dd131eca900ab410c692bfaea1855dd /setup_environment | |
| parent | b84f4193f7e94c503cfd07cdcdb8b6951400f695 (diff) | |
Changing the make flow so all the generated files, both object and code generated go in a directory independent of the source directory
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 16503]
Diffstat (limited to 'setup_environment')
| -rw-r--r-- | setup_environment | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/setup_environment b/setup_environment index cb39553..b4bcd1b 100644 --- a/setup_environment +++ b/setup_environment @@ -1,6 +1,6 @@ # see README before running this -ps -p $$ | awk '/bash/ {exit 1;}' && echo "ERROR ** source setup_environment must be run in a bash shell; see README" && exit +ps -p $$ | awk '/bash/ || / sh/ {exit 1;}' && echo "ERROR ** source setup_environment must be run in a bash or sh shell; see README" && exit export GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN= export GPGPUSIM_ROOT="$( cd "$( dirname "$BASH_SOURCE" )" && pwd )" @@ -39,6 +39,8 @@ if [ $? = 1 ]; then return; fi +CC_VERSION=`gcc --version | head -1 | sed -re "s/gcc\s+\(.*\)\s+([0-9.]+)/\1/"` + 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 4020 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then @@ -48,9 +50,9 @@ fi if [ $# == '1' ] ; then - export GPGPUSIM_CONFIG=$CUDA_VERSION_NUMBER/$1 + export GPGPUSIM_CONFIG=gcc-$CC_VERSION/cuda-$CUDA_VERSION_NUMBER/$1 else - export GPGPUSIM_CONFIG=$CUDA_VERSION_NUMBER/release + export GPGPUSIM_CONFIG=gcc-$CC_VERSION/cuda-$CUDA_VERSION_NUMBER/release fi export QTINC=/usr/include |
