Job Attributes

Flags
Enum Name Handle Name String Type Funcs U O M RUN ATR_DFLAG_
JOB_ATR_jobname ATTR_N "Job_Name" ATR_TYPE_STR - RW RW RW Y SELEQ |MOM
JOB_ATR_job_owner ATTR_owner "Job_Owner" ATR_TYPE_STR - R R R - SSET | SELEQ | MOM
JOB_ATR_resc_used ATTR_used "Resources_Used" ATR_TYPE_RESC resc R R R - SvWR
JOB_ATR_state ATTR_state "job_state" ATR_TYPE_CHAR c R R R - SvWR
JOB_ATR_in_queue ATTR_queue "Queue" ATR_TYPE_STR str R R R - MOM
JOB_ATR_at_server ATTR_server "Server" ATR_TYPE_STR str R R R - MOM
JOB_ATR_account ATTR_A "Account_Name" ATR_TYPE_STR str RW RW RW N SELEQ | MOM
JOB_ATR_chkpnt ATTR_c "Checkpoint" ATR_TYPE_STR str/chkpnt RW RW RW r MOM | ALTRUN
JOB_ATR_ctime ATTR_ctime "ctime" ATR_TYPE_LONG l R R R - SSET
JOB_ATR_depend ATTR_depend "depend" ATR_TYPE_LIST depend/str RW RW RW N READ_WRITE
JOB_ATR_errpath ATTR_e "Error_Path" ATR_TYPE_STR str RW RW RW r ALTRUN | SELEQ | MOM
JOB_ATR_exec_host ATTR_exechost "exec_host" ATR_TYPE_STR str R R R - MOM
JOB_ATR_exectime ATTR_a "Execution_Time" ATR_TYPE_LONG l/job_set_wait RW RW RW r ALTRUN
JOB_ATR_grouplst ATTR_g "group_list" ATR_TYPE_ARST arst RW RW RW N? SELEQ
JOB_ATR_hold ATTR_h "Hold_Types" ATR_TYPE_LONG hold/b RW RW RW r ALTRUN | SELEQ
JOB_ATR_interactive ATTR_inter "interactive" ATR_TYPE_LONG l/inter/b R R R - SvRD | Creat | SELEQ |MOM
JOB_ATR_join ATTR_j "Join_Path" ATR_TYPE_STR str RW RW RW N? SELEQ | MOM
JOB_ATR_keep ATTR_k "Keep_Files" ATR_TYPE_STR str RW RW RW N SELEQ | MOM
JOB_ATR_mailpnts ATTR_m "Mail_Points" ATR_TYPE_STR str RW RW RW Y ALTRUN | SELEQ
JOB_ATR_mailuser ATTR_M "Mail_Users" ATR_TYPE_ARST arst RW RW RW Y ALTRUN | SELEQ
JOB_ATR_mtime ATTR_mtime "mtime" ATR_TYPE_LONG l R R R - SSET
JOB_ATR_output ATTR_o "Output_Path" ATR_TYPE_STR str RW RW RW r ALTRUN | SELEQ | MOM
JOB_ATR_priority ATTR_p "Priority" ATR_TYPE_LONG l RW RW RW r ALTRUN
JOB_ATR_qtime "qtime" "qtime"
time entered queue
ATR_TYPE_LONG l R R R - -
JOB_ATR_rerunable ATTR_r "Rerunable" ATR_TYPE_LONG b RW RW RW Y ALTRUN | SELEQ
JOB_ATR_resource ATTR_l "Resource_List" ATR_TYPE_RESC resc RW RW RW Y? ALTRUN | MOM
JOB_ATR_session_id ATTR_session "session_id" ATR_TYPE_LONG l R R R - SvWR
JOB_ATR_shell ATTR_S "Shell_Path_List" ATR_TYPE_ARST arst RW RW RW Y ALTRUN | SELEQ | MOM
JOB_ATR_stagein ATTR_stagein "stagein" ATR_TYPE_ARST arst RW RW RW N? -
JOB_ATR_stageout ATTR_stageout "stageout" ATR_TYPE_ARST arst RW RW RW N? -
JOB_ATR_substate ATTR_substate "substate" ATR_TYPE_LONG l - R R - OPRD | MGRD | SvWR
JOB_ATR_userlst ATTR_u "User_List" ATR_TYPE_ARST arst/uacl RW RW RW N SELEQ
JOB_ATR_variables ATTR_v "Variable_List" ATR_TYPE_ARST arst RW RW RW N SELEQ | MOM
JOB_ATR_euser ATTR_euser "euser" ATR_TYPE_STR str - - R - MOM
JOB_ATR_egroup ATTR_egroup "egroup" ATR_TYPE_STR str - - R - MOM
JOB_ATR_hashname ATTR_hashname "hashname" ATR_TYPE_STR str - - R - MOM
JOB_ATR_hopcount ATTR_hopcount "hop_count" ATR_TYPE_LONG l - - - - SvWR | SvRD
JOB_ATR_queuerank ATTR_qrank "queue_rank" ATR_TYPE_LONG l - - R - -
JOB_ATR_queuetype ATTR_qtype "queue_type"
for Scheduler
ATR_TYPE_CHAR c - - R - SELEQ
JOB_ATR_sched_hint ATTR_sched_hint "sched_hint"
inform sched re sync
ATR_TYPE_LONG l - - RW - ?
JOB_ATR_security ATTR_security "security" ATR_TYPE_STR str - - - - SSET
JOB_ATR_Comment ATTR_comment "comment" ATR_TYPE_STR str R RW RW Y SvWR | ALTRUN
JOB_ATR_Cookie ATTR_cookie "cookie" ATR_TYPE_STR str - - - - SvRD | SvWR | MOM
JOB_ATR_altid ATTR_altid "alt_id" ATR_TYPE_STR str R R R - SvWR
JOB_ATR_altid2 ATTR_altid2 "alt_id2" ATR_TYPE_STR str R R R - SvWR
JOB_ATR_etime ATTR_etime "etime" ATR_TYPE_LONG l R R R - SSET

