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 = $(HOME)/BLACS 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 = SP2 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 = 0 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 = 51 MPIdev = 52 MPIplat = 53 MPILIBdir = 54 MPIINCdir = /usr/lpp/ppe.poe/include 55 MPILIB = 56 57# ------------------------------------- 58# All libraries required by the tester. 59# ------------------------------------- 60 BTLIBS = $(BLACSFINIT) $(BLACSLIB) $(BLACSFINIT) $(MPILIB) 61 62# ---------------------------------------------------------------- 63# The directory to put the installation help routines' executables 64# ---------------------------------------------------------------- 65 INSTdir = $(BTOPdir)/INSTALL/EXE 66 67# ------------------------------------------------ 68# The name and location of the tester's executable 69# ------------------------------------------------ 70 TESTdir = $(BTOPdir)/TESTING/EXE 71 FTESTexe = $(TESTdir)/xFbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL) 72 CTESTexe = $(TESTdir)/xCbtest_$(COMMLIB)-$(PLAT)-$(BLACSDBGLVL) 73#============================================================================= 74#=============================== End SECTION 1 =============================== 75#============================================================================= 76 77 78#============================================================================= 79#========================= SECTION 2: BLACS INTERNALS ======================== 80#============================================================================= 81# The following macro definitions set preprocessor values for the BLACS. 82# The file Bconfig.h sets these values if they are not set by the makefile. 83# User's compiling only the tester can skip this entire section. 84# NOTE: The MPI defaults have been set for MPICH. 85#============================================================================= 86 87# ----------------------------------------------------------------------- 88# The directory to find the required communication library include files, 89# if they are required by your system. 90# ----------------------------------------------------------------------- 91 SYSINC = -I$(MPIINCdir) 92 93# --------------------------------------------------------------------------- 94# The Fortran 77 to C interface to be used. If you are unsure of the correct 95# setting for your platform, compile and run BLACS/INSTALL/xintface. 96# Choices are: Add_, NoChange, UpCase, or f77IsF2C. 97# --------------------------------------------------------------------------- 98 INTFACE = -DNoChange 99 100# ------------------------------------------------------------------------ 101# Allows the user to vary the topologies that the BLACS default topologies 102# (TOP = ' ') correspond to. If you wish to use a particular topology 103# (as opposed to letting the BLACS make the choice), uncomment the 104# following macros, and replace the character in single quotes with the 105# topology of your choice. 106# ------------------------------------------------------------------------ 107# DEFBSTOP = -DDefBSTop="'1'" 108# DEFCOMBTOP = -DDefCombTop="'1'" 109 110# ------------------------------------------------------------------- 111# If your MPI_Send is locally-blocking, substitute the following line 112# for the empty macro definition below. 113# SENDIS = -DSndIsLocBlk 114# ------------------------------------------------------------------- 115 SENDIS = 116 117# -------------------------------------------------------------------- 118# If your MPI handles packing of non-contiguous messages by copying to 119# another buffer or sending extra bytes, better performance may be 120# obtained by replacing the empty macro definition below with the 121# macro definition on the following line. 122# BUFF = -DNoMpiBuff 123# -------------------------------------------------------------------- 124 BUFF = 125 126# ----------------------------------------------------------------------- 127# If you know something about your system, you may make it easier for the 128# BLACS to translate between C and fortran communicators. If the empty 129# macro defininition is left alone, this translation will cause the C 130# BLACS to globally block for MPI_COMM_WORLD on calls to BLACS_GRIDINIT 131# and BLACS_GRIDMAP. If you choose one of the options for translating 132# the context, neither the C or fortran calls will globally block. 133# If you are using MPICH, or a derivitive system, you can replace the 134# empty macro definition below with the following (note that if you let 135# MPICH do the translation between C and fortran, you must also indicate 136# here if your system has pointers that are longer than integers. If so, 137# define -DPOINTER_64_BITS=1.) For help on setting TRANSCOMM, you can 138# run BLACS/INSTALL/xtc_CsameF77 and BLACS/INSTALL/xtc_UseMpich as 139# explained in BLACS/INSTALL/README. 140# TRANSCOMM = -DUseMpich 141# 142# If you know that your MPI uses the same handles for fortran and C 143# communicators, you can replace the empty macro definition below with 144# the macro definition on the following line. 145 TRANSCOMM = -DCSameF77 146# ----------------------------------------------------------------------- 147# TRANSCOMM = 148 149# -------------------------------------------------------------------------- 150# You may choose to have the BLACS internally call either the C or Fortran77 151# interface to MPI by varying the following macro. If TRANSCOMM is left 152# empty, the C interface BLACS_GRIDMAP/BLACS_GRIDINIT will globally-block if 153# you choose to use the fortran internals, and the fortran interface will 154# block if you choose to use the C internals. It is recommended that the 155# user leave this macro definition blank, unless there is a strong reason 156# to prefer one MPI interface over the other. 157# WHATMPI = -DUseF77Mpi 158# WHATMPI = -DUseCMpi 159# -------------------------------------------------------------------------- 160 WHATMPI = 161 162# --------------------------------------------------------------------------- 163# Some early versions of MPICH and its derivatives cannot handle user defined 164# zero byte data types. If your system has this problem (compile and run 165# BLACS/INSTALL/xsyserrors to check if unsure), replace the empty macro 166# definition below with the macro definition on the following line. 167# SYSERRORS = -DZeroByteTypeBug 168# --------------------------------------------------------------------------- 169 SYSERRORS = 170 171# ------------------------------------------------------------------ 172# These macros set the debug level for the BLACS. The fastest 173# code is produced by BlacsDebugLvl 0. Higher levels provide 174# more debug information at the cost of performance. Present levels 175# of debug are: 176# 0 : No debug information 177# 1 : Mainly parameter checking. 178# ------------------------------------------------------------------ 179 DEBUGLVL = -DBlacsDebugLvl=$(BLACSDBGLVL) 180 181# ------------------------------------------------------------------------- 182# All BLACS definitions needed for compile (DEFS1 contains definitions used 183# by all BLACS versions). 184# ------------------------------------------------------------------------- 185 DEFS1 = -DSYSINC $(SYSINC) $(INTFACE) $(DEFBSTOP) $(DEFCOMBTOP) $(DEBUGLVL) 186 BLACSDEFS = $(DEFS1) $(SENDIS) $(BUFF) $(TRANSCOMM) $(WHATMPI) $(SYSERRORS) 187#============================================================================= 188#=============================== End SECTION 2 =============================== 189#============================================================================= 190 191 192#============================================================================= 193#=========================== SECTION 3: COMPILERS ============================ 194#============================================================================= 195# The following macros specify compilers, linker/loaders, the archiver, 196# and their options. Some of the fortran files need to be compiled with no 197# optimization. This is the F77NO_OPTFLAG. The usage of the remaining 198# macros should be obvious from the names. 199#============================================================================= 200 F77 = mpxlf 201 F77NO_OPTFLAGS = 202 F77FLAGS = $(F77NO_OPTFLAGS) -O3 -qarch=pwr2 203 F77LOADER = $(F77) 204 F77LOADFLAGS = 205 CC = mpcc 206 CCFLAGS = -O3 -qarch=pwr2 207 CCLOADER = $(CC) 208 CCLOADFLAGS = 209 210# -------------------------------------------------------------------------- 211# The archiver and the flag(s) to use when building an archive (library). 212# Also the ranlib routine. If your system has no ranlib, set RANLIB = echo. 213# -------------------------------------------------------------------------- 214 ARCH = ar 215 ARCHFLAGS = r 216 RANLIB = ranlib 217 218#============================================================================= 219#=============================== End SECTION 3 =============================== 220#============================================================================= 221