--- source-trees/gt2-cvs/gram/jobmanager/setup/condor/condor.in Thu Jun 14 13:18:23 2007 +++ source-trees/gt2-cvs/gram/jobmanager/setup/condor/condor.in Fri Jun 15 17:40:12 2007 @@ -212,6 +212,37 @@ $library_vars{$tuple->[0]} = 1; } } + + ##### OSG-Specific modification ##### + ##### These should not affect any non-OSG site, ##### + ##### unless you define $OSG_GRID ##### + + # First, we figure out if this is an OSG installation, and if so, where + # OSG is installed on the worker nodes + my $osg_grid = ''; + my $use_osg_grid = 1; + my $use_dynamic_wn_tmp = 1; + map { + if ($_->[0] eq "OSG_GRID") { + $osg_grid = $_->[1]; + } elsif ($_->[0] eq "OSG_DONT_USE_OSG_GRID_FOR_GL") { + $use_osg_grid = 0; + } + + } @environment; + + # If this is an OSG installation, we set GLOBUS_LOCATION based on OSG_GRID, + # and we set OSG_WN_TMP based on _CONDOR_SCRATCH_DIR + if ($osg_grid ne '') { + map { + if ($use_osg_grid && $_->[0] eq "GLOBUS_LOCATION") { + $_->[1] = $osg_grid . "/globus"; + } + } @environment; + } + ##### End OSG-Specific modification ##### + + foreach (keys %library_vars) { my $library_path = join(':', $description->library_path()); --- source-trees/gt2-cvs/gram/jobmanager/setup/lsf/lsf.in Mon Jun 18 23:42:33 2007 +++ source-trees/gt2-cvs/gram/jobmanager/setup/lsf/lsf.in Mon Jun 18 23:48:32 2007 @@ -39,6 +39,7 @@ my $email_when = ''; my $library_path; my @library_vars; + my @environment; $self->log('Entering lsf submit'); @@ -195,7 +196,35 @@ $self->nfssync( $description->stderr(), 1 ); print JOB '#BSUB -n ', $description->count(), "\n"; - foreach my $tuple ($description->environment()) + @environment = $description->environment(); + ##### OSG-Specific modification ##### + ##### These should not affect any non-OSG site, ##### + ##### unless you define $OSG_GRID ##### + + # First, we figure out if this is an OSG installation, and if so, where + # OSG is installed on the worker nodes + my $osg_grid = ''; + my $use_osg_grid = 1; + my $use_dynamic_wn_tmp = 1; + map { + if ($_->[0] eq "OSG_GRID") { + $osg_grid = $_->[1]; + } elsif ($_->[0] eq "OSG_DONT_USE_OSG_GRID_FOR_GL") { + $use_osg_grid = 0; + } + } @environment; + + # If this is an OSG installation, we set GLOBUS_LOCATION based on OSG_GRID. + if ($osg_grid ne '') { + map { + if ($use_osg_grid && $_->[0] eq "GLOBUS_LOCATION") { + $_->[1] = $osg_grid . "/globus"; + } + } @environment; + } + ##### End OSG-Specific modification ##### + + foreach my $tuple (@environment) { if(!ref($tuple) || scalar(@$tuple) != 2) { --- source-trees/gt2-cvs/gram/jobmanager/setup/pbs/pbs.in Mon Jun 18 23:36:32 2007 +++ source-trees/gt2-cvs/gram/jobmanager/setup/pbs/pbs.in Tue Jun 19 14:41:22 2007 @@ -48,7 +48,7 @@ my $email_when = ''; my $cache_pgm = "$Globus::Core::Paths::bindir/globus-gass-cache"; my %library_vars; - + my @environment; $self->log("Entering pbs submit"); @@ -269,7 +269,37 @@ $library_vars{LD_LIBRARY64_PATH} = 0; } - foreach my $tuple ($description->environment()) + @environment = $description->environment(); + + ##### OSG-Specific modification ##### + ##### These should not affect any non-OSG site, ##### + ##### unless you define $OSG_GRID ##### + + # First, we figure out if this is an OSG installation, and if so, where + # OSG is installed on the worker nodes + my $osg_grid = ''; + my $use_osg_grid = 1; + my $use_dynamic_wn_tmp = 1; + map { + if ($_->[0] eq "OSG_GRID") { + $osg_grid = $_->[1]; + } elsif ($_->[0] eq "OSG_DONT_USE_OSG_GRID_FOR_GL") { + $use_osg_grid = 0; + } + } @environment; + + # If this is an OSG installation, we set GLOBUS_LOCATION based on OSG_GRID. + if ($osg_grid ne '') { + map { + if ($use_osg_grid && $_->[0] eq "GLOBUS_LOCATION") { + $_->[1] = $osg_grid . "/globus"; + } + } @environment; + } + ##### End OSG-Specific modification ##### + + + foreach my $tuple (@environment) { if(!ref($tuple) || scalar(@$tuple) != 2) {