From 4850e5987d467722690dfd8d3bd0b4446b778605 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 25 Jan 2014 00:15:04 +0000 Subject: [PATCH] remove LD_LIBRARY_PATH (http://linuxmafia.com/faq/Admin/ld-lib-path.html) and fixed wrong named xxx_ROOT --- DAMASK_env.sh | 16 ---------------- code/Makefile | 16 ++++++++-------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/DAMASK_env.sh b/DAMASK_env.sh index 63810cfc4..7d35e09af 100644 --- a/DAMASK_env.sh +++ b/DAMASK_env.sh @@ -17,24 +17,10 @@ fi if [ "x$DAMASK_NUM_THREADS" != "x" ] then export DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS fi -export FFTW_ROOT=$FFTW_ROOT -LD_NEW=$FFTW_ROOT/lib -if [ "x$LAPACK_ROOT" != "x" ] - then LD_NEW=$LD_NEW:$LAPACK_ROOT/lib:$LAPACK_ROOT/lib64 -fi -if [ "x$ACML_ROOT" != "x" ] - then LD_NEW=$LD_NEW:$ACML_ROOT/ifort64_mp/lib:$ACML_ROOT/ifort64/lib:$ACML_ROOT/gfortran64_mp/lib:$ACML_ROOT/gfortran64/lib -fi -if [ "x$IMKL_ROOT" != "x" ] - then LD_NEW=$LD_NEW:$IMKL_ROOT/lib/intel64 -fi if [ "x$F90" != "x" ] then export F90=$F90 fi -if [ "x$DAMASK_BIN" == "x" ] - then DAMASK_BIN=$DAMASK_ROOT/bin -fi # disable output in case of scp if [ ! -z "$PS1" ]; then @@ -47,11 +33,9 @@ if [ ! -z "$PS1" ]; then echo "DAMASK installation in $DAMASK_ROOT" echo "DAMASK_NUM_THREADS=$DAMASK_NUM_THREADS" echo "F90=$F90" - echo "prepending to LD_LIBRARY_PATH: $LD_NEW" fi ulimit -s unlimited ulimit -c 0 ulimit -v unlimited ulimit -m unlimited export PYTHONPATH=$PYTHONPATH:$DAMASK_ROOT/lib -export LD_LIBRARY_PATH=$LD_NEW:$LD_LIBRARY_PATH diff --git a/code/Makefile b/code/Makefile index 3d5ed329f..33a881551 100644 --- a/code/Makefile +++ b/code/Makefile @@ -46,7 +46,7 @@ COMPILERNAME ?= $(F90) INCLUDE_DIRS :=-I../lib LIBRARIES :=-lfftw3 -LIB_DIRS :=-L$(FFTWROOT)/lib +LIB_DIRS :=-L$(FFTW_ROOT)/lib ifeq "$(FASTBUILD)" "YES" OPENMP := OFF @@ -93,17 +93,17 @@ else IMKL_ARCH =_sequential endif -ifneq "x$(IMKLROOT)" "x" -LIB_DIRS :=-L$(IMKLROOT)/lib/intel64 -INCLUDE_DIRS +=-I$(IMKLROOT)/include +ifneq "x$(IMKL_ROOT)" "x" +LIB_DIRS :=-L$(IMKL_ROOT)/lib/intel64 +INCLUDE_DIRS +=-I$(IMKL_ROOT)/include LIBRARIES +=-lmkl_intel_lp64 -lmkl_core -lmkl$(ACML_ARCH) -lm -lpthread -liomp5 else -ifneq "x$(ACMLROOT)" "x" -LIB_DIRS +=-L$(ACMLROOT)/$(F90)64$(ACML_ARCH)/lib +ifneq "x$(ACML_ROOT)" "x" +LIB_DIRS +=-L$(ACML_ROOT)/$(F90)64$(ACML_ARCH)/lib LIBRARIES +=-lacml$(ACML_ARCH) else -ifneq "x$(LAPACKROOT)" "x" -LIB_DIRS +=-L$(LAPACKROOT)/lib64 -L$(LAPACKROOT)/lib +ifneq "x$(LAPACK_ROOT)" "x" +LIB_DIRS +=-L$(LAPACK_ROOT)/lib64 -L$(LAPACK_ROOT)/lib LIBRARIES +=-llapack endif endif