bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Parallel Bug Reports User .rc files interacting with parallel's sub


From: Kempf, Stephen
Subject: GNU Parallel Bug Reports User .rc files interacting with parallel's sub shells
Date: Tue, 5 Aug 2014 01:06:27 +0000

I’ve run into a case, which I believe is a bug, in which a user’s .rc file (for whichever shell is in the SHELL env var) interferes with the commands run by parallel.  For example:

 

# .cshrc

module purge

 

 

> module load (something)

> foreach i (a b c)

            (cmd) $i

end

# (cmd)s ran fine

 

> parallel (cmd) ::: a b c

(cmd): Command not found.

(cmd): Command not found.

(cmd): Command not found.

 

If parallel is intended to be an easy-to-use replacement for foreach loops, then I’m pretty sure it would be a rare occurrence for it to be desirable for the sub shells to source the user’s .rc file.  Therefore I would like to request that the sub shells be invoked with an appropriate option (-f for tcsh; --norc for bash, etc.) to skip sourcing the user’s .rc file - or at least, for this behavior to be made available as a new command line option.

 

My parallel version (I think this is the latest version, but please correct me if it isn’t):

> parallel --version

GNU parallel 20120422

Copyright (C) 2007,2008,2009,2010,2011,2012 Ole Tange and Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

GNU parallel comes with no warranty.

 

Web site: http://www.gnu.org/software/parallel

 

When using GNU Parallel for a publication please cite:

 

O. Tange (2011): GNU Parallel - The Command-Line Power Tool,

;login: The USENIX Magazine, February 2011:42-47.

 

 

Complete, runnable example using an echo in the .cshrc as a proxy for environmental destruction:

 

#.cshrc

echo "I'm in your shell, sourcing your .cshrc!"

 

 

> env SHELL=/bin/tcsh parallel echo ::: a b c

I'm in your shell, sourcing your .cshrc!

b

I'm in your shell, sourcing your .cshrc!

a

I'm in your shell, sourcing your .cshrc!

c

 

Thanks,

~Steve


reply via email to

[Prev in Thread] Current Thread [Next in Thread]