PDA

View Full Version : Stop an application from GUI



jesse_mark
12th April 2013, 21:46
hello,

Im using Qprocess to start and application from GUI.

process->start("mpirun -np 12 -machinefile nodesfile myapp.exe");

is there any way that i can use to stop myapp.exe from the gui ???

i used process.terminate(); but it does not work.

Please anyhelp on how can i stop this application from GUI.

thanks

wysota
12th April 2013, 21:56
Try kill() instead of terminate().

jesse_mark
12th April 2013, 22:34
its still the same,

when ever i run "mpirun -np # -machinefile nodes app"

i see two process:
mpirun -np # -machinefile nodes app
mpiexec.hydra -np # -machinefile nodes app


and when i used terminate or kill .. the first process mpirun is killed/terminated, but mpiexec.hydra. and the application keeps running.

idk what should i do, i have even tried process.start("pkill mpiexec.hydra"); and did not work.

wysota
12th April 2013, 22:49
Ask at some mpi forum. Your issue has nothing to do with QProcess.