summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-03-16 15:15:22 +0000
committerknarf <knarf@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-03-16 15:15:22 +0000
commite544e81f8593ddb3469b7dcc8559789479996776 (patch)
treef39531fa3a9162185fbfcda2bf13f0c20875a19f
parente46b96579173142641d60f6b4ced41c44968927a (diff)
Let Cactus find the correct Intel compiler lib directory
git-svn-id: http://svn.cactuscode.org/flesh/trunk@4689 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/make/known-architectures/darwin9
-rw-r--r--lib/make/known-architectures/linux15
2 files changed, 19 insertions, 5 deletions
diff --git a/lib/make/known-architectures/darwin b/lib/make/known-architectures/darwin
index 12684027..055d80c5 100644
--- a/lib/make/known-architectures/darwin
+++ b/lib/make/known-architectures/darwin
@@ -277,8 +277,15 @@ else
intel_dir="$(dirname $(dirname $(which $F90)))"
+ intel_subdir=""
+ if [ ! -d "$intel_dir/lib" -a -d "$(dirname $intel_dir)/lib" ]; then
+ intel_subdir="/$(basename $(dirname $(which $F90)))"
+ intel_dir="$(dirname $intel_dir)"
+ fi
+ intel_libdir="$intel_dir/lib$intel_subdir"
+
# add the libpath
- : ${LIBDIRS="$intel_dir/lib"}
+ : ${LIBDIRS="$intel_libdir"}
: ${LIBS='ifcore imf svml m'}
F77_VERSION="`$F77 -V 2>&1 | grep -i version | head -n1`"
diff --git a/lib/make/known-architectures/linux b/lib/make/known-architectures/linux
index f955a0ea..f79f9662 100644
--- a/lib/make/known-architectures/linux
+++ b/lib/make/known-architectures/linux
@@ -286,6 +286,13 @@ else
intel_dir="$(dirname $(dirname $(which $F90)))"
+ intel_subdir=""
+ if [ ! -d "$intel_dir/lib" -a -d "$(dirname $intel_dir)/lib" ]; then
+ intel_subdir="/$(basename $(dirname $(which $F90)))"
+ intel_dir="$(dirname $intel_dir)"
+ fi
+ intel_libdir="$intel_dir/lib$intel_subdir"
+
case "$host_cpu" in
i?86 | x86_64)
# add the necessary libraries according to the compiler version
@@ -295,10 +302,10 @@ else
: ${LIBS='intrins IEPCF90 F90 imf svml m irc cxa cprts cxa pthread'}
fi
# add the libpath
- : ${LIBDIRS="$intel_dir/lib"}
+ : ${LIBDIRS="$intel_libdir"}
# add the linker script if the linker is not Intel
- if test `basename $LD` != 'icc' -a `basename $LD` != 'icpc' -a -e "$intel_dir/lib/icrt.link" ; then
- : ${LDFLAGS="-Qy $intel_dir/lib/icrt.link"}
+ if test `basename $LD` != 'icc' -a `basename $LD` != 'icpc' -a -e "$intel_libdir/icrt.link" ; then
+ : ${LDFLAGS="-Qy $intel_libdir/icrt.link"}
fi
;;
@@ -311,7 +318,7 @@ else
fi
if test "$LD" != 'ecc' -a "$LD" != 'ecpc' ; then
- : ${LIBDIRS="$intel_dir/lib"}
+ : ${LIBDIRS="$intel_libdir"}
fi
;;