well, i think i have to because you can not run the same application i'm running.
Let me give try to make it more clear:
void MyWindow
::startApp(QString Command
) {
/* command = " Run -nn 1 -np 12 myApp"
where :
nn: number of nodes i want to use
np: number of processes per each node */
Myprocess->start(Command);
//I catch all the signals from the Myprcess , readyread, fininshe ..etc
}
void MyWindow::stopApp()
{
qint64 id = Myprocess->pid();
qDebug
() <<
QString::number(id
);
// just to know the process id the was started before i kill it.
Myprocess->kill();
}
void MyWindow::startApp(QString Command)
{
/* command = " Run -nn 1 -np 12 myApp"
where :
nn: number of nodes i want to use
np: number of processes per each node */
Myprocess->start(Command);
//I catch all the signals from the Myprcess , readyread, fininshe ..etc
}
void MyWindow::stopApp()
{
qint64 id = Myprocess->pid();
qDebug() << QString::number(id); // just to know the process id the was started before i kill it.
Myprocess->kill();
}
To copy to clipboard, switch view to plain text mode
This is what i am doing.
so now i am just using one node, which my local machine, and forking 12 processes to run the application.
Now when i use the terminal to show the processes i have.
// the process id that im getting from Myprocess.pid() is >> 62524
before kill
qgrep Myapp.exe
result:
62524
64073
64074
64075
64076
64077
64078
64079
64080
64081
64082
64083
After Kill
pgrep myApp.exe
64073
64074
64075
64076
64077
64078
64079
64080
64081
64082
64083
only the first process get killed which the parent process that lead to fork all the other processes but the other process continue to works and the application too.
hope this make it more clear.
Thanks
Bookmarks