error while installing in debian linux

This forum is for issues related to parallel processing
and OpenSees using the new interpreters OpenSeesSP and OpenSeesMP

Moderator: selimgunay

Post Reply
Unni Kartha G
Posts: 11
Joined: Sat Jul 18, 2009 11:16 pm
Location: Cochin University of Science and Technology
Contact:

error while installing in debian linux

Post by Unni Kartha G »

I installed opensees on my linux machine with os debian lenny. when i try the opensees parallel, it give the following error (these are the last few lines)

es/OTHER/LAPACK/dpotrs.o /usr/lib/petsc/lib/linux-gnu-c-opt/libpetscsnes.a /usr/lib/petsc/lib/linux-gnu-c-opt/libpetscksp.a /usr/lib/petsc/lib/linux-gnu-c-opt/libpetscdm.a /usr/lib/petsc/lib/linux-gnu-c-opt/libpetscmat.a /usr/lib/petsc/lib/linux-gnu-c-opt/libpetscvec.a /usr/lib/petsc/lib/linux-gnu-c-opt/libpetsc.a /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenColLinSOE.o /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/SparseGenColLinSOE.o /opt/opensees/lib/libDistributedSuperLU.a -lg2c -ldl /usr/lib/libtk8.4.so /usr/lib/libtcl8.4.so -ldl -lieee -lm -lc -lg2c -Wl,-rpath,/usr/lib -lpng -o /opt/opensees/bin/OpenSees
g++: /opt/opensees/lib/libOpenSees.a: No such file or directory
g++: /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/petsc/PetscSOE.o: No such file or directory
g++: /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/petsc/PetscSolver.o: No such file or directory
g++: /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/petsc/PetscSparseSeqSolver.o: No such file or directory
make[1]: *** [tcl] Error 1
make[1]: Leaving directory `/opt/opensees/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2


my make file looks like this

############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# version created for Redhat 8.0 LINUX distribution
#
# Written: fmk
# Created: 01/2003
# edited by unnikartha for trial parallel installation at fisat
# date modified 19 august 2009
# modified for debian lenny
#
############################################################################

# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works)

OpenSees_PROGRAM = $(HOME)/bin/OpenSees
OpenSees_PROGRAM_MPI = $(HOME)/bin/OpenSeesMPI

# %---------------------------------%
# | SECTION 2: MAKEFILE CONSTANTS |
# %---------------------------------%
#
# Specify the constants the are used as control structure variables in the Makefiles.

OPERATING_SYSTEM = LINUX
PROGRAMMING_MODE = PARALLEL
RELIABILITY = NO_RELIABILITY
GRAPHICS = NONE
DEBUG_MODE = NO_DEBUG


# %---------------------------------%
# | 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 = /opt/opensees
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) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SUPERLU_DISTdir) \
$(SRCdir)

# %-------------------------------------------------------%
# | 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
DISTRIBUTED_SUPERLU_LIBRARY = $(HOME)/lib/libDistributedSuperLU.a

TCL_LIBRARY = /usr/lib/libtk8.4.so \
/usr/lib/libtcl8.4.so

ifeq ($(RELIABILITY), YES_RELIABILITY)
RELIABILITY_LIBRARY = $(HOME)/lib/libReliability.a
else
RELIABILITY_LIBRARY =
endif

# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.

WIPE_LIBS = $(FE_LIBRARY) \
$(NDARRAY_LIBRARY) \
$(MATMOD_LIBRARY) \
$(DISTRIBUTED_SUPERLU_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
# ###################################################

CC++ = /usr/bin/mpic++
CC = /usr/bin/mpicc
FC = /usr/bin/mpif77
FORTRAN = /usr/bin/mpif77
F90 = /usr/bin/mpif90
LINKER = /usr/bin/mpicxx


AR = ar
ARFLAGS = cqls
ARCH = ar
ARCHFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =

PROGRAMMING_FLAG =

ifeq ($(GRAPHICS), UsinOpenGl)
GRAPHIC_FLAG = -D_GLX
GRAPHIC_LIBRARY = -L/usr/X11/R6/lib -lGL -lGLU
else
GRAPHIC_FLAG = -D_NOGRAPHICS
GRAPHIC_LIBRARY =
endif

ifeq ($(RELIABILITY), YES_RELIABILITY)
RELIABILITY_FLAG = -D_RELIABILITY
else
RELIABILITY_FLAG =
endif

ifeq ($(DEBUG_MODE), DEBUG)
DEBUG_FLAG = -D_G3DEBUG
else
DEBUG_FLAG =
endif

ifeq ($(DEBUG_MODE), DEBUG)

C++FLAGS = -Wall -g -pg -D_LINUX -D_UNIX $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) -D_PARALLEL_PROCESSING -D_TCL84
CFLAGS = -Wall -g -pg $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic -g -pg

else

C++FLAGS = -Wall -O2 -D_LINUX -D_UNIX -D_TCL84 -Wall $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) -D_PARALLEL_PROCESSING -ffloat-store

CFLAGS = -Wall $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic

endif

# 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 $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@

.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@

.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $<

.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@

.f77.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@

.f90.o:
@$(ECHO) Making $@ from $<
$(FC90) $(FFLAGS) -c $< -o $@

# %---------------------------------------------------------%
# | 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 \




MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(GRAPHIC_LIBRARY)\
$(METIS_LIBRARY)\
$(RELIABILITY_LIBRARY)\
$(PETSC_LIB)\
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenColLinSOE.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/SparseGenColLinSOE.o \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
-lg2c -ldl

MPICC = mpicc
MPIINC = -I/usr/include/mpi
MPILIB = -L/usr/lib/openmpi/lib/

PETSC = YES
PETSC_FLAG = -D_PETSC

PETSC_INC = -I/usr/lib/petscdir/petsc-2.3.3 \
-I/usr/lib/petsc-2.3.3/bmake/linux-gnu \
-I/usr/lib/petsc-2.3.3/include \
-I/usr/lib/petsc-2.3.3/include/mpiuni \
-I/usr/lib/petscdir/2.3.3/include \
-DPETSC_USE_BOPT_g -DPETSC_USE_EXTERN_CXX

PETSCINC = -I/usr/lib/petsc-2.3.3/include -D_PETSC \
-I/usr/lib/petscdir/2.3.3/include \
-I/usr/lib/petsc-2.3.3/bmake/linux-gnu -DPETSC_USE_BOPT_g -DPETSC_USE_EXTERN_CXX \


PETSC_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 \
$(HOME)/OpenSees/OTHER/LAPACK/dgebak.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgebal.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgeev.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgehd2.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgehrd.o \
$(HOME)/OpenSees/OTHER/LAPACK/dhseqr.o \
$(HOME)/OpenSees/OTHER/LAPACK/dlahrd.o \
$(HOME)/OpenSees/OTHER/LAPACK/dorg2r.o \
$(HOME)/OpenSees/OTHER/LAPACK/dorghr.o \
$(HOME)/OpenSees/OTHER/LAPACK/dorgqr.o \
$(HOME)/OpenSees/OTHER/LAPACK/dpotrf.o \
$(HOME)/OpenSees/OTHER/LAPACK/dpotrs.o \
/usr/lib/petsc/lib/linux-gnu-c-opt/libpetscsnes.a \
/usr/lib/petsc/lib/linux-gnu-c-opt/libpetscksp.a \
/usr/lib/petsc/lib/linux-gnu-c-opt/libpetscdm.a \
/usr/lib/petsc/lib/linux-gnu-c-opt/libpetscmat.a \
/usr/lib/petsc/lib/linux-gnu-c-opt/libpetscvec.a \
/usr/lib/petsc/lib/linux-gnu-c-opt/libpetsc.a \


ifeq ($(PROGRAMMING_MODE), THREADS)
MACHINE_SPECIFIC_LIBS = -lpthread
else
MACHINE_SPECIFIC_LIBS = -ldl -lieee -lm -lc -lg2c -Wl,-rpath,/usr/lib -lpng $(MPILIB)
endif


# %---------------------------------------------------------%
# | SECTION 8: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%


MACHINE_INCLUDES = $(MPIINC) \
-I/usr/include \
-I/usr/include/mysql \
-I$(HOME)/include \
-I$(UMFPACKdir) \
-I$(SUPERLUdir) \
-I$(SUPERLU_DISTdir) $(PETSCINC)


# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl

TCL_INCLUDES = -I/usr/include/tcl8.4/tcl-private/generic/ \
-I/usr/include/tk8.4/tk-private/generic/

INCLUDES = $(MACHINE_INCLUDES) $(TCL_INCLUDES) $(FE_INCLUDES)

*******************************************

can anyone please help?
unnikartha
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

cd OpenSees/SRC, type make & see what the error is

cd /OpenSees/SRC/system_of_eqn/petsc and type make to build the petssc files
Unni Kartha G
Posts: 11
Joined: Sat Jul 18, 2009 11:16 pm
Location: Cochin University of Science and Technology
Contact:

it worked but new error!

Post by Unni Kartha G »

thanks fmk.
I did it. after carefully reading through the make file and source, I added the following in the make file and it worked.

PETSCINC= -I/opt/petsc-2.2.1/linux-gnu-c-debug/lib \
-I/opt/petsc-2.2.1/linux-gnu-c-debug/include/ \
-I/opt/petsc-2.2.1/include/mpiuni \
-I/opt/petsc-2.2.1/include \
-I/opt/petsc-2.2.1/include/finclude \
-I/opt/petsc-2.2.1/bmake/linux-gnu \
-DPETSC_USE_BOPT_g -DPETSC_USE_EXTERN_CXX=



but i got a new error. these are the last few lines of that

pt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenColLinSOE.o /opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/SparseGenColLinSOE.o /opt/opensees/lib/libDistributedSuperLU.a -lg2c -ldl /usr/lib/libtk8.4.so /usr/lib/libtcl8.4.so -ldl -lieee -lm -lc -lg2c -Wl,-rpath,/usr/lib -lpng -L/usr/lib/openmpi/lib/ -o /opt/opensees/bin/OpenSees
/opt/opensees/OpenSees/OTHER/LAPACK/dorg2r.o: In function `dorg2r_':
dorg2r.f:(.text+0x0): multiple definition of `dorg2r_'
/opt/opensees/lib/libLapack.a(dorg2r.o):dorg2r.f:(.text+0x0): first defined here
/opt/opensees/OpenSees/OTHER/LAPACK/dorgqr.o: In function `dorgqr_':
dorgqr.f:(.text+0x0): multiple definition of `dorgqr_'
/opt/opensees/lib/libLapack.a(dorgqr.o):dorgqr.f:(.text+0x0): first defined here
/usr/bin/ld: cannot find -lg2c
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make[1]: Leaving directory `/opt/opensees/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2

