summaryrefslogtreecommitdiff
path: root/setup_environment
diff options
context:
space:
mode:
authorAkshay Jain <[email protected]>2018-04-01 12:51:29 -0400
committerAkshay Jain <[email protected]>2018-04-01 12:51:29 -0400
commit12f2a2c791747dc38a53553026ed8122e8e08988 (patch)
tree14083fb3fe30b8801ff58de738b66cde9cee80f8 /setup_environment
parent0c6928caf8814bf9bd37602bffe6b7b0021f2585 (diff)
parentf373275550b689efaf9c60017ff11d4450d71091 (diff)
Merge branch 'dev-purdue-integration' of https://github.rcac.purdue.edu/jain156/gpgpu-sim_distribution into dev-purdue-integration
Diffstat (limited to 'setup_environment')
-rw-r--r--setup_environment8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup_environment b/setup_environment
index cd6452e..f6a16c5 100644
--- a/setup_environment
+++ b/setup_environment
@@ -6,7 +6,11 @@ export GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN=
export GPGPUSIM_ROOT="$( cd "$( dirname "$BASH_SOURCE" )" && pwd )"
GPGPUSIM_VERSION_STRING=`cat $GPGPUSIM_ROOT/version | awk '/Version/ {print $8}'`
-GPGPUSIM_BUILD_STRING=`cat $GPGPUSIM_ROOT/version | awk '/Change/ {print $6}'`
+#Detect Git branch and commit #
+GIT_COMMIT=`git log -n 1 | head -1 | sed -re 's/commit (.*)/\1/'`
+GIT_FILES_CHANGED=`git diff --numstat --cached && git diff --numstat | wc | sed -re 's/^\s+([0-9]+).*/\1/'`
+GPGPUSIM_BUILD_STRING="gpgpu-sim_git-commit-$GIT_COMMIT-modified_$GIT_FILES_CHANGED"
+
echo -n "GPGPU-Sim version $GPGPUSIM_VERSION_STRING (build $GPGPUSIM_BUILD_STRING) ";
if [ ! -n "$CUDA_INSTALL_PATH" ]; then
@@ -46,8 +50,6 @@ CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%
if [ $CUDA_VERSION_NUMBER -gt 9100 -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
-elif [ $CUDA_VERSION_NUMBER -gt 9100 ]; then
- echo "WARNING ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not fully tested with CUDA version $CUDA_VERSION_STRING (please see README)";
fi
if [ $# = '1' ] ;