I know due pyMPI.pdf documentation that mpi.send and mpi.recv are blocking depending on the underlying MPI implementation. But
knowing they are blocking and considering a pair of threads (threading.Thread), if one of them do an mpi.send or mpi.recv, both of them block. why? is it right?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This be related to python. Python itself does not allow two threads to run simultaneously (global interpreter lock). I cannot explain why both would block though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GIL issue only matter on machine with more than one proccesor or core, allowing multiple threads of the same proccess to run only on one core. It is not related with this issue.
The problem here is that the thread wich do the bloking recv should sleep and let the other threads to do their jobs, but it seems that the recv call cause the entire proccess to sleep.
It's like the recv call overlap the thread policy of python. I think is that and it's not an error. I think the recv call interrupt the proccess, so one should not use threads but proccess managment... the fork world.
It wold be nice to allow threads on pyMPI.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know due pyMPI.pdf documentation that mpi.send and mpi.recv are blocking depending on the underlying MPI implementation. But
knowing they are blocking and considering a pair of threads (threading.Thread), if one of them do an mpi.send or mpi.recv, both of them block. why? is it right?
This be related to python. Python itself does not allow two threads to run simultaneously (global interpreter lock). I cannot explain why both would block though.
GIL issue only matter on machine with more than one proccesor or core, allowing multiple threads of the same proccess to run only on one core. It is not related with this issue.
The problem here is that the thread wich do the bloking recv should sleep and let the other threads to do their jobs, but it seems that the recv call cause the entire proccess to sleep.
It's like the recv call overlap the thread policy of python. I think is that and it's not an error. I think the recv call interrupt the proccess, so one should not use threads but proccess managment... the fork world.
It wold be nice to allow threads on pyMPI.