I am working on it.
will correct that and post it here (hopefully!).

thanks once again,
unnikartha
Unni Kartha G
Posts: 11
Joined: Sat Jul 18, 2009 11:16 pm
Location: Cochin University of Science and Technology
Contact:

make file debian lenny

Post by Unni Kartha G »

this is the make file that worked for me in debian lenny. i am using open mpi. there are quite a few dependencies, which i shall document and post here later....!


############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# version created for Redhat 8.0 LINUX distribution
#
# Written: fmk
# Created: 01/2003
# edited by unnikartha for trial parallel installation at fisat
# date modified 19 august 2009
# modified for debian lenny
#
############################################################################

# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works)

OpenSees_PROGRAM = $(HOME)/bin/OpenSees
OpenSees_PROGRAM_MPI = $(HOME)/bin/OpenSeesMPI

# %---------------------------------%
# | SECTION 2: MAKEFILE CONSTANTS |
# %---------------------------------%
#
# Specify the constants the are used as control structure variables in the Makefiles.

OPERATING_SYSTEM = LINUX
PROGRAMMING_MODE = PARALLEL
RELIABILITY = NO_RELIABILITY
GRAPHICS = NONE
DEBUG_MODE = DEBUG


# %---------------------------------%
# | 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 = /opt/opensees
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) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SUPERLU_DISTdir) \
$(SRCdir)

# %-------------------------------------------------------%
# | 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
DISTRIBUTED_SUPERLU_LIBRARY = $(HOME)/lib/libDistributedSuperLU.a

TCL_LIBRARY = /usr/lib/libtk8.4.so \
/usr/lib/libtcl8.4.so

ifeq ($(RELIABILITY), YES_RELIABILITY)
RELIABILITY_LIBRARY = $(HOME)/lib/libReliability.a
else
RELIABILITY_LIBRARY =
endif

# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.

WIPE_LIBS = $(FE_LIBRARY) \
$(NDARRAY_LIBRARY) \
$(MATMOD_LIBRARY) \
$(DISTRIBUTED_SUPERLU_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
# ###################################################

CC++ = /opt/ompi/bin/mpic++
CC = /opt/ompi/bin/mpicc
FC = /usr/bin/gfortran
FORTRAN = /usr/bin/gfortran
F90 = /usr/bin/gfortran
LINKER = /opt/ompi/bin/mpicxx


AR = ar
ARFLAGS = cqls
ARCH = ar
ARCHFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =

PROGRAMMING_FLAG =

ifeq ($(GRAPHICS), UsinOpenGl)
GRAPHIC_FLAG = -D_GLX
GRAPHIC_LIBRARY = -L/usr/X11/R6/lib -lGL -lGLU
else
GRAPHIC_FLAG = -D_NOGRAPHICS
GRAPHIC_LIBRARY =
endif

ifeq ($(RELIABILITY), YES_RELIABILITY)
RELIABILITY_FLAG = -D_RELIABILITY
else
RELIABILITY_FLAG =
endif

ifeq ($(DEBUG_MODE), DEBUG)
DEBUG_FLAG = -D_G3DEBUG
else
DEBUG_FLAG =
endif

ifeq ($(DEBUG_MODE), DEBUG)

C++FLAGS = -Wall -g -pg -D_LINUX -D_UNIX $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) -D_PARALLEL_PROCESSING -D_TCL84
CFLAGS = -Wall -g -pg $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic -g -pg

else

C++FLAGS = -Wall -O2 -D_LINUX -D_UNIX -D_TCL84 -Wall $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) -D_PARALLEL_PROCESSING -ffloat-store

CFLAGS = -Wall $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic

endif

# 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 $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@

.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@

.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $<

.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@

.f77.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@

.f90.o:
@$(ECHO) Making $@ from $<
$(FC90) $(FFLAGS) -c $< -o $@

# %---------------------------------------------------------%
# | 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 \

MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(GRAPHIC_LIBRARY)\
$(METIS_LIBRARY)\
$(RELIABILITY_LIBRARY)\
$(PETSC_LIB)\
-lg2c -ldl -lgfortran


MPICC = /opt/ompi/bin/mpicc
MPIINC = -I/opt/ompi/include
MPILIB = -L/opt/ompi/lib/

PETSC_INC = -I/opt/petsc-2.2.1/linux-gnu-c-debug/lib \
-I/opt/petsc-2.2.1/linux-gnu-c-debug/include/ \
-I/opt/petsc-2.2.1/include/mpiuni \
-I/opt/petsc-2.2.1/include \
-I/opt/petsc-2.2.1/include/finclude \
-I/opt/petsc-2.2.1/bmake/linux-gnu \
-DPETSC_USE_BOPT_g -DPETSC_USE_EXTERN_CXX

PETSCINC= -I/opt/petsc-2.2.1/linux-gnu-c-debug/lib \
-I/opt/petsc-2.2.1/linux-gnu-c-debug/include/ \
-I/opt/petsc-2.2.1/include/mpiuni \
-I/opt/petsc-2.2.1/include \
-I/opt/petsc-2.2.1/include/finclude \
-I/opt/petsc-2.2.1/bmake/linux-gnu \
-DPETSC_USE_BOPT_g -DPETSC_USE_EXTERN_CXX=

PETSC = YES
PETSC_FLAG = -D_PETSC


