summaryrefslogtreecommitdiff
path: root/setup_environment
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-01-12 00:33:32 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:19:02 -0700
commit3ffba72094e4cbdae521343d7cceedd62428853e (patch)
tree7574a3dba179315e580c1acd34f45aa98c8c92d4 /setup_environment
parent15819dff8c2eec408379cae0bf42e275404885cb (diff)
Updating setup_environment script to avoid the empty domain name problem.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 11307]
Diffstat (limited to 'setup_environment')
-rw-r--r--setup_environment6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup_environment b/setup_environment
index 5edd41c..6420110 100644
--- a/setup_environment
+++ b/setup_environment
@@ -48,10 +48,12 @@ export PATH=$GPGPUSIM_ROOT/decuda/:$GPGPUSIM_ROOT/bin:$CUDA_INSTALL_PATH/bin:$PA
# 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" -a "$OPENCL_REMOTE_GPU_HOST" == "" ]; then
+HOSTNAME_DOMAIN=`hostname -d`
+if [ "x$HOSTNAME_DOMAIN" == "xece.ubc.ca" -a "$OPENCL_REMOTE_GPU_HOST" == "" ]; then
export OPENCL_REMOTE_GPU_HOST=aamodt-pc05.ece.ubc.ca
fi
-if [ `hostname -f` == $OPENCL_REMOTE_GPU_HOST ]; then
+HOSTNAME_F=`hostname -f`
+if [ "x$HOSTNAME_F" == "x$OPENCL_REMOTE_GPU_HOST" ]; then
unset OPENCL_REMOTE_GPU_HOST
fi