Quang Ha
2017-07-01 20:22:53 UTC
Hi MPI-users,
I am currently facing some troubles with persitance calling. The following
code describe the abstract I am trying to get out of:
I am trying to implement some form of persistent calling. Somehow the
following code keeps hanging - I guessed I must have introduced a deadlock
but can't really wrap my head around it...
MPI_Request r[2];
MPI_Request s[2];
int num_send = 1000;
[...]
MPI_Send_init(&Arr[1][1], num_send, MPI_DOUBLE, 1, A, MPI_COMM_WORLD,
&s[0]);
MPI_Recv_init(&Arr[1][0], num_send, MPI_DOUBLE, 0, A, MPI_COMM_WORLD,
&r[0]);
MPI_Send_init(&Arr[2][1], num_send, MPI_DOUBLE, 0, B, MPI_COMM_WORLD,
&s[1]);
MPI_Recv_init(&Arr[2][0], num_send, MPI_DOUBLE, 1, B, MPI_COMM_WORLD,
&r[1]);
[...]
MPI_Startall(2, r);
MPI_Waitall(2, r, MPI_STATUSES_IGNORE);
This works kinda-fine if num_send is acceptably small. Once I reached
something like 10,000 or 50,000, the code just hang there without changing
anything.
Is this phenomenon kinda expected? May I have some explanation for this
behaviour please?
Many thanks,
Quang
I am currently facing some troubles with persitance calling. The following
code describe the abstract I am trying to get out of:
I am trying to implement some form of persistent calling. Somehow the
following code keeps hanging - I guessed I must have introduced a deadlock
but can't really wrap my head around it...
MPI_Request r[2];
MPI_Request s[2];
int num_send = 1000;
[...]
MPI_Send_init(&Arr[1][1], num_send, MPI_DOUBLE, 1, A, MPI_COMM_WORLD,
&s[0]);
MPI_Recv_init(&Arr[1][0], num_send, MPI_DOUBLE, 0, A, MPI_COMM_WORLD,
&r[0]);
MPI_Send_init(&Arr[2][1], num_send, MPI_DOUBLE, 0, B, MPI_COMM_WORLD,
&s[1]);
MPI_Recv_init(&Arr[2][0], num_send, MPI_DOUBLE, 1, B, MPI_COMM_WORLD,
&r[1]);
[...]
MPI_Startall(2, r);
MPI_Waitall(2, r, MPI_STATUSES_IGNORE);
This works kinda-fine if num_send is acceptably small. Once I reached
something like 10,000 or 50,000, the code just hang there without changing
anything.
Is this phenomenon kinda expected? May I have some explanation for this
behaviour please?
Many thanks,
Quang