[petsc-users] undefined reference error in make test

Mohammad Mirzadeh mirzadeh at gmail.com
Fri Feb 25 03:45:43 CST 2011


Hi all,

I just noticed that when compiling petsc-3.1-p7 with hypre-2.0.0, running
make test results in the following undefined reference error on ex19 and
ex5f:

--------------Error detected during compile or link!-----------------------
See http://www.mcs.anl.gov/petsc/petsc-2/documentation/troubleshooting.html
/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/bin/mpicc -o ex19.o -c
-Wall -Wwrite-strings -Wno-strict-aliasing -g3
-I/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/include
-I/home/m.mirzadeh/soft/petsc-3.1-p7/include
-I/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/include
-D__INSDIR__=src/snes/examples/tutorials/ ex19.c
/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/bin/mpicc -Wall
-Wwrite-strings -Wno-strict-aliasing -g3  -o ex19  ex19.o
-Wl,-rpath,/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib
-L/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib -lpetsc  -lX11
-Wl,-rpath,/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib
-L/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib -lHYPRE
-lmpichcxx -lstdc++ -lflapack -lfblas -lnsl -lrt
-L/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lmpich -lpthread -lrt -lgcc_s
-lmpichf90 -lgfortran -lm -lm -lmpichcxx -lstdc++ -lmpichcxx -lstdc++ -ldl
-lmpich -lpthread -lrt -lgcc_s -ldl
/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib/libpetsc.a(mhyp.o):
In function `MatZeroEntries_HYPREStruct_3d':
/home/m.mirzadeh/soft/petsc-3.1-p7/src/dm/da/utils/mhyp.c:397: undefined
reference to `hypre_StructMatrixClearBoxValues'
collect2: ld returned 1 exit status
make[3]: [ex19] Error 1 (ignored)
/bin/rm -f ex19.o

--------------Error detected during compile or link!-----------------------
See http://www.mcs.anl.gov/petsc/petsc-2/documentation/troubleshooting.html
/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/bin/mpif90 -c  -Wall
-Wno-unused-variable -g
 -I/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/include
-I/home/m.mirzadeh/soft/petsc-3.1-p7/include
-I/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/include
-I/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/include
-I/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/include    -o ex5f.o
ex5f.F
/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/bin/mpif90 -Wall
-Wno-unused-variable -g  -o ex5f ex5f.o
-Wl,-rpath,/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib
-L/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib -lpetsc  -lX11
-Wl,-rpath,/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib
-L/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib -lHYPRE
-lmpichcxx -lstdc++ -lflapack -lfblas -lnsl -lrt
-L/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lmpich -lpthread -lrt -lgcc_s
-lmpichf90 -lgfortran -lm -lm -lmpichcxx -lstdc++ -lmpichcxx -lstdc++ -ldl
-lmpich -lpthread -lrt -lgcc_s -ldl
/home/m.mirzadeh/soft/petsc-3.1-p7/linux-gnu-c-debug/lib/libpetsc.a(mhyp.o):
In function `MatZeroEntries_HYPREStruct_3d':
/home/m.mirzadeh/soft/petsc-3.1-p7/src/dm/da/utils/mhyp.c:397: undefined
reference to `hypre_StructMatrixClearBoxValues'
collect2: ld returned 1 exit status
make[3]: [ex5f] Error 1 (ignored)
/bin/rm -f ex5f.o
Completed test examples

It seems that the function "hypre_StructMatrixClearBoxValues()" is not
properly defined. This problem is new as I didn't have any trouble with
petsc-3.0.0-p12.

Mohammad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110225/5cd3fe1f/attachment.htm>


More information about the petsc-users mailing list