[petsc-users] PETSc MPI world question

Y. Joseph Zhang yjzhang at vims.edu
Fri May 29 12:24:07 CDT 2026


Thank you all! Our system has PETSc installed so I'll just need to add the configpkg path; will try it later...




-Joseph



Joseph Zhang

Office: (804) 684 7464 (note the new number)

Web: schism.wiki



________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: Friday, May 29, 2026 1:04 PM
To: Y. Joseph Zhang <yjzhang at vims.edu>
Cc: Junchao Zhang <junchao.zhang at gmail.com>; petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] PETSc MPI world question


[EXTERNAL to VIMS received message]

On Fri, May 29, 2026 at 12:59 PM Y. Joseph Zhang via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Works like a charm; I actually mistakenly put that statement just after InitializePETSc (should be before)...

While I have you there: we've migrated make system to cmake (which is needed for ESM coupling). I understand older versions of PETSc do not support cmake. Is it still the case?

We generate  $PETSC_DIR/share/petsc/CMakeLists.txt in order to support inclusion in CMake builds. However you still build PETSc itself the same way.

  Thanks,

     Matt

Thanks!


-Joseph



Joseph Zhang

Office: (804) 684 7464 (note the new number)

Web: schism.wiki



________________________________
From: Junchao Zhang <junchao.zhang at gmail.com<mailto:junchao.zhang at gmail.com>>
Sent: Friday, May 29, 2026 11:25 AM
To: Y. Joseph Zhang <yjzhang at vims.edu<mailto:yjzhang at vims.edu>>
Cc: petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov> <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>>
Subject: Re: [petsc-users] PETSc MPI world question


[EXTERNAL to VIMS received message]

Hi Joseph,
  You can assign your compute world to PETSC_COMM_WORLD, see details at https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_COMM_WORLD/__;!!G_uCfscf7eWS!bGEB7fpqtMa5C9WQA0z-qfvx7tjf1EoHQQO-543yeafmN2L0Iggw-ttnZtA8NXHwuuRtb3ILavSX0rqVcGnhsjo$ <https://urldefense.us/v3/__https://petsc.org/release/manualpages/Sys/PETSC_COMM_WORLD/__;!!G_uCfscf7eWS!Z6_GNPIsRXNJX3U0sds166hfOGlL3_ZMGpke19RG776xJfoij_WU08GDEp2F2nzek-QJwJqm1NNKc5L1UbPxwCk$>

--Junchao Zhang


On Fri, May 29, 2026 at 10:06 AM Y. Joseph Zhang via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Hi:

We've been using PETSc solvers in our code for many years. A few years ago we changed the I/O method to improve efficiency, by reserving dedicated 'scribe' MPI processes. This entails the partitioning of MPI_COMM_WORLD into 2 worlds (1 for compute and the other for I/O).

Is there a way to ask PETSc to use compute world only? Otherwise we'd get a lot of errors.

Thank you for the great tool for the community!




-Joseph



Joseph Zhang

Office: (804) 684 7464

Web: schism.wiki




--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bGEB7fpqtMa5C9WQA0z-qfvx7tjf1EoHQQO-543yeafmN2L0Iggw-ttnZtA8NXHwuuRtb3ILavSX0rqVjNIOt7w$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bGEB7fpqtMa5C9WQA0z-qfvx7tjf1EoHQQO-543yeafmN2L0Iggw-ttnZtA8NXHwuuRtb3ILavSX0rqVSFys8KA$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20260529/1870cb96/attachment-0001.html>


More information about the petsc-users mailing list