Satish, Thanks for the quick reply, I had corrected that bug in 3.3 you mentioned before getting the linking bug. I have also tried the same configure line (and also a simple configure: ./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack --download-mpich) on another cluster and got the same problem. I think the problem may be related to gfortran version Red Hat 4.1.2 (there is 4.1.2-14 on one cluster and 4.1.2-46 on another cluster). Another petsc user found ex14f to compile fine with red hat 4.4.6 gfortran.
The only reference to PETSC_NULL_FUNCTION I can find is where it is declared with External PETSC_NULL_FUNCTION in petscsys.h. Is this set to zero somewhere, or is it just expected to return zero if it is not found? Thanks, Adam ________________________________ From: petsc-users-bounces at mcs.anl.gov [petsc-users-bounces at mcs.anl.gov] on behalf of Adam Stanier [[email protected]] Sent: 23 July 2012 18:03 To: petsc-users at mcs.anl.gov Subject: Re: [petsc-users] PETSC_NULL_FUNCTION in petsc-3.2-p7/src/snes/examples/tests/ex14f.F Hello, I am getting the following error message when linking a code: ../solver_3.2/libsel.a(p2_snes.o): In function `__p2_snes_mod__p2_snes_error': /home/stanier/hifi/solver_3.2/p2_snes.F:450: undefined reference to `__local_mod__petsc_null_function' collect2: ld returned 1 exit status I have noticed that src/snes/examples/tests/ex14f.F also gives an error message related to PETSC_NULL_FUNCTION, and make ex14f fails to make ex14f.o: In function `MAIN__': /home/stanier/soft/petsc-3.2-p7/src/snes/examples/tests/ex14f.F:182: undefined reference to `__petscmod__petsc_null_function' collect2: ld returned 1 exit status Also, have checked this with another PETSc user with version 3.2-p7 and version 3.3- the same error occurs. My configure options are ./configure --with-cc=gcc --with-fc=gfortran --download-f-blas-lapack --download-mpich --download-blacs --download-scalapack --download-parmetis --download-mumps --download-superlu --download-hypre I was wondering if anyone else has had this problem, and knew how to get around it. Thanks, Adam -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120724/423824aa/attachment.html>
