mpich - Executing MPI commands using PHP -
i trying execute mpi program using php have provide web-interface user.php executes command , return output if have 1 process, i.e
$output = system(" mpiexec -hostfile /data/hosts -np 1 /data/./hello",$returnvalue);
but have need more 1 process , have tried following ways results same i.e no response mpi program.
using system ()
$output = system(" mpiexec -hostfile /data/hosts -np 2 /data/./hello",$returnvalue);
using shell_exec ()
$output = shell_exec(" mpiexec -hostfile /data/hosts -np 2 /data/./hello");
if use these methodes run simple c program receive response.
$output = system("/data./hello",$returnvalue);
please assist me. many thanks.
problem seem trying store output of "system()" "$output" while it's storing value on "$returnvalue". try this:
exec('mpiexec -hostfile /data/hosts -np 2 /data/./hello', $var); var_dump($var);
for odd reason php doesn't along multi threads.
a dirty workarround output result file , feed php filem, like:
system(" mpiexec -hostfile /data/hosts -np 2 /data/./hello > myfile.txt 2>&1"); $handle = file_get_contents('myfile.txt');
Comments
Post a Comment