PyLoadL

Python Bindings for IBM LoadLeveler


 

Contents

Introduction

Example Code

API :

Download

Issues / ToDo

Miscellaneous

Links / Info

Reservation

Reservation API


Synopsis


  rc, errObj = ll_bind( res_id, job_list, bind_op )

  rc, errObj = ll_remove_reservation( res_id_list, res_user_list, res_host_list, res_group_list )

  rc, errObj = ll_make_reservation( start_date, period, res_type, res_data, users_list, groups_list, group_owner )

  rc, errObj = ll_change_reservation( res_IDs, param_dict )


Description

The LoadLeveler Reservation API via PyLoadL has the following functions:

ll_bind

The ll_bind routine enables you to bind job steps to a reservation. The ll_bind routine can also be used to unbind a list of job steps from the reservations to which they are currently bound to, or whichever reservation they have requested to bind to in the event that the bind has not yet occurred.

  rc = ll_bind( res_id, job_list, bind_op )

Parameters

  1. res_id

    String : Reservation id in form host.rid.

  2. job_list

    List : Users to perform control operation on.

  3. bind_op

    Numeric : 1 to unbind and 0 to bind jobs to reservation.

ll_remove_reservation

Function to enable you to cancel one or more reservations.

rc, errObj = ll_remove_reservation( res_id_list, res_user_list, res_host_list, res_group_list )

Parameters

  1. res_id_list

    List : Reservation IDs in format: "host.rid.r".

  2. res_users

    List : Reservation owners.

  3. res_host_list

    List : Machine names.

  4. res_group_list

    List : Loadleveler groups.

ll_make_reservation

Function to enable you to create a reservations.

rc, errObj = ll_make_reservation( start_date, period, res_type, res_data, users_list, groups_list, group_owner )

Parameters

  1. start_date

    String : Start time of reservation in the format of "[mm/dd[/[cc]yy] ]HH:MM".

  2. period

    Numeric : Duration of reservation in minutes.

  3. res_type

    Constant : Indicates how the nodes should be reserved.

  4. res_data

    Specifies options that control characteristics of the reservation. The follow values can be OR'ed together to set this parameter

    1. RESERVATION_SHARED

      Selects the SHARED option for the reservation. For a SHARED reservation, after all bound job steps which can run on the reserved nodes are scheduled to run, the remaining resources can be used to run job steps not bound to the reservation. Only bound job steps can be scheduled to run on a reservation that is not shared.

    2. RESERVATION_REMOVE_ON_IDLE

      Selects the REMOVE_ON_IDLE option for the reservation. For a REMOVE_ON_IDLE reservation, if all bound job steps are finished or if all bound job steps are Idle and none can run on the reserved nodes, the reservation will be removed (canceled) automatically by LoadLeveler. If this option is not set, the reservation will remain, regardless of being used or not.

  5. users_list

    List : Users to use reservation.

  6. groups_list

    List : Loadleveler groups to use reservation.

  7. group_owner

    String : Loadleveler group owner.

  8. ll_change_reservation

    Function to enable you to change the attribute of a reservation.

    rc, errObj = ll_change_reservation( res_IDs, param_dict )
    

    Parameters

    1. res_IDs

      List : Reservation IDs in format: "host.rid.r"

    2. param_dict

      Dictionary : { RES_OP: OP_VALUE, ....}

    Reservation Data TypeHow nodes are reservedData Type
    RESERVATION_BY_NODEBy number of nodesstring
    RESERVATION_BY_HOSTLISTBy specifying a hostlistlist
    RESERVATION_BY_JOBSTEPBy specifying a jobstepstring
    RESERVATION_BY_JCFBy specifying a job command filestring
    RESERVATION_BY_BG_CNODEBy number of Blue Gene c-nodesnumeric
    RESERVATION_BY_HOSTFILEBy specifying a host filestring
    To ModifyRES_OPOP_VALUE
    start_timeRESERVATION_START_TIMEstring
    start_timeRESERVATION_ADD_START_TIMEstring
    durationRESERVATION_DURATIONnumeric
    number_of_nodesRESERVATION_BY_NODEnumeric
    number_of_nodesRESERVATION_ADD_NUM_NODEnumeric
    hostlistRESERVATION_BY_HOSTLISTlist
    hostlistRESERVATION_ADD_HOSTSlist
    hostlistRESERVATION_DEL_HOSTSlist
    jobstepRESERVATION_BY_JOBSTEPstring
    job_command_fileRESERVATION_BY_JCFstring
    userlistRESERVATION_USERLISTlist
    userlistRESERVATION_ADD_USERSlist
    userlistRESERVATION_DEL_USERSlist
    grouplistRESERVATION_GROUPLISTlist
    grouplistRESERVATION_ADD_GROUPSlist
    grouplistRESERVATION_DEL_GROUPSlist
    shared modeRESERVATION_MODE_SHAREDnumeric
    remove on idleRESERVATION_MODE_REMOVE_ON_IDLEnumeric
    ownerRESERVATION_OWNERstring
    groupRESERVATION_GROUPstring
    hostfileRESERVATION_BY_HOSTFILEstring
    number_of_bg_cnodesRESERVATION_BY_BG_CNODEnumeric