Re: [Pympi-users] pyMPI + threading
Status: Alpha
Brought to you by:
patmiller
From: Vinicius P. <vpe...@ic...> - 2006-11-17 10:52:28
|
Hi Julian... Hmm... i've heard about this python Lock... "Python uses a global interpreter lock for thread safety. That global lock must be held by a thread before it can safely access Python objects." So, is it safe to call MPI functions (though pyMPI) by two simultaneous threads in python? I'm using threading python library and LAM/mpi runtime + pyMPI. I've attached a simple code in Python to explain better. it seems to run alright. but as it is an long term project that will be based on this simple one, I really want to make sure that I'm not going in wrong way choosing threads + mpi and in future get stuck with impossible to debug kinds of errors... Regards, Vinicius On 11/16/06, Julian Cook <jul...@ya...> wrote: > > > I think one of the major issues here is python itself. Are you thinking of > using threads within python? Python itself has an interpreter lock that > effectively prevents python threads executing simultaneously (you may > already be aware of this). > > Pat Miller would be better qualified to comment on the availablity of > MPI_THREAD_MULTIPLE itself. > > regards > > Julian Cook > > > ----- Original Message ---- > From: Vinicius Petrucci <vpe...@ic...> > To: pym...@li... > Sent: Thursday, November 16, 2006 6:30:54 PM > Subject: [Pympi-users] pyMPI + threading > > Hi all! > > pyMPI with threading support works alright? is it stable? with open > mpi for example... > > is it possible to use MPI_THREAD_MULTIPLE... or what ? is there any > limitation? > > if not, could you send me some tips on how to use python + mpi + > threading in a safe manner? or some examples? any experience in this > issue is worth. > > I was thinking about some design decision: > * use a Lock to provide exclusive access to mpi functions > * 1 thread in loop, executing "req = irecv()" and when some msg with a > type of TAG is available, it calls an appropriate function. it can use > some send functions inside too. > * other thread making some send calls... > > what common mistakes should I avoid? > > thanks in advance! > > > -- > Vinicius Tavares Petrucci > home page: http://www.ic.uff.br/~vpetrucci > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Pympi-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pympi-users > > > ________________________________ > Sponsored Link > > Mortgage rates near 39yr lows. $310,000 Mortgage for $999/mo - Calculate new > house payment > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Pympi-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pympi-users > > > -- Vinicius Tavares Petrucci home page: http://www.ic.uff.br/~vpetrucci |