Workload Management API functions via PyLoadL
# # Workload Management API # (rc, errObj) = ll_cluster( host_list, CLUSTER_SET | CLUSTER_UNSET ) (rc, errObj) = ll_cluster_auth() rc = ll_control( control_op, host_list, user_list, job_list, class_list, priority ) rc = llctl(LL_CONTROL_RECYCLE | LL_CONTROL_RECONFIG | LL_CONTROL_START | LL_CONTROL_STOP | LL_CONTROL_DRAIN | LL_CONTROL_DRAIN_STARTD | LL_CONTROL_DRAIN_SCHEDD | LL_CONTROL_PURGE_SCHEDD | LL_CONTROL_FLUSH | LL_CONTROL_SUSPEND | LL_CONTROL_RESUME | LL_CONTROL_RESUME_STARTD | LL_CONTROL_RESUME_SCHEDD | LL_CONTROL_FAVOR_JOB | LL_CONTROL_UNFAVOR_JOB | LL_CONTROL_FAVOR_USER | LL_CONTROL_UNFAVOR_USER | LL_CONTROL_HOLD_USER | LL_CONTROL_HOLD_SYSTEM | LL_CONTROL_HOLD_RELEASE | LL_CONTROL_PRIO_ABS | LL_CONTROL_PRIO_ADJ | LL_CONTROL_START_DRAINED, host_list, class_list ) rc = llfavorjob( LL_CONTROL_FAVOR_JOB | LL_CONTROL_UNFAVOR_JOB, job_list ) rc = llfavoruser( LL_CONTROL_FAVOR_USER | LL_CONTROL_UNFAVOR_USER, user_list ) rc = llhold( LL_CONTROL_HOLD_USER | LL_CONTROL_HOLD_SYSTEM | LL_CONTROL_HOLD_RELEASE, host_list, user_list, job_list ) (rc, errObj) = ll_modify( EXECUTION_FACTOR | CONSUMABLE_CPUS | CONSUMABLE_MEMORY | WCLIMIT_ADD_MIN | JOB_CLASS | ACCOUNT_NO | STEP_PREEMPTABLE | SYSPRIO | BG_SIZE | BG_SHAPE | BG_CONNECTION | BG_PARTITION | BG_ROTATE, value, job_step ) (rc, errObj) = ll_move_job( cluster_name, job_id ) rc = llprio( LL_CONTROL_PRIO_ABS | LL_CONTROL_PRIO_ADJ, job_list, priority ) (rc, errObj) = ll_preempt( job_step_id, PREEMPT_STEP | RESUME_STEP | SYSTEM_PREEMPT_STEP ) (rc, errObj) = ll_preempt_jobs( user_list, host_list, job_list, PREEMPT_STEP | RESUME_STEP, LL_PREEMPT_SUSPEND | LL_PREEMPT_VACATE | LL_PREEMPT_REMOVE LL_PREEMPT_SYS_HOLD | LL_PREEMPT_USER_HOLD ) (rc, errObj) = ll_run_scheduler() rc = ll_start_job_ext( cluster, proc, from_host, node_list ) rc = ll_terminate_job( cluster, proc, from_host, msg )
The LoadLeveler Workload Management API via PyLoadL has the following functions:
Function to set following function calls on a selected cluster or unselect a previous selected cluster.
(rc, errObj) = ll_cluster( cluster_list, cluster_op )
Parameters
List : Currently restricted to a list of one.
Numeric : CLUSTER_SET - select cluster, CLUSTER_UNSET - unselect cluster.
Function to generate SSL keys, necessary for secure multicluster communications.
(rc, errObj) = ll_cluster_auth()
Function to perfrom control operations against hosts, jobs, users or job classes.
rc = ll_control( control_op, host_list, user_list, job_list, class_list, priority )
Parameters
List : Host machines to perforn control operation on.
List : Users to perform control operation on.
List : Job step IDs to perfrom control operation on.
List : Users to perform control operation on.
Numeric : Value to be assigned fro control operation.
Function to favor and unfavor given users, this is really just a wrapper function of ll_control.
rc = llfavoruser( LL_CONTROL_FAVOR_USER | LL_CONTROL_UNFAVOR_USER, user_list )
Parameters
Favor the users in user_list.
Unfavor the users in user_list.
List : Users to perform hold operation on.
Function to hold and release given job steps or users, this is really just a wrapper function of ll_control.
rc = llhold( LL_CONTROL_HOLD_USER | LL_CONTROL_HOLD_SYSTEM | LL_CONTROL_HOLD_RELEASE, host_list, user_list, job_list )
Parameters
Place on user hold.
Place on system hold, you need to be a LoadLeveler administer to perfrom this operation.
Release from hold, you need to be a LoadLeveler adminster to perfrom this against system held jobs.
List : Host machines.
List : Users to perform hold operation on.
List : Job step IDs to perfrom hold operation on.
Function to adjust the priorities of job steps, this is really just a wrapper function of ll_control.
rc = llprio( LL_CONTROL_PRIO_ABS | LL_CONTROL_PRIO_ADJ, job_list, priority )
Parameters
New absolute priority value.
New adjusted priority value.
List : Job step IDs.
Numeric : Priority value to assign to the list of job steps.
Function to preempt a running job step or to resume a job_step that has already been preempted through the LoadLeveler llpreempt command or via ll_preempt. ll_preempt cannot resume a job step preempted through PREEMPT_CLASS (system-initiated).
(rc, errObj) = ll_preempt( job_step, preempt_op )
Parameters
String : The Job Step ID.
Constant : Preemption operation, which can be the following -
Preempts the job step.
Resumes the job step.
Function to preempt a set of running job steps using the specified preempt method, or to resume job steps that have already been preempted with the preempt method of suspend through the llpreempt command or the ll_preempt_jobs routine. The ll_preempt_jobs routine cannot resume a job step that was preempted through the PREEMPT_CLASS rules, or a job step that was preempted with a preempt method other than suspend.
(rc, errObj) = ll_preempt_jobs( user_list, host_list, job_list, preempt_op, preempt_method )
Parameters
List : Users to be targeted.
List : Hosts to be targeted.
List : Jobsteps in the form host.job_id.step_id i.e shivling.5.0
Preempts the job step.
Resumes the job step.
Preempts the job step.
Resumes the job step.
Resumes the job step.
Resumes the job step.
Resumes the job step.
Function to instruct the LoadLeveler negotiator to start a job on the specified nodes and adapters. This is meant for use by people writing external schedulers.
rc = ll_start_job_ext( step_id, node_list, adapter_list )
Parameters
String : The Job Step ID.
List : Node names where the job will be started. The first member of the list is the parallel master node.
List of Lists : Adapter information for each node. The members of the list are :
Device name of adapter to be used such as css0
Communication protocol this usage supports. Valid values are MPI, LAPI, and MPI_LAPI.
Communication subsystem this usage supports. Valid values are IP or US.
For US subsystem usages, this indicates which adapter window ID to use. For IP subsystem usages, this field is ignored.
For US subsystem usages, this is the amount of adapter memory to dedicate to the adapter usage. For IP subsystem usages, this field is ignored.
Each element in the adapter_list represents one communication channel for a task If the subsystem is US (User Space), a communication channel will require a switch adapter window. Adapter windows, and User Space usages, must be specified on actual switch adapters that are only accessible if AGGREGATE_ADAPTERS=False is specified in the configuration file.The name of the schedd host.
Function to instruct the LoadLeveler negotiator to cancel the specified job_step.
rc = ll_terminate_job( cluster, proc, from_ host, msg )
Parameters
String : The Job ID.
String : The job step to be cancelled.
String : Name of the schedd host.
String : The message via ll_get_data as to why the job was cancelled.
Function to modify the attributes of the submitted job step. This interface only supports one Job step, the API also only allows one job step at present but it is designed for expansion, therfore this interface may change in the future.
(rc, errObj) = ll_modify( modify_op, value, job_step )
Parameters
Constant : The modify operation to perform.
New execution factor, modify_data input is a numeric.
New consumable cpus value, modify_data input is a numeric
New consumable memory in megabytes, modify_data input is a numeric.
Additional minutes to add to hard wallclock limit, modify_data input is a numeric.
New job class, modify_data input is a string.
Changes the account number to the specified value for an idle-like job step.
Specifies whether a job is preemptable or nonpreemptable.
Changes the q_sysprio for a job step to the specified integer value. The new job step priority will be fixed. This is a LoadLeveler administrator only option.
Changes the size of an idle-like Blue Gene job. The subsequent value argument must be an integer in units of compute nodes. If this value is specified, any value previously specified for bg_shape or bg_partition will be ignored.
Changes the shape of an idle-like Blue Gene job. The subsequent value argument must be of the form "XxYxZ", where X, Y, and Z are integers in units of the number of base partitions. If this value is specified, any value previously specified for bg_size or bg_partition will be ignored.
Changes the connection option of an idle-like Blue Gene job. The subsequent value argument must be a string that is either TORUS, MESH, or PREFER_TORUS.
Changes the requested partition ID of an idle-like Blue Gene job. If this value is specified, any value specified for bg_connection, bg_shape, bg_size, or bg_rotate will be ignored.
Changes the rotate option of an idle-like Blue Gene job. The subsequent value argument must be a string that is either True or False.
The new data value for modify_op.
String : The job ID.
This is used when the internal scheduling interval has been disabled so that an external program can control when the central manager attempts to schedule job steps. The ll_run_scheduler subroutine sends a request to the central manager to run the scheduling algorithm.
(rc, errObj) = ll_run_scheduler()
the LoadLeveler page the DataAccess page the Error Handling page
IBM LoadLeveler for AIX 5L: Using and Administering