Bug 4748 - Adding a submit-site chosen job name to the remote job manager
: Adding a submit-site chosen job name to the remote job manager
: unspecified
: All All
: P3 enhancement
: 4.2
Assigned To:
  Show dependency treegraph
Reported: 2006-10-04 15:31 by
Modified: 2006-10-04 17:03 (History)

Patch to add PBS -N support in pbs.pm (561 bytes, patch)
2006-10-04 16:17, Peter Lane


You need to log in before you can comment on or make changes to this bug.

Description From 2006-10-04 15:31:39
PBS shows a job-name of "STDIN" for all my grid jobs. It would be nice to be
able to tell which job is which from a simple name. PBS permits to augment the
job description with a simple name: 

       -N name Declares a name for the job.  The name specified may be  up  to
               and  including  15  characters  in  length.  It must consist of
               printable, non white space characters with the first  character

I envision this as an RSL extension like "(jobName=identifier)". If the RSL is
not specified, the jobname within the jobmanager should default to the basename
of the executable.

Besides the RSL necessary setup, the PBS integratin is achieved with a few
lines of perl in the pbs.pm module, adding "#PBS -N ident" to the script. 

The Condor jobmanager can use the jobName to add a user ClassAd to the job,
and/or a user event to the job. This is also reasonably simple to add, e.g. the
user ClassAd as "+globus_jobname = ident" and "submit_user_event_nodes =

I have no experience with LSF nor FBSNG to suggest anything for those
------- Comment #1 From 2006-10-04 15:34:52 -------

[1] it's submit_user_event_notes, not nodes
[2] at least the pbs identifier should have truncation.
[3] all jobnames should have sanity checks to ensure C-style identifiers.
------- Comment #2 From 2006-10-04 16:17:09 -------
Created an attachment (id=1069) [details]
Patch to add PBS -N support in pbs.pm

Here's a diff I made for the very trivial change that I made to HEAD in order
support this. The patch also works on pbs.pm directly. If using HEAD or 4.0.x
with extensions support, you can do something like the following to pass in the
job name:

------- Comment #3 From 2006-10-04 16:26:01 -------
Aehm, please be aware that many many people still happily use pre-WS GRAM, me
included. Thus my RSL string instead of fancy XML spec. 
------- Comment #4 From 2006-10-04 16:35:56 -------
Then add (name="foo").
------- Comment #5 From 2006-10-04 17:03:13 -------
[1] Adding "(name=foo)" won't work:

lennon:~ $ globus-job-run hpc-opteron.usc.edu/jobmanager-pbs -m 1 -x
'(jobtype=single)(name=foo)' -l /bin/date -Isec
GRAM Job submission failed because one of the RSL parameters is not supported
(error code 1)

hpc-opteron:~ > globus-version

I think you forgot about the $G_L/share/globus_gram_jobmanager/pbs.rvf

[2] PBS has stringent requirements on the style of the identifier, so it may be
better to add some sanity code, e.g. (untested!): 

+     if($description->name() ne '')
+     {
+       my $name = $description->name();
+       $name =~ tr/a-zA-Z0-9_//csd;
+       substr($name,15) = '' if length($name) > 15;
+       print JOB '#PBS -M ', $name, "\n";
+     }

We wouldn't want to have qsub fail because of an illegal identifier.