[petsc-users] PetscFinalize at root processor only

Paula Sanematsu paulasan at gmail.com
Thu Nov 1 11:48:29 CDT 2018


Hi,

I have a Fortran code that calls an external function only at the root
processor. If this external function returns an error code that indicates
that it failed, then I call PetscFinalize() only at the root processor. For
example:

if(rank==0) then
    metis_call_status = METIS_SetDefaultOptions(opts)
    if( metis_call_status /= 1 ) then
        call PetscFinalize(ierr)
        stop
    end if
end if

I noticed that this will cause the other processors to "hang". I don't want
to change the Metis call. Do you have a suggestion on how to propagate
PetscFinalize to other processors? Or another solution?

Thank you,

Paula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181101/a88ae9e7/attachment.html>


More information about the petsc-users mailing list