locked
a question about MPI initilize RRS feed

  • Question

  • Dear ALL:

    I have a problem about MPI initialzation.

    I use ' CALL MPI_INIT(mpi_err)'  to setup the environment of MPI, but I found this command did not run at all.

    I use the same code to run a simple case, it works whatever how many processors I use. However,evertime I try to run one bigger case, it just hang up. I checked and found this initializing command had not been executed.

    this MPI-INIT is used at the begining of my main program, I think it should not have any differece when I run different cases.

    does anyone know why? many thanks
    Monday, February 9, 2009 8:43 PM

Answers

  • hi Cindy,

    yes, there is a difference.
    in the first case you are piping input.data into mpiexec and the output of mpiexec to output.dat.
    Hence, your mpiexec seems hangs when the program complets because its output is still being piped into output.dat.

    what do you find in output.dat when your program hangs?

    .Erez
    • Marked as answer by Don Pattee Thursday, March 26, 2009 12:34 AM
    Wednesday, February 18, 2009 9:24 PM

All replies

  • hi

    I solve this problem but I do know why.

    I only change the command to run this case from

    mpiexec -np 4 test.exe <input.dat >output.dat

    to 

    mpiexec -np 4 test.exe

    is there any difference between these two?

    Cindy

    Monday, February 9, 2009 9:51 PM
  • hi Cindy,

    yes, there is a difference.
    in the first case you are piping input.data into mpiexec and the output of mpiexec to output.dat.
    Hence, your mpiexec seems hangs when the program complets because its output is still being piped into output.dat.

    what do you find in output.dat when your program hangs?

    .Erez
    • Marked as answer by Don Pattee Thursday, March 26, 2009 12:34 AM
    Wednesday, February 18, 2009 9:24 PM
  • thank you  Erez:

    Accually , this was nothing written out, it was just hanging on. :)

    Cindy
    Wednesday, February 18, 2009 9:26 PM