Bugzilla – Bug 1556
Environment fix for PBS
Last modified: 2004-11-16 15:59:52
You need to log in before you can comment on or make changes to this bug.
PBS is annoying. Here's the deal: When environment variables have commas in them, it causes problems with PBS. (I'm not sure which version of PBS: Maarten, can you comment?) GLOBUS_TCP_PORT_RANGE has commas in it, so it is a regular source of problems. The right way to fix this may be to scan the environment for any variables that have commas in them, and remove them from the environment. In lieu of that, this is a patch that just undefined GLOBUS_TCP_PORT_RANGE. It's an incomplete solution, but it helps many of the problems, so it's useful. We'd like to either see this hack added, or a better solution developed. We're happy to work with you to develop something better, if you would prefer. Thanks! -alain --- globus_2_4_3_adv2003_fix892_fix956_more/gram/jobmanager/setup/pbs/pbs.in Fri Mar 28 00:00:31 2003 +++ globus_2_4_3_adv2003_fix892_fix956_plus/gram/jobmanager/setup/pbs/pbs.in Sun Jan 4 04:55:44 2004 @@ -233,7 +233,11 @@ $library_vars{$tuple->[0]} = 1; } - push(@new_env, $tuple->[0] . "=" . '"' . $tuple->[1] . '"'); + # Hack to unset GLOBUS_TCP_PORT_RANGE, because it may contain a comma, + # which cannot be handled by PBS in an environment line. EDG bug 1208. + + push(@new_env, $tuple->[0] . "=" . '"' . $tuple->[1] . '"') + unless $tuple->[0] =~ /^GLOBUS_(TCP|UDP)_PORT_RANGE$/; $tuple->[0] =~ s/\\/\\\\/g; $tuple->[0] =~ s/\$/\\\$/g;
Created an attachment (id=317) [details] pbs_env_fix.diff Since PBS cannot handle *any* environment variable with a comma, I think the patch should rather be as attached here.
At least openpbs-2.3.16 has the problem.
PBS people tell me that this has been fixed in PBS pro, but not yet in open pbs. So we cannot just reject all env RSL's with commas for all pbs versions. We will need to detect which PBS version it is and handle it accordingly.
Created an attachment (id=452) [details] pbs-env-patch.diff Can you try this patch and see if this is satisfactory? This bypasses using the -v option for environment variables and just sets them in the script which the pbs system executes. This patch is against the trunk, but patches cleanly against the head of the 3.2 branch as well.
In the patch I see the "#PBS -v " line has been removed, but I do not see the variables getting set anywhere else?
Please ignore my previous question... (it is evident after all).
Patch committed to trunk after running GRAM tests.