diff options
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | README | 2 | ||||
| -rw-r--r-- | setup_environment | 12 | ||||
| -rw-r--r-- | version_detection.mk | 3 |
4 files changed, 18 insertions, 9 deletions
@@ -29,8 +29,10 @@ # comment out next line to disable OpenGL support # export OPENGL_SUPPORT=1 -# for MacOS X +include version_detection.mk + ifeq ($(shell uname), Darwin) + # Note: MacOX support not working for this version export MACOSX_BUILD_FLAGS=-m32 endif @@ -71,7 +73,7 @@ gpgpusim: check_setup_environment makedirs $(TARGETS) check_setup_environment: - @if [ ! -n "$(GPGPUSIM_ROOT)" -o ! -n "$(CUDA_INSTALL_PATH)" -o ! -n "$(GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN)" ]; then \ + @if [ ! -n "$(GPGPUSIM_ROOT)" -o ! -n "$(CUDA_INSTALL_PATH)" -o ! -n "$(GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN)" ]; then \ echo "ERROR *** run 'source setup_environment' before 'make'; please see README."; \ exit 101; \ else \ @@ -83,7 +85,9 @@ check_setup_environment: echo " Please also be sure to read the README file if you have not done so."; \ echo ""; \ exit 102; \ - else true; \ + else \ + echo; echo -n " Building GPGPU-Sim version "; cat version | awk '/Version/ {print $$8}'; echo " on CUDA version $(CUDA_VERSION_STRING)"; echo; \ + true; \ fi \ fi @@ -2,7 +2,7 @@ Welcome to GPGPU-Sim, a cycle-level simulator modeling contemporary graphics processing units (GPUs) running GPU computing workloads written in CUDA or OpenCL. -This version of GPGPU-Sim works with CUDA version 3.1 and 4.0. +This version of GPGPU-Sim has been tested with CUDA version 2.3, 3.1 and 4.0. Please see the copyright notice in the file COPYRIGHT distributed with this release in the same directory as this file. diff --git a/setup_environment b/setup_environment index d28e154..7e9e4e8 100644 --- a/setup_environment +++ b/setup_environment @@ -2,6 +2,9 @@ export GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN= +GPGPUSIM_VERSION_STRING=`cat version | awk '/Version/ {print $8}'` +echo "GPGPU-Sim version $GPGPUSIM_VERSION_STRING"; + if [ ! -n "$CUDA_INSTALL_PATH" ]; then echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; return; @@ -11,9 +14,9 @@ if [ ! -d "$CUDA_INSTALL_PATH" ]; then return; fi -# for MacOS X -if [ `uname` = "Darwin" ]; then - echo "Detected MacOS X platform..." +if [ ! `uname` = "Linux" ]; then + echo "ERROR ** Unsupported platform: GPGPU-Sim $GPGPUSIM_VERSION_STRING developed and tested on Linux." + return; fi # to run the debug build of GPGPU-Sim run: @@ -69,7 +72,6 @@ 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 - GPGPUSIM_VERSION_STRING=`cat version | awk '/Version/ {print $8}'` echo "ERROR ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)"; return; fi @@ -92,4 +94,6 @@ if [ "x$HOSTNAME_F" == "x$OPENCL_REMOTE_GPU_HOST" ]; then unset OPENCL_REMOTE_GPU_HOST fi +echo "setup_environment succeeded"; + export GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN=1 diff --git a/version_detection.mk b/version_detection.mk index d73a05e..3824866 100644 --- a/version_detection.mk +++ b/version_detection.mk @@ -28,7 +28,8 @@ # Detect CUDA Runtime Version -CUDART_VERSION:=$(shell $(CUDA_INSTALL_PATH)/bin/nvcc --version | awk '/release/ {print $$5;}' | sed 's/,//' | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($$1), 10*$$2);}') +CUDA_VERSION_STRING:=$(shell $(CUDA_INSTALL_PATH)/bin/nvcc --version | awk '/release/ {print $$5;}' | sed 's/,//') +CUDART_VERSION:=$(shell echo $(CUDA_VERSION_STRING) | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($$1), 10*$$2);}') # Detect GCC Version CC_VERSION := $(shell gcc --version | perl -ne '/gcc\s+\(.*\)\s+([0-9.]+)/ and print $$1;') |
