Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] IB warnings
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-07-20 08:22:26


On Jul 20, 2010, at 8:03 AM, N.M. Maclaren wrote:

> > Also, it seems like the 3rd parameter could be problematic if it ever
> > goes larger than 2B -- it'll increment in the wrong direction, won't it?
>
> Not on most systems.

Ah -- I just checked -- the associativity of + and (cast) are equal, and are right to left. So it should be ok. But still, for defensive programming purposes, I'd prefer this:

       } while (!OPAL_ATOMIC_CMPSET_32((int32_t*)&ep->eager_rdma_remote.seq,
                                       (int32_t)ftr->seq, (int32_t)(ftr->seq+1)));

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