[Trilinos-Users] Erro Epetra_CrsMatrix

Michael A Heroux maherou at sandia.gov
Wed Nov 28 12:20:33 MST 2007


Virginia,

The undefined references are to the four Fortran functions that are in
Epetra.  First you should determine whether or not the symbols are in
libepetra.a and, if so, confirm that the name mangling matches what is
expected (i.e., it appears that a double underscore is expected).

One other things to consider:  Do you have two Fortran compilers, one of
which is being used by configure to determine the name mangling and another
which is actually compiling the Fortran kernels?

I hope this helps.

Mike


On 11/28/07 11:48 AM, "Virginia Costa" <virscosta at gmail.com> wrote:

> Hi,
> 
> When I try to execute a main program with the ex12.cpp (from didasko), it
> returns the following error:
> 
> ../trilinos/serial/lib/libepetra.a(Epetra_CrsMatrix.o): In function
> `Epetra_CrsMatrix::GeneralSM(bool, bool, bool, double**, int, double**, int,
> int) const':
> ./Epetra_CrsMatrix.cpp:3050: undefined reference to `epetra_dcrssm__'
> ../trilinos/serial/lib/libepetra.a(Epetra_CrsMatrix.o): In function
> `Epetra_CrsMatrix::GeneralSV(bool, bool, bool, double*, double*) const':
> ./Epetra_CrsMatrix.cpp:2936: undefined reference to `epetra_dcrssv__'
> ../trilinos/serial/lib/libepetra.a(Epetra_CrsMatrix.o): In function
> `Epetra_CrsMatrix::GeneralMTM(double**, int, double**, int, int) const':
> ./Epetra_CrsMatrix.cpp:2851: undefined reference to `epetra_dcrsmm__'
> ../trilinos/serial/lib/libepetra.a(Epetra_CrsMatrix.o): In function
> `Epetra_CrsMatrix::GeneralMM(double**, int, double**, int, int) const':
> ./Epetra_CrsMatrix.cpp:2773: undefined reference to `epetra_dcrsmm__'
> ../trilinos/serial/lib/libepetra.a(Epetra_CrsMatrix.o): In function
> `Epetra_CrsMatrix::GeneralMTV(double*, double*) const':
> ./Epetra_CrsMatrix.cpp:2699: undefined reference to `epetra_dcrsmv__'
> ../trilinos/serial/lib/libepetra.a(Epetra_CrsMatrix.o): In function
> `Epetra_CrsMatrix::GeneralMV(double*, double*) const':
> ./Epetra_CrsMatrix.cpp:2630: undefined reference to `epetra_dcrsmv__'
> collect2: ld returned 1 exit status
> 
> The makefile is
> 
> TARGET = ns3d
> DIR = ./
> CC = g++ 
> CFLAGS = -g -w -O3
> 
> LIBS += -lblas -llapack
> LIBS += -L/opt/local/lib -lgsl -lgslcblas
> LIBS += -lm 
> LIBS += -L../sparselib/lib -lsparse -lspblas -lmv
> LIBS += -L../trilinos/serial/lib -lepetra -lepetraext -laztecoo -lbelos
> -lifpack -lml -lteuchos -ltriutils
> 
> INCLUDES += -I$(DIR) -I/opt/local/include
> INCLUDES += -I../sparselib/include -I../sparselib/mv/include
> INCLUDES += -I../trilinos/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 += Diagonal.o
> OBJECTS += ICholesky.o
> OBJECTS += ILU.o
> OBJECTS += CGSolver.o
> OBJECTS += CGSolver2.o
> OBJECTS += PCGSolver.o
> OBJECTS += CGSSolver.o
> OBJECTS += GMRes.o
> OBJECTS += GSLSolver.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
> 
> and I have libblas.so.3 and liblapack.so.3 into /usr/lib.
> 
> Can somebody help me?
> 
> Thanks.
> Virginia S. Costa.
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20071128/5d540918/attachment.html


More information about the Trilinos-Users mailing list