From 36ce0f2243fd0723a746b3c2f5f0651577312400 Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Fri, 30 Nov 2012 21:29:42 -0800 Subject: Merging Power model into Fermi //depot/gpgpu_sim_research/fermi_power/distribution/... to //depot/gpgpu_sim_research/fermi/distribution/... [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14723] --- setup_environment | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'setup_environment') diff --git a/setup_environment b/setup_environment index 28fd2d6..79dd34a 100644 --- a/setup_environment +++ b/setup_environment @@ -11,6 +11,7 @@ if [ ! -n "$CUDA_INSTALL_PATH" ]; then echo "ERROR ** Install CUDA Toolkit and set CUDA_INSTALL_PATH."; return; fi + if [ ! -d "$CUDA_INSTALL_PATH" ]; then echo "ERROR ** CUDA_INSTALL_PATH=$CUDA_INSTALL_PATH invalid (directory does not exist)"; return; @@ -96,6 +97,33 @@ if [ "x$HOSTNAME_F" == "x$OPENCL_REMOTE_GPU_HOST" ]; then unset OPENCL_REMOTE_GPU_HOST fi +# The following checks to see if the GPGPU-Sim power model is enabled. +# GPGPUSIM_POWER_MODEL points to the directory where gpgpusim_mcpat is located. +# If this is not set, it checks the default directory "distribution/../mcpat/". +echo "=== GPGPUSim Power model ===" +if [ -d $GPGPUSIM_ROOT/src/mcpat/ ]; then + if [ ! -f $GPGPUSIM_ROOT/src/mcpat/gpgpu_sim.verify ]; then + echo "ERROR ** gpgpu_sim.verify not found in $GPGPUSIM_ROOT/../mcpat"; + return; + fi + export GPGPUSIM_POWER_MODEL=$GPGPUSIM_ROOT/src/mcpat/; + echo "GPGPU-Sim_McPAT power model detected... Using default directory $GPGPUSIM_POWER_MODEL."; + echo "If you want to specify a non-default directory, modify GPGPUSIM_POWER_MODEL manually after running setup_environment." +elif [ -n "$GPGPUSIM_POWER_MODEL" ]; then + if [ ! -f $GPGPUSIM_POWER_MODEL/gpgpu_sim.verify ]; then + echo "ERROR ** gpgpu_sim.verify not found in $GPGPUSIM_ROOT/../mcpat/ - Either incorrect directory or incorrect McPAT version"; + return; + fi + echo "GPGPU-Sim_McPAT power model detected... Using directory $GPGPUSIM_POWER_MODEL."; +elif [ ! -d $GPGPUSIM_POWER_MODEL ]; then + echo "ERROR ** GPGPUSIM_POWER_MODEL ($GPGPUSIM_POWER_MODEL) does not exist... Please set this to the gpgpusim_mcpat directory or unset this environment variable."; + return; +else + echo "GPGPU-Sim_McPAT power model not detected..."; +fi +echo "============================" + + echo "setup_environment succeeded"; export GPGPUSIM_SETUP_ENVIRONMENT_WAS_RUN=1 -- cgit v1.3