Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Re : Yet another stdin problem
From: Ashley Pittman (ashley_at_[hidden])
Date: 2009-10-07 12:12:33


Or better still if you want to be able to pass the filename and args on
the mpirun command line use the following and then run it as

mpirun -np 64 ./input_wrapper inputs.txt my_exe

#!/bin/bash

FILE=$1
shift

"$@" < $FILE

In general though using stdin on parallel applications is rarely a good
solution.

Ashley.

On Wed, 2009-10-07 at 18:42 +0300, Roman Cheplyaka wrote:
> As a slight modification, you can write a wrapper script
>
> #!/bin/sh
> my_exe < inputs.txt
>
> and pass it to mpirun.

-- 
Ashley Pittman, Bath, UK.
Padb - A parallel job inspection tool for cluster computing
http://padb.pittman.org.uk