pympi-users Mailing List for MPI Python (Page 3)
Status: Alpha
Brought to you by:
patmiller
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(8) |
2005 |
Jan
(9) |
Feb
(4) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(2) |
Jul
(16) |
Aug
(11) |
Sep
(10) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(4) |
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Julian C. <rjc...@cs...> - 2005-09-26 04:12:52
|
I had this problem with pyMPI-2.0b0, at which point I was directed to use the CVS version, but the fix should be in b4. The other missing piece is the compile options, in that configure needs to be run: ./configure --prefix=/usr --with-isatty Obviously --prefix=/usr depends on where the ultimate install will be, but --with-isatty makes sure that the interactive console will work. There are some posts in November 2004 (see Julian cook, Mike Steder) that discuss a similar problem. There is another configure option with regard to Newlines, but normally that is not needed. Otherwise on Monday Pat Miller should be able to give better advice. Julian -----Original Message----- From: pym...@li... [mailto:pym...@li...]On Behalf Of db...@br... Sent: Sunday, September 25, 2005 11:41 PM To: rjc...@cs... Cc: db...@br...; pym...@li... Subject: RE: [Pympi-users] pyMPI interactively Thanks for some assistance. Details below. > Does pyMPI run correctly when you startup interactively without running > sum.py? > > i.e. in your case you should get: > > $ mpirun -np 3 pyMPI > > Python 2.4 (pyMPI 2.1b4) on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > Python 2.4 (pyMPI 2.1b4) on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > Python 2.4 (pyMPI 2.1b4) on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > >>>> No, I can never get a prompt. Every time Python gets to where it should give the prompt, it either hangs till I control+c and gives the following error, or just gives the error immediately: pyMPI aborting on untrapped fatal signal 11 (SIGSEGV) on rank 0 Fatal Python error: PyThreadState_Get: no current thread ---------------------------------------------------------------------------- - One of the processes started by mpirun has exited with a nonzero exit code. This typically indicates that the process finished in error. If your process did not finish in error, be sure to include a "return 0" or "exit(0)" in your C code before exiting the application. PID 944 failed on node n0 (10.0.0.1) due to signal 6. ---------------------------------------------------------------------------- - I thought I'd try the unittests. I had to change line 231 in PyMPITest.py to: cart = mpi.cart_create((1,int(mpi.procs)), (1,1), 0) and then they all ran without errors. So whatever is causing the crash, the unittests are testing for it. > Obviously my copy is a later version and on Solaris, but b3 should work > correctly as well. Also, what is inside sum.py? It doesn't really matter, as this happens with any python program, including an empty one, and the fractal.py example program. It must be that the Pythons are talking to each other correctly... if anyone has any ideas of other things to test/try please let me know. Thanks! -Doug > Julian Cook > -----Original Message----- > From: pym...@li... > [mailto:pym...@li...]On Behalf Of > db...@br... > Sent: Sunday, September 25, 2005 4:55 PM > To: pym...@li... > Subject: [Pympi-users] pyMPI interactively > > > Greetings pyMPI-users, > > I'm working on some major upgrades, moving from pyMPI-1.3a1 running on > RedHat 9 to pyMPI-2.4b3 running Fedore Core 4. I'm running > lam-7.1.1-7.FC4. I'm using rsh on a private network. Once I got the proper > version of rsh running on the machines (had to remove kerberos "rpm -e > krb5-workstation"), most things generally work the same as before. For > example: > > [dblank@bw40 mpi]$ mpirun -np 3 pyMPI sum.py > 24499996500000 > > But, I used to be able to also run Python interactively. If I try with the > -i flag, I get an error, or it hangs: > > [dblank@bw40 mpi]$ mpirun -np 3 pyMPI -i sum.py >>>> > 24499996500000 > pyMPI aborting on untrapped fatal signal 11 (SIGSEGV) on rank 0 > Fatal Python error: PyThreadState_Get: no current thread > -------------------------------------------------------------------------- -- > - > One of the processes started by mpirun has exited with a nonzero exit > code. This typically indicates that the process finished in error. > If your process did not finish in error, be sure to include a "return > 0" or "exit(0)" in your C code before exiting the application. > > PID 28595 failed on node n0 (10.0.0.40) due to signal 6. > -------------------------------------------------------------------------- -- > - > > Has something changed that prevents me from running interactively that > way? I looked through the archives but didn't see anything. Maybe I have > something configure incorrectly? > > Thanks for any hints, > > -Doug > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your very > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Pympi-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pympi-users > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your very > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Pympi-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pympi-users > ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Pympi-users mailing list Pym...@li... https://lists.sourceforge.net/lists/listinfo/pympi-users |
From: <db...@br...> - 2005-09-26 03:40:42
|
Thanks for some assistance. Details below. > Does pyMPI run correctly when you startup interactively without running > sum.py? > > i.e. in your case you should get: > > $ mpirun -np 3 pyMPI > > Python 2.4 (pyMPI 2.1b4) on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > Python 2.4 (pyMPI 2.1b4) on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > Python 2.4 (pyMPI 2.1b4) on sunos5 > Type "help", "copyright", "credits" or "license" for more information. > >>>> No, I can never get a prompt. Every time Python gets to where it should give the prompt, it either hangs till I control+c and gives the following error, or just gives the error immediately: pyMPI aborting on untrapped fatal signal 11 (SIGSEGV) on rank 0 Fatal Python error: PyThreadState_Get: no current thread -------------------------------------------------------------------------= ---- One of the processes started by mpirun has exited with a nonzero exit code. This typically indicates that the process finished in error. If your process did not finish in error, be sure to include a "return 0" or "exit(0)" in your C code before exiting the application. PID 944 failed on node n0 (10.0.0.1) due to signal 6. -------------------------------------------------------------------------= ---- I thought I'd try the unittests. I had to change line 231 in PyMPITest.py= to: cart =3D mpi.cart_create((1,int(mpi.procs)), (1,1), 0) and then they all ran without errors. So whatever is causing the crash, the unittests are testing for it. > Obviously my copy is a later version and on Solaris, but b3 should work > correctly as well. Also, what is inside sum.py? It doesn't really matter, as this happens with any python program, including an empty one, and the fractal.py example program. It must be that the Pythons are talking to each other correctly... if anyone has any ideas of other things to test/try please let me know. Thanks! -Doug > Julian Cook > -----Original Message----- > From: pym...@li... > [mailto:pym...@li...]On Behalf Of > db...@br... > Sent: Sunday, September 25, 2005 4:55 PM > To: pym...@li... > Subject: [Pympi-users] pyMPI interactively > > > Greetings pyMPI-users, > > I'm working on some major upgrades, moving from pyMPI-1.3a1 running on > RedHat 9 to pyMPI-2.4b3 running Fedore Core 4. I'm running > lam-7.1.1-7.FC4. I'm using rsh on a private network. Once I got the pro= per > version of rsh running on the machines (had to remove kerberos "rpm -e > krb5-workstation"), most things generally work the same as before. For > example: > > [dblank@bw40 mpi]$ mpirun -np 3 pyMPI sum.py > 24499996500000 > > But, I used to be able to also run Python interactively. If I try with = the > -i flag, I get an error, or it hangs: > > [dblank@bw40 mpi]$ mpirun -np 3 pyMPI -i sum.py >>>> > 24499996500000 > pyMPI aborting on untrapped fatal signal 11 (SIGSEGV) on rank 0 > Fatal Python error: PyThreadState_Get: no current thread > -----------------------------------------------------------------------= ----- > - > One of the processes started by mpirun has exited with a nonzero exit > code. This typically indicates that the process finished in error. > If your process did not finish in error, be sure to include a "return > 0" or "exit(0)" in your C code before exiting the application. > > PID 28595 failed on node n0 (10.0.0.40) due to signal 6. > -----------------------------------------------------------------------= ----- > - > > Has something changed that prevents me from running interactively that > way? I looked through the archives but didn't see anything. Maybe I hav= e > something configure incorrectly? > > Thanks for any hints, > > -Doug > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your v= ery > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.p= hp > _______________________________________________ > Pympi-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pympi-users > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. > Download it for free - -and be entered to win a 42" plasma tv or your v= ery > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.p= hp > _______________________________________________ > Pympi-users mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pympi-users > |
From: Julian C. <rjc...@cs...> - 2005-09-26 02:10:29
|
Does pyMPI run correctly when you startup interactively without running sum.py? i.e. in your case you should get: $ mpirun -np 3 pyMPI Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. Python 2.4 (pyMPI 2.1b4) on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> Obviously my copy is a later version and on Solaris, but b3 should work correctly as well. Also, what is inside sum.py? Julian Cook -----Original Message----- From: pym...@li... [mailto:pym...@li...]On Behalf Of db...@br... Sent: Sunday, September 25, 2005 4:55 PM To: pym...@li... Subject: [Pympi-users] pyMPI interactively Greetings pyMPI-users, I'm working on some major upgrades, moving from pyMPI-1.3a1 running on RedHat 9 to pyMPI-2.4b3 running Fedore Core 4. I'm running lam-7.1.1-7.FC4. I'm using rsh on a private network. Once I got the proper version of rsh running on the machines (had to remove kerberos "rpm -e krb5-workstation"), most things generally work the same as before. For example: [dblank@bw40 mpi]$ mpirun -np 3 pyMPI sum.py 24499996500000 But, I used to be able to also run Python interactively. If I try with the -i flag, I get an error, or it hangs: [dblank@bw40 mpi]$ mpirun -np 3 pyMPI -i sum.py >>> 24499996500000 pyMPI aborting on untrapped fatal signal 11 (SIGSEGV) on rank 0 Fatal Python error: PyThreadState_Get: no current thread ---------------------------------------------------------------------------- - One of the processes started by mpirun has exited with a nonzero exit code. This typically indicates that the process finished in error. If your process did not finish in error, be sure to include a "return 0" or "exit(0)" in your C code before exiting the application. PID 28595 failed on node n0 (10.0.0.40) due to signal 6. ---------------------------------------------------------------------------- - Has something changed that prevents me from running interactively that way? I looked through the archives but didn't see anything. Maybe I have something configure incorrectly? Thanks for any hints, -Doug ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Pympi-users mailing list Pym...@li... https://lists.sourceforge.net/lists/listinfo/pympi-users |
From: <db...@br...> - 2005-09-25 20:54:53
|
Greetings pyMPI-users, I'm working on some major upgrades, moving from pyMPI-1.3a1 running on RedHat 9 to pyMPI-2.4b3 running Fedore Core 4. I'm running lam-7.1.1-7.FC4. I'm using rsh on a private network. Once I got the prope= r version of rsh running on the machines (had to remove kerberos "rpm -e krb5-workstation"), most things generally work the same as before. For example: [dblank@bw40 mpi]$ mpirun -np 3 pyMPI sum.py 24499996500000 But, I used to be able to also run Python interactively. If I try with th= e -i flag, I get an error, or it hangs: [dblank@bw40 mpi]$ mpirun -np 3 pyMPI -i sum.py >>> 24499996500000 pyMPI aborting on untrapped fatal signal 11 (SIGSEGV) on rank 0 Fatal Python error: PyThreadState_Get: no current thread -------------------------------------------------------------------------= ---- One of the processes started by mpirun has exited with a nonzero exit code. This typically indicates that the process finished in error. If your process did not finish in error, be sure to include a "return 0" or "exit(0)" in your C code before exiting the application. PID 28595 failed on node n0 (10.0.0.40) due to signal 6. -------------------------------------------------------------------------= ---- Has something changed that prevents me from running interactively that way? I looked through the archives but didn't see anything. Maybe I have something configure incorrectly? Thanks for any hints, -Doug |
From: Julian C. <rjc...@cs...> - 2005-09-21 01:10:27
|
http://www.eweek.com/article2/0,1895,1859439,00.asp It probably won't shock and amaze anyone to find out that Microsoft decided to use MPI as the foundation for Windows Server 2003 Compute Cluster Edition. They started with MPICH2 and spent some time optimising it for win32 [and 64 probably]. September 15, 2005 "Microsoft plans to include the Message Passing Interfacea library specification for message passing proposed as a standard by a broad-based committee of vendors, implementers and usersin its Windows Server 2003 Compute Cluster Edition, which went to public beta this week at the Microsoft Developers Conference here and is on track to ship in the first half of next year." |
From: Julian C. <rjc...@cs...> - 2005-08-22 16:32:28
|
Getting back to the subject of the server, originally discussed under "Reposted: Web Services and pyMPI:" Pat Miller wrote: Here it sounds like you want to have a distributed replacement for what is typically done with threads. E.g. rank 0 takes requests and passes them off to other workers for completion. At the end of his code sample he added: A more complete version would need allow the clients themselves to be parallel (on a sub-communicator) so you could both process requests in parallel and process each one individually in parallel. The latter is more like what I'm thinking about (clients themselves are parallel on a sub-communicator). To make this work, without a lot of complexity, I think we would have to start multiple [mostly idle] p4 devices per cpu, as a pool and use them as needed: example: On 10 CPU machine, instead starting 10 p4 devices, start 51 i.e. one for the server and 5 pools of 10 cpu's. Technically this could handle 5 simultaneous requests. After 5 simultaneous requests, it would have to queue or reject - assuming that MPI has no ability to dynamically start more slaves (MPI-2 ?). The advantage of this is that performance degrades slowly and the operating system handles the multi-tasking of all jobs. There are, however a lot of idle p4 devices taking up sockets, but that is not a major problem. The main task of the server is managing pools i.e. decrementing available pools as requests come in and incrementing again, when the result is returned. I think that the classic Globus grid implementations still handle this by placing executables into a batch queue, which is very unsophisticated. Pat would probably know better. In any case, I think the pool approach would actually simplify the server design over the original that Pat created. Julian Cook |
From: Julian C. <rjc...@cs...> - 2005-08-18 20:33:04
|
Hi Pat, I tried it: Idle seems to work, but it appears that there is no communication with the sub-process. I made it hang by doing following: >>> import mpi >>> mpi.size 2 >>> r = mpi.rank * 2 >>> mpi.reduce(r, mpi.SUM) Looking at the stack for the master process yields following: (i.e. it seems to be waiting for a reply, but nothing was ever sent, so I can t be sure that the child even exec'd any of the statements) 12626: /home/jcook/python/Python-2.4/bin/pyMPI -i pyMPI_idle.py -n -p4pg /iro ----------------- lwp# 1 / thread# 1 -------------------- fef9d5fc poll (ffbe7030, 1, 2328) fef4d534 select (6, 0, 0, ffbe7038, fefbf1bc, ffbe7030) + 348 feddaa28 select (1, 2aa908, 0, ffffffff, 0, 613968) + 34 001721ec recv_message (2c8938, 2c7ee0, 1, ffffffff, 357d38, 357dc1) + 2c 00171f58 p4_recv (2c8938, 2c7ee0, ffbe72d8, 2c9138, ffbe72ec, 3bc528) + 78 00179aa8 MPID_CH_Check_incoming (2cc4d0, 1, 200, 1, 3db, 4) + 348 00161c44 MPID_RecvComplete (ffbeb408, ffbebb94, ffbeb500, 35bf58, 1, 3db) + 124 00163fe8 MPID_RecvDatatype (3be268, ffbebbb0, 1, 35bf58, 1, 3db) + 88 001190f0 MPI_Recv (ffbebbb0, 1, 87, 1, 3db, 85) + 2d8 00064b10 pyMPI_recv (387920, 1, 3db, 0, 0, 0) + 1d8 00059db8 pyMPI_collective (387920, 0, 3a2fec, 0, 0, 613968) + 290 0005c270 reduction (ffbebf08, 613968, 0, 0, 0, 0) + 500 0005d7b8 pyMPI_collective_reduce (387920, 613968, 0, 5d788, 3d6c60, 4a2658) + 30 000c3cfc call_function (613968, 35f268, 0, 3d6c60, ffbec08c, 43aaec) + 3b8 000c0d10 PyEval_EvalFrame (bd20c, 26f0fc, 26f0f0, 253c54, 35f268, 0) + 38c8 000c2304 PyEval_EvalCodeEx (0, 378a50, 0, 0, 0, 0) + 9f8 000bd1d4 PyEval_EvalCode (69b3a0, 378a50, 378a50, 1, 0, 2582d4) + 28 000c55c4 exec_statement (2557d8, 69b3a0, 378a50, 0, 4396e0, 378a50) + 29c ....everything before this removed..I can send the whole thing if you want it. FYI: See my email from yesterday - check if you can switch off loopback with '-n' i.e. % mpirun -np 2 ./pyMPI -i pyMPI_idle.py -n in PyShell.py -n is documented as "run IDLE without a subprocess" -----Original Message----- From: pym...@li... [mailto:pym...@li...]On Behalf Of Pat Miller Sent: Wednesday, August 17, 2005 12:47 PM To: rjc...@cs...; pym...@li... Subject: Re: [Pympi-users] Idle as the console Perhaps % mpirun -np 2 ./pyMPI -i pyMPI_idle.py ..snip.. |
From: Pat M. <pat...@ll...> - 2005-08-18 19:59:08
|
I modified Julian's IDLE startup script to put in an input adapter % cat pyMPI_idle.py import mpi import sys if (mpi.rank == 0): import idlelib.PyShell class adapter(idlelib.PyShell.ModifiedInterpreter): base = idlelib.PyShell.ModifiedInterpreter def runsource(self,source): mpi.bcast_input_to_slaves(source+'\n') return self.base.runsource(self,source) idlelib.PyShell.ModifiedInterpreter = adapter idlelib.PyShell.main() I added a routine to the mpi module that allows alternate IO routines to properly broadcast input data to the waiting slaves... Its called (unimaginatively) mpi.bcast_input_to_slaves() The adapter in IDLE calls it right before it executes a completed IDLE input line. I did a very quick test.... % mpirun -np 4 pyMPI -i pyMPI_idle.py -n < now in the IDLE window > >>> 3 3 >>> mpi.rank 0 >>> mpi.allreduce(mpi.rank.mpi.SUM) 6 Requires lastest CVS snapshot (don't forget to run ./boot before the ./configure) Pat -- Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller It is not what we do, but also what we do not do, for which we are accountable. -- Moliere, actor and playwright (1622-1673) |
From: Julian C. <rjc...@cs...> - 2005-08-18 17:23:45
|
Hi Pat I re-built pyMPI from cvs and was able to re-produce your test. For instance, see following test: Python 2.4 (pyMPI 2.1b4) on sunos5 Type "copyright", "credits" or "license()" for more information. ... IDLE 1.1 ==== No Subprocess ==== >>> import mpi >>> jump = mpi.rank * 25000 >>> mpi.synchronizedWrite( mpi.rank,jump,"\n" ) 0 0 1 25000 >>> It WILL freeze if you don't use '-n' in the command line though i.e. % mpirun -np 4 pyMPI -i pyMPI_idle.py -n HOWEVER If I load and run a script from within Idle: 1. This statement calc's to zero because mpi.rank appears to not return a number: jump = TotalSteps * (mpi.rank + offset) 2. This statement causes a perma-freeze, until I kill everything: mpi.synchronizedWrite( mpi.rank,jump,"\n" ) (At this point the master process (mpi.rank = 0) is stuck in recv_message() ) Both statements appeared to work when I ran them interactively regards Julian Cook |
From: Pat M. <pat...@ll...> - 2005-08-17 16:46:54
|
Perhaps % mpirun -np 2 ./pyMPI -i pyMPI_idle.py I can't test here at work (TCP locked down, so IDLE loopback doesn't work), but will try at home tonight. I may need to modify the input scheme somewhat so that only one process is reading interactively while the others are non-interactive. This may simplify running the debugger too. Pat -- Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller It is not what we do, but also what we do not do, for which we are accountable. -- Moliere, actor and playwright (1622-1673) |
From: Julian C. <rjc...@cs...> - 2005-08-17 16:21:40
|
Pat I tried using idle as the main interpreter for pyMPI at np >1. But not suprisingly it didn't work. I executed pyMPI with the following simple script: % mpirun - np 2 pyMPI pyMPI_idle.py -n Contents of pyMPI_idle.py: import mpi if (mpi.rank == 0): import idlelib.PyShell idlelib.PyShell.main() idle will run, but with no communication. When I inspected the stacks (using pstack), not suprisingly, they were quite different, though part of it is because the idle stack actually executes the above script: Stack for the python interactive console: You can see that from Py_Main, we end up at call_readline after parallelReadline.. 4280: /home/jcook/python/Python-2.4/bin/pyMPI -p4pg /ironside/home/jcook/PI4 ----------------- lwp# 1 / thread# 1 -------------------- fef9d5fc poll (ffbee3a8, 1, 64) fef4d534 select (1, 0, 0, ffbee3b0, fefbf1bc, ffbee3a8) + 348 feddaa28 select (252274, 0, fefbc008, fed774d0, 1, fed83480) + 34 fed83294 call_readline (2c8668, 2c8678, 466c74, 4159d8, 2c8668, 0) + 7c 0003df64 parallelReadline (2c8668, 2c8678, 466c74, 0, 4990f8, 4a00c0) + 36c 00065618 PyOS_Readline (2c8c00, 252000, 35ea48, 264c00, 2c7c00, 466c74) + e0 00106fb8 tok_nextc (1413f08, 10, 2, c, a, b) + 64 00107b88 tok_get (2c7e40, 22fff4, 2c7ce8, 7f, 3a3d10, 3a3818) + 70 00108830 PyTokenizer_Get (1413f08, ffbeede4, ffbeede0, 27556c, 2c8668, 35f030) + c 00105c50 parsetok (0, 27556c, 100, ffbeee54, 0, 4a4b58) + 64 000e389c PyRun_InteractiveOneFlags (466ca0, 466cb4, ffbeef9c, 29b4f4, 466c74, 466c60) + 15c 000e3714 PyRun_InteractiveLoopFlags (466ca0, 29b4f4, 2c8668, ffbeef9c, 22e9c0, 466c60) + fc 000e35dc PyRun_AnyFileExFlags (2c8668, 2c8668, 0, ffbeef9c, 29b4f4, 0) + 38 000ea664 Py_Main (2c8688, 29b468, 2c8668, 0, 0, 1) + 8e0 00035f6c pyMPI_Main_with_communicator (1, ffbef12c, ffbef130, 5b, fefc21d0, 0) + 19c 0003600c pyMPI_Main (1, ffbef12c, ffbef130, fef1bc20, 31ea0, 0) + 2c 00035d98 main (5, ffbef14c, ffbef164, 251400, 0, 0) + 30 00035d40 _start (0, 0, 0, 0, 0, 0) + b8 The stack for idle is completely different. I had to show only the first portion up to the select loop: 29203: /home/jcook/python/Python-2.4/bin/pyMPI pyMPI_idle.py -n -p4pg /ironsi 00103e70 Tkapp_MainLoop (1, 35ea48, 0, 2c0950, 642670, 26e274) + 1dc 000c3cfc call_function (60d508, 35ea48, 0, 642670, ffbee914, 3bd89c) + 3b8 000c0d10 PyEval_EvalFrame (bd20c, 26f0fc, 26f0f0, 253c54, 35ea48, 0) + 38c8 000c2304 PyEval_EvalCodeEx (53a95c, 4, 1, 8, 0, 1) + 9f8 000c4018 fast_function (53c7b0, ffbeeb1c, 1, 1, 0, 469270) + 170 000c3df8 call_function (43a144, 468990, 0, 53c7b0, ffbeeb1c, 43a140) + 4b4 000c0d10 PyEval_EvalFrame (bd20c, 26f0fc, 26f0f0, 253c54, 35ea48, 0) + 38c8 000c3f7c fast_function (ffbeecac, 35ea48, 439fb0, 0, 0, 0) + d4 000c3df8 call_function (3a37b8, 0, 0, 404af0, ffbeecac, 3a37b4) + 4b4 000c0d10 PyEval_EvalFrame (bd20c, 26f0fc, 26f0f0, 253c54, 35ea48, 0) + 38c8 000c2304 PyEval_EvalCodeEx (0, 377a50, 0, 0, 0, 0) + 9f8 000bd1d4 PyEval_EvalCode (460060, 377a50, 377a50, 4688e0, 35f030, 35f030) + 28 000e4d28 run_node (368368, 460060, 377a50, 377a50, ffbeeecc, 368368) + 3c 000e3c98 PyRun_SimpleFileExFlags (4686d8, 377a50, ffbef299, ffbeeecc, 1, 2c8698) + 1b4 000ea664 Py_Main (3, 29b468, 2c8668, 0, 0, 1) + 8e0 00035f6c pyMPI_Main_with_communicator (1, ffbef05c, ffbef060, 5b, fefc21d0, 0) + 19c 0003600c pyMPI_Main (1, ffbef05c, ffbef060, fef1bc20, 31ea0, 0) + 2c 00035d98 main (7, ffbef07c, ffbef09c, 251400, 0, 0) + 30 00035d40 _start (0, 0, 0, 0, 0, 0) + b8 Obviously the big question is: Is it even feasible to consider using a graphical shell such as idle, or are they just too different? regards Julian Cook |
From: Julian C. <rjc...@cs...> - 2005-08-16 20:47:10
|
Last month Pat Miller outlined how to encapsulate mpi code so that it will run regardless of the presence/absence of mpi as follows: def Computation(...): value = ... if mpi is not None: value = mpi.allreduce(value) return value Sometimes you need to debug your actual mpi code to find out where you messed up. I discovered that you can run the graphical debugger under idle at np 1, AS LONG AS you start up idle *without* the network subprocess, which is used for debugging. If the startup directory was "/home/jcook/python/Python-2.4", then you could use the following command to startup idle under pyMPI. Note the "-n" to switch off the debugging subprocess. mpirun -np 1 /home/jcook/python/Python-2.4/bin/pyMPI Lib/idlelib/idle.py -n After idle starts, you can load the file you want to debug and step into it or set a breakpoint and run it. I used it to find a difficult error, where (in some low level function) one input had to be an exact multiple of another - but the code never checked for this (because I never added it). pyMPI had no trouble running the debugger, so I found it fairly quickly. It would be nice to use Idle with np >1, but I have not figured out how to do it.. Julian Cook |
From: Julian C. <rjc...@cs...> - 2005-08-03 03:56:05
|
Pat: Tks for the server code. Actually, I'm still trying to understand it. It looks like you are subdividing mpi.WORLD and allocating portions of it to incoming requests? -----Original Message----- From: pym...@li... [mailto:pym...@li...]On Behalf Of Pat Miller Sent: Tuesday, August 02, 2005 2:44 PM Cc: pym...@li... Subject: Re: [Pympi-users] Reposted: Web Services and pyMPI: [...] Here it sounds like you want to have a distributed replacement for what is typically done with threads. E.g. rank 0 takes requests and passes them off to other workers for completion. In pyMPI the workers would be distributed processes instead of local threads. Suppose I introduced the concept of a pyMPI server class.. [...] |
From: Pat M. <pat...@ll...> - 2005-08-02 18:44:40
|
Julian writes: > The major issue that occurs to me regarding pyMPI is that most parallel > scripts are by nature long running processes. This conflicts with the nature > of a server, which is supposed to handle multiple clients and multiple tasks > simultaneously. This suggests that the server itself would have to either > queue requests or manage the slave processes. That seems to add a lot of > complexity. > Anyway let me know if you think it has any utility for you. I have been very interested in using pyMPI for exploring other parallel mechanisms that the prominent SPMD style that MPI favors. There are some old stubs (incomplete) for SIMD style (sort of a *python for you old connection machine buffs), a parallel version of the map function() that works across a distributed array, there is the "remote cooperating objects" model (rco) that has a working prototype, I'm working on smoothing MPMD startup for some folks at Argonne, etc.... Here it sounds like you want to have a distributed replacement for what is typically done with threads. E.g. rank 0 takes requests and passes them off to off to other workers for completion. In pyMPI the workers would be distributed processes instead of local threads. Suppose I introduced the concept of a pyMPI server class. Then you could write something like: import mpi class MyServer(mpi.server): def __init__(self,root=0): .... # define what you want to do in the main body def server(self): ..... self.spawn(a,b,c,d) # This gets sent to some worker rank ..... return # define what you want to do for each client def client(self, a,b,c,d): print 'Servicing request on rank',mpi.rank,a,b,c,d return # Start server. On rank 0 it is the master, others are slaves S = MyServer() S.start() Here's an example (full code attached): class MyServer(mpi.Server): def server(self): for i in range(10): self.spawn(i*1,i*2,i*3) return def client(self,a,b,c): print 'on',mpi.rank,'process',a,b,c return S = MyServer() S.start() output: on 1 process 0 0 0 on 1 process 2 4 6 on 2 process 1 2 3 on 2 process 3 6 9 on 2 process 5 10 15 on 1 process 4 8 12 on 2 process 7 14 21 on 1 process 6 12 18 on 2 process 9 18 27 on 1 process 8 16 24 A more complete version would need allow the clients themselves to be parallel (on a sub-communicator) so you could both process requests in parallel and process each one individually in parallel. Cheers, Pat -- Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller Patriotism is supporting your country all the time and the government when it deserves it. -- Mark Twain, author and humorist (1835-1910) |
From: Julian C. <rjc...@cs...> - 2005-08-02 02:22:19
|
(This ended up at the end of the pyMPI 2.4 beta 2 available.... thread, so I reposted it as a new thread here) Web Services and pyMPI: Recently (that would be this w/e) I looked at how to set up a web service in python. The major reason was to make code written on python available from other platforms, especially Windows and Excel. I installed SOAPpy 0.12 (http://pywebsvcs.sourceforge.net/) on both windows and Solaris and suffice to say, it"s very easy to use python client to python server. SOAPpy handles all the complexity for you. The real complexity was having to use WSDL descriptor files to be able to call python servers from Excel (Using MS SoapClient 3.0). Basically on Windows, you have? to use a WSDL and you need to use namespaces or it doesn"t work. Effectively, you have to pre-define all functions, inputs and outputs in the WSDL file. Now to the point: You probably aren"t shocked to find out that I was able to get pyMPI to act as a soap server. My reasoning was simple: why wait 10 seconds to run something on windows, when I can run the same thing in 1 second on pyMPI? Below is a simple example of pyMPI running at np 1, generating and returning a short array of random numbers to a soap client. The printout is from the client side. Issues: The major issue that occurs to me regarding pyMPI is that most parallel scripts are by nature long running processes. This conflicts with the nature of a server, which is supposed to handle multiple clients and multiple tasks simultaneously. This suggests that the server itself would have to either queue requests or manage the slave processes. That seems to add a lot of complexity. Anyway let me know if you think it has any utility for you. regards Julian Cook >>> # Call a pyMPI soap server >>> import SOAPpy >>> server = SOAPpy.SOAPProxy("http://brahma:8007/",namespace = "python-os") >>> seed = 69069 >>> server.config.dumpSOAPIn = 1 # debugging flag >>> list = server.ArrayOfFloats(seed) *** Incoming SOAP ****************************************************** <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" > <SOAP-ENV:Body> <ArrayOfFloatsResponse SOAP-ENC:root="1"> <Result SOAP-ENC:arrayType="xsd:double[10]" xsi:type="SOAP-ENC:Array"> <item>0.70316610192589002</item> <item>0.37607240403594255</item> <item>0.018328414124517245</item> <item>0.87040174120950486</item> <item>0.20098065818385713</item> <item>0.52939641382095703</item> <item>0.68237564433556841</item> <item>0.076620094609716638</item> <item>0.50193267461011581</item> <item>0.53994633368761047</item> </Result> </ArrayOfFloatsResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ************************************************************************ |
From: Julian C. <rjc...@cs...> - 2005-08-02 00:59:11
|
Web Services and pyMPI: Recently (that would be this w/e) I looked at how to set up a web service in python. The major reason was to make code written on python available from other platforms, especially Windows and Excel. I installed SOAPpy 0.12 (http://pywebsvcs.sourceforge.net/) on both windows and Solaris and suffice to say, it's very easy to use python client to python server. SOAPpy handles all the complexity for you. The real complexity was having to use WSDL descriptor files to be able to call python servers from Excel (Using MS SoapClient 3.0). Basically on Windows, you have? to use a WSDL and you need to use namespaces or it doesn't work. Effectively, you have to pre-define all functions, inputs and outputs in the WSDL file. Now to the point: You probably aren't shocked to find out that I was able to get pyMPI to act as a soap server. My reasoning was simple: why wait 10 seconds to run something on windows, when I can run the same thing in 1 second on pyMPI? Below is a simple example of pyMPI running at np 1, generating and returning a short array of random numbers to a soap client. The printout is from the client side. Issues: The major issue that occurs to me regarding pyMPI is that most parallel scripts are by nature long running processes. This conflicts with the nature of a server, which is supposed to handle multiple clients and multiple tasks simultaneously. This suggests that the server itself would have to either queue requests or manage the slave processes. That seems to add a lot of complexity. Anyway let me know if you think it has any utility for you. regards Julian Cook >>> # Call a pyMPI soap server >>> import SOAPpy >>> server = SOAPpy.SOAPProxy("http://brahma:8007/",namespace = "python-os") >>> seed = 69069 >>> server.config.dumpSOAPIn = 1 # debugging flag >>> list = server.ArrayOfFloats(seed) *** Incoming SOAP ****************************************************** <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" > <SOAP-ENV:Body> <ArrayOfFloatsResponse SOAP-ENC:root="1"> <Result SOAP-ENC:arrayType="xsd:double[10]" xsi:type="SOAP-ENC:Array"> <item>0.70316610192589002</item> <item>0.37607240403594255</item> <item>0.018328414124517245</item> <item>0.87040174120950486</item> <item>0.20098065818385713</item> <item>0.52939641382095703</item> <item>0.68237564433556841</item> <item>0.076620094609716638</item> <item>0.50193267461011581</item> <item>0.53994633368761047</item> </Result> </ArrayOfFloatsResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ************************************************************************ |
From: <tha...@bi...> - 2005-07-29 11:54:43
|
> I haven't verified the leak status though I did plug some holes > in the 2.4b1 release. Is there a mocapy run that illustrates the > problem? I could use it in the release test suite then. The problem arises when using scatter with large lists. Long running jobs crash because the slave nodes run out of memory due to a memory leak. The following script for example quickly eats memory: --- import mpi while 1: a=None if mpi.rank==0: a=range(0,1000000) b=mpi.scatter(a) --- The problem is due to a line in pyMPI_send.c. For long messages, buffer2 needs to be cleaned up by calling pyMPI_message_free. But buffer2 is erroneoulsy set to 0 right before calling pyMPI_message_free, so the memory is not free'd. Removing the "buffer2 = 0" line gets rid of the leak. Here's the offending piece of code: --- if ( buffer1.bytes_in_second_message ) { MPICHECK( self->communicator, MPI_Send(buffer2, buffer1.bytes_in_second_message, MPI_BYTE,destination,tag, self->communicator) ); buffer2 = 0; /* ERROR (?) */ } pyMPI_message_free(&buffer1,&buffer2); --- Best regards, -Thomas |
From: <tha...@bi...> - 2005-07-28 21:23:33
|
> All but one of the PyObject_Print statements are gone (I just > deleted the one I missed which is a debug print only when raising > an exception if you illegally slice a communicator). Great - thanks. > I haven't verified the leak status though I did plug some holes > in the 2.4b1 release. Is there a mocapy run that illustrates the > problem? I could use it in the release test suite then. I've got a small test script that illustrates the problem - I'll send it tomorrow. Best regards, -Thomas |
From: Pat M. <pat...@ll...> - 2005-07-28 21:01:59
|
> pyMPI_comm.c, pyMPI_comm_collective.c and pyMPI_comm_misc.c > contain PyObject_Print statements that print out a lot of what All but one of the PyObject_Print statements are gone (I just deleted the one I missed which is a debug print only when raising an exception if you illegally slice a communicator). I haven't verified the leak status though I did plug some holes in the 2.4b1 release. Is there a mocapy run that illustrates the problem? I could use it in the release test suite then. Pat -- Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller Be the change you want to see in the world. -- Mahatma Gandhi (1869-1948) |
From: <tha...@bi...> - 2005-07-28 16:15:29
|
> Thomas > > Can you explain what the problem of the extra stdout output is? Pat > probably > knows, but I'm not sure what this means. Hi Julian, pyMPI_comm.c, pyMPI_comm_collective.c and pyMPI_comm_misc.c contain PyObject_Print statements that print out a lot of what seems to be debugging info. This generates a huge amount of irrelevant output that clogs log files. I'm very near Mocapy 1.0 - a toolkit that does parallelized learning and inference in Dynamic Bayesian Networks (https://sourceforge.net/projects/mocapy/). It depends on pyMPI so I'd like to see these things fixed before I claim Mocapy is ready-to-use. The memory leak problem is particularly problematic, of course, since Mocapy typically runs for several days. Cheers, -Thomas |
From: Julian C. <rjc...@cs...> - 2005-07-28 15:56:05
|
Thomas Can you explain what the problem of the extra stdout output is? Pat probably knows, but I'm not sure what this means. Tks Julian Cook FNX Ltd -----Original Message----- From: pym...@li... [mailto:pym...@li...]On Behalf Of Thomas Hamelryck Sent: Thursday, July 28, 2005 3:05 AM To: Pat Miller; pym...@li... Subject: Re: [Pympi-users] pyMPI 2.4 beta 2 available.... Hi Pat, On Wednesday 27 July 2005 23:57, Pat Miller wrote: > Thanks to Julian, I uncovered a bad bug in pack/unpack in which > short strings were sometimes truncated with an EOF error. You > should strongly consider downloading 2.4b2 to replace any 2.4b1 > version you have. I was wondering if the memory leak problem associated with buffer2 (I submitted a patch for this) and the problem of the extra stdout output are fixed as well? Best regards & thanks for a great tool, -- Thomas Hamelryck, Postdoctoral researcher Bioinformatics center Institute of Molecular Biology and Physiology University of Copenhagen Universitetsparken 15 Bygning 10 2100 Copenhagen, Denmark --- http://www.binf.ku.dk/users/thamelry/ ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Pympi-users mailing list Pym...@li... https://lists.sourceforge.net/lists/listinfo/pympi-users |
From: Thomas H. <tha...@bi...> - 2005-07-28 07:20:48
|
Hi Pat, On Wednesday 27 July 2005 23:57, Pat Miller wrote: > Thanks to Julian, I uncovered a bad bug in pack/unpack in which > short strings were sometimes truncated with an EOF error. You > should strongly consider downloading 2.4b2 to replace any 2.4b1 > version you have. I was wondering if the memory leak problem associated with buffer2 (I submitted a patch for this) and the problem of the extra stdout output are fixed as well? Best regards & thanks for a great tool, -- Thomas Hamelryck, Postdoctoral researcher Bioinformatics center Institute of Molecular Biology and Physiology University of Copenhagen Universitetsparken 15 Bygning 10 2100 Copenhagen, Denmark --- http://www.binf.ku.dk/users/thamelry/ |
From: Pat M. <pat...@ll...> - 2005-07-27 21:57:22
|
Thanks to Julian, I uncovered a bad bug in pack/unpack in which short strings were sometimes truncated with an EOF error. You should strongly consider downloading 2.4b2 to replace any 2.4b1 version you have. I will also start working on some enhancements including better MIMD support, turning on the unimplemented SIMD array maps, and improving the hidden RCO (remote, co-operating objects) model that lets you invoke methods on remote objects. Thanks as always! Pat -- Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller I have suffered from being misunderstood, but I would have suffered a hell of a lot more if I had been understood. -- Clarence Darrow (1857-1938) |
From: Julian C. <rjc...@cs...> - 2005-07-25 21:06:48
|
Does anyone know why I might get the following error Traceback (most recent call last): File "MpiMcAccCallable.py", line 471, in ? GCancelArray = mpi.gather(CancelArray) EOFError I have a set of local lists (CancelArray) that I am trying to gather into GCancelArray. This will work when np = 1, not when np = 10 local example of CancelArray contents: [-480.04903804050844, -769.26198299032922, -168.86634699756146, -591.0109440 9812958, -19.086781875334857, -77.491592282250238, -93.16308729813332, 22.625448290414017, -187.16276573032729, -242.82672867333429] The code fragment is here: The point of mpi.gather is to get all the lists, so the the STD DEV can be calculated: GFinalSum = mpi.reduce(FinalVal, mpi.SUM) mpi.synchronizedWrite( CancelArray,"\n" ) GCancelArray = mpi.gather(CancelArray) if (mpi.rank == 0): print len(GCancelArray) Mean = GFinalSum / nSims print "Mean", GFinalSum / nSims SumVar = 0.0 for i in range(0,len(GCancelArray)): SumVar = SumVar + (GCancelArray[i] - Mean) ** 2 Variance = SumVar/ nSims print "STDev", math.sqrt(Variance) tks Julian |
From: Pat M. <pat...@ll...> - 2005-07-22 16:12:00
|
> Where is the best place to look up the complete list of pympi routines and arguments? > I realised that I've been missing some like mpi.synchronizedWrite, which may not be in > the C version of mpi. Do I have to look in the source code, or is there somwhere else I can look? The best way to get a complete listing is to use the "help" function. One nice thing about this is that each function includes a code example. Each example is guaranteed to work since they form the unit test snippets (look at micro_tests/pyMPI_comm_misc_008 for example which tests the comm_dup() function and then do a >>> import mpi ; help(mpi.comm_dup) to see how the doc and the test line up. They are actually created from the C source so everything is always in sync). You can get the pages either from the command line this way % pyMPI -c 'import mpi; help(mpi)' > pympi.man or get things interactive this way: >>> import mpi >>> help(mpi) Help on built-in module mpi: NAME mpi - mpi FILE (built-in) DESCRIPTION Basic mpi calls < snip > FUNCTIONS abort(...) Emergency kill of MPI and Python abort(errorcode=1) --> None Use this to cleanly abort Python and MPI. You can provide a status (default value is 1), but the MPI implementation may ignore it. >>> mpi.abort() >>> mpi.abort(77) allgather(...) Gather items from across the communicator allgather(message, # Some sequence object count=len(message), # Number of objects to send root=0) # Rank that gets the list --> [ list ] | None Gather sub-lists to the root process. The result is a concatenation of the sub-lists on all processes (unlike gather which only gathers to the root). >>> print mpi.allgather([WORLD.rank]) [0,1,2,3] [0,1,2,3] [0,1,2,3] [0,1,2,3] <snip> -- Pat Miller | (925) 423-0309 | http://www.llnl.gov/CASC/people/pmiller If you think you can do a thing or think you can't do a thing, you're right. -- Henry Ford |