Menu

mpirun -np x pyMPI fail

Help
Jesus
2009-01-26
2013-04-17
  • Jesus

    Jesus - 2009-01-26

    I can't get the python shell with:

    mpirun -np x pyMPI

    It just stay freeze.

    but testing scripts like the fractal example given with the pyMPI package seems to work:

    mpirun -np 3 pyMPI fractal.py
    Starting computation (groan)

    process 1 done with computation!!
    process 2 done with computation!!
    process 0 done with computation!!
    Header length is  54
    BMP size is  (400, 400)
    Data length is  480000

    ¿what could it be?

    I'm using:
    pyMPI-2.5b0
    mpich2-1.0.8

    on a single machine for learning.

     
    • Gregory Lee

      Gregory Lee - 2009-01-27

      Sounds like you need to add "--with-isatty" to your configure line.  When doing so, you may still not see the >>> python prompt, but you should be able to enter commands.  If your mpirun has an option for unbuffered output, you should run with that option (i.e., SLURM's srun has a -u, --unbuffered option).  This will force mpirun to flush output to your terminal, thus displaying the python prompt.  If that doesn't work or if mpirun doesn't have that option, then add "--with-prompt-nl" to your configure line.  This will add a newline character after printing the python prompt, which should flush the output buffer.

       
    • Jesus

      Jesus - 2009-01-27

      Thank you. It worked for me with the --with-isatty and --with-prompt-nl. It present the prompt. It's a little buggy but i think is because i'm on a single machine and try it with diferent values of -np just to see. i think in a real cluster it'll behave good.

      mpirun -np 1 pyMPI works fine, but after import mpi, it looks like two process instead of one (i.e. if i print 4 it print 4 twice).

      if -np is grater than 1, when i import mpi, it freeze--with-prompt-nl again like no --with-isatty was performed.

      should i try without the --with-prompt-nl?

       
    • Gregory Lee

      Gregory Lee - 2009-01-28

      Sounds like your MPI environment may be buggy.  Try running a simple C/Fortran MPI hello world app at -np 1 and see how that behaves.

      As for --promt-nl, I can't imagine that causing things to freeze.  Really, all this option does is write a newline after the python promt and flush it.  Try printing something out and then ending the interactive pyMPI session with Ctrl-D and see if everything gets printed out then.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.