Building error

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
ozgura
Posts: 36
Joined: Mon Apr 19, 2010 9:46 am
Location: Virginia Tech

Building error

Post by ozgura »

Frank,

Here is the new error we are getting. I will post the makefile as well.

Thanks for your help.


/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::~DistributedSuperLU()':
DistributedSuperLU.cpp:(.text+0x6c8): undefined reference to `SparseGenColLinSolver::~SparseGenColLinSolver()'
DistributedSuperLU.cpp:(.text+0x6f4): undefined reference to `SparseGenColLinSolver::~SparseGenColLinSolver()'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::~DistributedSuperLU()':
DistributedSuperLU.cpp:(.text+0x748): undefined reference to `SparseGenColLinSolver::~SparseGenColLinSolver()'
DistributedSuperLU.cpp:(.text+0x76c): undefined reference to `SparseGenColLinSolver::~SparseGenColLinSolver()'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::~DistributedSuperLU()':
DistributedSuperLU.cpp:(.text+0x7c8): undefined reference to `SparseGenColLinSolver::~SparseGenColLinSolver()'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o:DistributedSuperLU.cpp:(.text+0x7ec): more undefined references to `SparseGenColLinSolver::~SparseGenColLinSolver()' follow
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::DistributedSuperLU()':
DistributedSuperLU.cpp:(.text+0x818): undefined reference to `SparseGenColLinSolver::SparseGenColLinSolver(int)'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::DistributedSuperLU()':
DistributedSuperLU.cpp:(.text+0x878): undefined reference to `SparseGenColLinSolver::SparseGenColLinSolver(int)'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::DistributedSuperLU(int, int)':
DistributedSuperLU.cpp:(.text+0x8e8): undefined reference to `SparseGenColLinSolver::SparseGenColLinSolver(int)'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o: In function `DistributedSuperLU::DistributedSuperLU(int, int)':
DistributedSuperLU.cpp:(.text+0x968): undefined reference to `SparseGenColLinSolver::SparseGenColLinSolver(int)'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o:(.rodata._ZTV18DistributedSuperLU[vtable for DistributedSuperLU]+0x3c): undefined reference to `SparseGenColLinSolver::setLinearSOE(SparseGenColLinSOE&)'
/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o:(.rodata._ZTI18DistributedSuperLU[typeinfo for DistributedSuperLU]+0x8): undefined reference to `typeinfo for SparseGenColLinSolver'
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make[1]: Leaving directory `/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2
ozgura
Posts: 36
Joined: Mon Apr 19, 2010 9:46 am
Location: Virginia Tech

Post by ozgura »

#
# By Bharath Ramesh, 2010 Makefile.def
#
# Makefile.def for OpenSees built in parallel mode with support for Mumps.
#

BASE = $(HOME)/ARC/Ozgur_Atlayan/OpenSees
FE = $(BASE)/SRC
PROGRAMMING_MODE = PARALLEL
OpenSees_PROGRAM = $(BASE)/bin/OpenSees

ifeq ($(PROGRAMMING_MODE), PARALLEL)
OpenSees_PROGRAM = $(BASE)/bin/OpenSeesSP
endif

ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
OpenSees_PROGRAM = $(BASE)/bin/OpenSeesMP
endif

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

BLASdir = $(BASE)/OTHER/BLAS
CBLASdir = $(BASE)/OTHER/CBLAS
LAPACKdir = $(BASE)/OTHER/LAPACK
ARPACKdir = $(BASE)/OTHER/ARPACK
UMFPACKdir = $(BASE)/OTHER/UMFPACK
METISdir = $(BASE)/OTHER/METIS
SUPERLUdir = $(BASE)/OTHER/SuperLU_3.0/SRC
SUPERLU_DISTdir = $(BASE)/OTHER/SuperLU_DIST_2.0/SRC
SRCdir = $(BASE)/SRC

DIRS = $(BLASdir) \
$(CBLASdir) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SUPERLUdir) \
$(SUPERLU_DISTdir) \
$(SRCdir)

FE_LIBRARY = $(BASE)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(BASE)/lib/libndarray.a
MATMOD_LIBRARY = $(BASE)/lib/libmatmod.a
BJMISC_LIBRARY = $(BASE)/lib/libBJmisc.a
BLAS_LIBRARY = $(BASE)/lib/libBlas.a
CBLAS_LIBRARY = $(BASE)/lib/libCBlas.a
LAPACK_LIBRARY = $(BASE)/lib/libLapack.a
ARPACK_LIBRARY = $(BASE)/lib/libArpack.a
UMFPACK_LIBRARY = $(BASE)/lib/libUmfpack.a
METIS_LIBRARY = $(BASE)/lib/libMetis.a
SUPERLU_LIBRARY = $(BASE)/lib/libSuperLU.a
DISTRIBUTED_SUPERLU_LIBRARY = $(BASE)/lib/libDistributedSuperLU.a

