[petsc-users] Is there any method to call multiple mpi run inside program
Jed Brown
jed at jedbrown.org
Wed May 7 08:16:52 CDT 2014
张国熙 <altriaex86 at gmail.com> writes:
> Hi, all
>
> I use SLEPc as part of my program, which means I compile it as .so library.
>
> I want my program work like this: execute serially, reach Point A, parallel
> solving, then serially again.
>
> I know I could use mpirun -np 4 in terminal to call the whole program,
> but this will let the serial part be executed 4 times.
This may not be bad, but you can MPI_Comm_rank(MPI_COMM_WORLD,&rank), if
(rank == 0) { ... do the serial stuff ...}.
> What I want is only call mpi at the eigensolving part. Is there any
> function that could achieve something like that?
There is MPI_Comm_spawn, but it's sort of a mess for resource
management/portability problem so I would recommend just using mpiexec.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140507/4659c197/attachment.pgp>
More information about the petsc-users
mailing list