[Trilinos-Users] AztecOO Error
Williams, Alan B
william at sandia.gov
Mon Dec 17 09:18:22 MST 2007
Hi Virginia,
The order in which libraries appear on the link line is important. Since
aztecoo depends on teuchos (aztecoo references symbols in teuchos),
'-lteuchos' needs to come after '-laztecoo' on your link line. You may
also find, at least on some systems, that blas needs to come after
lapack, and both of those need to come after teuchos.
Trilinos has a facility to help with these issues. For instance, the
aztecoo package supplies a file called Makefile.export.aztecoo (which
should be in the install directory after you do 'make install'). If you
include that file from your own Makefile, then you can simply reference
$(AZTECOO_LIBS) on your link line, and it will supply aztecoo as well as
the dependencies in the correct order.
Alan
________________________________
From: trilinos-users-bounces at software.sandia.gov
[mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of
Virginia Costa
Sent: Monday, December 17, 2007 7:53 AM
To: trilinos-users at software.sandia.gov
Subject: [Trilinos-Users] AztecOO Error
Hi,
I want to use the AztecOO package, but it returns me the
following linker error:
make ns3d
g++ clVector.o clVector_Ext.o clMatrix.o clDMatrix.o
clMatrix_Ext.o Model3D.o TElement.o FEMLinElement.o FEMMiniElement.o
Galerkin.o SemiLagrangean.o Solver.o Precond.o ICholesky.o ILU.o
Diagonal.o IC_splib.o ILU_splib.o CGSolver.o CGSolver2.o PCGSolver.o
CGSSolver.o GMRes.o GSLSolver.o AztecOOSolver.o Simulator3D.o InOut.o
main.o -L/opt/local/lib -lgsl -lgslcblas -lm -L../sparselib/lib
-lsparse -lspblas -lmv -lblas -llapack -L../trilinos/LINUX_SERIAL/lib
-lepetra -lepetraext -ltriutils -lifpack -lml -lteuchos -laztecoo -g -w
-O3 -o ns3d
../trilinos/LINUX_SERIAL/lib/libaztecoo.a(AztecOO.o): In
function `AztecOO_uppercase(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
../../../../packages/aztecoo/src/AztecOO.cpp:206: undefined
reference to `Teuchos::StrUtils::allCaps(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
../trilinos/LINUX_SERIAL/lib/libaztecoo.a(AztecOO.o): In
function `AztecOO::PrintLinearSystem(char const*)':
../../../../packages/aztecoo/src/AztecOO.cpp:1306: undefined
reference to `typeinfo for Epetra_VbrMatrix'
../trilinos/LINUX_SERIAL/lib/libaztecoo.a(AztecOO.o): In
function `AztecOO::SetParameters(Teuchos::ParameterList&, bool)':
../../../../packages/aztecoo/src/AztecOO.cpp:292: undefined
reference to `Teuchos::ParameterList::begin() const'
../../../../packages/aztecoo/src/AztecOO.cpp:293: undefined
reference to `Teuchos::ParameterList::end() const'
../trilinos/LINUX_SERIAL/lib/libaztecoo.a(AztecOO.o): In
function `std::basic_string<char, std::char_traits<char>,
std::allocator<char> >
Teuchos::typeName<Teuchos::any::placeholder>(Teuchos::any::placeholder
const&)':
/root/workspace/GesarLA/trilinos/LINUX_SERIAL/packages/teuchos/../../../
packages/teuchos/src/Teuchos_TypeNameTraits.hpp:73: undefined reference
to `Teuchos::demangleName(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
collect2: ld returned 1 exit status
make: ** [ns3d] Erro 1
I used configure with the following options, when I build
trilinos:
../configure --prefix=/root/workspace/GesarLA/trilinos-
8.0.4/LINUX_SERIAL/ --with-blas=/usr/lib/libblas.so.3
--with-lapack=/usr/lib/liblapack.so.3 --enable-tests --enable-examples
--enable-belos
And make like this
make everything
make install-everything
And I have this makefile
TARGET = ns3d
DIR = ./
CC = g++
CFLAGS = -g -w -O3
LIBS += -L/opt/local/lib -lgsl -lgslcblas
LIBS += -lm
LIBS += -L../sparselib/lib -lsparse -lspblas -lmv
LIBS += -lblas -llapack
LIBS += -L../trilinos/LINUX_SERIAL/lib -lepetra -lepetraext
-ltriutils -lifpack -lml -lteuchos -laztecoo
INCLUDES += -I$(DIR) -I/opt/local/include
INCLUDES += -I../sparselib/include -I../sparselib/mv/include
INCLUDES += -I../trilinos/LINUX_SERIAL/include
OBJECTS += clVector.o
OBJECTS += clVector_Ext.o
OBJECTS += clMatrix.o
OBJECTS += clDMatrix.o
OBJECTS += clMatrix_Ext.o
OBJECTS += Model3D.o
OBJECTS += TElement.o
OBJECTS += FEMLinElement.o
OBJECTS += FEMMiniElement.o
OBJECTS += Galerkin.o
OBJECTS += SemiLagrangean.o
OBJECTS += Solver.o
OBJECTS += Precond.o
OBJECTS += ICholesky.o
OBJECTS += ILU.o
OBJECTS += Diagonal.o
OBJECTS += IC_splib.o
OBJECTS += ILU_splib.o
OBJECTS += CGSolver.o
OBJECTS += CGSolver2.o
OBJECTS += PCGSolver.o
OBJECTS += CGSSolver.o
OBJECTS += GMRes.o
OBJECTS += GSLSolver.o
OBJECTS += AztecOOSolver.o
OBJECTS += Simulator3D.o
OBJECTS += InOut.o
OBJECTS += main.o
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) $(LIBS) $(CFLAGS) -o $(TARGET)
%.o : %.cpp $(wildcard *.h)
$(CC) $(INCLUDES) -c $< $(CFLAGS) -o $@
.PHONY: clean
clean:
@rm -f core
@find . -name "*.o" -exec rm {} \;
@find . -name "*~" -exec rm {} \;
deepclean:
@rm -f core
@find . -name "*.o" -exec rm {} \;
@find . -name "*~" -exec rm {} \;
@rm -f $(TARGET)
@rm -f ./vtk/*.vtk
@rm -f ./sim/*.dat
@rm -f ./relatorio.dat
# makefile help
# $@ is the name of the file to be made
# $? is the names of the changed dependents
# $< the name of the related file that caused the action
# $* the prefix shared by target and dependent files
So, Does somebody know what's happening?
Thanks.
Virginia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20071217/f1f1c10f/attachment-0001.html
More information about the Trilinos-Users
mailing list