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

Reply via email to