All have last component "PARENT_TYPE_JOB"

define ATR_DFLAG_SSET (ATR_DFLAG_SvWR | ATR_DFLAG_SvRD)


pbs_alterjob and qalter options:
--------------------------------

ATTR_a "Execution_Time"        y   Alter the jobs execution time.
ATTR_A "Account_Name"          N   Alter the account string.
ATTR_c "Checkpoint"            y   Alter the checkpoint interval.
ATTR_e "Error_Path"            y   Alter the path name for the standard error of the job.
ATTR_g "Group_List"            y   Alter the list of group names under which the job may execute.
ATTR_h "Hold_Types"            y   Alter the hold types.
ATTR_j "Join_Path"             y   Alter if standard errorand standard output are joined (merged).
ATTR_k "Keep_Files"            N   Alter which output of the job is kept on the execution host.
ATTR_l "Resource_List"         ?   Alter the value of a named resource.
ATTR_m "Mail_Points"               Alter the points at which  the  server  will  send mail about the job.
ATTR_M "Mail_Users"                Alter the list of users  who  would  receive  mail about the job.
ATTR_N "Job_Name"                  Alter the job name.
ATTR_o "Output_Path"           y   Alter the path name for the standard output of the job.
ATTR_p "Priority"              y   Alter the priority of the job.
ATTR_r "Rerunable"                 Alter the rerunable flag.
ATTR_S "Shell_Path_List"       y   Alter the path to the shell which will  interprets the job script.
ATTR_u "User_List"             N   Alter the list of user names under which  the  job may execute.
ATTR_v "Variable_List"             Alter the list of  environmental  variables  which are to be exported to the job.
ATTR_depend "depend"               Alter the inter-job dependencies.
ATTR_stagein "stagein"             Alter the list of files to be staged-in before job execution.
ATTR_stageout "stageout"           Alter the list of files to be staged-out after job execution.

