0

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 :

  1. How can I launch MPI-EXE without Qt-GUI freezing ?
  2. 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.

Cairnarvon
  • 25,981
  • 9
  • 51
  • 65
  • What happens if you move the arguments to `mpirun` from `exeFilePath` to the start of `args`? – Cairnarvon May 10 '13 at 07:05
  • Hi Cairnarvon, Thanks for your valuable comment. It really helped. Until today, I was in impression that process->start(program, stringlist) will do all things. But program with full command specified did the trick. I could successfully launch an MPI exe. You rock. Thanks. – user2368894 May 10 '13 at 08:01

0 Answers0