Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] minor change request
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-05-21 12:10:25


We actually talked about this some more on our weekly teleconf today. It seems like your compiler is being incorrect here: there is an explicit cast in the code from an int to a bool; it's a way for the developer to tell the compiler "I know what I'm doing".

The compiler is does not seem to be correct here. Perhaps there's a way you can have the compiler suppress this warning...?

On May 21, 2013, at 9:43 AM, Jeff Squyres (jsquyres) <jsquyres_at_[hidden]> wrote:

> Committed in https://svn.open-mpi.org/trac/ompi/changeset/28544; thanks.
>
> On May 20, 2013, at 9:00 PM, Alan Sayre <ansayre62_at_[hidden]>
> wrote:
>
>> To quiet VS compile time warnings can the following (very) minor change be made:
>>
>> c:\program files
>> (x86)\openmpi_v1.6-x64\include\openmpi/ompi/mpi/cxx/op_inln.h(148):
>> warning C4800: 'int' : forcing value to bool 'true' or 'false'
>> (performance warning)
>>
>> from:
>>
>> inline bool
>> MPI::Op::Is_commutative(void) const
>> {
>> int commute;
>> (void)MPI_Op_commutative(mpi_op, &commute);
>> return (bool) commute;
>> }
>>
>> to:
>>
>> inline bool
>> MPI::Op::Is_commutative(void) const
>> {
>> int commute;
>> (void)MPI_Op_commutative(mpi_op, &commute);
>> return (commute != 0);
>> }
>>
>> Thanks,
>>
>> Alan
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> --
> Jeff Squyres
> jsquyres_at_[hidden]
> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/