summaryrefslogtreecommitdiff
path: root/lib/make/extras/MPI
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-09-10 14:23:03 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2001-09-10 14:23:03 +0000
commitc729693ceb83a2355fb605f84a32cf41c39a19dc (patch)
tree17bd60f885fc2a18cd470ca309dcabd33036ae00 /lib/make/extras/MPI
parentc77ea358dd8e206a7d781fd7d50b9853d945c70f (diff)
Support LAM 6.5.x installations which come with a different liblist than
older versions. Added /usr/include and /usr/lib to the search path for standard LAM locations (like in RH 7.1). This closes PR Compiler-766. Search for MPI++ includes and add them to the include path. This closes PR Compiler-752. git-svn-id: http://svn.cactuscode.org/flesh/trunk@2348 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/extras/MPI')
-rw-r--r--lib/make/extras/MPI/LAM55
1 files changed, 40 insertions, 15 deletions
diff --git a/lib/make/extras/MPI/LAM b/lib/make/extras/MPI/LAM
index 367887d1..536cdb46 100644
--- a/lib/make/extras/MPI/LAM
+++ b/lib/make/extras/MPI/LAM
@@ -3,10 +3,10 @@
# @file LAM
# @date Wed Jul 21 13:27:07 1999
# @author Tom Goodale
-# @desc
-# Configure Cactus to compile with the LAM version of MPI.
+# @desc
+# Configure Cactus to compile with the LAM version of MPI.
# @enddesc
-# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/LAM,v 1.4 2000-12-13 09:04:22 goodale Exp $
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/LAM,v 1.5 2001-09-10 14:23:03 tradke Exp $
# @@*/
echo "LAM selected"
@@ -15,26 +15,51 @@ if test -z "$LAM_LIB_DIR" -o -z "$LAM_INC_DIR" ; then
if test -z "$LAM_DIR" ; then
echo "LAM selected but no LAM_DIR set... Checking some places"
if test -d "/usr/include/lam" -a -d "/usr/lib/lam" ; then
- LAM_LIB_DIR="/usr/lib/lam"
- LAM_INC_DIR="/usr/include/lam"
+ lam_libs="/usr/lib/lam"
+ lam_includes="/usr/include/lam"
elif test -d "/usr/local/include/lam" -a -d "/usr/local/lib/lam" ; then
- LAM_LIB_DIR="/usr/local/lib/lam"
- LAM_INC_DIR="/usr/local/include/lam"
+ lam_libs="/usr/local/lib/lam"
+ lam_includes="/usr/local/include/lam"
else
- CCTK_Search LAM_DIR "/usr /usr/local /usr/local/lam /usr/local/packages/lam /usr/local/apps/lam" h/lam.h
+ CCTK_Search LAM_DIR "/usr /usr/local /usr/local/lam /usr/local/packages/lam /usr/local/apps/lam" include/lam_config.h
if test -z "$LAM_DIR" ; then
- echo "Unable to locate the LAM directory - please set LAM_DIR"
+ echo "Unable to locate LAM installation - please set LAM_DIR or {LAM_INC_DIR, LAM_LIB_DIR}"
exit 2
fi
fi
fi
- : ${LAM_LIB_DIR="$LAM_DIR/lib"}
- : ${LAM_INC_DIR="$LAM_DIR/h"}
- echo "Using $LAM_LIB_DIR as lam library path"
- echo "Using $LAM_INC_DIR as lam include path"
+ # set LAM_INC_DIR if not already set
+ if test -z "$LAM_INC_DIR" ; then
+
+ : ${lam_includes="$LAM_DIR/include"}
+
+ # search for mpi++.h which might be in an include subdirectory
+ if test ! -r "$lam_includes/mpi++.h" ; then
+ if test -r "$lam_includes/mpi2c++/mpi++.h" ; then
+ lam_cxx_includes="$lam_includes/mpi2c++"
+ elif test -r "$lam_includes/../mpi2c++/mpi++.h" ; then
+ lam_cxx_includes="$lam_includes/../mpi2c++"
+ fi
+ fi
+ LAM_INC_DIR="$lam_includes $lam_cxx_includes"
+
+ fi
+
+ # set LAM_LIB_DIR if not already set
+ : ${lam_libs="$LAM_DIR/lib"}
+ : ${LAM_LIB_DIR="$lam_libs"}
+
+ echo "Using \"$LAM_INC_DIR\" as LAM include path"
+ echo "Using \"$LAM_LIB_DIR\" as LAM library path"
+fi
+
+# LAM libs changed in versions newer than 6.4
+if test -r "$LAM_LIB_DIR/libtrillium.a" ; then
+ MPI_LIBS="mpi tstdio args t trillium"
+else
+ MPI_LIBS="mpi lam"
fi
-MPI_LIBS="mpi tstdio args t trillium "
-MPI_LIB_DIRS="$LAM_LIB_DIR"
MPI_INC_DIRS="$LAM_INC_DIR"
+MPI_LIB_DIRS="$LAM_LIB_DIR"