[petsc-users] petsc-users Digest, Vol 16, Issue 23

Jed Brown jed at 59A2.org
Mon Apr 19 15:12:29 CDT 2010


On Mon, 19 Apr 2010 20:05:06 +0000, "Li, Zhisong (lizs)" <lizs at mail.uc.edu> wrote:
> Mat and Jed,
> 
> Thank you for your reply.
> 
> As far as I remembered, the make test was successful except the Fortran complier, but I only use C for my work.
> 
> I tried " $ cd src/snes/examples/tutorials && make -n ex5" and it shows: /home/lizs/petsc/linux-gnu-c-debug/bin/mpicc  ex5.c  -o  ex5

Looks like configure has built an MPI for you.  Did you use
--download-mpich ?

> All the machines have mpi package installed before I got to touch
> PETSc.

Maybe you wanted to use --with-mpi-dir=/path/to/system/mpi ?

> But "Portability" is one of the main features of PETSc. Doesn't that
> mean the user can run the final executable anywhere as long as c and
> mpi libraries are available?

PETSc can only be as "portable" as MPI.  MPI does not define an ABI
(which would allow you to compile with one MPI and run with a different
one).  So you have to compile the code with the same MPI you are running
under.  You can use static linking if you want to send binaries around
(they will still need a compatible MPI, but won't need all the other
libraries your program may use) but this will make your executables
*much* larger.

Jed


More information about the petsc-users mailing list