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.

always loading, no response 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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -