Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Calling MPI from a CGI script
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-05-04 07:52:50


On Apr 29, 2010, at 2:25 PM, Srujan Enaganti wrote:

> 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 -np 10 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.

Can you explain that a little more -- do you mean that it only creates 1 testmpi process, or that it creates 10 testmpi processes and they each think that they're the only process in MPI_COMM_WORLD?

> 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/

I'm not sure I understand -- you said above that the processes were running incorrectly, but this error message indicates that they may be failing to launch altogether. Can you explain?

> [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/

What version of Open MPI are you using? Can you try updating to the latest release? The source code file referred to in the above message indicates that you might be using a fairly old version.

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/