Are you using PETSc makefile format? Please compare your link command with the the link command used for a petsc example [say from "cd src/ksp/ksp/examples/tutorials && make ex2"] - and look for differences with your link command.
We recommend using petsc makefile format to avoid such issues. Satish On Tue, 17 Sep 2013, Suraj Prabhakaran wrote: > yes I also observed that. But still when I link petsc to a simple hello world > example, I can see that the binary requires libmpi_f77 and libmpi_f90. > Can you please compile the following snippet with mpicc and link it with > petsc library, do a ldd on the binary and see if it asks for these 2 > libraries or not? > > #include "stdio.h" > int main() > { > printf("hello world\n"); > return 0 > } > > best, > Suraj > > > > > On Sep 17, 2013, at 6:25 PM, Satish Balay wrote: > > > I just attempted a build with openmpi 1.7 and 'make test' ran fine with it. > > > > Satish > > > > ------- > > > > ./configure > > --download-openmpi=http://www.open-mpi.org/software/ompi/v1.7/downloads/openmpi-1.7.2.tar.gz > > make all > > make test > > > > > > On Tue, 17 Sep 2013, Satish Balay wrote: > > > >> On Tue, 17 Sep 2013, Suraj Prabhakaran wrote: > >> > >>> Hello, > >>> > >>> I am trying to compile petsc with openmpi 1.7 version. I can compile and > >>> install petsc successfully. but my application doesn't run > >> > >> Do PETSc examples run? > >> > >> What do you get for 'make test'? > >> > >> If it doesn't work - send us the corresponding logs. > >> > >> Satish > >> > >>> since petsc is not able to find the libmpi_f77.so.1 and libmpi_f90.so.1. > >>> The problem is, in openmpi 1.7 version, these fotran libraries are > >>> completely replaced with libmpi_mpifh.so > >>> > >>> When I configure petsc with this mpi (I specifiy --with-mpi-dir option), > >>> I can see from the output that petsc only uses the libmpi_mpifh library > >>> rather than the other two. But still, when petsc is linked with my > >>> application, the binary ends up looking for libmpi_f90 and libmpi_f77, > >>> along with the correct libmpi_mpifh. > >>> > >>> To really be sure, I also used a hello world program and linked it with > >>> all libraries to see which one really asks for libmpi_f90 and libmpi_f77 > >>> and it was for sure libpetsc.so. > >>> > >>> Has anyone tried to compile and use petsc with openmpi 1.7 series? > >>> Is there anything special I have to do for this case? > >>> > >>> Best, > >>> Suraj > >>> > >>> > >>> -------------------------- > >>> Suraj Prabhakaran > >>> > >>> German Research School for > >>> Simulation Sciences GmbH > >>> Laboratory for Parallel Progreamming > >>> 52062 Aachen | Germany > >>> > >>> Tel +49 241 80 99743 > >>> Fax +49 241 80 92742 > >>> EMail s.prabhaka...@grs-sim.de > >>> Web www.grs-sim.de > >>> > >>> Members: Forschungszentrum Jülich GmbH | RWTH Aachen University > >>> Registered in the commercial register of the local court of Düren > >>> (Amtsgericht Düren) under registration number HRB 5268 > >>> Registered office: Jülich > >>> Executive board: Prof. Marek Behr Ph.D. | Prof. Dr. Sebastian M. Schmidt > >>> > >>> > >> > > -------------------------- > Suraj Prabhakaran > > German Research School for > Simulation Sciences GmbH > Laboratory for Parallel Progreamming > 52062 Aachen | Germany > > Tel +49 241 80 99743 > Fax +49 241 80 92742 > EMail s.prabhaka...@grs-sim.de > Web www.grs-sim.de > > Members: Forschungszentrum Jülich GmbH | RWTH Aachen University > Registered in the commercial register of the local court of Düren > (Amtsgericht Düren) under registration number HRB 5268 > Registered office: Jülich > Executive board: Prof. Marek Behr Ph.D. | Prof. Dr. Sebastian M. Schmidt > >