1#=============================================================================
2#====================== SECTION 1: PATHS AND LIBRARIES =======================
3#=============================================================================
4#  The following macros specify the name and location of libraries required by
5#  the BLACS and its tester.
6#=============================================================================
7
8#  --------------------------------------
9#  Make sure we've got a consistent shell
10#  --------------------------------------
11   SHELL = /bin/sh
12
13#  -----------------------------
14#  The top level BLACS directory
15#  -----------------------------
16   BTOPdir = @WRKSRC@
17
18#  ---------------------------------------------------------------------------
19#  The communication library your BLACS have been written for.
20#  Known choices (and the machines they run on) are:
21#
22#     COMMLIB   MACHINE
23#     .......   ..............................................................
24#     CMMD      Thinking Machine's CM-5
25#     MPI       Wide variety of systems
26#     MPL       IBM's SP series (SP1 and SP2)
27#     NX        Intel's supercomputer series (iPSC2, iPSC/860, DELTA, PARAGON)
28#     PVM       Most unix machines; See PVM User's Guide for details
29#  ---------------------------------------------------------------------------
30   COMMLIB = MPI
31
32#  -------------------------------------------------------------
33#  The platform identifier to suffix to the end of library names
34#  -------------------------------------------------------------
35   PLAT = FreeBSD
36
37#  ----------------------------------------------------------
38#  Name and location of the BLACS library.  See section 2 for
39#  details on BLACS debug level (BLACSDBGLVL).
40#  ----------------------------------------------------------
41   BLACSdir    = $(BTOPdir)/LIB
42   BLACSDBGLVL = @DEBUG_LEVEL@
43   BLACSFINIT  = $(BLACSdir)/blacsF77init_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
44   BLACSCINIT  = $(BLACSdir)/blacsCinit_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
45   BLACSLIB    = $(BLACSdir)/blacs_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL).a
46
47#  -------------------------------------
48#  Name and location of the MPI library.
49#  -------------------------------------
50   MPIdir = @LOCALBASE@
51   MPILIBdir = $(MPIdir)/lib/
52   MPIINCdir = $(MPIdir)/include
53   MPILIB = -lmpi -lmpifort -pthread
54
55#  -------------------------------------
56#  All libraries required by the tester.
57#  -------------------------------------
58   BTLIBS = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT) $(MPILIB)
59
60#  ----------------------------------------------------------------
61#  The directory to put the installation help routines' executables
62#  ----------------------------------------------------------------
63   INSTdir = $(BTOPdir)/INSTALL/EXE
64
65#  ------------------------------------------------
66#  The name and location of the tester's executable
67#  ------------------------------------------------
68   TESTdir = $(BTOPdir)/TESTING/EXE
69   FTESTexe = $(TESTdir)/xFbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL)
70   CTESTexe = $(TESTdir)/xCbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL)
71#=============================================================================
72#=============================== End SECTION 1 ===============================
73#=============================================================================
74
75
76#=============================================================================
77#========================= SECTION 2: BLACS INTERNALS ========================
78#=============================================================================
79#  The following macro definitions set preprocessor values for the BLACS.
80#  The file Bconfig.h sets these values if they are not set by the makefile.
81#  User's compiling only the tester can skip this entire section.
82#  NOTE: The MPI defaults have been set for MPICH.
83#=============================================================================
84
85#  -----------------------------------------------------------------------
86#  The directory to find the required communication library include files,
87#  if they are required by your system.
88#  -----------------------------------------------------------------------
89   SYSINC = -I$(MPIINCdir)
90
91#  ---------------------------------------------------------------------------
92#  The Fortran 77 to C interface to be used.  If you are unsure of the correct
93#  setting for your platform, compile and run BLACS/INSTALL/xintface.
94#  Choices are: Add_, NoChange, UpCase, or f77IsF2C.
95#  ---------------------------------------------------------------------------
96   INTFACE = -DAdd_
97
98#  ------------------------------------------------------------------------
99#  Allows the user to vary the topologies that the BLACS default topologies
100#  (TOP = ' ') correspond to.  If you wish to use a particular topology
101#  (as opposed to letting the BLACS make the choice), uncomment the
102#  following macros, and replace the character in single quotes with the
103#  topology of your choice.
104#  ------------------------------------------------------------------------
105#  DEFBSTOP   = -DDefBSTop="'1'"
106#  DEFCOMBTOP = -DDefCombTop="'1'"
107
108#  -------------------------------------------------------------------
109#  If your MPI_Send is locally-blocking, substitute the following line
110#  for the empty macro definition below.
111#  SENDIS = -DSndIsLocBlk
112#  -------------------------------------------------------------------
113   SENDIS =
114
115#  --------------------------------------------------------------------
116#  If your MPI handles packing of non-contiguous messages by copying to
117#  another buffer or sending extra bytes, better performance may be
118#  obtained by replacing the empty macro definition below with the
119#  macro definition on the following line.
120#  BUFF = -DNoMpiBuff
121#  --------------------------------------------------------------------
122   BUFF =
123
124#  -----------------------------------------------------------------------
125#  If you know something about your system, you may make it easier for the
126#  BLACS to translate between C and fortran communicators.  If the empty
127#  macro defininition is left alone, this translation will cause the C
128#  BLACS to globally block for MPI_COMM_WORLD on calls to BLACS_GRIDINIT
129#  and BLACS_GRIDMAP.  If you choose one of the options for translating
130#  the context, neither the C or fortran calls will globally block.
131#  If you are using MPICH, or a derivitive system, you can replace the
132#  empty macro definition below with the following (note that if you let
133#  MPICH do the translation between C and fortran, you must also indicate
134#  here if your system has pointers that are longer than integers.  If so,
135#  define -DPOINTER_64_BITS=1.)  For help on setting TRANSCOMM, you can
136#  run BLACS/INSTALL/xtc_CsameF77 and BLACS/INSTALL/xtc_UseMpich as
137#  explained in BLACS/INSTALL/README.
138#   TRANSCOMM = -DUseMpich
139#
140#  If you know that your MPI uses the same handles for fortran and C
141#  communicators, you can replace the empty macro definition below with
142#  the macro definition on the following line.
143  TRANSCOMM = -DCSameF77
144#  -----------------------------------------------------------------------
145#  TRANSCOMM =
146
147#  --------------------------------------------------------------------------
148#  You may choose to have the BLACS internally call either the C or Fortran77
149#  interface to MPI by varying the following macro.  If TRANSCOMM is left
150#  empty, the C interface BLACS_GRIDMAP/BLACS_GRIDINIT will globally-block if
151#  you choose to use the fortran internals, and the fortran interface will
152#  block if you choose to use the C internals.  It is recommended that the
153#  user leave this macro definition blank, unless there is a strong reason
154#  to prefer one MPI interface over the other.
155#  WHATMPI = -DUseF77Mpi
156#  WHATMPI = -DUseCMpi
157#  --------------------------------------------------------------------------
158   WHATMPI =
159
160#  ---------------------------------------------------------------------------
161#  Some early versions of MPICH and its derivatives cannot handle user defined
162#  zero byte data types.  If your system has this problem (compile and run
163#  BLACS/INSTALL/xsyserrors to check if unsure), replace the empty macro
164#  definition below with the macro definition on the following line.
165#  SYSERRORS = -DZeroByteTypeBug
166#  ---------------------------------------------------------------------------
167   SYSERRORS =
168
169#  ------------------------------------------------------------------
170#  These macros set the debug level for the BLACS.  The fastest
171#  code is produced by BlacsDebugLvl 0.  Higher levels provide
172#  more debug information at the cost of performance.  Present levels
173#  of debug are:
174#  0 : No debug information
175#  1 : Mainly parameter checking.
176#  ------------------------------------------------------------------
177   DEBUGLVL = -DBlacsDebugLvl=$(BLACSDBGLVL)
178
179#  -------------------------------------------------------------------------
180#  All BLACS definitions needed for compile (DEFS1 contains definitions used
181#  by all BLACS versions).
182#  -------------------------------------------------------------------------
183   DEFS1 = -DSYSINC $(SYSINC) $(INTFACE) $(DEFBSTOP) $(DEFCOMBTOP) $(DEBUGLVL)
184   BLACSDEFS = $(DEFS1) $(SENDIS) $(BUFF) $(TRANSCOMM) $(WHATMPI) $(SYSERRORS)
185#=============================================================================
186#=============================== End SECTION 2 ===============================
187#=============================================================================
188
189
190#=============================================================================
191#=========================== SECTION 3: COMPILERS ============================
192#=============================================================================
193#  The following macros specify compilers, linker/loaders, the archiver,
194#  and their options.  Some of the fortran files need to be compiled with no
195#  optimization.  This is the F77NO_OPTFLAG.  The usage of the remaining
196#  macros should be obvious from the names.
197#=============================================================================
198   F77            = @F77@
199   F77NO_OPTFLAGS = @F77EXTRAFLAGS@
200   F77FLAGS       = @FFLAGS@
201   F77LOADER      = @F77@
202   F77LOADFLAGS   = @FFLAGS@
203   CC             = @CC@
204   CCFLAGS        = @CFLAGS@
205   CCLOADER       = $(CC)
206   CCLOADFLAGS    =
207#  --------------------------------------------------------------------------
208#  The archiver and the flag(s) to use when building an archive (library).
209#  Also the ranlib routine.  If your system has no ranlib, set RANLIB = echo.
210#  --------------------------------------------------------------------------
211   ARCH      = ar
212   ARCHFLAGS = r
213   RANLIB    = ranlib
214
215#=============================================================================
216#=============================== End SECTION 3 ===============================
217#=============================================================================
218