WIPE_LIBS = $(FE_LIBRARY) \
$(NDARRAY_LIBRARY) \
$(MATMOD_LIBRARY) \
$(BJMISC_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(LAPACK_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY)

TCL_LIBRARY = -ltcl8.4

MPI_BIN = /apps/packages/openmpi-1.3.2-32/bin

CC = $(MPI_BIN)/mpicc
CC++ = $(MPI_BIN)/mpic++
FC = $(MPI_BIN)/mpif90
F90 = $(MPI_BIN)/mpif90
FORTRAN = $(FC)
LINKER = $(CC++)

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

DEBUG_FLAG =
GRAPHIC_FLAG = -D_NOGRAPHICS
GRAPHIC_LIBRARY =
RELIABILITY_FLAG =
RELIABILITY_LIBRARY =
PROGRAMMING_FLAG =

ifeq ($(PROGRAMMING_MODE), PARALLEL)
PROGRAMMING_FLAG = -D_PARALLEL_PROCESSING
endif

ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
PROGRAMMING_FLAG = -D_PARALLEL_INTERPRETERS
endif

CFLAGS = -Wall $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(PROGRAMMING_FLAG)
C++FLAGS = -Wall -O2 -D_LINUX -D_UNIX -D_TCL84 -ffloat-store $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic

MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh

.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o

.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"

.c.o:
$(CC) $(CFLAGS) -c $<

.C.o:
$(CC++) $(C++FLAGS) $(INCLUDES) -c $<

.cpp.o:
$(CC++) $(C++FLAGS) $(INCLUDES) -c $<

.f.o:
$(FC) $(FFLAGS) -c $<

.f77.o:
$(FC) $(FFLAGS) -c $<

.f90.o:
$(F90) $(FFLAGS) -c $<

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

MACHINE_LINKLIBS = -L$(BASE)/lib
MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(METIS_LIBRARY)

MACHINE_SPECIFIC_LIBS = -ldl -lieee -lgfortran -Wl,-rpath,/local/lib -lpng
MACHINE_INCLUDES = -I$(BASE)/include \
-I$(UMFPACKdir) \
-I$(SUPERLUdir) \
-I$(SUPERLU_DISTdir) \

include $(FE)/Makefile.incl

INCLUDES = $(MACHINE_INCLUDES) $(FE_INCLUDES)
Ozgur Atlayan
Virginia Tech
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

it is in the OpenSees.lib but some compliers do not do a good jjob of linking .. i take it you are building one of the parallel versions .. try adding it to PARELLEL_LIB in the Makefile.def
ozgura
Posts: 36
Joined: Mon Apr 19, 2010 9:46 am
Location: Virginia Tech

Post by ozgura »

Thanks Frank. It worked. That build was for OpenSeesSP. When we try to build OpenSeesMP we got this error.

/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/lib/libOpenSees.a(AMDNumberer.o): In function `AMD::number(Graph&, int)':
AMDNumberer.cpp:(.text+0x4f4): undefined reference to `amd_order'
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make[1]: Leaving directory `/home/bramesh/ARC/Ozgur_Atlayan/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2

I will post makefile.def in next message.
Thanks
Ozgur Atlayan
Virginia Tech
ozgura
Posts: 36
Joined: Mon Apr 19, 2010 9:46 am
Location: Virginia Tech

Makefile for OpenSeesMP

Post by ozgura »

#
# By Bharath Ramesh, 2010 Makefile.def
#
# Makefile.def for OpenSees built in parallel interpreters mode with support
# for Mumps.
#

BASE = $(HOME)/ARC/Ozgur_Atlayan/OpenSees
FE = $(BASE)/SRC
PROGRAMMING_MODE = PARALLEL_INTERPRETERS
OpenSees_PROGRAM = $(BASE)/bin/OpenSees

ifeq ($(PROGRAMMING_MODE), PARALLEL)
OpenSees_PROGRAM = $(BASE)/bin/OpenSeesSP
endif

ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
OpenSees_PROGRAM = $(BASE)/bin/OpenSeesMP
endif

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

BLASdir = $(BASE)/OTHER/BLAS
CBLASdir = $(BASE)/OTHER/CBLAS
LAPACKdir = $(BASE)/OTHER/LAPACK
ARPACKdir = $(BASE)/OTHER/ARPACK
UMFPACKdir = $(BASE)/OTHER/UMFPACK
METISdir = $(BASE)/OTHER/METIS
SUPERLUdir = $(BASE)/OTHER/SuperLU_3.0/SRC
SUPERLU_DISTdir = $(BASE)/OTHER/SuperLU_DIST_2.0/SRC
SRCdir = $(BASE)/SRC

DIRS = $(BLASdir) \
$(CBLASdir) \
$(LAPACKdir) \
$(ARPACKdir) \
$(UMFPACKdir) \
$(METISdir) \
$(SUPERLUdir) \
$(SUPERLU_DISTdir) \
$(SRCdir)

FE_LIBRARY = $(BASE)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(BASE)/lib/libndarray.a
MATMOD_LIBRARY = $(BASE)/lib/libmatmod.a
BJMISC_LIBRARY = $(BASE)/lib/libBJmisc.a
BLAS_LIBRARY = $(BASE)/lib/libBlas.a
CBLAS_LIBRARY = $(BASE)/lib/libCBlas.a
LAPACK_LIBRARY = $(BASE)/lib/libLapack.a
ARPACK_LIBRARY = $(BASE)/lib/libArpack.a
UMFPACK_LIBRARY = $(BASE)/lib/libUmfpack.a
METIS_LIBRARY = $(BASE)/lib/libMetis.a
SUPERLU_LIBRARY = $(BASE)/lib/libSuperLU.a
DISTRIBUTED_SUPERLU_LIBRARY = $(BASE)/lib/libDistributedSuperLU.a

WIPE_LIBS = $(FE_LIBRARY) \
$(NDARRAY_LIBRARY) \
$(MATMOD_LIBRARY) \
$(BJMISC_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(LAPACK_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY)

TCL_LIBRARY = -ltcl8.4

MPI_BIN = /apps/packages/openmpi-1.3.2-32/bin

CC = $(MPI_BIN)/mpicc
CC++ = $(MPI_BIN)/mpic++
FC = $(MPI_BIN)/mpif90
F90 = $(MPI_BIN)/mpif90
FORTRAN = $(FC)
LINKER = $(CC++)

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

DEBUG_FLAG =
GRAPHIC_FLAG = -D_NOGRAPHICS
GRAPHIC_LIBRARY =
RELIABILITY_FLAG =
RELIABILITY_LIBRARY =
PROGRAMMING_FLAG =

ifeq ($(PROGRAMMING_MODE), PARALLEL)
PROGRAMMING_FLAG = -D_PARALLEL_PROCESSING
endif

ifeq ($(PROGRAMMING_MODE), PARALLEL_INTERPRETERS)
PROGRAMMING_FLAG = -D_PARALLEL_INTERPRETERS
endif

CFLAGS = -Wall $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(PROGRAMMING_FLAG)
C++FLAGS = -Wall -O2 -D_LINUX -D_UNIX -D_TCL84 -ffloat-store $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
LINKFLAGS = -rdynamic

MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh

.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o

.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"

.c.o:
$(CC) $(CFLAGS) -c $<

.C.o:
$(CC++) $(C++FLAGS) $(INCLUDES) -c $<

.cpp.o:
$(CC++) $(C++FLAGS) $(INCLUDES) -c $<

.f.o:
$(FC) $(FFLAGS) -c $<

.f77.o:
$(FC) $(FFLAGS) -c $<

.f90.o:
$(F90) $(FFLAGS) -c $<

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

MACHINE_LINKLIBS = -L$(BASE)/lib
MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(DISTRIBUTED_SUPERLU_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(METIS_LIBRARY)

MACHINE_SPECIFIC_LIBS = -ldl -lieee -lgfortran -Wl,-rpath,/local/lib -lpng
MACHINE_INCLUDES = -I$(BASE)/include \
-I$(UMFPACKdir) \
-I$(SUPERLUdir) \
-I$(SUPERLU_DISTdir) \

include $(FE)/Makefile.incl

INCLUDES = $(MACHINE_INCLUDES) $(FE_INCLUDES)
Ozgur Atlayan
Virginia Tech
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

1. you need to add a line AMD_LIBRARY = something in the MAkefile.def (look at other libs)

2, you need to add this library to MACHINE_NUMERICAL_LIBS in the Makefile.def

3, cd into OpenSees/OTHER/AMD and type make

4. make in OpenSees again
gourik
Posts: 69
Joined: Wed Dec 31, 2008 10:07 pm
Location: C-DAC,Pune

Re: Building error

Post by gourik »

Hi,

I am getting the same error while building OpenSeesSP.

SRC/system_of_eqn/linearSOE/sparseGEN/DistributedSuperLU.o:(.rodata._ZTI18DistributedSuperLU[typeinfo for DistributedSuperLU]+0x10): undefined reference to `typeinfo for SparseGenColLinSolver'

Not able to understand teh solution given by fmk. :(

Please help.

Regards,
Gouri
Thanks And Regards,

Gouri
Post Reply