summaryrefslogtreecommitdiff
path: root/setup_enviroment
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2011-07-31 21:13:35 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:18:22 -0700
commit8eb9ab667645ca32174093927f5e3b25368c752e (patch)
tree2897999ae5f68a7e258c5c43d35778431ac719dc /setup_enviroment
parentf750aa13b3d88092ab8a956b2a4dde25739b0f56 (diff)
ready to release?
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 9917]
Diffstat (limited to 'setup_enviroment')
-rw-r--r--setup_enviroment27
1 files changed, 22 insertions, 5 deletions
diff --git a/setup_enviroment b/setup_enviroment
index c7e30aa..94f9d10 100644
--- a/setup_enviroment
+++ b/setup_enviroment
@@ -1,5 +1,8 @@
+# see README before running this
+
+# uncomment the line with debug if you want to run GPGPU-Sim in gdb
export GPGPUSIM_CONFIG=release
-#export GPGPUSIM_CONFIG=debug
+#export GPGPUSIM_CONFIG=debug
export GPGPUSIM_ROOT="$( cd "$( dirname "$BASH_SOURCE" )" && pwd )"
@@ -9,15 +12,29 @@ export BOOST_LIB=/usr/lib64
export BOOST_VER=
export NVOPENCL_LIBDIR=/usr/lib64
+# change the following to point to your installation of CUDA Toolkit
export CUDA_INSTALL_PATH=$HOME/nvcuda/3.1/cuda
export CUDAHOME=$HOME/nvcuda/3.1/cuda
+
+# change these to point to your installation of the CUDA SDK
+# (you also need to build the SDK, see README)
export NVIDIA_COMPUTE_SDK_LOCATION=$HOME/NVIDIA_GPU_Computing_SDK/
export NVIDIA_CUDA_SDK_LOCATION=$NVIDIA_COMPUTE_SDK_LOCATION/
+
+# setting LD_LIBRARY_PATH as follows enables GPGPU-Sim to be invoked by
+# native CUDA and OpenCL applications. GPGPU-Sim is dynamically linked
+# against instead of the CUDA toolkit. This replaces this cumbersome
+# static link setup in prior GPGPU-Sim releases.
export LD_LIBRARY_PATH=$GPGPUSIM_ROOT/lib/$GPGPUSIM_CONFIG:$LD_LIBRARY_PATH
export PATH=$GPGPUSIM_ROOT/bin:$CUDA_INSTALL_PATH/bin:$PATH
-HF=`hostname -f`
-export OPENCL_REMOTE_GPU_HOST=aamodt-pc05.ece.ubc.ca
-if [ $HF = $OPENCL_REMOTE_GPU_HOST ]; then
- unset OPENCL_REMOTE_GPU_HOST
+# The following sets OPENCL_REMOTE_GPU_HOST which is used by GPGPU-Sim to
+# SSH to remote node to generate PTX for OpenCL kernels when running on
+# a node that does not have an NVIDIA driver installed.
+# The remote node should have GPGPU-Sim installed at the same path
+if [ `hostname -d` = "ece.ubc.ca" ]; then
+ export OPENCL_REMOTE_GPU_HOST=aamodt-pc05.ece.ubc.ca
+ if [ `hostname -f` = $OPENCL_REMOTE_GPU_HOST ]; then
+ unset OPENCL_REMOTE_GPU_HOST
+ fi
fi