where to realize "petscsetcommonblock_" and "petscgetcommoncomm_"

Satish Balay balay at mcs.anl.gov
Tue Sep 22 15:26:54 CDT 2009

petscgetcommoncomm_ should be in somefort.F

Can you verify if you've configured/compiled PETSc with a
fortran compiler.

And also verify that there are no errors during petsc build [i.e in

asterix:/home/balay/tmp/petsc-dist-test/asterix64/lib>nm -Ao *.a |grep -i petscgetcommoncomm
libpetsc.a:zstart.o:                 U petscgetcommoncomm_
libpetsc.a:somefort.o:00000000000000a2 T petscgetcommoncomm_


On Tue, 22 Sep 2009, Yujie wrote:

> Hello, PETSc developer
> I am trying to compile my codes. However, I got the following errors.
> "Linking myproj-dbg...
> /home/yujie/codes/petsc-3.0.0-p3/linux/lib/libpetsc.so: undefined reference
> to `petscsetcommonblock_'
> /home/yujie/codes/petsc-3.0.0-p3/linux/lib/libpetsc.so: undefined reference
> to `petscgetcommoncomm_'
> "
> I can't find "petscsetcommonblock_" and "petscgetcommoncomm_". I have
> checked libpetsc.so using nm commands as follows:
> "00000000000c65a4 T petscsequentialphasebegin_
> 00000000000c6574 T petscsequentialphaseend_
>                                 U petscsetcommonblock_
> 0000000000032cb4 T petscsetdefaultdebugger_
> ......
> 00000000003dcba0 B petscfortran9_
> 00000000001441a2 T petscfprintf_
> 000000000013e2c8 T petscgetarchtype_
>                              U petscgetcommoncomm_
> 0000000000052f18 T petscgetcputime_
> 000000000014761e T petscgetflops_
> "
> There is not the address linker for them. I can't find the realization for
> these two functions in PETSc codes. Could you give me some advice?
> CPU in my PC is x86_64bits. GCC is 4.2 version. Thanks a lot.
> Regards,
> Yujie

More information about the petsc-users mailing list