Solved: Problems with tcsh /csh syntax for long $PATH -- potential fix

From NWChem

You are viewing a single post from the thread title above
Jump to: navigation, search

Click here for full thread
Gets Around
Threads 16
Posts 115
In working on getting set up on a ROCKS (CentOS 5.6-based) system I think I've stumbled across something which I think should be relatively easy to fix. This seems to affect tcsh but not bsd-csh.

I've got ECCE working perfectly now with my university cluster (either direct connection to front node although I have the 32 proc limit -- see other threads -- or via port redirection), which is running ScientificSL (Boron?) which is also CentOS/RHEL based.

I'm having some problems with the ROCKS cluster, however. I can do direct submissions to node via node hopping but can't submit to SGE on the front node because I get the behaviour below -- I also managed to submit to SGE on the frontnode by doing node hopping on the same node (mycluster.university.edu (eth0) -> mycluster.local (eth1)). That's all fine.

One of the issues I've found on the ROCKS cluster, but not Scientic Linux cluster, is that when I try to submit a job I get this
+go+if ($?PATH) setenv PATH /opt/gridengine/bin/lx26-amd64/:/usr/bin/:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/bin/X11:${PATH}
+go+setenv: Too many arguments.

The /opt/gridengine bit comes from the CONFIG.<> file (qmgrpath). Running the command in the remote terminal gives the same error, but only if ${PATH} is included. See below for more.

csh on both rocks/centos and scientific linux is really tcsh (softlinked /bin/csh -> tcsh). The tcsh versions (tcsh 6.14.00 (Astron) 2005-03-25) are identical on both clusters.

The reason for the 'too many arguments' seems to be that the PATH variable is already very long (1686 chars) on the ROCKS cluster but not on the Scientific Linux one (449 chars). So far, so bad.

There's a fix though: this can be dealt with by doing
setenv PATH "/opt/gridengine/bin/lx26-amd64/:/usr/bin/:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/bin/X11:${PATH}"

instead.

I've tested the
setenv PATH "path1:path2:${PATH}"

syntax on bsd-csh (debian/wheezy standard csh) and in tcsh (centos -- on the ROCKS cluster) and it works on both, so patching shouldn't break anything.

I tried going through the ECCE source code myself, but didn't have too much luck in understanding what to change -- but it doesn't seem like it's something that SHOULD be too difficult to patch.

Interesting to note is that my debian systems, which use bsd-csh and not tcsh, have PATHs which contain up to 1562 chars without requiring "s.

Andy
Edited On 3:10:04 PM PDT - Sun, Mar 24th 2013 by Ohlincha


Who's here now Members 0 Guests 0 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC