Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] Interactive OMPI job, stdin problem
From: Harald Anlauf (anlauf_at_[hidden])
Date: 2008-12-12 10:21:43


Hello,

I am having problems with OMPI-1.3beta with an interactive job where rank 0
reads stdin from a terminal. The problem does not show up when stdin
is redirected from a file. The problem also does not exist with OMPI 1.2.[5-9].
Has there been any change in OMPI between 1.2 and 1.3 that I should take
care of?

Please find attached a famous sample program that was modified to aid debugging.

The program reads the number of intervals used to calculate pi. 0 means exit.
I first enter 1000, then 0.

Interactive run, without mpirun:
% ./a.out
 Process 0 of 1 is alive
 Process 0 before read
Enter the number of intervals: (0 quits)
1000
 Process 0 read: n = 1000
 Process 0 before MPI_BCAST
 Process 0 after MPI_BCAST
  pi is approximately: 3.1415927369231227 Error is: 0.0000000833333296
 Process 0 before read
Enter the number of intervals: (0 quits)
0
 Process 0 read: n = 0
 Process 0 before MPI_BCAST
 Process 0 after MPI_BCAST
 Process 0 Normal exit

With mpirun:
% mpirun -np 1 ./a.out
 Process 0 of 1 is alive
 Process 0 before read
Enter the number of intervals: (0 quits)
1000
--------------------------------------------------------------------------
mpirun has exited due to process rank 0 with PID 10909 on
node oflws105 exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------

Now with stdin redirected from a here-document:
% mpirun -np 1 ./a.out <<EOF
> 1000
> 0
> EOF
 Process 0 of 1 is alive
 Process 0 before read
Enter the number of intervals: (0 quits)
 Process 0 read: n = 1000
 Process 0 before MPI_BCAST
 Process 0 after MPI_BCAST
  pi is approximately: 3.1415927369231227 Error is: 0.0000000833333296
 Process 0 before read
Enter the number of intervals: (0 quits)
 Process 0 read: n = 0
 Process 0 before MPI_BCAST
 Process 0 after MPI_BCAST

Similarly for np > 1, with minor variations, but the same error message.

Can anybody reproduce this behavior?

% ompi_info |grep SVN
   Open MPI SVN revision: r20119
   Open RTE SVN revision: r20119
       OPAL SVN revision: r20119

Regards,
Harald

-- 
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL 
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a