From 5534e13a1597d5393856f8a2b8e2f518a772814a Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Wed, 16 Nov 2011 22:14:51 -0800 Subject: Removing config_setup and changing setup_environment to allow for a better way to enable the debug build [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10968] --- setup_environment | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'setup_environment') diff --git a/setup_environment b/setup_environment index d1dcff3..a7213ba 100644 --- a/setup_environment +++ b/setup_environment @@ -1,13 +1,13 @@ # see README before running this -# uncomment the line with debug if you want to run GPGPU-Sim in gdb -# Alternatively you can run: -# ./config_setup debug -# or -# ./config_setup release -# This avoids extending your LD_LIBRARY_PATH when changing the configuration -export GPGPUSIM_CONFIG=release -# export GPGPUSIM_CONFIG=debug +# to run the debug build of GPGPU-Sim run: +# source setup_environment debug +if [ $# == '1' ] ; +then + export GPGPUSIM_CONFIG=$1 +else + export GPGPUSIM_CONFIG=release +fi export GPGPUSIM_ROOT="$( cd "$( dirname "$BASH_SOURCE" )" && pwd )" @@ -36,6 +36,7 @@ export CUDA_INSTALL_PATH=/usr/local/cuda/ # 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=`echo $LD_LIBRARY_PATH | sed -re 's/.*gpgpu_sim.*(release|debug)://'` export LD_LIBRARY_PATH=$GPGPUSIM_ROOT/lib/$GPGPUSIM_CONFIG:$LD_LIBRARY_PATH export PATH=$GPGPUSIM_ROOT/bin:$CUDA_INSTALL_PATH/bin:$PATH -- cgit v1.3