开发者

Using php and MPI

开发者 https://www.devze.com 2023-01-21 08:31 出处:网络
I currently have a php file which allows the user to upload a file.Once they upload the file, it runs a program with the file using MPI.

I currently have a php file which allows the user to upload a file. Once they upload the file, it runs a program with the file using MPI.

The problem is that the script says it cannot开发者_运维百科 find the file .mpd.conf (config file that must be present in users home directory). I'm guessing that this is because it is running as a different user than myself.

I am using apache2 to serve this webpage, can anyone help me get this working? I don't know too much about how PHP works.


Although the user can set a lot of things in their .mpd.conf, the reason it's required is just to have a `secret word' that the launched mpds can agree on -- like (say) erlang machine cookies, it's just so that the various mpd daemons launched only can make sure they're only contacting the right other mpds.

Presumably your php program is launching a script which does the mpirun/mpiexec? If so, you could simply have the script check for the existance of ~/.mpd.conf and if it doesn't exist, create it containing a line of the form MPD_SECRETWORD=[something-unique-here] and then make sure its created with read/write permissions only for that user.

0

精彩评论

暂无评论...
验证码 换一张
取 消