diff options
| author | Timothy G Rogers <[email protected]> | 2018-03-26 12:37:58 -0400 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2018-03-26 12:37:58 -0400 |
| commit | cd4ec521b43093380ce9535ba940e65ea5bf0752 (patch) | |
| tree | a2cbef25d44a4e818176055d80955735bc31d18a /setup_environment | |
| parent | 1af82fbe97428654b06b7cd8d40c2d2ce4592aae (diff) | |
| parent | f7ff51824547d017bdfffcaff79a762ff07c6fdf (diff) | |
Merge branch 'dev-purdue-integration' into dev-purdue-integration
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 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' ] ; |
