summaryrefslogtreecommitdiff
path: root/setup_environment
diff options
context:
space:
mode:
authorTayler Hetherington <[email protected]>2012-11-30 21:29:42 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:49:22 -0700
commit36ce0f2243fd0723a746b3c2f5f0651577312400 (patch)
treee79475e75f800ad34b4851ea710c4ee409f5bd72 /setup_environment
parent08ec3343d0bca75e63e130266f75f8242f22050b (diff)
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]
Diffstat (limited to 'setup_environment')
-rw-r--r--setup_environment28
1 files changed, 28 insertions, 0 deletions
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