I have developed an application which comprises of a frontend Qt-GUI and a solver EXE. As these two are independent module, I could successfully launch EXE in Qt-GUI by using a QProcess like below:
QProcess *myProcess = new QProcess;
myProcess->start(exeFilePath, args);
Where
exeFilePath = "EXE"
args = "input1 -option1 name1 -option2 name2"
From QProcess's signals, I could successfully read from output channels and update the progress in a Qt-GUI's QGLWidget.
Things have changed by time. EXE is now MPI-EXE, an MPI based executable and I need to use it through Qt-GUI in a practical way.
I tried the above QProcess exercise for MPI-EXE with the following change:
exeFilePath = "mpirun -np 4 MPI-EXE"
When doing this, myProcess could not be started and when error was printed, it gave UnknownError. As I understand, QProcess itself runs in a separate thread and from this I have to launch a 4-process MPI-EXE which makes this problematic.
I need help in :
- How can I launch MPI-EXE without Qt-GUI freezing ?
- How can I monitor progress of MPI-EXE as I have to plot the progress in QGLWidget ?
I will really appreciate any comments on my questions. Please help. Thanks.