Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] ibcm private header file
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-07-22 12:38:35

On Jul 22, 2008, at 12:32 PM, Roland Dreier wrote:

>> So I think using byteorder.h is not a good idea (note the warning).
>> How about just having two #defines, picking the Right one based on
> On Linux, the public <byteswap.h> header might have what you need.
> For that matter <infiniband/arch.h> has htonll() defined.

The problematic line is:

        #define IB_CM_ASSIGN_SERVICE_ID __cpu_to_be64(0x0200000000000000ULL)

There's no reason this has to be byte-swapped at compile time, right?
Using htonll or OMPI's hton64() should be sufficient, right?

Jeff Squyres
Cisco Systems