y = only applies to rerun

     qalter [-a date_time] [-A account_string] [-c interval]  [-e
     path]  [-h hold_list] [-j join] [-k keep] [-l resource_list]
     [-m mail_options] [-M user_list] [-N  name]  [-o  path]  [-p
     priority]    [-r   c]   [-S   path]   [-u   user_list]   [-W
     additional_attributes] job_identifier...

PBS Resources

Flags
Name String Type Funcs Descripion U O M RUN ATR_DFLAG_
"arch" ATR_TYPE_STR str system architecture type RW RW RW - SOL
"cpupercent" ATR_TYPE_LONG l percentage of cpu used R RW RW - -
"cput" ATR_TYPE_LONG time/l cputime of all procs RW RW RW Y SOL | MOM
"file" ATR_TYPE_SIZE size largest single file size RW RW RW - SOL | MOM
"mem" ATR_TYPE_SIZE size physical memory RW RW RW Y MOM | RASSN
"pmem" ATR_TYPE_SIZE size physical memory per proc RW RW RW Y SOL | MOM | RMOMIG
"ncpus" ATR_TYPE_LONG l number of processors RW RW RW - MOM | RMOMIG | RASSN
"vmem" ATR_TYPE_SIZE size virtual memory RW RW RW Y SOL | MOM | RASSN
"pvmem" ATR_TYPE_SIZE size virtual memory per proc RW RW RW - SOL | MOM | RMOMIG
"nice" ATR_TYPE_LONG l job nice value R RW RW - SOL | MOM
"pcput" ATR_TYPE_LONG time/l cputime per proc RW RW RW - SOL | MOM
"walltime" ATR_TYPE_LONG time/l wall clock time limit RW RW RW Y SOL | MOM
"host" ATR_TYPE_STR str host to execute on RW RW RW - SOL
"nodes" ATR_TYPE_STR nodes/str user specification of nodes RW RW RW Y SOL | RMOMIG
"neednodes" ATR_TYPE_STR str scheduler modified
specification of nodes
- - RW Y MOM | SvWR | RMOMIG
"nodect" ATR_TYPE_LONG l count of number of nodes requested
read-only, set by server whenever
"nodes" is set, for use by sched
R R RW - RASSN | RMOMIG
"mpplabel" ATR_TYPE_STR str PE label required for execution RW RW RW - -
"other" ATR_TYPE_STR str site specific RW RW RW - SOL
"software" ATR_TYPE_STR str software required for execution RW RW RW - SOL
"site" ATR_TYPE_STR str site resource RW RW RW - MOM

MOM - resource sent to MOM if set
RASSN - resource to be summed in resources_used
RMOMIG - resource to be ignored by MOM



