diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-19 14:17:36 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-04-19 14:17:36 +0000 |
commit | d0348fed2d5363c913fe93e3abdc4f07c2bb2c32 (patch) | |
tree | f1a4b45b5caf6d9c8d4f772908bfe5dceefcebdb /lib/make | |
parent | 260855685751dc60df3b35d319505f8885fe1af3 (diff) |
Support for mpich-1.2.0 .
Note that the new directory layout in this version of mpich means that
it no longer needs MPICH_ARCH or MPICH_DEVICE, although if you specify
them it increases the range of directories to look for mpich in.
You still need to use MPICH_DEVICE to get the special libraries for
globus or myrinet.
It still works with the older MPICH version.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1594 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make')
-rw-r--r-- | lib/make/extras/MPI/MPICH | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/lib/make/extras/MPI/MPICH b/lib/make/extras/MPI/MPICH index fb98b688..aee3e9ed 100644 --- a/lib/make/extras/MPI/MPICH +++ b/lib/make/extras/MPI/MPICH @@ -6,7 +6,7 @@ # @desc # # @enddesc -# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/MPICH,v 1.5 1999-10-24 13:16:39 lanfer Exp $ +# @version $Header: /mnt/data2/cvs2svn/cvs-repositories/Cactus/lib/make/extras/MPI/MPICH,v 1.6 2000-04-19 14:17:36 goodale Exp $ # @@*/ @@ -18,7 +18,23 @@ echo "MPICH selected" 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 + if test -z "$MPICH_DIR" ; then + if test -n "$MPICH_ARCH" ; then + CCTK_Search MPICH_DIR "/usr/local/mpich/$MPICH_ARCH /usr/local/packages/mpich/$MPICH_ARCH /usr/local/apps/mpich/$MPICH_ARCH" include/mpe.h + if test -z "$MPICH_DIR" ; then + if test -n "$MPICH_DEVICE" ; then + CCTK_Search MPICH_DIR "/usr/local/mpich/$MPICH_ARCH/$MPICH_DEVICE /usr/local/packages/mpich/$MPICH_ARCH/$MPICH_DEVICE /usr/local/apps/mpich/$MPICH_ARCH/$MPICH_DEVICE" include/mpe.h + if test -z "$MPICH_DIR" ; then + CCTK_Search MPICH_DIR "/usr/local/mpich/$MPICH_DEVICE /usr/local/packages/mpich/$MPICH_DEVICE /usr/local/apps/mpich/$MPICH_DEVICE" include/mpe.h + fi + fi + fi + else + CCTK_Search MPICH_DIR "/usr/local/mpich/$MPICH_DEVICE /usr/local/packages/mpich/$MPICH_DEVICE /usr/local/apps/mpich/$MPICH_DEVICE" include/mpe.h + + fi + fi + if test -z "$MPICH_DIR" ; then echo "Unable to locate the MPICH directory - please set MPICH_DIR" exit 2 fi @@ -36,17 +52,28 @@ if test -z "$MPICH_ARCH" ; then fi fi -# Find the MPICH device +# Find the MPICH device - this isn't necessary for mpich-1.2.0 -if test -z "$MPICH_DEVICE" ; then - echo "MPICH selected but no MPICH_DEVICE set... Checking for one" - CCTK_Search MPICH_DEVICE "ch_p4 ch_shmem globus ch_gm" 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 +if test -d "$MPICH_DIR/build/$MPICH_ARCH" ; then + if test -z "$MPICH_DEVICE" ; then + echo "MPICH selected but no MPICH_DEVICE set... Checking for one" + CCTK_Search MPICH_DEVICE "ch_p4 ch_shmem globus ch_gm" lib $MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE + if test -z "$MPICH_DEVICE" ; then + echo "Unable to determine the MPICH device - please set MPICH_DEVICE" + exit 2 + fi + fi fi +# Work out MPICH version + +if test -d "$MPICH_DIR/build/$MPICH_ARCH" ; then + MPICH_LIB_DIR="$MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE/lib" + MPICH_INC_DIRS="$MPICH_DIR/include $MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE/include" +else + MPICH_LIB_DIR="$MPICH_DIR/lib" + MPICH_INC_DIRS="$MPICH_DIR/include" +fi # Select the device and any special options for it. @@ -88,7 +115,7 @@ esac # Work out what the MPICH library is called -if test -r "$MPICH_DIR/build/$MPICH_ARCH/$MPICH_DEVICE/lib/libmpi.a" ; then +if test -r "$MPICH_LIB_DIRS/libmpi.a" ; then MPICH_LIB=mpi else MPICH_LIB=mpich @@ -97,15 +124,6 @@ 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" - - - - - - - - - +MPI_LIB_DIRS="$MPICH_DEVICE_LIB_DIR $MPICH_LIB_DIR" +MPI_INC_DIRS="$MPICH_DIR/include $MPICH_INC_DIRS/include" |