PETSC_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 \
/opt/opensees/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/SparseGenRowLinSolver.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgebak.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgebal.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgeev.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgehd2.o \
$(HOME)/OpenSees/OTHER/LAPACK/dgehrd.o \
$(HOME)/OpenSees/OTHER/LAPACK/dhseqr.o \
$(HOME)/OpenSees/OTHER/LAPACK/dlahrd.o \
$(HOME)/OpenSees/OTHER/LAPACK/dorghr.o \
$(HOME)/OpenSees/OTHER/LAPACK/dpotrf.o \
$(HOME)/OpenSees/OTHER/LAPACK/dpotrs.o \
$(HOME)/OpenSees/OTHER/LAPACK/dlahqr.o \
$(HOME)/OpenSees/OTHER/LAPACK/dlarfx.o \
$(HOME)/OpenSees/OTHER/LAPACK/dtrevc.o \
$(HOME)/OpenSees/OTHER/LAPACK/dlanv2.o \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscsnes.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscksp.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscdm.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscmat.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscvec.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetsc.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libmpiuni.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscfortran.a \
/opt/petsc-2.2.1/lib/libg/linux-gnu/libpetscts.a

PARALLEL_LIB = $(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/DistributedSparseGenColLinSOE.o \
$(FE)/system_of_eqn/linearSOE/sparseGEN/SparseGenColLinSOE.o \
$(DISTRIBUTED_SUPERLU_LIBRARY) \


ifeq ($(PROGRAMMING_MODE), THREADS)
MACHINE_SPECIFIC_LIBS = -lpthread
else
MACHINE_SPECIFIC_LIBS = -ldl -lieee -lm -lc -lg2c -Wl,-rpath,/usr/lib -lpng $(MPILIB)
endif


# %---------------------------------------------------------%
# | SECTION 8: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%


MACHINE_INCLUDES = $(MPIINC) \
-I/usr/include \
-I/usr/include/mysql \
-I$(HOME)/include \
-I$(UMFPACKdir) \
-I$(SUPERLUdir) \
-I$(SUPERLU_DISTdir) $(PETSCINC)


# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl

TCL_INCLUDES = -I/usr/include/tcl8.4/tcl-private/generic/ \
-I/usr/include/tk8.4/tk-private/generic/

INCLUDES = $(MACHINE_INCLUDES) $(TCL_INCLUDES) $(FE_INCLUDES)

**************************
thanks everyone here. the posts in this forum helped me a lot.
unnikartha
lsquinones
Posts: 14
Joined: Wed Jul 29, 2009 2:03 pm
Location: Ecuador
Contact:

Re: make file debian lenny

Post by lsquinones »

Hello Unni Karta, very useful your comments.

To solve the problem of “/usr/bin/ld: cannot find -lg2c“ use Synaptic and install "libg2c0" and then run the following command:

cd /usr/lib

ln -s libg2c.so.0 libg2c.so.

This problem was solved.

All this I did in the system Ubuntu 9.04 - Jaunty Jackalope.
Unni Kartha G
Posts: 11
Joined: Sat Jul 18, 2009 11:16 pm
Location: Cochin University of Science and Technology
Contact:

makefile debian lenny

Post by Unni Kartha G »

Thats exactly what i did.
i am now trying to customize my makefile. i am trying to compile with the packages supplied along with debian and also trying to compile all the packages like lapack separately for the cluster (40 node debian)at my institution. will document the whole thing once done and post it here. we are trying to use ompi and sungrid engine.will surely need help from this forum. thanks for the reply.
unnikartha
lsquinones
Posts: 14
Joined: Wed Jul 29, 2009 2:03 pm
Location: Ecuador
Contact:

Re: makefile debian lenny

Post by lsquinones »

Hello again Unni Kartha G like I was in the cluster configuration? I have had some problems, I'm setting in 4-core machines. I configured the cluster with MPICH2 but there are some problems when running it between the 2 machines. That's why I wanted to know how you did, and maybe you can give me ideas to overcome this problem.

Santiago
Unni Kartha G
Posts: 11
Joined: Sat Jul 18, 2009 11:16 pm
Location: Cochin University of Science and Technology
Contact:

Post by Unni Kartha G »

I am using openmpi. then, again my installation in not complete yet. the post was from the trial installation. still working on the original one. now i am trying to include mumps and it is giving me a headache. the nodes have debian lenny, mpi is open mpi, the scheduler is sun grid engine.
unnikartha
Post Reply