1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
diff -Nru blacs-mpi-1.1.orig//Bmake.inc blacs-mpi-1.1//Bmake.inc
--- blacs-mpi-1.1.orig//Bmake.inc 2011-08-15 21:08:36.474630178 -0700
+++ blacs-mpi-1.1//Bmake.inc 2011-08-15 21:11:41.535007658 -0700
@@ -1,4 +1,38 @@
#=============================================================================
+#=========================== SECTION 3: COMPILERS ============================
+#=============================================================================
+# The following macros specify compilers, linker/loaders, the archiver,
+# and their options. Some of the fortran files need to be compiled with no
+# optimization. This is the F77NO_OPTFLAG. The usage of the remaining
+# macros should be obvious from the names.
+#
+# This section has been moved before Section 1 to allow redefinition of the
+# F77 and CC options in the MPI implementation specific clauses.
+#=============================================================================
+ F77 = gfortran
+ F77NO_OPTFLAGS = $(FPIC) -w
+ F77FLAGS = $(F77NO_OPTFLAGS) -O4
+ F77LOADER = $(F77)
+ F77LOADFLAGS =
+ CC = cc
+ CCFLAGS = $(FPIC) -O4
+ CCLOADER = $(CC)
+ CCLOADFLAGS =
+
+# --------------------------------------------------------------------------
+# The archiver and the flag(s) to use when building an archive (library).
+# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo.
+# --------------------------------------------------------------------------
+ ARCH = ar
+ ARCHFLAGS = r
+ RANLIB = ranlib
+
+#=============================================================================
+#=============================== End SECTION 3 ===============================
+#=============================================================================
+
+
+#=============================================================================
#====================== SECTION 1: PATHS AND LIBRARIES =======================
#=============================================================================
# The following macros specify the name and location of libraries required by
@@ -44,24 +78,39 @@
BLACSCINIT = $(BLACSdir)/blacsCinit_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
BLACSLIB = $(BLACSdir)/blacs_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
+# Default unless overridden below:
+ CC = cc
+
# -------------------------------------
# Name and location of the MPI library.
# -------------------------------------
ifeq ($(MPI),mpich)
# for compilation with mpich:
MPIdir = /usr/lib/mpich
- MPIdev = ch_p4
- MPIplat = LINUX
MPILIBdir = $(MPIdir)/lib
MPIINCdir = $(MPIdir)/include
- MPILIB = $(MPILIBdir)/shared/libmpich.so $(MPILIBdir)/shared/libpmpich.so $(MPILIBdir)/libmpich.a
-else
+ MPILIB = -lmpich
+ CC = mpicc.mpich
+ F77 = mpif90.mpich
+endif
+ifeq ($(MPI),lam)
# for compilation with lam:
MPILIBdir = /usr/lib/lam/lib
MPIINCdir = /usr/include/lam
MPILIB = -L/usr/lib/lam/lib -llam
+ CC = mpicc.lam
+ F77 = mpif90.lam
+endif
+ifeq ($(MPI),openmpi)
+# for compilation with openmpi:
+ MPIdir = /usr/lib/$(DEB_HOST_MULTIARCH)/openmpi
+ MPILIBdir = $(MPIdir)/lib
+ MPIINCdir = $(MPIdir)/include
+ MPILIB = $$(pkg-config mpi-fort --libs)
+ CC = mpicc.openmpi
+ F77 = mpif90.openmpi
+ TRANSCOMM = -DUseMpi2
endif
-
# -------------------------------------
# All libraries required by the tester.
@@ -98,11 +146,7 @@
# The directory to find the required communication library include files,
# if they are required by your system.
# -----------------------------------------------------------------------
-ifeq ($(MPI),mpich)
- SYSINC = -I$(MPIINCdir) -I$(MPIdir)/build/$(MPIplat)/$(MPIdev)/include
-else
- SYSINC = -I$(MPIINCdir)
-endif
+SYSINC = -I$(MPIINCdir)
# ---------------------------------------------------------------------------
# The Fortran 77 to C interface to be used. If you are unsure of the correct
@@ -208,33 +252,3 @@
#=============================== End SECTION 2 ===============================
#=============================================================================
-
-#=============================================================================
-#=========================== SECTION 3: COMPILERS ============================
-#=============================================================================
-# The following macros specify compilers, linker/loaders, the archiver,
-# and their options. Some of the fortran files need to be compiled with no
-# optimization. This is the F77NO_OPTFLAG. The usage of the remaining
-# macros should be obvious from the names.
-#=============================================================================
- F77 = gfortran
- F77NO_OPTFLAGS = $(FPIC) -w
- F77FLAGS = $(F77NO_OPTFLAGS) -O4
- F77LOADER = $(F77)
- F77LOADFLAGS =
- CC = cc
- CCFLAGS = $(FPIC) -O4
- CCLOADER = $(CC)
- CCLOADFLAGS =
-
-# --------------------------------------------------------------------------
-# The archiver and the flag(s) to use when building an archive (library).
-# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo.
-# --------------------------------------------------------------------------
- ARCH = ar
- ARCHFLAGS = r
- RANLIB = ranlib
-
-#=============================================================================
-#=============================== End SECTION 3 ===============================
-#=============================================================================
diff -Nru blacs-mpi-1.1.orig/SRC/MPI/Makefile blacs-mpi-1.1/SRC/MPI/Makefile
--- blacs-mpi-1.1.orig/SRC/MPI/Makefile 2011-08-15 20:33:19.000000000 -0700
+++ blacs-mpi-1.1/SRC/MPI/Makefile 2011-08-15 20:34:39.870603642 -0700
@@ -194,8 +194,8 @@
$(F77) -c $(F77FLAGS) $*.f
mpif.h: $(MPIINCdir)/mpif.h
- rm -f mpif.h
- ln -s $< $@
+ rm -f mpif*
+ ln -s $(MPIINCdir)/mpif* .
# ------------------------------------------------------------------------
# We move C .o files to .C so that we can use the portable suffix rule for
diff -Nru blacs-mpi-1.1.orig/TESTING/Makefile blacs-mpi-1.1/TESTING/Makefile
--- blacs-mpi-1.1.orig/TESTING/Makefile 2011-08-15 20:33:19.000000000 -0700
+++ blacs-mpi-1.1/TESTING/Makefile 2011-08-15 20:34:39.870603642 -0700
@@ -59,8 +59,8 @@
$(F77) -c $(F77FLAGS) $*.f
mpif.h: $(MPIINCdir)/mpif.h
- rm -f mpif.h
- ln -s $< $@
+ rm -f mpif*
+ ln -s $(MPIINCdir)/mpif* .
fpvm3.h : $(PVMINCdir)/fpvm3.h
rm -f fpvm3.h
|