Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] minor change request
From: Alan Sayre (ansayre62_at_[hidden])
Date: 2013-05-20 21:00:22


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