[mpich-discuss] X11 and mpich2 - passing environment variables with a colon in the name

Dave Goodell goodell at mcs.anl.gov
Tue Feb 2 16:44:02 CST 2010


On Feb 2, 2010, at 4:17 PM, John Watts wrote:

> Thanks for the suggestion, but that gives the same result.   However  
> (as so often happens...) having searched the internet for days, and  
> then submitted this question, I find the answer within the hour...
> If you want to define the environment variable DISPLAY for an X11  
> process, use the full <hostname:m.n> format, eg -env DISPLAY  
> localhost:0.0.   Another example:  /cygdrive/c/mpich2/bin/ 
> mpiexec.exe -env DISPLAY GibbonRd-T40:0.0 -n $1 executable_name.exe

John, I'm glad you found a workaround.

This appears to be an SMPD-only limitation.  MPD and Hydra do the  
right thing when there is a colon in the environment variable value,  
at least when using the trunk on my Mac.  That is, they separate MPMD  
executables by exactly ":" as a token.

(bare mpiexec is hydra's mpiexec)
--------8<-------
% cat quux.sh
#!/bin/sh
echo VAL=$VAL
% ./quux.sh
VAL=
% VAL=:foo ./quux.sh
VAL=:foo
% mpiexec -env VAL :foo -n 1 ./quux.sh
VAL=:foo
% mpiexec.mpd  -env VAL :foo -n 1 ./quux.sh
VAL=:foo
--------8<-------

-Dave



More information about the mpich-discuss mailing list