Results 1 to 11 of 11

Thread: Qprocess and mpi not finishing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Qprocess and mpi not finishing

    Currently I'm facing the same problem with mpiexec, did you found a solution for this problem then?

  2. #2
    Join Date
    Jan 2014
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Qprocess and mpi not finishing

    Exactly the same problem : still no solution (6 years after !)

    Working with Qt 4.8, Windows

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Qprocess and mpi not finishing

    Rather than post "Me too!" Perhaps you could put some effort in to write a small, self-contained example that demonstrates the problem. The problem almost certainly has nothing to do with Qt but you never know what the process of distilling and sharing the problem might show you.

    You could also capture any standard output/error output from mpiexec, which I am sure could be useful in conjunction with other MPI log.

    BTW: Mar 2009 to Jan 2014 is a long way short of 6 years.
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

  4. #4
    Join Date
    Jan 2014
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Qprocess and mpi not finishing

    Ok i was a bit frustrated ... and you are right 2009 to 2014 is a bit less than 6 years !

    The solution i found is to use the command "system" rather than qprocess

    My first idea was to use QProcess like this :
    QProcess process;
    process.setWorkingDirectory( "xxxx" );
    process.setProcessChannelMode(QProcess::MergedChan nels);
    process.setStandardOutputFile("logfile");
    process.start(commandProcess,argumentsProcess);
    process.waitForFinished(-1);

    But as i mentionned, the qprocess never sends a finish signal (why, this is the question and that's maybe mpiexec problem ??)

    Solution i did is (using command system) :
    QString command = commandProcess+" "+argumentsProcess.join(" ")+ " > "+logProcessFilePath;
    command = QDir::toNativeSeparators(command);
    command.replace(":\\",":\\\\");
    int returnCode = system(command.toStdString().c_str());

  5. #5
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Qprocess and mpi not finishing

    I am sorry to post in a very old thread, but I figured that it might help others looking for an answer in a search engine...

    I just had the very same problem, which might be due to this bug, at least according to my research.
    According to that message, OpenMPI is catching the SIGCHLD signal, which is necessary for QProcess "finished" signal to work correctly (and thus for QProcess::waitForFinished()).

    The message says that this was changed in OpenMPI series 1.6 and 1.7.
    As of today, the latest Ubuntu 15.10 ships with OpenMPI 1.6.5, which apparently is still affected by this (mis-)behaviour.

    Upgrading to a later OpenMPI version should therefore fix the problem.
    I did this by installing OpenMPI 1.10.2 from source, which is very easily done by following these instructions, and I can confirm that the problem is solved.

    Hope this helps...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.