[mpich2-dev] MPICH2 via mpd via php via apache
Leon Yuhanov
leon at philipchun.com
Tue May 10 01:39:58 CDT 2011
Hi Rajeev, after 2 days I found a solution, its a bit dirty but it
worked! No matter what i did i could not get MPD to work and using Hydra
was out of the question because of some issues with the system. I simply
edited the sudoers file:
CODE:
visudo
And added the below under the Command Alias Section:
CODE:
%www-data ALL = NOPASSWD: /usr/bin/mpdtrace
%www-data ALL = NOPASSWD: /usr/bin/mpd
%www-data ALL = NOPASSWD: /usr/bin/mpiexec
%www-data ALL = NOPASSWD: /usr/bin/mpdallexit
%www-data ALL = NOPASSWD: /usr/bin/mpdlistjobs
%www-data ALL = NOPASSWD: /usr/bin/mpdkilljob
www-data is the user and group under which APACHE2 and PHP is run.
This allows me to control MPD and MPICH job submission, monitor the
jobs, kill them all in web interface. Thanks for your suggestion, i hope
this helps someone else!
Thanks
Leon
-----Original Message-----
From: mpich2-dev-bounces at mcs.anl.gov
[mailto:mpich2-dev-bounces at mcs.anl.gov] On Behalf Of Rajeev Thakur
Sent: Monday, 9 May 2011 11:59 PM
To: mpich2-dev at mcs.anl.gov
Subject: Re: [mpich2-dev] MPICH2 via mpd via php via apache
Why don't you try using the latest version of MPICH2, which uses a
different process manager (Hydra) by default. You won't need to setup an
MPD ring, etc.
Rajeev
On May 9, 2011, at 3:52 AM, Leon Yuhanov wrote:
> I have a curios problem. I have 2 machines configured to run mpd and
mpich2 via ubuntu linux server x64. From console i can run mpd and
verify that i have a functional ring. I can run jobs as well. I have
verified that i can do via root or via a user on the machines. I am
developing a project where i need to be able to start mpich2 jobs via a
web browser. I have set up apache2 with php5 and use system calls such
as :
> exec()
> passthru()
> system()
> I have verified that apache is running as a user called
'wwwserveruser' and have set up a .mpd.conf file in the users home
directory with the mpd password option. I also have a mpd.conf file in
/etc/mpd.conf with the same settings.
> If i log in to the machines via SSH i am able to start mpd, verify the
ring, and run jobs. Howevr when i call any mpich2 or mpd commands via
php system calls they fail with:
> <?
> echo passthrough("whoami");
> echo passthrough("mpdtrace -l");
> ?>
> my output is :
> wwwserveruser
> unable to find mpd.conf file
>
> What am i doing wrong??
> Leon Yuhanov
> PCAT
> leon at philipchun.com
More information about the mpich2-dev
mailing list