summaryrefslogtreecommitdiff
path: root/lib/make/extras/MPI
diff options
context:
space:
mode:
Diffstat (limited to 'lib/make/extras/MPI')
-rw-r--r--lib/make/extras/MPI/CUSTOM19
-rw-r--r--lib/make/extras/MPI/LAM25
-rw-r--r--lib/make/extras/MPI/MPICH85
-rw-r--r--lib/make/extras/MPI/NATIVE17
-rwxr-xr-xlib/make/extras/MPI/setup.sh42
5 files changed, 188 insertions, 0 deletions
diff --git a/lib/make/extras/MPI/CUSTOM b/lib/make/extras/MPI/CUSTOM
new file mode 100644
index 00000000..d77b6329
--- /dev/null
+++ b/lib/make/extras/MPI/CUSTOM
@@ -0,0 +1,19 @@
+#! /bin/sh
+# /*@@
+# @file CUSTOM
+# @date Wed Jul 21 13:27:07 1999
+# @author Tom Goodale
+# @desc
+#
+# @enddesc
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/CUSTOM,v 1.1 1999-07-21 12:25:01 goodale Exp $
+# @@*/
+
+
+# Allow the user to completely specify at the command line,
+echo "Custom MPI selected"
+
+MPI_LIBS="$MPI_LIBS"
+MPI_LIB_DIRS="$MPI_LIB_DIRS"
+MPI_INC_DIRS="$MPI_INC_DIRS"
+
diff --git a/lib/make/extras/MPI/LAM b/lib/make/extras/MPI/LAM
new file mode 100644
index 00000000..e07e04d5
--- /dev/null
+++ b/lib/make/extras/MPI/LAM
@@ -0,0 +1,25 @@
+#! /bin/sh
+# /*@@
+# @file LAM
+# @date Wed Jul 21 13:27:07 1999
+# @author Tom Goodale
+# @desc
+#
+# @enddesc
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/LAM,v 1.1 1999-07-21 12:25:02 goodale Exp $
+# @@*/
+
+echo "LAM selected"
+
+if test -z "$LAM_DIR" ; then
+ echo "LAM selected but no LAM_DIR set... Checking some places"
+ CCTK_Search LAM_DIR "/usr /usr/local /usr/local/lam /usr/local/packages/lam /usr/local/apps/lam" h/lam.h
+ if test -z "$LAM_DIR" ; then
+ echo "Unable to locate the LAM directory - please set LAM_DIR"
+ exit 2
+ fi
+fi
+
+MPI_LIBS="mpi tstdio args t trillium "
+MPI_LIB_DIRS="$LAM_DIR/lib"
+MPI_INC_DIRS="$LAM_DIR/h"
diff --git a/lib/make/extras/MPI/MPICH b/lib/make/extras/MPI/MPICH
new file mode 100644
index 00000000..3f7faff1
--- /dev/null
+++ b/lib/make/extras/MPI/MPICH
@@ -0,0 +1,85 @@
+#! /bin/sh
+# /*@@
+# @file CUSTOM
+# @date Wed Jul 21 13:27:07 1999
+# @author Tom Goodale
+# @desc
+#
+# @enddesc
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/MPICH,v 1.1 1999-07-21 12:25:02 goodale Exp $
+# @@*/
+
+
+echo "MPICH selected"
+
+# MPICH is pretty configerable itself
+
+# Find the directory.
+if test -z "$MPICH_DIR" ; then
+ echo "MPICH selected but no MPICH_DIR set... Checking some places"
+ CCTK_Search MPICH_DIR "/usr /usr/local /usr/local/mpich /usr/local/packages/mpich /usr/local/apps/mpich" include/mpe.h
+ if test -z "$MPICH_DIR" ; then
+ echo "Unable to locate the MPICH directory - please set MPICH_DIR"
+ exit 2
+ fi
+fi
+
+# Find the MPICH architecture
+
+if test -x "$MPICH_DIR/bin/tarch" ; then
+ MPICH_ARCH=`$MPICH_DIR/bin/tarch`
+ echo "MPICH architecture is $MPICH_ARCH"
+else
+ echo "Cannot execute $MPICH_DIR/bin/tarch"
+ exit 2
+fi
+
+# Find the MPICH device
+
+if test -z "$MPICH_DEVICE" ; then
+ echo "MPICH selected but no MPICH_DEVICE set... Checking for one"
+ CCTK_Search MPICH_DEVICE "ch_shmem ch_p4 globus" lib $MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE
+ if test -z "$MPICH_DEVICE" ; then
+ echo "Unable to locate the MPICH device - please set MPICH_DEVICE"
+ exit 2
+ fi
+fi
+
+
+# Select the device and any special options for it.
+
+case "$MPICH_DEVICE" in
+ globus)
+ if test -z "$GLOBUS_DIR" ; then
+ echo "GLOBUS selected, but GLOBUS_DIR not set !"
+ exit 2
+ fi
+ MPICH_DEVICE_LIB_DIR="$GLOBUS_DIR"
+ MPICH_DEVICE_LIBS="globus_common globus_dc globus_duct_control \
+ globus_duct_runtime globus_duroc_bootstrap globus_duroc_control\
+ globus_duroc_runtime globus_gass_cache globus_gass_client \
+ globus_gass_file globus_gass_server globus_gass_server_ez \
+ globus_gram_client globus_gram_myjob globus_gss globus_gss_assist \
+ globus_hbm_client globus_hbm_datacollector globus_mp globus_nexus \
+ globus_rsl globus_utp lber ldap ldif netperf"
+ ;;
+ *)
+ MPICH_DEVICE_LIB_DIR=""
+ MPICH_DEVICE_LIBS=""
+ ;;
+esac
+
+# Work out what the MPICH library is called
+
+if test -r "$MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE/lib/libmpi.a" ; then
+ MPICH_LIB=mpi
+else
+ MPICH_LIB=mpich
+fi
+
+# Finally set the library lines.
+
+MPI_LIBS="$MPICH_LIB $MPICH_DEVICE_LIBS"
+MPI_LIB_DIRS="$MPICH_DEVICE_LIB_DIR $MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE/lib"
+MPI_INC_DIRS="$MPICH_DIR/include $MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE/include"
+
diff --git a/lib/make/extras/MPI/NATIVE b/lib/make/extras/MPI/NATIVE
new file mode 100644
index 00000000..4c397599
--- /dev/null
+++ b/lib/make/extras/MPI/NATIVE
@@ -0,0 +1,17 @@
+#! /bin/sh
+# /*@@
+# @file NATIVE
+# @date Wed Jul 21 13:27:07 1999
+# @author Tom Goodale
+# @desc
+#
+# @enddesc
+# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/NATIVE,v 1.1 1999-07-21 12:25:02 goodale Exp $
+# @@*/
+
+echo "Native MPI selected"
+
+# This should be filled out by the know-architecture stuff.
+MPI_LIBS=""
+MPI_LIB_DIRS=""
+MPI_INC_DIRS=""
diff --git a/lib/make/extras/MPI/setup.sh b/lib/make/extras/MPI/setup.sh
new file mode 100755
index 00000000..abc054af
--- /dev/null
+++ b/lib/make/extras/MPI/setup.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+# /*@@
+# @file setup.sh
+# @date Wed Jul 21 11:18:40 1999
+# @author Tom Goodale
+# @desc
+# Setup MPI
+# @enddesc
+# @version $Header$
+# @@*/
+
+if test -n "$MPI" ; then
+
+echo "Configuring with MPI"
+
+CCTK_WriteLine cctk_extradefs.h "#define MPI"
+
+# Work out which variation of MPI is installed
+
+if test -r $srcdir/extras/MPI/$MPI ; then
+ . $srcdir/extras/MPI/$MPI
+else
+ echo "MPI selected, but no known MPI method - what is $MPI ?"
+ exit 2
+fi
+
+# Write the data out to the header and make files.
+
+CCTK_WriteLine make.extra.defn "MPI_LIBS = $MPI_LIBS"
+CCTK_WriteLine make.extra.defn "MPI_LIB_DIRS = $MPI_LIB_DIRS"
+CCTK_WriteLine make.extra.defn "MPI_INC_DIRS = $MPI_INC_DIRS"
+
+CCTK_WriteLine make.extra.defn ""
+CCTK_WriteLine make.extra.defn ""
+
+CCTK_WriteLine make.extra.defn 'LIBS += $(MPI_LIBS)'
+CCTK_WriteLine make.extra.defn 'LIBDIRS += $(MPI_LIB_DIRS)'
+CCTK_WriteLine make.extra.defn 'SYS_INC_DIRS += $(MPI_INC_DIRS)'
+
+fi
+
+