[Beowulf] MPI2-standard to lauch "mpirun -np 2 myshellscript.sh"
kball at pathscale.com
Fri Jun 23 10:21:21 PDT 2006
On Fri, 2006-06-23 at 04:38, mg wrote:
> Traditionally, a parallel application is run like following
> >>> export FOO=foo
> >>> mpirun -np 2 -machinefile mymachinefile my_parallel_app [app options]
> (To be known by all the nodes of my cluster, the environment variable
> FOO has to be set on all the nodes or exported on the nodes by
> Few months ago, I used MVAPICH on a cluster of Opteron: this MPI
> distribution allows me to launch shell scripts with the mpirun script
> like following :
> myscript.sh|| #!/bin/bash
> | export FOO=foo
> | my_parallel_app [app options]
> >>> mpirun -np 2 myscript.sh
> (In that case, the environment variable FOO is exported on all the
> I heard all the distributions do not support this feature. Indeed, I
> use currently MPICH-126.96.36.199 which does not permit me to do it.
I think that you can probably make MPICH do this. However, you will
need to add to your script slightly and change it to something like
and invoke it like
mpirun -np 2 myscript.sh [app options]
This (I believe) will work in MPICH, and probably most or all other MPI
implementations. The reason for doing it like this is that some
implementations of MPI pass information to the MPI library through
commandline options added to the program. They then use the call to
MPI_Init to pull these options off and fix pointers so that the
application code doesn't see these special added options.
> Nevertheless, it should be standardized in the distributions based on
> the MPI-2 standard. So, can someone confirm it and/or send me a link
> to the page of the standard which says it?
I don't know anything about this, sorry, but I would expect it to work
similarly to how I described above.
> Thanks a lot,
> Beowulf mailing list, Beowulf at beowulf.org
> To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
More information about the Beowulf