mpich/p4 failure when $SHELL=(t)csh

Ben Webb ben at bellatrix.pcl.ox.ac.uk
Fri Feb 8 09:59:20 EST 2002


On Thu, 7 Feb 2002, Pete Wyckoff wrote:

> This is a bit painful.  For mpich/gm the code doesn't change the working
> directory on its own, but users of good old mpirun I think expect the
> slave processes to end up in the same dir on each node.

	But of course. We also have an NFS mount shared by all the compute 
nodes, so I'm not proposing that you ditch the "cd" behaviour entirely.

> First, though, I'll go play around with
> 
>     rsh node "bash -c 'if [ -d $dir ] ; then cd $dir ; fi ; $SHELL -c
> 	\'exec executable arguments\''"
> 
> but it will be necessary to run through the executable and arguments and
> change all ' to '\''.  Hope that's sufficient.  Ugh.

	Yuck. Having to mess with the command line to this extent was my 
primary motivation for patching tm_spawn to take a working directory 
instead, but that creates another problem - it'd break the tm API.

> My take, then is that hopefully a modified (1) can get rid of both the
> warning messages from bash and fix the non-bash-shell problem, while
> still allowing both mpich/p4 and mpich/gm and ad-hoc usage.

Good plan. 

You could just do 

> Is there a case where even testing the $dir would be a bad thing?

	Not that I can think of. I suppose you could do a
"cd $cwd >& /dev/null" instead, although you'd mask any
"Permission denied" errors that way.

	Ben
-- 
ben at bellatrix.pcl.ox.ac.uk           http://bellatrix.pcl.ox.ac.uk/~ben/
"And earthly power doth then show likest God's
When mercy seasons justice."
	- 'The Merchant of Venice', William Shakespeare




More information about the mpiexec mailing list