Flags
Name String Type Funcs Descripion U O M RUN ATR_DFLAG_
"taskspn" ATR_TYPE_LONG l number of tasks per node
set by admin on queue or system
R RW RW - MOM | RMOMIG
"arch" ATR_TYPE_STR str system architecture type RW RW RW - -
"cpupercent" ATR_TYPE_LONG l percentage of cpu used R RW RW - -
"cput" ATR_TYPE_LONG time/l cputime of all procs RW RW RW Y MOM
"file" ATR_TYPE_SIZE size largest single file size RW RW RW - MOM
"mem" ATR_TYPE_SIZE size physical memory RW RW RW Y MOM | RASSN
"pmem" ATR_TYPE_SIZE size physical memory per proc RW RW RW Y MOM | RMOMIG
"ncpus" ATR_TYPE_LONG l number of processors RW RW RW - MOM | RMOMIG | RASSN
"vmem" ATR_TYPE_SIZE size virtual memory RW RW RW Y MOM | RASSN
"pvmem" ATR_TYPE_SIZE size virtual memory per proc RW RW RW - MOM | RMOMIG
"nice" ATR_TYPE_LONG l job nice value R RW RW - MOM
"pcput" ATR_TYPE_LONG time/l cputime per proc RW RW RW - MOM
"walltime" ATR_TYPE_LONG time/l wall clock time limit RW RW RW Y MOM
"host" ATR_TYPE_STR str host to execute on RW RW RW - -
"nodes" ATR_TYPE_STR nodes/str user specification
of nodes
RW RW RW Y RMOMIG
"neednodes" ATR_TYPE_STR str scheduler modified
specification of nodes
- - RW Y MOM | SvWR | RMOMIG
"nodect" ATR_TYPE_LONG l count of number of nodes requested
read-only, set by server whenever
"nodes" is set, for use by sched
R R RW - RASSN | RMOMIG
"mpplabel" ATR_TYPE_STR str PE label required for execution RW RW RW - -
"other" ATR_TYPE_STR str site specific RW RW RW - -
"software" ATR_TYPE_STR str software required for execution RW RW RW - -
"site" ATR_TYPE_STR str site resource (e.g. globus) RW RW RW - MOM

    {	"pf",				/* max file space for job */
	decode_size,
        encode_size,
        set_size,
        comp_size,
        free_null,
	NULL_FUNC,
        READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
        ATR_TYPE_SIZE
    },
    {	"ppf",				/* max file space per process */
	decode_size,
        encode_size,
        set_size,
        comp_size,
        free_null,
	NULL_FUNC,
        READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
        ATR_TYPE_SIZE
    },
    {	"sds",				/* max SDS for job */
	decode_size,
        encode_size,
        set_size,
        comp_size,
        free_null,
	NULL_FUNC,
        READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
        ATR_TYPE_SIZE
    },
    {	"psds",				/* max SDS per process */
	decode_size,
        encode_size,
        set_size,
        comp_size,
        free_null,
	NULL_FUNC,
        READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
        ATR_TYPE_SIZE
    },
    {	"procs",			/* number of processes per job */
	decode_l,
	encode_l,
	set_l,
	comp_l,
	free_null,
	NULL_FUNC,
	READ_WRITE | ATR_DFLAG_MOM,
	ATR_TYPE_LONG
    },
    {	"mppe",				/* number of mpp nodes */
	decode_l,
	encode_l,
	set_l,
	comp_l,
	free_null,
	NULL_FUNC,
	READ_WRITE | ATR_DFLAG_MOM,
	ATR_TYPE_LONG
    },
    {	"mppt",				/* total mpp time for job */
	decode_time,
	encode_time,
	set_l,
	comp_l,
	free_null,
	NULL_FUNC,
	READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
	ATR_TYPE_LONG
    },
    {	"pmppt",			/* max mpp time for any process */ 
	decode_time,
	encode_time,
	set_l,
	comp_l,
	free_null,
	NULL_FUNC,
	READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
	ATR_TYPE_LONG
    },
    {	"mppmem",			/* max mppmem memory for job */
	decode_size,
        encode_size,
        set_size,
        comp_size,
        free_null,
	NULL_FUNC,
        READ_WRITE | ATR_DFLAG_MOM | ATR_DFLAG_ALTRUN,
        ATR_TYPE_SIZE
    },
/* SRFS */

/*NODEMASK*/

	/* the following are found only on Cray systems */


/* PE mask on Cray T3e (similar to nodemask on SGI O2K *//* PE_MASK */

	/* include any site defined resources */
//#include "site_resc_attr_def.h"

	/* the definition for the "unknown" resource MUST be last */

    {	"|unknown|",
	decode_unkn,
	encode_unkn,
	set_unkn,
	comp_unkn,
	free_unkn,
	NULL_FUNC,
	READ_WRITE,
	ATR_TYPE_LIST
    }
	/* DO NOT ADD DEFINITIONS AFTER "unknown", ONLY BEFORE */
};

