[petsc-dev] Hijacked MPI calls...

Satish Balay balay at mcs.anl.gov
Mon Sep 12 21:34:12 CDT 2016

I'd still like to see make.log to see if the warnings are also from
petsc build aswell.

[if its clean - as I can't reporduce it with my build with clang-3.9]
I suspect - if MPI calls follow the same notation as petsc sources -
the warnings would go away.

ierr = MPI_Call();CHKERRQ(ierr)


On Mon, 12 Sep 2016, Barry Smith wrote:

>   We might be able to move it into something like petsclogimpl.h without too much pain. The key is to make it easy to be included in all the PETSc source code but not user code without requiring any convoluted code.
>   It's funny we've been doing this for almost 20 years and no one has noticed before :-)
>   Barry
> > On Sep 12, 2016, at 9:22 PM, Jed Brown <jed at jedbrown.org> wrote:
> > 
> > Eric Chamberland <Eric.Chamberland at giref.ulaval.ca> writes:
> >> - Would you consider doing static_cast<void>( ) as suggested by clang to 
> >> silence the warnings?
> > 
> > We want valid C so it'll be ((void)petsc_send_ct++,0).  It's annoying,
> > but I think we should do it.  There will be a ton of places inside
> > PETSc.
> > 
> >> - Does PETSc lib really wants to count *my* calls to MPI functions?
> > 
> > It's useful information about what happens inside SNESFunctionEval, for
> > example.  I don't like that it's messing with something that is not in
> > PETSc's namespace and would collide with any other library trying to do
> > the same thing.  So by that metric, it's wrong and we should move it to
> > a private header.

More information about the petsc-dev mailing list