mpiexec and interactive read
Troy Baer
troy at osc.edu
Thu May 15 11:26:09 EDT 2003
On Thu, 15 May 2003, Bryan Putnam wrote:
> I have a part of the famous "pi calculating" program below where node 0
> reads some input from the terminal. If I run this program using for
> example,
>
> mpirun -np 4 -machinefile $PBS_NODEFILE prog
>
> it runs normally, but when using
>
> mpiexec -n 4 prog
>
> the program doesn't appear to stop and wait at the read, and it complains
> about reading the end of file.
>
> We're using Linux RedHat 7.3 and the problem occurs when compiling with
> both g77 and Portland pgf77. Any help appreciated!
By default, mpiexec only connects stdin to rank 0. If you want it to
go to all MPI processes, do
mpiexec -allstdin prog
(mpiexec will figure out how many procs to use from the batch system,
so you don't need -n unless you want fewer MPI processes that CPUs
you requested for your job.)
--Troy
--
Troy Baer email: troy at osc.edu
Science & Technology Support phone: 614-292-9701
Ohio Supercomputer Center web: http://oscinfo.osc.edu
More information about the mpiexec
mailing list