0
$\begingroup$

I am a beginner to PETSc and MPI, so after installing PETSc I was compiling some basic tutorial. But whenever I give the number of processors i.e mpiexec -n 4 ./ex1 the first processor with 0th rank appears 4 times, and not the processor 2,3 and 4 even for a simple hello world program given in petsc/src/sys/examples/tutorials/ex1

What should I do?

$\endgroup$
2
$\begingroup$

This behavior typically results from using the wrong mpiexec. It has to be the one from the MPI that you used to install petsc. For instance, if you did --download-mpich during installation it's the one in $PETSC_DIR/bin, not any other mpiexec that happens to be on your system.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.