source: pypar/contrib/Dreed.reply @ 636

Last change on this file since 636 was 85, checked in by ole, 19 years ago

Added pypar files

File size: 10.2 KB
Line 
1
2Hi Ole,
3
4Yes, that appears to work - no more segmentation faults:
5
6mpirun -np 2 python demo.py
7MPI initialised OK with 2 processors
8I am proc 0 of 2 on node fourier
9I am proc 1 of 2 on node hopper
10Processor 0 sending message "MSGP0" to processor 1
11Processor 1 received message "MSGP0" from processor 0
12Size of msg was 5 bytes
13Processor 1 sending msg "MSGP0->P1" to 0
14Processor 0 received message "MSGP0->P1" from processor 1
15Size of msg was 9 bytes
16
17Thanks!
18
19Dave
20
21
22
23> Date: Sat, 30 Aug 2003 19:47:39 +1000
24> Reply-To: Ole.Nielsen@anu.edu.au
25> Content-Type: text/plain; charset=us-ascii
26> Content-Disposition: inline
27> User-Agent: Mutt/1.5.4i
28> From: ole@cuttlefish.anu.edu.au (Ole Moller Nielsen)
29> Content-Length: 9270
30>
31>
32> Hello Dave
33>
34> Regarding your problem I may have the solution (thanks to input from Doug Orr).
35> It seems that newer versions of LAM require the last commandline argument to be NULL
36> so try to modify mpiext.c as follows around line 472 and let me know if it works for you.
37> The symbol + means add the line and - means remove the line.
38>
39> Cheers
40> Ole
41>
42> ----PATCH for mpiext.c
43>
44> /* Reconstruct C-commandline */
45> /*                           */
46> argc = PyList_Size(input); //Number of commandline arguments
47> - argv = (char**) malloc((argc)*sizeof(char*));
48> + argv = (char**) malloc((argc+1)*sizeof(char*));
49>     
50> for (i=0; i<argc; i++)
51>   argv[i] = PyString_AsString( PyList_GetItem(input, i) );
52>         
53> + argv[i] = NULL;
54>
55> -------------------------------         
56>
57>
58>
59>               
60> On Tue, Aug 05, 2003 at 11:14:20AM -0400, Dave Reed wrote:
61> >
62> > Hi,
63> >
64> > I'm trying to install the lam-7.0 version of MPI and pypar on a
65> > Solaris 9 system for one of my colleagues. I've got lam-7.0 working
66> > fine (successfully ran one of its test cases). I then installed pypar
67> > 1.6.4 using:
68> >
69> > python setup.py build
70> > python setup.py install
71> >
72> > and that worked without any errors; however, I can't seem to get any
73> > of the examples to work.
74> >
75> > Details of the system are:
76> > relevant details of the system are:
77> > Solaris 9, gcc 3.2.3, python 2.3, Numeric-23.0
78> >
79> > When I try:
80> >
81> > mpirun -np 2 python demo.py
82> > -----------------------------------------------------------------------------
83> > It seems that [at least] one of the processes that was started with
84> > mpirun did not invoke MPI_INIT before quitting (it is possible that
85> > more than one process did not invoke MPI_INIT -- mpirun was only
86> > notified of the first one, which was on node n0).
87> >
88> > mpirun can *only* be used with MPI programs (i.e., programs that
89> > invoke MPI_INIT and MPI_FINALIZE).  You can use the "lamexec" program
90> > to run non-MPI programs over the lambooted nodes.
91> > -----------------------------------------------------------------------------
92> >
93> > mpirun C python demo.py
94> >
95> > produces the same results.
96> >
97> > mpirun C hello
98> >
99> > runs the hello demo that comes with lam-7.0 fine.
100> >
101> > when I execute:
102> > python
103> > import pypar
104> >
105> > I get a segmentation fault. Here's the backtrace
106> >
107> > #0  0xfef33400 in strlen () from /usr/lib/libc.so.1
108> > #1  0xfece5c40 in sfh_argv_dup ()
109> >    from /usr/local/lib/python2.3/site-packages/pypar/mpiext.so
110> > #2  0xfece67b0 in ao_parse ()
111> >    from /usr/local/lib/python2.3/site-packages/pypar/mpiext.so
112> > #3  0xfecb7be0 in lam_linit ()
113> >    from /usr/local/lib/python2.3/site-packages/pypar/mpiext.so
114> > #4  0xfecb82fc in lam_mpi_init ()
115> >    from /usr/local/lib/python2.3/site-packages/pypar/mpiext.so
116> > #5  0xfecb5a70 in MPI_Init ()
117> >    from /usr/local/lib/python2.3/site-packages/pypar/mpiext.so
118> > #6  0xfecb4a08 in init (self=0x1, args=0xffbfc7e0) at lib/pypar/mpiext.c:480
119> > #7  0xff25b340 in PyCFunction_Call (func=0xc5620, arg=0xc6650, kw=0x0)
120> >     at Objects/methodobject.c:93
121> > #8  0xff29a39c in call_function (pp_stack=0xffbfc968, oparg=1)
122> >     at Python/ceval.c:3439
123> > #9  0xff297694 in eval_frame (f=0x9a8f0) at Python/ceval.c:2116
124> > #10 0xff2987a8 in PyEval_EvalCodeEx (co=0xbf9a0, globals=0x1, locals=0x0,
125> >     args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0,
126> >     closure=0x0) at Python/ceval.c:2663
127> > #11 0xff294c34 in PyEval_EvalCode (co=0xbf9a0, globals=0x0, locals=0xbc5d0)
128> >     at Python/ceval.c:537
129> > #12 0xff2bd2fc in PyImport_ExecCodeModuleEx (name=0xffbfd558 "pypar.pypar",
130> >     co=0xbf9a0,
131> >     pathname=0xffbfcb70 "/usr/local/lib/python2.3/site-packages/pypar/pypar.pyc") at Python/import.c:621
132> > #13 0xff2c016c in load_source_module (name=0xffbfd558 "pypar.pypar",
133> >     pathname=0xffbfcb70 "/usr/local/lib/python2.3/site-packages/pypar/pypar.pyc", fp=0x22e8) at Python/import.c:894
134> > #14 0xff2bdf64 in load_module (name=0xffbfd558 "pypar.pypar", fp=0xfefc02b4,
135> >     buf=0xffbfd068 "/usr/local/lib/python2.3/site-packages/pypar/pypar.py",
136> >     type=1, loader=0x0) at Python/import.c:1699
137> > #15 0xff2bf104 in import_submodule (mod=0xbb1b0, subname=0xffbfd55e "pypar",
138> >     fullname=0xffbfd558 "pypar.pypar") at Python/import.c:2290
139> > #16 0xff2bebd4 in load_next (mod=0xbb1b0, altmod=0xff318028,
140> >     p_name=0xffbfd55e, buf=0xffbfd558 "pypar.pypar", p_buflen=0xffbfd554)
141> >     at Python/import.c:2111
142> > #17 0xff2c0890 in import_module_ex (name=0x0, globals=0xbb1b0, locals=0x48d20,
143> >     fromlist=0x45590) at Python/import.c:1957
144> > #18 0xff2be7e8 in PyImport_ImportModuleEx (name=0xbb1f4 "pypar",
145> >     globals=0x48d20, locals=0x48d20, fromlist=0x45590) at Python/import.c:1998
146> > #19 0xff28cda0 in builtin___import__ (self=0x0, args=0xbb1f4)
147> >     at Python/bltinmodule.c:45
148> > #20 0xff25b340 in PyCFunction_Call (func=0x29e68, arg=0xb3f60, kw=0x0)
149> >     at Objects/methodobject.c:93
150> > #21 0xff22e090 in PyObject_Call (func=0x29e68, arg=0xb3f60, kw=0x0)
151> >     at Objects/abstract.c:1755
152> > #22 0xff299f84 in PyEval_CallObjectWithKeywords (func=0x29e68, arg=0xb3f60,
153> >     kw=0x0) at Python/ceval.c:3346
154> > #23 0xff29740c in eval_frame (f=0xf71d0) at Python/ceval.c:1996
155> > #24 0xff2987a8 in PyEval_EvalCodeEx (co=0xacee0, globals=0x1, locals=0x0,
156> >     args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0,
157> >     closure=0x0) at Python/ceval.c:2663
158> > #25 0xff294c34 in PyEval_EvalCode (co=0xacee0, globals=0x0, locals=0x48d20)
159> >     at Python/ceval.c:537
160> > #26 0xff2bd2fc in PyImport_ExecCodeModuleEx (name=0xffbfed28 "pypar",
161> >     co=0xacee0,
162> >     pathname=0xffbfde48 "/usr/local/lib/python2.3/site-packages/pypar/__init__.pyc") at Python/import.c:621
163> > #27 0xff2c016c in load_source_module (name=0xffbfed28 "pypar",
164> >     pathname=0xffbfde48 "/usr/local/lib/python2.3/site-packages/pypar/__init__.pyc", fp=0x22e8) at Python/import.c:894
165> > #28 0xff2bdf64 in load_module (name=0xffbfed28 "pypar", fp=0xfefc02a4,
166> >     buf=0xffbfe340 "/usr/local/lib/python2.3/site-packages/pypar/__init__.py",
167> >     type=1, loader=0x0) at Python/import.c:1699
168> > #29 0xff2c0624 in load_package (name=0xffbfed28 "pypar", pathname=0xb2338 "")
169> >     at Python/import.c:951
170> > #30 0xff2be11c in load_module (name=0xffbfed28 "pypar", fp=0x0,
171> >     buf=0xffbfe838 "/usr/local/lib/python2.3/site-packages/pypar", type=5,
172> >     loader=0x0) at Python/import.c:1722
173> > #31 0xff2bf104 in import_submodule (mod=0xff318028,
174> >     subname=0xffbfed28 "pypar", fullname=0xffbfed28 "pypar")
175> >     at Python/import.c:2290
176> > #32 0xff2bebd4 in load_next (mod=0xff318028, altmod=0xff318028,
177> >     p_name=0xffbfed28, buf=0xffbfed28 "pypar", p_buflen=0xffbfed24)
178> >     at Python/import.c:2111
179> > #33 0xff2c0890 in import_module_ex (name=0x0, globals=0xff318028,
180> >     locals=0x3a9c0, fromlist=0xff318028) at Python/import.c:1957
181> > #34 0xff2be7e8 in PyImport_ImportModuleEx (name=0xbb1f4 "pypar",
182> >     globals=0x3a9c0, locals=0x3a9c0, fromlist=0xff318028)
183> >     at Python/import.c:1998
184> > #35 0xff28cda0 in builtin___import__ (self=0x0, args=0xbb1f4)
185> >     at Python/bltinmodule.c:45
186> > #36 0xff25b340 in PyCFunction_Call (func=0x29e68, arg=0x39900, kw=0x0)
187> >     at Objects/methodobject.c:93
188> > #37 0xff22e090 in PyObject_Call (func=0x29e68, arg=0x39900, kw=0x0)
189> >     at Objects/abstract.c:1755
190> > #38 0xff299f84 in PyEval_CallObjectWithKeywords (func=0x29e68, arg=0x39900,
191> >     kw=0x0) at Python/ceval.c:3346
192> > #39 0xff29740c in eval_frame (f=0xedb78) at Python/ceval.c:1996
193> > #40 0xff2987a8 in PyEval_EvalCodeEx (co=0xb0ce0, globals=0x0, locals=0x0,
194> >     args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0,
195> >     closure=0x0) at Python/ceval.c:2663
196> > #41 0xff294c34 in PyEval_EvalCode (co=0xb0ce0, globals=0x0, locals=0x3a9c0)
197> >     at Python/ceval.c:537
198> > #42 0xff2caf3c in run_node (n=0x2a140, filename=0x3a9c0 "", globals=0x3a9c0,
199> >     locals=0x3a9c0, flags=0x3a9c0) at Python/pythonrun.c:1205
200> > #43 0xff2ca000 in PyRun_InteractiveOneFlags (fp=0xffffffff,
201> >     filename=0xff2fed08 "<stdin>", flags=0xffbff79c) at Python/pythonrun.c:697
202> > #44 0xff2c9d60 in PyRun_InteractiveLoopFlags (fp=0xfefc0274,
203> >     filename=0xff2fed08 "<stdin>", flags=0xffbff79c) at Python/pythonrun.c:630
204> > #45 0xff2c9cac in PyRun_AnyFileExFlags (fp=0xfefc0274,
205> >     filename=0xff2fed08 "<stdin>", closeit=0, flags=0xffbff79c)
206> >     at Python/pythonrun.c:593
207> > #46 0xff2d2a08 in Py_Main (argc=5120, argv=0x16bc) at Modules/main.c:415
208> >
209> >
210> > Any suggestions or ideas for getting this working?
211> >
212> > Thanks,
213> > Dave
214> >
215> > --
216> > David Reed, Ph.D.                   e-mail: dreed@capital.edu
217> > Math/Computer Science Dept.         http://capital2.capital.edu/faculty/dreed
218> > Capital University                  phone:  614-236-6133
219> > 2199 E. Main St.                    fax:    614-236-6518
220> > Columbus, OH 43209
221>
222> --
223> ------------------------------------------------------------------- 
224> Ole Nielsen                     | Email: Ole.Nielsen@anu.edu.au
225> ------------------------------------------------------------------- 
226> Mathematical Sciences Institute | Phone: +61 2 6125 3873 (Direct)
227> Australian National University  | Fax:   +61 2 6125 5549
228> Canberra ACT 0200               |
229> Australia                       |
230> ------------------------------------------------------------------- 
231> ANU CRICOS # 00120C
232> ------------------------------------------------------------------- 
233>
Note: See TracBrowser for help on using the repository browser.