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] --- README | 6 +++--- config_setup | 3 --- setup_environment | 17 +++++++++-------- 3 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 config_setup diff --git a/README b/README index 0af2687..1ba9b8f 100644 --- a/README +++ b/README @@ -82,11 +82,11 @@ system. Then, from a bash shell, type the following in this directory: Step 4: Type "make" in this directory. This will build the simulator with optimizations enabled so the simulator runs faster. If you want to run the -simulator in gdb to debug it, then uncomment the line +simulator in gdb to debug it, then run - #export GPGPUSIM_CONFIG=debug + source setup_environment debug -in setup_environment and type "source setup_environment" again, then "make" again. +then "make" again. Step 4.1 [optional]: Type "make docs" in this directory to build the doxygen documentation. You need to have doxygen and graphviz installed for this to work. diff --git a/config_setup b/config_setup deleted file mode 100644 index c3a725d..0000000 --- a/config_setup +++ /dev/null @@ -1,3 +0,0 @@ -export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed -re 's/.*gpgpu_sim.*(release|debug)://'` -export GPGPUSIM_CONFIG=$1 -export LD_LIBRARY_PATH=$GPGPUSIM_ROOT/lib/$GPGPUSIM_CONFIG:$LD_LIBRARY_PATH 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