On Wed, 2019-03-13 at 22:10 +0000, Sergio None wrote:
> Hello.
> 
> 
> I'm using OpenMPI 3.1.3 on x64 CPU  and two ARMv8( Raspberry pi 3).
> 
> 
> But i'm having some issues with data types that are architecture
> dependent, like 'long'.
> 
---------trimmed---------


> 
> So my question is: there any way to pass data that don't depend of
> architecture? 

What I do is make a header file I call 'sysdef.h' with #ifdefs for
all the systems I use that define types like (for signed 32-bit integer)
#ifdef Intel64
typedef int si32
#endif
#ifdef ARMv8
typedef long si32
#endif
...etc...
[And I have a whole bunch of other useful definitions like MAX_SI32,
LONG_SIZE and stuff like that--above is not an actual code excerpt]

and then in the makefile put '-DIntel64' or '-DARMv8' or whatever
I called it in the sysdef.  Then the code should use the typedef names.
In the MPI_Send, MPI_Recv calls I usually call the type MPI_BYTE and
give the actual lengths in bytes which I compute once at the time
of the malloc and store in a global common block.
George Reeke





_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to