[Beowulf] qsub script and input files

Lombard, David N david.n.lombard at intel.com
Fri Aug 19 07:50:20 PDT 2005


From: decon brody on Tuesday, August 16, 2005 3:25 PM
> 
> That said, I'm trying to write a script for pbs (torque) that will
> take an input file, if I run it from the command line, it would look
> like this:
> 
> c29b2_xxlarge_mpi < inputfile.inp
> 
> if I wanted to run it with mpirun and I do this:
> 
> mpirun c29b2_xxlarge_mpi < inputfile.inp
> 
> this of course doesn't work.  Is there anyway to pass options to a
> binary like this?  fyi, it's lam-mpi but I don't think it makes a
> difference..

The issue is you are not passing options to your binary.  You have made
the local shell redirect the mpirun process' standard input to read from
inputfile.inp.  That is, when you run your program, it never sees
"inputfile.inp," it only reads its standard input and data just happens
to be there.  mpirun could arrange for this to work, but it would
require a little bit of socket magic; that said, I don't know if mpirun,
from LAM/MPI or elsewhere, does this.

An alternative is to actually pass the name of the input file on the
command line and then have your binary open the file, i.e.,

  c29b2_xxlarge_mpi inputfile.inp

You would also need to make sure that inputfile.inp is available to all
nodes, perhaps by putting the file on an NFS file system and passing the
absolute path instead of using a relative path, i.e.,

  mpirun c29b2_xxlarge_mpi /home/decon/inputfile.inp

HTH
-- 
David N. Lombard

My comments represent my opinions, not those of Intel Corporation.




More information about the Beowulf mailing list