Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Rainer Keller (keller_at_[hidden])
Date: 2007-08-25 13:20:39


On Saturday 25 August 2007 18:12, Brian Barrett wrote:
> > 1. We have logic in ompi_mpi_abort to prevent recursive invocation
> > (ompi_mpi_abort.c:60):
> >
> > /* Protection for recursive invocation */
> > if (have_been_invoked) {
> > return OMPI_SUCCESS;
> > }
> > have_been_invoked = true;
>
> This, IMHO, is a wrong thing to do. The intent of ompi_mpi_abort()
> was that it never returned. But now it is? That seems wrong to me.

Recursive or not, if we add __opal_attribute_noreturn__, the compiler (and
Coverity, as David said in a private mail) then knows, that the function
won't exit.

Of course, the compiler does also check, that the function indeed does not
return...
So the patch below should silence coverity (and help the compiler optimize
some code which calls ompi_mpi_abort).

OK to check in?

With best regards,
Rainer

-- 
----------------------------------------------------------------
Dipl.-Inf. Rainer Keller       http://www.hlrs.de/people/keller
 High Performance Computing       Tel: ++49 (0)711-685 6 5858
   Center Stuttgart (HLRS)           Fax: ++49 (0)711-685 6 5832
 POSTAL:Nobelstrasse 19                 email: keller_at_[hidden]     
 ACTUAL:Allmandring 30, R.O.030            AIM:rusraink
 70550 Stuttgart