Re: [OMPI users] MPI_Send, MPI_Recv problem on Mac and Linux

2012-04-18 Thread Peter Sels
ok, I see. Interesting. Thanks. Peter On 18 April 2012 14:17, Jeffrey Squyres wrote: > On Apr 18, 2012, at 3:15 AM, Peter Sels wrote: > >> I suppose with C++ MPI it's possible to enforce more strict type >> checking using template or so.) > > Not really, unfortunately.  :-(

Re: [OMPI users] MPI_Send, MPI_Recv problem on Mac and Linux

2012-04-18 Thread Jeffrey Squyres
On Apr 18, 2012, at 3:15 AM, Peter Sels wrote: > I suppose with C++ MPI it's possible to enforce more strict type > checking using template or so.) Not really, unfortunately. :-( The idea is to be able to send *anything* through the (void*) choice buffer designation -- that includes even

Re: [OMPI users] MPI_Send, MPI_Recv problem on Mac and Linux

2012-04-18 Thread Peter Sels
Hi Jeffrey, Thanks a lot for answering my message. The io work thing escaped my attention. (Usually the compiler catches these things but of course here any pointer type should work. I suppose with C++ MPI it's possible to enforce more strict type checking using template or so.) Anyway in the

Re: [OMPI users] MPI_Send, MPI_Recv problem on Mac and Linux

2012-04-17 Thread Jeffrey Squyres
Sorry for the delay in replying; I was out last week. MPI_SEND and MPI_RECV take pointers to the buffer to send and receive, respectively. When you send a scalar variable, like an int, you get the address of the buffer via the & operator (e.g., MPI_Send(, ...)). When you send a

[OMPI users] MPI_Send, MPI_Recv problem on Mac and Linux

2012-04-11 Thread Peter Sels
Dear openMPI users, I think this should be an easy question to anyone with more experience than an openMPI-hello-world-program... I wrote some openMPI code, where the master sends a length and then a buffer with that length as 2 subsequent MPI messages. The slave is receiving these messages and