threading module and pyMPI blocking issue

Help
Jesus
2009-02-05
2013-04-17
  • Jesus
    Jesus
    2009-02-05

    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?

     
    • Julian Cook
      Julian Cook
      2009-02-07

      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.

       
      • Jesus
        Jesus
        2009-02-07

        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.