[mpich-discuss] Calling MPI from a CGI Python script

Darius Buntinas buntinas at mcs.anl.gov
Thu Apr 29 09:53:19 CDT 2010


Or better yet, use MPICH2! :-)

   http://www.mcs.anl.gov/research/projects/mpich2/

-d

On 04/29/2010 08:14 AM, Dave Goodell wrote:
> It appears that you are using Open MPI, not MPICH2.  This list is
> primarily for MPICH2 discussion and support. Please contact the Open MPI
> developers at users at open-mpi.org.
>
> -Dave
>
> On Apr 29, 2010, at 12:21 AM, Srujan kumar wrote:
>
>> Hi,
>>
>> I am trying to run an MPI program as a CGI Python script which is
>> running over an Apache web server running locally on my computer.
>>
>> I have a test.py file which has the code snippet
>>
>> cmd = 'opt/local/bin/mpiexec -n 7 testmpi'
>> output = commands.getoutput(cmd)
>>
>>
>> When I run the file test.py as an executable over command line (as
>> ./test.py ), it works perfectly fine.
>>
>> But when I try to run the same over the web browser, the MPI code
>> functions as if the command was 'mpiexec -n 1 testmpi'.
>> It is unable to recognize that there are multiple processes that are
>> being invoked. In other words it is not forking child processes.
>>
>> I checked in to the error log in apache regarding the same. The
>> corresponding error code is following:
>>
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1]
>> [NeoDen-1261.local:07199] [0,0,0]-[0,0,1]
>> mca_oob_tcp_msg_send_handler: writev failed: Broken pipe (32),
>> referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1]
>> [NeoDen-1261.local:07199] [0,0,0] ORTE_ERROR_LOG: Communication
>> failure in file
>> /SourceCache/openmpi/openmpi-5/openmpi/orte/mca/gpr/replica/communications/gpr_replica_recv_proxy_msgs.c
>> at line 49, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> *** Process received signal ***, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> Signal: Segmentation fault (11), referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> Signal code: Address not mapped (1), referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> Failing at address: 0x8, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 0] 2 libSystem.B.dylib 0x00000000803ec3fa _sigtramp + 26, referer:
>> http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 1] 3 ??? 0x0000000000000004 0x0 + 4, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 2] 4 libopen-rte.0.dylib 0x000000000002dca9 mca_oob_send_packed_nb +
>> 297, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 3] 5 mca_oob_tcp.so 0x00000000000f4a8f mca_oob_tcp_msg_complete + 175,
>> referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 4] 6 mca_oob_tcp.so 0x00000000000f588a mca_oob_tcp_peer_send + 298,
>> referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 5] 7 mca_oob_tcp.so 0x00000000000f9973 mca_oob_tcp_send_nb + 595,
>> referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 6] 8 libopen-rte.0.dylib 0x000000000002dc4c mca_oob_send_packed_nb +
>> 204, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 7] 9 mca_gpr_replica.so 0x00000000002271a0 orte_gpr_replica_recv +
>> 304, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 8] 10 libopen-rte.0.dylib 0x000000000002da13 mca_oob_recv_packed_nb +
>> 403, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199] [
>> 9] 11 mca_oob_tcp.so 0x00000000000f5073 mca_oob_tcp_msg_recv_complete
>> + 771, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [10] 12 mca_oob_tcp.so 0x00000000000f6400 mca_oob_tcp_peer_lookup +
>> 2240, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [11] 13 libopen-pal.0.dylib 0x0000000000077f3e opal_event_base_loop +
>> 990, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [12] 14 libopen-pal.0.dylib 0x000000000006e8ce opal_progress + 126,
>> referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [13] 15 mpiexec 0x0000000000001b9d orterun + 2242, referer:
>> http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [14] 16 mpiexec 0x0000000000001764 orterun + 1161, referer:
>> http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [15] 17 mpiexec 0x00000000000012d9 main + 27, referer:
>> http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> [16] 18 mpiexec 0x000000000000129c start + 52, referer:
>> http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1] [NeoDen-1261:07199]
>> *** End of error message ***, referer: http://localhost:8888/
>> [Wed Apr 28 20:32:20 2010] [error] [client ::1]
>> /Users/esrujan/apache2/htdocs/cgi-bin/shell.sh: line 29: 7199
>> Segmentation fault mpiexec -np 10 testmpi, referer:
>> http://localhost:8888/
>>
>>
>> Can some one help me what the problem is? Why am I not able to run the
>> MPI using a CGI script.
>>
>> Thanks a ton for your help,
>> --
>> Srujan Kumar Enaganti
>>
>> _______________________________________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list