[Beowulf] MPI2-standard to lauch "mpirun -np 2 myshellscript.sh"

Diego M. Vadell dvadell at linuxclusters.com.ar
Sat Jul 1 14:55:55 EDT 2006


Hi,
   I can confirm I have done what Kevin says in this email. At least it 
was enough for me to write a shell script that would do

#!/bin/bash
export FOO=bar
mpirun ... my_parallel_app $@

Hope it helps,
 -- Diego.

Kevin Ball wrote:

>Mathieu,
>
>On Fri, 2006-06-23 at 04:38, mg wrote:
>  
>
>>Hello, 
>>
>>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
>>mpirun.)
>>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]
>>|
>>end
>>
>>    
>>
>>>>>mpirun -np 2 myscript.sh
>>>>>          
>>>>>
>> (In that case, the environment variable FOO is exported on all the
>>nodes)
>>I heard all the distributions do not  support this feature. Indeed, I
>>use currently MPICH-1.2.5.2 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
>
>#!/bin/bash
>MPICH_OPTS=$*
>export FOO=foo
>my_parallel_app $MPICH_OPTS
>
>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.
>
>-Kevin
>
>  
>
>>Thanks a lot,
>>Mathieu.
>>
>>
>>
>>
>>______________________________________________________________________
>>_______________________________________________
>>Beowulf mailing list, Beowulf at beowulf.org
>>To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
>>    
>>
>
>_______________________________________________
>Beowulf mailing list, Beowulf at beowulf.org
>To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf
>  
>

_______________________________________________
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 mailing list