SP vs MP?, Trouble compiling SP
Posted: Tue Apr 19, 2011 6:15 am
Hi,
First a question. What is the difference the build PARALLEL and PARALLEL_INTERPRETERS ?
Second, I am working on building PARALLEL for a dual core 64 bit intel ubuntu linux PC. I installed
mpi-default-dev (0.6, currently openmpi)
petsc-dev (3.0.0)
libmumps-4.9.2 (linear solver, includes scalapack)
libblacs-mpil 1.1-28.2buildl
libblacs-mpi-dev 1.1-28.2buildl
libhpmud0 3.10.2-2ubuntu2.2
For MPI_Channel and mumps I had to descend into the directory below SRC and run make myself. But then I got the
following error when trying to build /OpenSees/SRC/system_of_eqn/linearSOE/mumps
MumpsSolver.cpp: In constructor ‘MumpsSolver::MumpsSolver(int, int)’:
MumpsSolver.cpp:51: error: invalid conversion from ‘ompi_communicator_t*’ to ‘int’
make: *** [MumpsSolver.o] Error 1
Any suggestions?
thanks,
alisa
(Makefile below)
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# version for parallelized PC (linux ubuntu 10.04)
# installed packages:
# mpi-default-dev (0.6, currently openmpi)
# petsc-dev (3.0.0)
# libmumps-4.9.2 (linear solver, includes scalapack)
# libblacs-mpil 1.1-28.2buildl
# libblacs-mpi-dev 1.1-28.2buildl
# libhpmud0 3.10.2-2ubuntu2.2 (HP Multi-Point Transport Driver (hpmud) run-time libraries)
# Written: fmk
# Created: 01/2003
# NOTES: you have to go into SRC/actor/channel and call make by hand on some
# classes.
# You have to do things by hand in SRC/system_of_eqn/liearSOE/mumps
#
#
############################################################################
# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works!)
#PROGRAMMING_MODE = PARALLEL, SEQUENTIAL, PARALLEL_INTERPRETERS
PROGRAMMING_MODE = PARALLEL
OpenSees_PROGRAM = $(HOME)/bin/OpenSees
ifeq ($(PROGRAMMING_MODE), PARALLEL)
OpenSees_PROGRAM = $(HOME)/bin/OpenSeesSP
endif
ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
OpenSees_PROGRAM = $(HOME)/bin/OpenSeesMP
endif
# %---------------------------------%
# | SECTION 2: MAKEFILE CONSTANTS |
# %---------------------------------%
#
# Specify the constants the are used as control structure variables in the Makefiles.
OPERATING_SYSTEM = LINUX
#DEBUG_MODE = DEBUG, NO_DEBUG
DEBUG_MODE = NO_DEBUG
RELIABILITY = NO_RELIABILITY
GRAPHICS = NONE
# %---------------------------------%
# | SECTION 3: PATHS |
# %---------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries or if you have
# any of the libraries already leave the directory location blank AND
# remove the directory from DIRS.
BASE =
# PUT YOUR HOME DIRECTOREY HERE
HOME = /home/alisanee
FE = $(HOME)/OpenSees/SRC
BLASdir = $(HOME)/OpenSees/OTHER/BLAS
CBLASdir = $(HOME)/OpenSees/OTHER/CBLAS
LAPACKdir = $(HOME)/OpenSees/OTHER/LAPACK
ARPACKdir = $(HOME)/OpenSees/OTHER/ARPACK
UMFPACKdir = $(HOME)/OpenSees/OTHER/UMFPACK
METISdir = $(HOME)/OpenSees/OTHER/METIS
SRCdir = $(HOME)/OpenSees/SRC
SUPERLUdir = $(HOME)/OpenSees/OTHER/SuperLU_3.0/SRC
SUPERLU_DISTdir = $(HOME)/OpenSees/OTHER/SuperLU_DIST_2.0/SRC
DIRS = $(BLASdir) \
$(CBLASdir) \
$(SUPERLUdir) \
$(SUPERLU_DISTdir) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SRCdir)
DISTRIBUTED_SUPERLU_LIBRARY = $(HOME)/lib/libDistributedSuperLU.a
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
DIRS = $(BLASdir) \
$(CBLASdir) \
$(SUPERLUdir) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SRCdir)
DISTRIBUTED_SUPERLU_LIBRARY =
endif
# %-------------------------------------------------------%
# | SECTION 4: LIBRARIES |
# | |
# | The following section defines the libraries that will |
# | be created and/or linked with when the libraries are |
# | being created or linked with. |
# %-------------------------------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries leave the
# libraries blank. You have to get your own copy of the tcl/tk
# library!!
#
# Note: For libraries that will be created (any in DIRS above)
# make sure the directory exsists where you want the library to go!
FE_LIBRARY = $(HOME)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(HOME)/lib/libndarray.a # BJ_UCD jeremic@ucdavis.edu
MATMOD_LIBRARY = $(HOME)/lib/libmatmod.a # BJ_UCD jeremic@ucdavis.edu
BJMISC_LIBRARY = $(HOME)/lib/libBJmisc.a # BJ_UCD jeremic@ucdavis.edu
LAPACK_LIBRARY = $(HOME)/lib/libLapack.a
BLAS_LIBRARY = $(HOME)/lib/libBlas.a
SUPERLU_LIBRARY = $(HOME)/lib/libSuperLU.a
CBLAS_LIBRARY = $(HOME)/lib/libCBlas.a
ARPACK_LIBRARY = $(HOME)/lib/libArpack.a
UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a
METIS_LIBRARY = $(HOME)/lib/libMetis.a
TCL_LIBRARY = /usr/lib/libtcl8.4.a
GRAPHIC_LIBRARY =
#RELIABILITY_LIBRARY = $(HOME)/lib/libReliability.a
RELIABILITY_LIBRARY =
# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.
WIPE_LIBS = $(FE_LIBRARY) \
$(NDARRAY_LIBRARY) \
$(MATMOD_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(RELIABILITY_LIBRARY)
# %---------------------------------------------------------%
# | SECTION 5: COMPILERS |
# | |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options. You need to make sure |
# | these are correct for your system. |
# %---------------------------------------------------------%
# ###################################################
# # Compilers
# ###################################################
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
CC++ = icpc
CC = icc
FC = ifort
F90 = ifort
LINKER = $(CC++)
else
CC++ = mpiCC
CC = mpicc
FC = mpif90
F90 = mpif90
FORTRAN = $(FC)
LINKER = $(CC++)
endif
AR = ar
ARCH = ar
ARFLAGS = -q
#ARCHFLAGS = cqls
ARCHFLAGS = -v -q
RANLIB = ranlib
RANLIBFLAGS =
GRAPHIC_FLAG = -D_NOGRAPHICS
PROGRAMMING_FLAG =
ifeq ($(PROGRAMMING_MODE), PARALLEL)
PROGRAMMING_FLAG = -D_PARALLEL_PROCESSING
endif
ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
PROGRAMMING_FLAG = -D_PARALLEL_INTERPRETERS
endif
#RELIABILITY_FLAG = -D_RELIABILITY
RELIABILITY_FLAG =
#DEBUG_FLAG = -D_G3DEBUG
DEBUG_FLAG =
MUMPS_FLAG =
PETSC_FLAG =
OPT_FLAG = -O2
COMP_FLAG =
C++FLAGS = -D_LINUX -D_UNIX $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(OPT_FLAG) $(COMP_FLAG)\
$(PROGRAMMING_FLAG) $(PETSC_FLAG) $(MUMPS_FLAG) \
-D_TCL84 -D_BLAS -D_NETINET_PROBLEMS_INTEL
CFLAGS = $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG)$(PROGRAMMING_FLAG) $(OPT_FLAG) $(COMP_FLAG) -D_TCL84 -D_BLAS
FFLAGS = -qextname $(OPT_FLAG) $(COMP_FLAG)
LINKFLAGS =
# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh
# %---------------------------------------------------------%
# | SECTION 6: COMPILATION |
# | |
# | The following macros specify the macros used in |
# | to compile the source code into object code. |
# %---------------------------------------------------------%
.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o .cpp
#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"
#
# %-----------------------------------------------%
# | Command to build .o files from source files. |
# %-----------------------------------------------%
#
.cpp.o:
@$(ECHO) Making $@ from $< $@ with $(CC++) $(C++FLAGS) $(INCLUDES) -c $<
@$(CC++) $(C++FLAGS) $(INCLUDES) -c $<
.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $<
.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $<
.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $<
.f77.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $<
.f90.o:
@$(ECHO) Making $@ from $<
$(FC90) $(FFLAGS) -c $<
# %---------------------------------------------------------%
# | SECTION 7: OTHER LIBRARIES |
# | |
# | The following macros specify other libraries that must |
# | be linked with when creating executables. These are |
# | platform specific and typically order does matter!! |
# %---------------------------------------------------------%
MACHINE_LINKLIBS = -L$(BASE)/lib \
-L$(HOME)/lib
# PETSC
HAVEPETSC = YES
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
HAVEPETSC = NO
endif
ifeq ($(HAVEPETSC), YES)
PETSC = YES
PETSC_FLAG = -D_PETSC
PETSC_DIR = /usr
PETSC_ARCH = linux-gnu
BOPT = O
PETSC_INC = -I$(PETSC_DIR)/include/petsc -I$(PETSC_DIR)/include/petsc/finclude -D_PETSC
PETSC_LIB = -L$(PETSC_DIR)/lib \
$(FE)/system_of_eqn/linearSOE/petsc/PetscSOE.o \
$(FE)/system_of_eqn/linearSOE/petsc/PetscSolver.o \
$(FE)/system_of_eqn/linearSOE/petsc/PetscSparseSeqSolver.o \
-lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc \
-L/usr/X11/lib -lX11 -lGL
endif
HAVEMUMPS = YES
MUMPS_INCLUDE =
MUMPS_LIB =
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
HAVEMUMPS = NO
endif
ifeq ($(HAVEMUMPS), YES)
MUMPS = YES
MUMPS_FLAG = -D_MUMPS
#MUMPS_DIR = /gpfs/fmk/MUMPS_4.6.4
MUMPS_DIR = /usr
BLACSdir = /usr
#BLACSDBGLVL = 0
BLACSFINIT = $(BLACSdir)/lib/libblacsF77init-openmpi.a
BLACSCINIT = $(BLACSdir)/lib/libblacsCinit-openmpi.a
BLACSLIB = $(BLACSdir)/lib/libblacs-openmpi.a
CBLACSLIB = $(BLACSLIB) $(BLACSCINIT)
FBLACSLIB = $(BLACSLIB) $(BLACSFINIT)
BLACSlib = $(CBLACSLIB)
SCALAPdir = /usr
SCALAPlib = $(SCALAPdir)/lib/libscalapack-openmpi.a
SCALAP = $(BLACSlib) $(SCALAPlib) $(BLACSlib)
MUMPS_LIB = -L$(MUMPS_DIR)/lib \
-ldmumps$(PLAT) \
-lpord$(PLAT) \
$(SCALAP) \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsSOE.o \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsSolver.o \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsParallelSOE.o \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsParallelSolver.o
MUMPS_INCLUDE = -I$(MUMPS_DIR)/include
endif
PARALLEL_LIB = $(FE)/system_of_eqn/linearSOE/diagonal/DistributedDiagonalSOE.o \
$(FE)/system_of_eqn/linearSOE/diagonal/DistributedDiagonalSolver.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenColLinSOE.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
PARALLEL_LIB =
endif
HPM_LIB = -L/usr -l/usr/libhpmud.so \
-lhpmud -lhpm_r -lpmapi -lm
MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(GRAPHIC_LIBRARY)\
$(RELIABILITY_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
$(METIS_LIBRARY) $(PARALLEL_LIB) $(PETSC_LIB) $(MUMPS_LIB)
MACHINE_SPECIFIC_LIBS = -L${MKL_HOME}/lib/64 -lmkl_lapack -lmkl_ipf -lguide -lpthread \
#/usr/local/apps/intel/compiler8/lib/libifcoremt.a
# %---------------------------------------------------------%
# | SECTION 8: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/local/BerkeleyDB.4.0/include \
-I/usr/include/mysql \
-I$(HOME)/include \
-I$(UMFPACKdir) \
-I$(SUPERLUdir) \
-I$(SUPERLU_DISTdir) \
$(PETSC_INC) $(MUMPS_INCLUDE)
# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl
#TCL_INCLUDES = -I/home/fmk/tcl8.3.3/generic
TCL_INCLUDES = -I/usr/include/tcl8.4 -I/usr/include/
INCLUDES = $(MACHINE_INCLUDES) $(TCL_INCLUDES) $(FE_INCLUDES)
First a question. What is the difference the build PARALLEL and PARALLEL_INTERPRETERS ?
Second, I am working on building PARALLEL for a dual core 64 bit intel ubuntu linux PC. I installed
mpi-default-dev (0.6, currently openmpi)
petsc-dev (3.0.0)
libmumps-4.9.2 (linear solver, includes scalapack)
libblacs-mpil 1.1-28.2buildl
libblacs-mpi-dev 1.1-28.2buildl
libhpmud0 3.10.2-2ubuntu2.2
For MPI_Channel and mumps I had to descend into the directory below SRC and run make myself. But then I got the
following error when trying to build /OpenSees/SRC/system_of_eqn/linearSOE/mumps
MumpsSolver.cpp: In constructor ‘MumpsSolver::MumpsSolver(int, int)’:
MumpsSolver.cpp:51: error: invalid conversion from ‘ompi_communicator_t*’ to ‘int’
make: *** [MumpsSolver.o] Error 1
Any suggestions?
thanks,
alisa
(Makefile below)
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# version for parallelized PC (linux ubuntu 10.04)
# installed packages:
# mpi-default-dev (0.6, currently openmpi)
# petsc-dev (3.0.0)
# libmumps-4.9.2 (linear solver, includes scalapack)
# libblacs-mpil 1.1-28.2buildl
# libblacs-mpi-dev 1.1-28.2buildl
# libhpmud0 3.10.2-2ubuntu2.2 (HP Multi-Point Transport Driver (hpmud) run-time libraries)
# Written: fmk
# Created: 01/2003
# NOTES: you have to go into SRC/actor/channel and call make by hand on some
# classes.
# You have to do things by hand in SRC/system_of_eqn/liearSOE/mumps
#
#
############################################################################
# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works!)
#PROGRAMMING_MODE = PARALLEL, SEQUENTIAL, PARALLEL_INTERPRETERS
PROGRAMMING_MODE = PARALLEL
OpenSees_PROGRAM = $(HOME)/bin/OpenSees
ifeq ($(PROGRAMMING_MODE), PARALLEL)
OpenSees_PROGRAM = $(HOME)/bin/OpenSeesSP
endif
ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
OpenSees_PROGRAM = $(HOME)/bin/OpenSeesMP
endif
# %---------------------------------%
# | SECTION 2: MAKEFILE CONSTANTS |
# %---------------------------------%
#
# Specify the constants the are used as control structure variables in the Makefiles.
OPERATING_SYSTEM = LINUX
#DEBUG_MODE = DEBUG, NO_DEBUG
DEBUG_MODE = NO_DEBUG
RELIABILITY = NO_RELIABILITY
GRAPHICS = NONE
# %---------------------------------%
# | SECTION 3: PATHS |
# %---------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries or if you have
# any of the libraries already leave the directory location blank AND
# remove the directory from DIRS.
BASE =
# PUT YOUR HOME DIRECTOREY HERE
HOME = /home/alisanee
FE = $(HOME)/OpenSees/SRC
BLASdir = $(HOME)/OpenSees/OTHER/BLAS
CBLASdir = $(HOME)/OpenSees/OTHER/CBLAS
LAPACKdir = $(HOME)/OpenSees/OTHER/LAPACK
ARPACKdir = $(HOME)/OpenSees/OTHER/ARPACK
UMFPACKdir = $(HOME)/OpenSees/OTHER/UMFPACK
METISdir = $(HOME)/OpenSees/OTHER/METIS
SRCdir = $(HOME)/OpenSees/SRC
SUPERLUdir = $(HOME)/OpenSees/OTHER/SuperLU_3.0/SRC
SUPERLU_DISTdir = $(HOME)/OpenSees/OTHER/SuperLU_DIST_2.0/SRC
DIRS = $(BLASdir) \
$(CBLASdir) \
$(SUPERLUdir) \
$(SUPERLU_DISTdir) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SRCdir)
DISTRIBUTED_SUPERLU_LIBRARY = $(HOME)/lib/libDistributedSuperLU.a
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
DIRS = $(BLASdir) \
$(CBLASdir) \
$(SUPERLUdir) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SRCdir)
DISTRIBUTED_SUPERLU_LIBRARY =
endif
# %-------------------------------------------------------%
# | SECTION 4: LIBRARIES |
# | |
# | The following section defines the libraries that will |
# | be created and/or linked with when the libraries are |
# | being created or linked with. |
# %-------------------------------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries leave the
# libraries blank. You have to get your own copy of the tcl/tk
# library!!
#
# Note: For libraries that will be created (any in DIRS above)
# make sure the directory exsists where you want the library to go!
FE_LIBRARY = $(HOME)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(HOME)/lib/libndarray.a # BJ_UCD jeremic@ucdavis.edu
MATMOD_LIBRARY = $(HOME)/lib/libmatmod.a # BJ_UCD jeremic@ucdavis.edu
BJMISC_LIBRARY = $(HOME)/lib/libBJmisc.a # BJ_UCD jeremic@ucdavis.edu
LAPACK_LIBRARY = $(HOME)/lib/libLapack.a
BLAS_LIBRARY = $(HOME)/lib/libBlas.a
SUPERLU_LIBRARY = $(HOME)/lib/libSuperLU.a
CBLAS_LIBRARY = $(HOME)/lib/libCBlas.a
ARPACK_LIBRARY = $(HOME)/lib/libArpack.a
UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a
METIS_LIBRARY = $(HOME)/lib/libMetis.a
TCL_LIBRARY = /usr/lib/libtcl8.4.a
GRAPHIC_LIBRARY =
#RELIABILITY_LIBRARY = $(HOME)/lib/libReliability.a
RELIABILITY_LIBRARY =
# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.
WIPE_LIBS = $(FE_LIBRARY) \
$(NDARRAY_LIBRARY) \
$(MATMOD_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(RELIABILITY_LIBRARY)
# %---------------------------------------------------------%
# | SECTION 5: COMPILERS |
# | |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options. You need to make sure |
# | these are correct for your system. |
# %---------------------------------------------------------%
# ###################################################
# # Compilers
# ###################################################
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
CC++ = icpc
CC = icc
FC = ifort
F90 = ifort
LINKER = $(CC++)
else
CC++ = mpiCC
CC = mpicc
FC = mpif90
F90 = mpif90
FORTRAN = $(FC)
LINKER = $(CC++)
endif
AR = ar
ARCH = ar
ARFLAGS = -q
#ARCHFLAGS = cqls
ARCHFLAGS = -v -q
RANLIB = ranlib
RANLIBFLAGS =
GRAPHIC_FLAG = -D_NOGRAPHICS
PROGRAMMING_FLAG =
ifeq ($(PROGRAMMING_MODE), PARALLEL)
PROGRAMMING_FLAG = -D_PARALLEL_PROCESSING
endif
ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
PROGRAMMING_FLAG = -D_PARALLEL_INTERPRETERS
endif
#RELIABILITY_FLAG = -D_RELIABILITY
RELIABILITY_FLAG =
#DEBUG_FLAG = -D_G3DEBUG
DEBUG_FLAG =
MUMPS_FLAG =
PETSC_FLAG =
OPT_FLAG = -O2
COMP_FLAG =
C++FLAGS = -D_LINUX -D_UNIX $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(OPT_FLAG) $(COMP_FLAG)\
$(PROGRAMMING_FLAG) $(PETSC_FLAG) $(MUMPS_FLAG) \
-D_TCL84 -D_BLAS -D_NETINET_PROBLEMS_INTEL
CFLAGS = $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG)$(PROGRAMMING_FLAG) $(OPT_FLAG) $(COMP_FLAG) -D_TCL84 -D_BLAS
FFLAGS = -qextname $(OPT_FLAG) $(COMP_FLAG)
LINKFLAGS =
# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh
# %---------------------------------------------------------%
# | SECTION 6: COMPILATION |
# | |
# | The following macros specify the macros used in |
# | to compile the source code into object code. |
# %---------------------------------------------------------%
.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o .cpp
#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"
#
# %-----------------------------------------------%
# | Command to build .o files from source files. |
# %-----------------------------------------------%
#
.cpp.o:
@$(ECHO) Making $@ from $< $@ with $(CC++) $(C++FLAGS) $(INCLUDES) -c $<
@$(CC++) $(C++FLAGS) $(INCLUDES) -c $<
.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $<
.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $<
.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $<
.f77.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $<
.f90.o:
@$(ECHO) Making $@ from $<
$(FC90) $(FFLAGS) -c $<
# %---------------------------------------------------------%
# | SECTION 7: OTHER LIBRARIES |
# | |
# | The following macros specify other libraries that must |
# | be linked with when creating executables. These are |
# | platform specific and typically order does matter!! |
# %---------------------------------------------------------%
MACHINE_LINKLIBS = -L$(BASE)/lib \
-L$(HOME)/lib
# PETSC
HAVEPETSC = YES
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
HAVEPETSC = NO
endif
ifeq ($(HAVEPETSC), YES)
PETSC = YES
PETSC_FLAG = -D_PETSC
PETSC_DIR = /usr
PETSC_ARCH = linux-gnu
BOPT = O
PETSC_INC = -I$(PETSC_DIR)/include/petsc -I$(PETSC_DIR)/include/petsc/finclude -D_PETSC
PETSC_LIB = -L$(PETSC_DIR)/lib \
$(FE)/system_of_eqn/linearSOE/petsc/PetscSOE.o \
$(FE)/system_of_eqn/linearSOE/petsc/PetscSolver.o \
$(FE)/system_of_eqn/linearSOE/petsc/PetscSparseSeqSolver.o \
-lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetsc \
-L/usr/X11/lib -lX11 -lGL
endif
HAVEMUMPS = YES
MUMPS_INCLUDE =
MUMPS_LIB =
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
HAVEMUMPS = NO
endif
ifeq ($(HAVEMUMPS), YES)
MUMPS = YES
MUMPS_FLAG = -D_MUMPS
#MUMPS_DIR = /gpfs/fmk/MUMPS_4.6.4
MUMPS_DIR = /usr
BLACSdir = /usr
#BLACSDBGLVL = 0
BLACSFINIT = $(BLACSdir)/lib/libblacsF77init-openmpi.a
BLACSCINIT = $(BLACSdir)/lib/libblacsCinit-openmpi.a
BLACSLIB = $(BLACSdir)/lib/libblacs-openmpi.a
CBLACSLIB = $(BLACSLIB) $(BLACSCINIT)
FBLACSLIB = $(BLACSLIB) $(BLACSFINIT)
BLACSlib = $(CBLACSLIB)
SCALAPdir = /usr
SCALAPlib = $(SCALAPdir)/lib/libscalapack-openmpi.a
SCALAP = $(BLACSlib) $(SCALAPlib) $(BLACSlib)
MUMPS_LIB = -L$(MUMPS_DIR)/lib \
-ldmumps$(PLAT) \
-lpord$(PLAT) \
$(SCALAP) \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsSOE.o \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsSolver.o \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsParallelSOE.o \
$(FE)/system_of_eqn/linearSOE/mumps/MumpsParallelSolver.o
MUMPS_INCLUDE = -I$(MUMPS_DIR)/include
endif
PARALLEL_LIB = $(FE)/system_of_eqn/linearSOE/diagonal/DistributedDiagonalSOE.o \
$(FE)/system_of_eqn/linearSOE/diagonal/DistributedDiagonalSolver.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenColLinSOE.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o
ifeq ($(PROGRAMMING_MODE), SEQUENTIAL)
PARALLEL_LIB =
endif
HPM_LIB = -L/usr -l/usr/libhpmud.so \
-lhpmud -lhpm_r -lpmapi -lm
MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(GRAPHIC_LIBRARY)\
$(RELIABILITY_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
$(METIS_LIBRARY) $(PARALLEL_LIB) $(PETSC_LIB) $(MUMPS_LIB)
MACHINE_SPECIFIC_LIBS = -L${MKL_HOME}/lib/64 -lmkl_lapack -lmkl_ipf -lguide -lpthread \
#/usr/local/apps/intel/compiler8/lib/libifcoremt.a
# %---------------------------------------------------------%
# | SECTION 8: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/local/BerkeleyDB.4.0/include \
-I/usr/include/mysql \
-I$(HOME)/include \
-I$(UMFPACKdir) \
-I$(SUPERLUdir) \
-I$(SUPERLU_DISTdir) \
$(PETSC_INC) $(MUMPS_INCLUDE)
# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl
#TCL_INCLUDES = -I/home/fmk/tcl8.3.3/generic
TCL_INCLUDES = -I/usr/include/tcl8.4 -I/usr/include/
INCLUDES = $(MACHINE_INCLUDES) $(TCL_INCLUDES) $(FE_INCLUDES)