int svr_resc_size = sizeof (svr_resc_def) / sizeof (resource_def);


/*
 * decode_nodes - decode a node requirement specification, 
 *	Check if node requirement specification is syntactically ok,
 *	then call decode_str()
 *
 *	val if of the form:	node_spec[+node_spec...]
 *	where node_spec is:	number | properity | number:properity
 */

static int decode_nodes(patr, name, rescn, val)
	struct attribute *patr;
	char *name;             /* attribute name */
	char *rescn;            /* resource name - unused here */
	char *val;              /* attribute value */
{
	char *pc;

	pc = val;
	while (1) {
		while (isspace((int)*pc))
			++pc;

		if ( ! isalnum((int)*pc) )
			return (PBSE_BADATVAL);
		if (isdigit((int)*pc)) {
			while (isdigit((int)*++pc)) ;
			if (*pc == '\0')
				break;
			else if ((*pc != '+') && (*pc != ':') && (*pc != '#'))
				return (PBSE_BADATVAL);
		} else if (isalpha((int)*pc)) {
			while (isalnum((int)*++pc) || *pc == '-' || *pc == '.' || *pc == '=');
			if (*pc  == '\0')
				break;
			else if ((*pc != '+') && (*pc != ':') && (*pc != '#'))
				return (PBSE_BADATVAL);
		}
		++pc;
	}
	return (decode_str(patr, name, rescn, val));
}

/*
 * ctnodes = count nodes, turn node spec (see above) into a
 *	plain number of nodes.
 */

int ctnodes(spec)
	char *spec;
{
	int   ct = 0;
	char *pc;

	while (1) {

		while (isspace((int)*spec))
			++spec;

		if (isdigit((int)*spec))
			ct += atoi(spec);
		else
			++ct;
		if ((pc = strchr(spec, '+')) == (char *)0)
			break;
		spec = pc+1;
	}
	return (ct);
}

/*
 * set_node_ct = set node count
 *
 *	This is the "at_action" routine for the resource "nodes".
 *	When the resource_list attribute changes, then set/update
 *	the value of the resource "nodect" for use by the scheduler.
 */

static int set_node_ct(pnodesp, pattr, actmode)
	resource  *pnodesp;
	attribute *pattr;
	int	   actmode;
{
	resource	*pnct;
	resource_def	*pndef;

	if (actmode == ATR_ACTION_RECOV)
		return (0);

	/* Set "nodect" to count of nodes in "nodes" */

	pndef = find_resc_def(svr_resc_def, "nodect", svr_resc_size);
	if (pndef == (resource_def *)0)
		return (PBSE_SYSTEM);

	if ((pnct = find_resc_entry(pattr, pndef)) == (resource *)0) {
		if ((pnct = add_resource_entry(pattr, pndef)) == 0)
			return (PBSE_SYSTEM);
	}

	pnct->rs_value.at_val.at_long =
				ctnodes(pnodesp->rs_value.at_val.at_str);
	pnct->rs_value.at_flags |= ATR_VFLAG_SET|ATR_VFLAG_MODCACHE;

	/* Set "neednodes" to "nodes", may be altered by Scheduler */

	pndef = find_resc_def(svr_resc_def, "neednodes", svr_resc_size);
	if (pndef == (resource_def *)0)
		return (PBSE_SYSTEM);

	if ((pnct = find_resc_entry(pattr, pndef)) == (resource *)0) {
		if ((pnct = add_resource_entry(pattr, pndef)) == 0)
			return (PBSE_SYSTEM);
	} else {
		pndef->rs_free(&pnct->rs_value);
	}
	pndef->rs_decode(&pnct->rs_value, (char *)0, (char *)0,
			 pnodesp->rs_value.at_val.at_str);
	pnct->rs_value.at_flags |= ATR_VFLAG_SET;
	
	return (0);
}