Re: [OMPI users] Invalid rank despite com size large enough

2018-04-13 Thread Florian Lindner
Am 13.04.2018 um 15:41 schrieb Nathan Hjelm: > Err. MPI_Comm_remote_size. Ah, thanks! I thought at that MPI_Comm_size returns the number of remote ranks. remote_size returns 1, so now at least the error message is consistent. Best, Florian > >> On Apr 13, 2018, at 7:41 AM, Nathan Hjelm

Re: [OMPI users] Invalid rank despite com size large enough

2018-04-13 Thread Nathan Hjelm
Try using MPI_Comm_remotr_size. As this is an intercommunicator that will give the number of ranks for send/recv. > On Apr 13, 2018, at 7:34 AM, Florian Lindner wrote: > > Hello, > > I have this piece of code > > PtrRequest MPICommunication::aSend(double *itemsToSend,

[OMPI users] Invalid rank despite com size large enough

2018-04-13 Thread Florian Lindner
Hello, I have this piece of code PtrRequest MPICommunication::aSend(double *itemsToSend, int size, int rankReceiver) { rankReceiver = rankReceiver - _rankOffset; int comsize = -1; MPI_Comm_size(communicator(rankReceiver), ); TRACE(size, rank(rankReceiver), comsize); MPI_Request