Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Page Properties


Target release1.0
Epic

Jira Legacy
serverJIRA (pbspro.atlassian.net)
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-624

Document status
Status
titleDRAFT
Document owner
Designer

Ram Pranesh

Suresh Thelkar (Deactivated)

Arun Grover (Deactivated)

Vinod (Deactivated)

Developers

Ram Pranesh

Suresh Thelkar (Deactivated)

Arun Grover (Deactivated)

Vinod (Deactivated)

QA<TBD>Varun Sonkar (Deactivated)



Goals

Implementation of DRMAAv2 Specification

Background and strategic fit

The Distributed Resource Management Application API Version 2 (DRMAA) specification defines an interface for tightly coupled, but still portable access to the majority of DRM systems. PBS is a Distributed Resource Management system(DRMS).  Standardized access to PBS product through a DRMAAv2 implementation(API). High-level API designers, meta-scheduler architects and end users can rely on DRMAAv2 implementations for a unified access to execution resources.

DRMAAv2 Specification (Distributed Resource Management Application API 2)

Overview

As we all know open Open standards are taking major role in the exponential growth in many areas. DRMAA2 is such an open standard. It is the successor of the wide-spread DRMAA standard. DRMAA is generally used for submitting jobs (or creating job work-flows) into a compute cluster by using a cluster resource management system like PBS Professional. Unlike DRMAA, with DRMAA2 you can not only submit jobs, you can also get cluster related information, like getting host names, types and status information or insight about queues configured in the resource management system. You can also monitor jobs not submitted within the application. Overall it covers many more use cases than the old DRMAA standard. 

...

https://www.ogf.org/documents/GFD.231.pdf

Assumptions

Color coding in Diagram

Image Added

Requirements

The implementation of DRMAA2 specification for PBS Pro is broadly divided into the following requirements/user stories.

#User StoryImportanceNotes
1

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-628


2

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-634



3

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-631



4

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-630



5

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-629



6

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-632



7

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-633



8

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-643



9

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-626



10

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-644



11

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-636



12

Jira Legacy
serverJIRA (pbspro.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId32008a99-7831-3ff8-9638-3db0cd01164d
keyPP-673



Architecture and design

Application stack



DRMAA2 Layout


PDF
nameDRMAAv2_Layout.pdf

Note : Document is part of https://troeger.eu/files/talks/ogf35.pdf

Domain model diagram

...

Image Added



ConnectionPool is a set of active connection connections with PBSPro. In multi-threaded application each thread uses one connection. ConnectionPool Is Member of DRMSystem

...

Job State model Defined in DRMAAv2 Specification

PDF
nameDRMAA2Overviewstatemodel.pdf

Note : Document is part of https://www.ogf.org/documents/GFD.231.pdf

DRMAA2 spec relies on concept of session to support the persistency of job and reservation information in multiple runs of short lived applications.

...

Refer DRMAAv2 document for description of Objects

Few important Sequence diagram

  Image Removed Image Added

...

Image Added

...

Image Added



Source Directory structure in github


├── ...

├──
pbsproPBSPro
│   ├── src│DRMAAv2    ├── ├── lib│         ├── ├── ├── Libdrmaa2              # DRMAAv2 module Top level directory 
|   ├──   ├──  -- configure.ac           DRMAAv2 module Top level directory # This file dictates the ├──behavior ├──of ├──the ├──final libdrmaa2configure script that is generated by Autoconf.
|   ├──   ├──  -- INSTALL                     # Instructions for successful compilation of this 
|   ├──   ├──  All the function prototypes and definitions included in this API. Autoconf and libtool specification to create library.│-- autogen.sh                  # This file provides automatic build system preparation and is useful for projects that use the GNU autotools.  
| ├── ├── ├── ├── ├── -- drmaa2.cppAUTHORS # Altair authors information API definitions
|   ├── ├── ├── ├──  ├── -- drmaa2.hChangeLog                   # Delta         API and declaration
change information
|   ├── ├── ├── ├── src -- COPYING                     # Altair Copyright information  
|   ├──   ├──  --    NEWS  Core infrastructure source files    ├── ├── ├── ├── inc            # Latest news and updates 
|   ├──   ├──  -- README                Core infrastructure internal include files  # README
|   ├── ├── ├── ├── unittesting -- README.md                   # README

| ├── ├── api           White-box    testing          ├──# ├──This ├──directory ├──contains all ├──the srcfunction prototypes and definitions included in this API.
   ├──   ├──   ├── c-binding                 # C style API Sourcedefinitions for unit-testingexternal  use

│ ├── ├── ├── ├── ├── inc ├── -- drmaa2.cpp # API definitions
   ├──   ├──   ├──   ├── -- drmaa2.h         Internal# includeAPI files for unit-testingand declaration
│   ├── m4  ├──   ├── cpp-binding               # CPP style class definitions for external use

├──
├── ├── -- drmaa2.hpp # Class GNU m4 macros required for DRMAAv2level declaration
|   ├── doc  ├──   src                           # Core infrastructure source files           
|   ├──   ├──   inc                           # Core infrastructure internal include files
|   ├──   ├──   m4 Doxygen and  man    pages                --  Doxygen.in  # GNU m4 macros required for DRMAAv2
|   ├──   ├──   docs                          # Documentation files 
|   ├──   ├──   ├──   man         Doxygen configure file    -- configure.ac     # Man pages
| ├── ├── ├── -- Doxygen.in           # Doxygen configure file
|   ├──   ├──   test                  Existing configure.ac is updated with DRMAAv2 configs 
 

Directory structure in target

├── ...
├── $(PBS_EXEC)│ # Testing
|   ├──  lib ├──  ├── ├── libdrmaav2.so unittesting              # White-box testing(using CppUnit).
|   ├──   ├──   ├──  benchmarks           │   ├── include    # Placeholder for Load and stress tests
 

Directory structure in target

├── ...

├──
$(DRMAAV2_LIB)
│   ├── ├── drmaav2.hlibdrmaav2.so                                        
├── $(DRMAAV2_INCLUDE)
├──

Dependent packages

PBSPro - libdrmaav2.so needs libpbs.so library for IFL calls

c-binding     
│   ├──   ├── drmaa2.h  
│   ├── cpp-binding     
│   ├──   ├── drmaav2.hpp  
                                    

Dependent packages

PBSPro - libdrmaav2.so needs libpbs.so library for IFL calls

cppunit - for unittesting

doxygen - for generating docs


Compiling DRMAA2 applications for PBS Pro

It is assumed that libdrmaa2.so or libdrmaa2.a is installed as follows prior to compiling a DRMAA2 application.

rpm --install <rpm for libdrmaav2 for PBS Pro>libdrmaav2>

Example: rpm --install libdrmaav2_pbspro-1.0-17.x86_64.rpm

By default this will install the library to /usr/lib/libdrmaa2.*(so or a) and the headers are installed at /usr/include/drmaa2.

Now DRMAA2 application can be compiled as follows.

...

We also need to set the following before starting the application if in case we are using shared library.

export LD_LIBRARY_PATH=/usr/lib/libdrmaa2.so ./<drmaa2_app>

APIs defined in DRMAAv2 specification

drmaa2_error drmaa2_close_jsession (drmaa2_jsession js_) drmaa2_close_jsession - closes the drmaa2_job session pointed by js Parameters: js_ - pointer to drmaa2_job session which needs to be closed Side-Effects: none Returns: drmaa2_error - returns DRMAA2_SUCCESS if successful returns DRMAA2_INVALID_SESSION if session is invalid drmaa2_error drmaa2_close_msession (drmaa2_msession ms_) Dis-associates monitoring session from DRMS. Should be callable only once else it should return DRMAA2_INVALID_SESSION error. Parameters: ms_ - pointer to drmaa2 monitoring session created earlier. Side-Effects: none Returns: NULL and also sets sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if fails DRMAA2_SUCCESS if succeeds drmaa2_error drmaa2_close_rsession (drmaa2_rsession rs_) Disassociates reservation session from DRMS. Should be callable only once else it should return DRMAA2_INVALID_SESSION error. Parameters: rs_ - pointer to drmaa2 reservation session created earlier. Side-Effects: none Returns: NULL and also sets sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if fails DRMAA2_SUCCESS if succeeds drmaa2_jsession drmaa2_create_jsession (const char * session_name_, const char * contact_) Creates a drmaa2 job session for a given name and contact. Parameters: session_name_ - Name of the session . contact_ - DRMS name. Side-Effects: none Returns: drmaa2_jsession if succeeds NULL if fails and sets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT error. drmaa2_rsession drmaa2_create_rsession (const char * session_name_, const char * contact_) Creates a drmaa2 reservation session for a given name and contact. Parameters: session_name_ - Name of the session. contact_ - DRMS name. Side-Effects: none Returns: drmaa2_jsession if succeeds NULL if fails and sets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT error. drmaa2_string drmaa2_describe_attribute (const void * instance, const char * name) drmaa2_error drmaa2_destroy_jsession (const char * session_name_) drmaa2_destroy_jsession - destroys the drmaa2_job session pointed by js Parameters: session_name_ - pointer to drmaa2_job session which needs to be closed Side-Effects: none Returns: drmaa2_error - returns DRMAA2_SUCCESS if successful returns DRMAA2_INVALID_ARGUMENT if session name is invalid drmaa2_error drmaa2_destroy_rsession (const char * session_name_) Reaps the persisted or cached state information for the given session name. Parameters: session_name_ - Name of the session. Side-Effects: none Returns: NULL and also sets sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if fails DRMAA2_SUCCESS if succeeds drmaa2_dict drmaa2_dict_create (const drmaa2_dict_entryfree callback) This function creates a drmaa dictionary. Parameters: callback - Call back function to call when free is called. Side-Effects: none Returns: drmaa2_dict drmaa2_error drmaa2_dict_del (drmaa2_dict d, const char * key) This function deletes the entry with specified key from the dictionary. Parameters: d - Pointer to drmaa dict key - pointer to key string Side-Effects: none Returns: drmaa2_error Return values: DRMAA2_INVALID_ARGUMENT void drmaa2_dict_free (drmaa2_dict * dRef) This function frees a drmaa dict. Parameters:
Code Block
languagecpp
themeEclipse
titleAPI
linenumberstrue
collapsetrue
Code Block
languagecpp
themeEclipse
titleDRMAA2 app
linenumberstrue
#include <drmaa2/c-binding/drmaa2.h>
 
...
...
void main() {
...
...
}


Now DRMAA2 application can be compiled and run as follows.

gcc  <drmaa2_app>.c -ldrmaa2 -o <drmaa2_app>

./<drmaa2_app>


IFL call mapping with C-Style and CPP-style binding

C-Style Binding 
CPP-Style BindingIFL calls
void 
drmaa2_jsession_free(drmaa2_jsession * js)
delete jobSession;
N/A
void 
drmaa2_rsession_free(drmaa2_rsession * rs)
delete reservationSession;
N/A
void 
drmaa2_j_free(drmaa2_j * j)
delete job;
N/A
void 
drmaa2_jarray_free(drmaa2_jarray * ja)
delete jobArray;
N/A
void 
drmaa2_r_free(drmaa2_r * r)
delete reservation;
N/A
drmaa2_string 
drmaa2_rsession_get_contact(const drmaa2_rsession rs);
reservationSession.getContact()
N/A
drmaa2_string 
drmaa2_rsession_get_session_name(const drmaa2_rsession rs);
reservationSession.getSessionName()
N/A
drmaa2_r 
drmaa2_rsession_get_reservation
(const drmaa2_rsession rs,
const drmaa2_string reservationId);
reservationSession.getReservation()
pbs_statresv
drmaa2_r 
drmaa2_rsession_request_reservation
(const drmaa2_rsession rs,
const drmaa2_rtemplate rt);
reservationSession.requestReservation()
pbs_submit_resv
drmaa2_r_list 
drmaa2_rsession_get_reservations
(const drmaa2_rsession rs);
reservationSession.getReservations()
pbs_statresv
drmaa2_string 
drmaa2_r_get_id (const drmaa2_r r);
reservation.getId()
N/A
drmaa2_string 
drmaa2_r_get_session_name (const drmaa2_r r);
reservation.getId()
N/A
drmaa2_rtemplate 
drmaa2_r_get_reservation_template(const drmaa2_r r);
reservation.getReservationTemplate()
N/A
drmaa2_rinfo 
drmaa2_r_get_info(const drmaa2_r r);
reservation.getReservationInfo()
pbs_statresv
drmaa2_error 
drmaa2_r_terminate(drmaa2_r r);
reservation.terminate()
pbs_delresv
drmaa2_string 
drmaa2_jarray_get_id(const drmaa2_jarray ja);
jobArray.getId()
N/A
drmaa2_j_list 
drmaa2_jarray_get_jobs(const drmaa2_jarray ja);
jobArray.getJobs()
pbs_selectjob
drmaa2_string 
drmaa2_jarray_get_session_name(const drmaa2_jarray ja);
jobArray.getSessionName()
N/A
drmaa2_jtemplate 
drmaa2_jarray_get_job_template(const drmaa2_jarray ja);
jobArray.getJobTemplete()
N/A
drmaa2_error 
drmaa2_jarray_suspend(drmaa2_jarray ja);
jobArray.suspend()
pbs_sigjob
drmaa2_error 
drmaa2_jarray_resume(drmaa2_jarray ja);
jobArray.resume()
pbs_sigjob
drmaa2_error 
drmaa2_jarray_hold(drmaa2_jarray ja);
jobArray.hold()
pbs_holdjob
drmaa2_error 
drmaa2_jarray_release(drmaa2_jarray ja);
jobArray.release()
pbs_rlsjob
drmaa2_error 
drmaa2_jarray_terminate(drmaa2_jarray ja);
jobArray.terminate()
pbs_deljob
drmaa2_string 
drmaa2_jsession_get_contact(const drmaa2_jsession js);
jobSession.getContact()
N/A
drmaa2_string 
drmaa2_jsession_get_session_name(const drmaa2_jsession js);
jobSession.getSessionName()
N/A
drmaa2_string_list 
drmaa2_jsession_get_job_categories(const drmaa2_jsession js);
jobSession.getJobCategeries()
N/A
drmaa2_j_list 
drmaa2_jsession_get_jobs
(const drmaa2_jsession js,
const drmaa2_jinfo filter);
jobSession.getJobs()
pbs_selectjob
drmaa2_jarray 
drmaa2_jsession_get_job_array
(const drmaa2_jsession js,
const drmaa2_string jobarrayId);
jobSession.getJobArray()
pbs_selectjob
drmaa2_j 
drmaa2_jsession_run_job
(const drmaa2_jsession js,
const drmaa2_jtemplate jt);
jobSession.runJob()
pbs_runjob
, pbs_asyrunjob
drmaa2_jarray
drmaa2_jsession_run_bulk_jobs
 (const drmaa2_jsession js,
const drmaa2_jtemplate jt,
unsigned long begin_index,
unsigned long end_index,
unsigned long step,
unsigned long max_parallel);
jobSession.runBulkJobs()
pbs_runjob
, pbs_asyrunjob
drmaa2_j 
drmaa2_jsession_wait_any_started
(const drmaa2_jsession js,
const drmaa2_j_list l,
const time_t timeout);
jobSession.waitAnyStarted()
pbs_selectjob
drmaa2_j 
drmaa2_jsession_wait_any_terminated
(const drmaa2_jsession js,
const drmaa2_j_list l,
const time_t timeout);
jobSession.waitAnyTerminated()
pbs_selectjob
drmaa2_string 
drmaa2_j_get_id(const drmaa2_j j);
job.getId()
N/A
drmaa2_string 
drmaa2_j_get_session_name(const drmaa2_j j);
job.getSessionName
N/A
drmaa2_jtemplate 
drmaa2_j_get_jt(const drmaa2_j j);
job.getJobTemplete()
N/A
drmaa2_error 
drmaa2_j_suspend(drmaa2_j j);
job.suspend()
pbs_sigjob
drmaa2_error 
drmaa2_j_resume(drmaa2_j j);
job.resume()
pbs_sigjob
drmaa2_error 
drmaa2_j_hold (drmaa2_j j);
job.hold()
pbs_holdjob
drmaa2_error
 drmaa2_j_release(drmaa2_j j);
job.resume()
pbs_rlsjob
drmaa2_error 
drmaa2_j_terminate(drmaa2_j j);
job.terminate()
pbs_deljob
drmaa2_jstate 
drmaa2_j_get_state
(const drmaa2_j j,
 drmaa2_string * substate);
job.getState()
N/A
drmaa2_jinfo 
drmaa2_j_get_info(const drmaa2_j j);
job.getInfo()
N/A
drmaa2_error
drmaa2_j_wait_started
(const drmaa2_j j,
 const time_t timeout);
job.waitStarted()
pbs_selectjob
drmaa2_error 
drmaa2_j_wait_terminated
(const drmaa2_j j,
  const time_t timeout);
job.waitTerminated()
pbs_selectjob
drmaa2_r_list 
drmaa2_msession_get_all_reservations
(const drmaa2_msession ms);
monitoringSession.getAllReservations()
pbs_statresv
drmaa2_j_list 
drmaa2_msession_get_all_jobs
(const drmaa2_msession ms,
const drmaa2_jinfo filter);
monitoringSession.getAllJobs()
pbs_selectjob
drmaa2_queueinfo_list 
drmaa2_msession_get_all_queues
(const drmaa2_msession ms,
const drmaa2_string_list names);
monitoringSession.getAllQueues()
pbs_statque
drmaa2_machineinfo_list 
drmaa2_msession_get_all_machines
(const drmaa2_msession ms,
const drmaa2_string_list names);


monitoringSession.getAllMachines()
pbs_statnode
, pbs_stathost
,pbs_statvnode


drmaa2_string 
drmaa2_get_drms_name()
sessionManager.getDrmsName()
N/A
drmaa2_version 
drmaa2_get_drms_version()
sessionManager.getDrmsVersion()
N/A
drmaa2_string 
drmaa2_get_drmaa_name()
sessionManager.getDrmaaName()
N/A
drmaa2_version 
drmaa2_get_drmaa_version()
sessionManager.getDrmaaName()
N/A
drmaa2_bool
 drmaa2_supports()
sessionManager.supports()
N/A
drmaa2_jsession 
drmaa2_create_jsession (const char * session_name, const char * contact);
sessionManager.createJobSession()
N/A
drmaa2_rsession
 drmaa2_create_rsession(const char * session_name, const char * contact);
sessionManager.createReservationSession()
N/A
drmaa2_jsession
 drmaa2_open_jsession (const char * session_name);
sessionManager.openJobSession()
N/A
drmaa2_rsession 
drmaa2_open_rsession (const char * session_name);
sessionManager.openReservationSession()
N/A
drmaa2_msession 
drmaa2_open_msession (const char * session_name);
sessionManager.openMonitoringSession
N/A
drmaa2_error 
drmaa2_close_jsession (drmaa2_jsession js);
sessionManager.closeJobSession()
N/A
drmaa2_error 
drmaa2_close_rsession  (drmaa2_rsession rs);
sessionManager.closeReservationSession()
N/A
drmaa2_error 
drmaa2_close_msession (drmaa2_msession ms);
sessionManager.closeMonitoringSession()
N/A
drmaa2_error 
drmaa2_destroy_jsession (const char * session_name);
sessionManager.destroyJobSession()
N/A
drmaa2_error 
drmaa2_destroy_rsession (const char * session_name);
sessionManager.closeReservationSession()
N/A
drmaa2_string_list 
drmaa2_get_jsession_names()
sessionManager.getJobSessionNames()
N/A
drmaa2_string_list 
drmaa2_get_rsession_names ()
sessionManager.getReservationSessionNames()
N/A
drmaa2_error 
drmaa2_register_event_notification (const drmaa2_callback callback);
sessionManager.registerEventNotification()
N/A


CPP-Style binding

Code Block
languagecpp
themeEclipse
titleCPP-style class defination
collapsetrue
  
namespace drmaa2 {

typedef long TimeAmount;
typedef time_t AbsoluteTime;

enum DrmaaCapability {
    ADVANCE_RESERVATION,
    RESERVE_SLOTS,
    CALLBACK,
    BULK_JOBS_MAXPARALLEL,
    JT_EMAIL,
    JT_STAGING,
    JT_DEADLINE,
    JT_MAXSLOTS,
    JT_ACCOUNTINGID,
    RT_STARTNOW,
    RT_DURATION,
    RT_MACHINEOS,
    T_MACHINEARCH
};

enum JobState {
    UNDETERMINED,
    QUEUED,
    QUEUED_HELD,
    RUNNING,
    SUSPENDED,
    REQUEUED,
    REQUEUED_HELD,
    DONE,
    FAILED
};
enum OperatingSystem {
    AIX = 0,
    BSD = 1,
    LINUX = 2,
    HPUX = 3,
    IRIX = 4,
    MACOS = 5,
    SUNOS = 6,
    TRUE64 = 7,
    UNIXWARE = 8,
    WI = 9,
    WINNT = 10,
    OTHER_OS = 11
};

enum CpuArchitecture {
    ALPHA = 0,
    ARM = 1,
    CELL = 2,
    PARISC = 3,
    X86 = 4,
    X64 = 5,
    IA64 = 6,
    MIPS = 7,
    PPC = 8,
    PPC64 = 9,
    SPARC = 10,
    SPARC64 = 11,
    OTHER_CPU = 12
};
template<class T>
typedef map<string, T> Dictionary;

typedef list<string> StringList;
typedef list<string> OrderedStringList;
enum DrmaaEvent {
    NEW_STATE, MIGRATED, ATTRIBUTE_CHANGE
};

class DrmaaCallback {
    void notify(DrmaaNotification notification) = 0;
};
struct DrmaaNotification {
    DrmaaEvent event;
    string jobId;
    string sessionName;
    JobState jobState;
};
struct Version {
    string major;
    string minor;
};
struct ReservationTemplate {
    string reservationName;
    time_t startTime;
    time_t endTime;
    time_t duration;
    long minSlots;
    long maxSlots;
    set<string> usersACL;
    vector<string> candidateMachines;
    long minPhysMemory;
    OperatingSystem machineOS;
    CpuArchitecture machineArch;
};
struct QueueInfo {
    string name;
};
typedef list<QueueInfo> QueueInfoList;

struct JobInfo {
    string jobId;
    long exitStatus;
    string terminatingSignal;
    string annotation;
    JobState jobState;
    string jobSubState;
    vector<string> allocatedMachines;
    string submissionMachine;
    string jobOwner;
    long slots;
    string queueName;
    time_t wallclockTime;
    long cpuTime;
    time_t submissionTime;
    time_t dispatchTime;
    time_t finishTime;
};
typedef list<JobInfo> JobInfoList;

struct SlotInfo {
    string machineName;
    string slots;
};
typedef list<SlotInfo> SlotInfoList;

struct ReservationInfo {
    string reservationId;
    string reservationName;
    time_t reservedStartTime;
    time_t reservedEndTime;
    set<string> usersACL;
    long reservedSlots;
    SlotInfoList reservedMachines;
};
typedef list<ReservationInfo> ReservationInfoList;

struct JobTemplate {
    string remoteCommand;
    vector<string> args;
    bool submitAsHold;
    bool rerunnable;
    Dictionary<string> jobEnvironment;
    string workingDirectory;
    string jobCategory;
    set<string> email;
    bool emailOnStarted;
    bool emailOnTerminated;
    string jobName;
    string inputPath;
    string outputPath;
    string errorPath;
    bool joinFiles;
    string reservationId;
    string queueName;
    long minSlots;
    long maxSlots;
    long priority;
    vector<string> candidateMachines;
    long minPhysMemory;
    OperatingSystem machineOS;
    CpuArchitecture machineArch;
    time_t startTime;
    time_t deadlineTime;
    Dictionary<string> stageInFiles;
    Dictionary<string> stageOutFiles;
    Dictionary<string> resourceLimits;
    string accountingId;
};

struct MachineInfo {
    string name;
    bool available;
    long sockets;
    long coresPerSocket;
    long threadsPerCore;
    double load;
    long physMemory;
    long virtMemory;
    OperatingSystem machineOS;
    Version machineOSVersion;
    CpuArchitecture machineArch;
};
typedef list<MachineInfo> MachineInfoList;

class Drmaa2Exception;
class DeniedByDrmsException;
class DrmCommunicationException;
class TryLaterException;
class TimeoutException;
class InternalException;
class InvalidArgumentException;
class InvalidSessionException;
class InvalidStateException;
class OutOfResourceException;
class UnsupportedAttributeException;
class UnsupportedOperationException;
class ImplementationSpecificException;

class DrmaaReflective {
    /**
     * TODO : How to support reflective in C++?
     * Java provides reflection
     */
    StringList jobTemplateImplSpec;
    StringList jobInfoImplSpec;
    StringList reservationTemplateImplSpec;
    StringList reservationInfoImplSpec;
    StringList queueInfoImplSpec;
    StringList machineInfoImplSpec;
    StringList notificationImplSpec;
    string getInstanceValue(void *instance, string name);
    void setInstanceValue(void *instance, string name, string value);
    string describeAttribute(void *instance, string name);
};

class JobArray {
public:
    virtual ~JobArray(void);
    virtual string& getJobArrayId(void) const = 0;
    virtual JobList& getJobs(void) const = 0;
    virtual JobSession& getSession(void) const = 0;
    virtual JobTemplate& getJobTemplate(void) const = 0;

    virtual void suspend(void) = 0;
    virtual void resume(void) = 0;
    virtual void hold(void) = 0;
    virtual void release(void) = 0;
    virtual void terminate(void) = 0;
};

class Job {
public:
    virtual ~Job(void);
    virtual const string& getJobId(void) const = 0;
    virtual const JobInfo& getJobInfo(void) const = 0;
    virtual const JobState& getState(string& subState) const = 0;
    virtual const JobTemplate& getJobTemplate(void) const = 0;
    virtual void suspend(void) = 0;
    virtual void resume(void) = 0;
    virtual void hold(void) = 0;
    virtual void release(void) = 0;
    virtual void terminate(void) = 0;
    virtual void waitStarted(TimeAmount& timeout_) = 0;
    virtual void waitTerminated(TimeAmount& timeout_) = 0;
};
typedef list<Job> JobList;

class Reservation {
public:
    virtual ~Reservation(void);
    virtual const string& getReservationId(void) const = 0;
    virtual const ReservationSession& getSession(void) const = 0;
    virtual const ReservationTemplate& getReservationTemplate(void) const = 0;
    virtual const ReservationInfo& getInfo(void) const = 0;
    virtual void terminate(void) = 0;
};
typedef list<Reservation> ReservationList;

class ReservationSession {
public:
    virtual ~ReservationSession(void);
    virtual const string& getContact(void) const = 0;
    virtual const string& getSessionName(void) const = 0;
    virtual const Reservation& getReservation(string& reservationId_) = 0;
    virtual const Reservation& requestReservation(
            const ReservationTemplate& reservationTemplate_) = 0;
    virtual const ReservationList& getReservations(void) = 0;
};

class JobSession {
public:
    virtual ~JobSession(void);
    virtual const string& getContact(void) const = 0;
    virtual const string& getSessionName(void) const = 0;
    virtual const StringList getJobCategories(void) const = 0;
    virtual const JobList& getJobs(const JobInfo& filter_) = 0;
    virtual const JobArray& getJobArray(const string& jobArrayId_) = 0;
    virtual const string& runJob(const JobTemplate& jobTemplate_) = 0;
    virtual const JobArray& runBulkJobs(const JobTemplate& jobTemplate_,
          dRef - Pointerconst tolong drmaabeginIndex_, dictconst long endIndex_, const long step_,
   Side-Effects: none        const long maxParallel_) = 0;
    virtual Returns:const Job& waitAnyStarted(const JobList& jobs_const,
       void     const char*TimeAmount drmaa2timeout_dict_get (const drmaa2_dict d, const char * key)
       This function gets the key's value from the dictionary.

       Parameters:
     ) = 0;
    virtual const Job& waitAnyTerminated(const JobList& jobs_,
            const TimeAmount timeout_) = 0;
};

class MonitoringSession {
public:
    virtual d~MonitoringSession(void);
- Pointer to drmaa dictvirtual const MachineInfoList& getAllMachines(list<string> machines_) = 0;
    virtual keyconst - pointer to key stringReservationList& getAllReservations(void) = 0;
    virtual const JobList& getAllJobs(JobInfo&  Side-Effects: nonefilter_) = 0;
    virtual const QueueInfoList& getAllQueues(list<string> queues_) = 0;
};

class SessionManager {

Returnsprivate:
    SessionManager();

public:
    char /**
    drmaa2_bool drmaa2_dict_has (const drmaa2_dict d, const char * key)
  * SessionManager as singleton
     */
     This function checks for the presence of key in the dictionary.static SessionManager& getInstance() = 0;

public:
    virtual ~SessionManager(void);
    virtual const string&  Parameters:
 getDrmsName(void) const = 0;
    virtual const Version& getDrmsVersion(void) const d= -0;
Pointer to drmaa dict virtual const Version& getDrmaaVersion(void) const = 0;

   key -virtual pointerbool to key string

supports(const DrmaaCapability& capability_) = 0;

    virtual Side-Effects: none

 const JobSession& createJobSession(const string& sessionName_,
            const  Returns:
 string& contact_) = 0;
    virtual const JobSession& openJobSession(const string& drmaa2_boolsessionName_) = 0;
    drmaa2_string_list drmaa2_dict_list (const drmaa2_dict d)
 virtual void closeJobSession(JobSession& session_) = 0;
    virtual Thisvoid function returns a drmaa list of keys in the dictionary.

       Parameters:destroyJobSession(const string& sessionName_) = 0;

    virtual const ReservationSession& createReservationSession(
            dconst - Pointer to drmaa dict

string& sessionName_, const string& contact_) = 0;
    virtual  Side-Effects: noneconst ReservationSession& openReservationSession(
            const string& sessionName_) = 0;
Returns:    virtual void closeReservationSession(ReservationSession& session_) = 0;
  drmaa2_string_list  void destroyReservationSession(const string& drmaa2sessionName_error drmaa2_dict_set (drmaa2_dict d, const char * key, const char * val)) = 0;

    virtual const MonitoringSession& openMonitoringSession(
        This function sets the keyconst value pair to the dictionary.string& contact_) = 0;
    virtual void closeMonitoringSession(MonitoringSession& session_) = Parameters:0;

    virtual const StringList& getReservationSessionNames(void) = 0;
d - Pointer to drmaavirtual dictconst       StringList& getJobSessionNames(void) = 0;

};




key - pointer to key string
           val - pointer to value string

       Side-Effects: none

       

       Returns:
           drmaa2_error

       Return values:
           DRMAA2_INVALID_ARGUMENT DRMAA2_SUCCESS

   drmaa2_string drmaa2_get_drmaa_name (void)
       drmaa2_get_drmaa_name - returns the DRM application name

       Parameters:
   


C-Style binding APIs definition

Note: APIs are as defined in https://www.ogf.org/documents/GFD.230.pdf

Code Block
languagecpp
themeEclipse
titleForward declaration required for API
collapsetrue
typedef const char * drmaa2_string;
typedef struct drmaa2_list_s * drmaa2_list;
typedef struct drmaa2_list_s * drmaa2_string_list;
typedef struct drmaa2_list_s * drmaa2_j_list;
typedef struct drmaa2_list_s * drmaa2_queueinfo_list;
typedef struct drmaa2_list_s * drmaa2_machineinfo_list;
typedef struct drmaa2_list_s * drmaa2_slotinfo_list;
typedef struct drmaa2_list_s * drmaa2_r_list;
typedef struct drmaa2_dict_s * drmaa2_dict;
typedef drmaa2_jinfo_s * drmaa2_jinfo;
typedef drmaa2_slotinfo_s * drmaa2_slotinfo;
typedef drmaa2_rinfo_s * drmaa2_rinfo;
typedef drmaa2_jtemplate_s * drmaa2_jtemplate;
typedef drmaa2_rtemplate_s * drmaa2_rtemplate;
typedef drmaa2_notification_s * drmaa2_notification;
typedef drmaa2_queueinfo_s * drmaa2_queueinfo;
typedef drmaa2_version_s * drmaa2_version;
typedef drmaa2_machineinfo_s * drmaa2_machineinfo;
typedef struct drmaa2_jsession_s * drmaa2_jsession;
typedef struct drmaa2_rsession_s * drmaa2_rsession;
typedef struct drmaa2_msession_s * drmaa2_msession;
typedef struct drmaa2_j_s        * drmaa2_j;
typedef struct drmaa2_jarray_s   * drmaa2_jarray;
typedef struct drmaa2_r_s        - void* drmaa2_r;


/**
 Note : Names ending  Side-Effects: none

      with _s are forward declaration 
**/ 


Code Block
languagecpp
themeEclipse
titleJob States defined in specification
collapsetrue
typedef enum drmaa2_jstate {
    DRMAA2_UNDETERMINED     Returns:           = drmaa2_string 0,
   drmaa2_version drmaa2_get_drmaa_version (void)
       drmaa2_get_drmaa_version - returns the DRM application versionDRMAA2_QUEUED                    Parameters:  =  1,
    DRMAA2_QUEUED_HELD   - void         Side-Effects: none   =  2,
    DRMAA2_RUNNING        Returns:            drmaa2_version =  3,
 drmaa2_string drmaa2_get_drms_name (void) DRMAA2_SUSPENDED       drmaa2_get_drms_name - returns the DRM system name      =  4,
Parameters:    DRMAA2_REQUEUED        - void         Side-Effects: none =  5,
    DRMAA2_REQUEUED_HELD          Returns:     =  6,
    drmaa2DRMAA2_stringDONE      drmaa2_version drmaa2_get_drms_version (void)        drmaa2_get_drms_version - returns the DRM system version  =  7,
    Parameters:DRMAA2_FAILED            - void         Side-Effects:= none 8
} drmaa2_jstate;

/**
Note : Refer DRMAA State Model in specfication
**/


Code Block
languagecpp
themeEclipse
titleAPI
collapsetrue
  Returns: drmaa2_error drmaa2_close_jsession (drmaa2_jsession js_)
       drmaa2_close_versionjsession - closes the  drmaa2_string drmaa2_get_instance_value (const void * instance, const char * name)
   drmaa2_string_list drmaa2_get_jsession_names (void)job session pointed by js

       Parameters:
           drmaa2_get_jsessionjs_names - returns the list ofpointer to drmaa2_job sessions session which needs to be closed

       Side-Effects: none

       

       Returns:
           drmaa2_string_listerror - returns list of jobDRMAA2_SUCCESS if successful DRMAA2_INVALID_SESSION if session namesis availableinvalid

   drmaa2_string_listerror drmaa2_get_rsession_names (voidclose_msession (drmaa2_msession ms_)
       GetDis-associates amonitoring listsession offrom allDRMS. reservationShould sessionbe names.callable only once else it should return   Side-Effects: noneDRMAA2_INVALID_SESSION error.

        ReturnsParameters:
           drmaa2ms_string_list - pointer to drmaa2 monitoring session created earlier.
Return
values:       Side-Effects: none

  NULL - If there are noReturns:
existing reservation sessions         DRMAA2_SUCCESS if succeeds NULL ·and Ifalso this feature is not supported, setsets sets drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATIONINVALID_SESSION error if fails

   voiddrmaa2_error drmaa2_jclose_freersession (drmaa2_j * j)
       drmaa2_j_free - frees the drmaa2_job structure pointed by j_rsession rs_)
       Disassociates reservation session from DRMS. Should be callable only once else it should return DRMAA2_INVALID_SESSION error.

       Parameters:
           jrs_ - pointer to drmaa2_job reservation session created earlier.

       Side-Effects: none

       Returns:
           DRMAA2_SUCCESS Returns:if succeeds NULL and also sets sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if voidfails

   drmaa2_stringjsession drmaa2_jcreate_get_idjsession (const drmaa2_j j)
 char * session_name_, const char * contact_)
       Creates a drmaa2 job session for a given name  drmaa2_j_get_id() - Returns newly allocated drmaa2_job id string

and contact.

       Parameters:
      Parameters:     session_name_ - Name of the session .
j - pointer to drmaa2_job structure.      contact_ -  Side-Effects: noneDRMS name.

       Side-Effects: none

       Returns:
           drmaa2_stringjsession if -succeeds GetsNULL theif jobfails idand fromsets drmaa2_job_lasterror_v to DRMAA2_INVALID_ARGUMENT error.

   drmaa2_jinforsession drmaa2_jcreate_get_inforsession (const drmaa2_j j)
    char * session_name_, const char * contact_)
      drmaa2_j_get_info() - Gets drmaa2_job info structure from the drmaa2_job in drmaa2_j structure Creates a drmaa2 reservation session for a given name and contact.

       Parameters:
           jsession_name_ - pointer to drmaa2_job structure Name of the session.
           contact_ - DRMS name.

       Side-Effects: none

       Returns:
            Returns:
    drmaa2_jsession if succeeds NULL if fails and sets DRMAA2_INVALID_ARGUMENT error.

   drmaa2_string  drmaa2_jinfo - returns drmaa2_jinfo if successful
_describe_attribute (const void * instance, const char * name)
   drmaa2_jtemplateerror drmaa2_jdestroy_get_jtjsession (const drmaa2_j j)
    char * session_name_)
       drmaa2_j_get_jt()destroy_jsession - Returnsdestroys pointer ofthe drmaa2_job templatesession structurepointed fromby Job.js

       Parameters:
           jsession_name_ - pointer to drmaa2_job structure.session which needs to      Side-Effects: nonebe closed

        

       Returns:
    Side-Effects: none

     drmaa2_string - Gets the job template from drmaa2_job

   drmaa2_string drmaa2_j_get_session_name (const drmaa2_j j)   @return
        drmaa2_j_get_session_name() - Returns newly allocated session name stringDRMAA2_SUCCESS if successful
      Parameters:     DRMAA2_INVALID_ARGUMENT if session name is invalid

j - pointer todrmaa2_error drmaa2_job structure._destroy_rsession (const char * session_name_)
       Reaps Side-Effects: none

       the persisted or cached state information for the given session name.

       ReturnsParameters:
           drmaa2session_name_string - getsName of the session.

   name from drmaa2_session  Side-Effects: none

drmaa2_jstate drmaa2_j_get_state (const drmaa2_j j, drmaa2_string * substate)Returns:
           drmaa2_j_get_state() - Gets drmaa2_job state from the drmaa2_job in drmaa2_j structure.

DRMAA2_SUCCESS if successful DRMAA2_INVALID_ARGUMENT if session name is invalid

   drmaa2_dict drmaa2_dict_create (const drmaa2_dict_entryfree callback)
      Parameters: This function creates a drmaa dictionary.

    j - pointer toParameters:
drmaa2_job structure.          callback - substateCall -back statefunction ofto thecall drmaa2_jobwhen infree drmaa2_j structureis called.

       Side-Effects: none

       

       Returns:
           drmaa2_jstatedict
-
returns current drmaa2_job state

   drmaa2_error drmaa2_jdict_holddel (drmaa2_jdict j)d, const char * key)
       drmaa2_j_hold() - Holds the drmaa2_job in drmaa2_j structureThis function deletes the entry with specified key from the dictionary.

       Parameters::
           d - Pointer to drmaa dict
           jkey - pointer to drmaa2_job structure.key string

       Side-Effects: none

    

          Returns:
           drmaa2_error - Returns DRMAA2_SUCCESS
on
   success Returns DRMAA2_INVALID_STATE if job state is invalid for hold· DRMAA2_INVALID_ARGUMENT

   drmaa2_errorvoid drmaa2_jdict_releasefree (drmaa2_jdict * jdRef)
       This function frees  drmaa2_j_release() - Releases the drmaa2_job in drmaa2_j structurea drmaa dict.

       Parameters:
           jdRef - pointerPointer to drmaa2_job structure.drmaa dict

       Side-Effects: none

    

          Returns:
           drmaa2_errorvoid
-
Returns DRMAA2_SUCCESS on success Returns DRMAA2_INVALID_STATE if job state is invalid for release

   drmaa2_error drmaa2_j_resume (drmaa2_j j)
   const char* drmaa2_dict_get (const drmaa2_dict d, const char * key)
       drmaa2_j_resume() - Resumes the drmaa2_job in drmaa2_j structureThis function gets the key's value from the dictionary.

       Parameters:
           jd - pointerPointer to drmaa2_job structure.drmaa dict
        Side-Effects: none  key - pointer to key string

         ReturnsSide-Effects: none

       Returns:
 drmaa2_error - Returns DRMAA2_SUCCESS on success Returns DRMAA2_INVALID_STATE if job state is invalid for resumechar *

   drmaa2_errorbool drmaa2_jdict_suspendhas (const drmaa2_j j)
  dict d, const char * key)
        drmaa2_j_suspend() - Suspends the drmaa2_job in drmaa2_j structureThis function checks for the presence of key in the dictionary.

       Parameters:
 
         j - pointer to drmaa2_job structure.

       Side-Effects: none d - Pointer to drmaa dict
           key - pointer to key string

   Returns:    Side-Effects: none

     drmaa2_error - Returns:
DRMAA2_SUCCESS on success Returns DRMAA2_INVALID_STATE if job state is invalid for suspenddrmaa2_bool

   drmaa2_string_errorlist drmaa2_jdict_terminatelist (const drmaa2_jdict jd)
       This function returns  drmaa2_j_terminate() - Terminates the drmaa2_job in drmaa2_j structurea drmaa list of keys in the dictionary.

       Parameters:
           jd - pointerPointer to drmaa2_job structure.drmaa dict

       Side-Effects: none

       Returns:
        Returns:   drmaa2_string_list

   drmaa2_error drmaa2_dict_set (drmaa2_dict d, const drmaa2_errorchar -* Returns DRMAA2_SUCCESS on success
key, const char * val)
   drmaa2_error drmaa2_j_wait_started (const drmaa2_j j,This constfunction time_t timeout)
     sets the key value pair to the dictionary.

    drmaa2_j_wait_started() - Blocks tillParameters:
the drmaa2_job is started or till timeout expires    d - Pointer to drmaa Parameters:dict
           jkey - pointer to drmaa2_job structure.key string
           timeoutval - Timeoutpointer into time_t format.value string

       Side-Effects: none

       Returns:
        Returns:
   drmaa2_error - DRMAA2_SUCCESS

         drmaa2_error - returns· DRMAA2_SUCCESSINVALID_ARGUMENT

 if successful returns DRMAA2_TIMEOUT if timeout happeneddrmaa2_string drmaa2_get_drmaa_name (void)
      drmaa2_error drmaa2_jget_wait_terminated (const drmaa2_j j, const time_t timeout)
   drmaa_name - returns the DRM application name

       Parameters:
           - void

      drmaa2_j_wait_terminated() - Blocks till the drmaa2_job is terminated or till timeout expires Side-Effects: none

           ·

   Parameters:    Returns:
       j - pointer to drmaa2_jobstring

 structure.  drmaa2_version drmaa2_get_drmaa_version (void)
       timeoutdrmaa2_get_drmaa_version - returns Timeoutthe inDRM time_t format.application version

       Side-Effects: noneParameters:
           - void

       ReturnsSide-Effects: none

       Returns:
 drmaa2_error - returns DRMAA2_SUCCESS if successful returns DRMAA2_TIMEOUT if timeout happeneddrmaa2_version

   voiddrmaa2_string drmaa2_get_jarraydrms_freename (drmaa2_jarray * javoid)
       drmaa2_get_jarraydrms_freename - freesreturns the drmaa2_job array structure pointed by ja DRM system name

       Parameters:
           ja - pointer to DRMAA jo arrayvoid

        Side-Effects: none

      

        Returns:
           voiddrmaa2_string

   drmaa2_stringversion drmaa2_jarrayget_getdrms_idversion (const drmaa2_jarray javoid)
       drmaa2_jarrayget_get_id() Getsdrms_version - returns the idDRM from drmaa2 drmaa2_job array.system version

       Parameters:
           ja - pointervoid
to
drmaa2_job array         Side-Effects: none

     

         Returns:
           drmaa2_string - job id of
drmaa2_job array     drmaa2_jtemplate drmaa2_jarray_get_job_template (const drmaa2_jarray ja)
       drmaa2_jarray_get_job_template - returns the     drmaa2_jobversion
template
used to submit thedrmaa2_string drmaa2_get_job array.

       Parameters:
   instance_value (const void * instance, const char * name)
   drmaa2_string_list drmaa2_get_jsession_names (void)
       jadrmaa2_get_jsession_names - returns pointerthe list toof drmaa2_job arraysessions

       Side-Effects: none

       Returns:
        Returns:   drmaa2_string_list - returns list of job session names available drmaa2_jtemplateNULL -and returnslast joberror template from drmaa2_job arrayis set

   drmaa2_jstring_list drmaa2_jarrayget_getrsession_jobsnames (const drmaa2_jarray javoid)
       drmaa2_jarray_get_jobs() Returns theGet a list of jobsall inreservation the drmaa2_job array structuresession names.

       ParametersSide-Effects:     none

     ja - PointerReturns:
to drmaa2_job array structure        drmaa2_string_list Side-Effects: nonelist of reservation sessions NULL - If there are no existing reservation sessions

    Returns:       · If this feature is drmaa2_j_list - gets list of drmaa2_jobs from drmaa2_jarraynot supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   drmaa2_stringvoid drmaa2_jarray_get_session_namej_free (const drmaa2_jarrayj * jaj)
       drmaa2_jarray_get_session_namej_free - gets the session name in whichfrees the drmaa2_job arraystructure pointed isby submittedj

       Parameters:
           jaj - pointer to drmaa2_job
array
        Side-Effects: none

       Returns:
        Returns:   void

   drmaa2_string drmaa2_j_get_id (const  drmaa2_stringj -j)
returns session name from drmaa2_job array     drmaa2_error drmaa2_jarray_hold (drmaa2_jarray ja)        drmaa2_jarray_holdj_get_id() - Returns holdsnewly theallocated drmaa2_job arrayid string

       Parameters:
           jaj - pointer to drmaa2_job arraystructure.

       Side-Effects: none

       Returns:
        Returns:   drmaa2_string - Gets the job id   from drmaa2_errorjob NULL - returns DRMAA2_SUCCESS if successfulfails returnsand DRMAA2_INVALID_STATEARGUMENT iferror job state not valid for holdis set

   drmaa2_errorjinfo drmaa2_jarrayj_get_releaseinfo (const drmaa2_jarrayj jaj)
           drmaa2_j_jarrayget_releaseinfo() - releases Gets drmaa2_job info structure from the drmaa2_job array in drmaa2_j structure.

       Parameters:
           jaj - pointer to drmaa2_job arraystructure.

       Side-Effects: none

       

       Returns:
           drmaa2_errorjinfo - returns DRMAA2drmaa2_SUCCESSjinfo if successful returns NULL - if fails and DRMAA2_INVALID_STATE if job state not valid for releaseARGUMENT error is set

    drmaa2_errorjtemplate drmaa2_jarrayj_get_resumejt (const drmaa2_jarrayj jaj)
           drmaa2_jarray_resumej_get_jt() - Returns resumespointer theof drmaa2_job array template structure from Job.

       Parameters:
           jaj - pointer to drmaa2_job arraystructure.

       Side-Effects: none

       Returns:
        Returns:   drmaa2_string - gets the session name   from drmaa2_errorsession NULL - returns DRMAA2_SUCCESS if successfulfails returnsand DRMAA2_INVALID_STATEARGUMENT iferror job state not valid for resumeis set

   drmaa2_errorstring drmaa2_j_get_jarraysession_suspendname (const drmaa2_jarrayj jaj)
           drmaa2_jarray_suspendj_get_session_name() - Returns suspendsnewly allocated thesession drmaa2_jobname arraystring

       Parameters:
           jaj - pointer to drmaa2_job arraystructure.

       Side-Effects: none

        none

       Returns:
           drmaa2_errorstring - returns DRMAA2_SUCCESS gets the session name from drmaa2_session NULL - if successfulfails returnsand DRMAA2_INVALID_STATEARGUMENT iferror job state not valid for suspendis set

   drmaa2_errorjstate drmaa2_j_jarrayget_terminatestate (const drmaa2_j j, drmaa2_jarraystring * jasubstate)
           drmaa2_j_jarrayget_terminatestate() - terminatesGets drmaa2_job state from the drmaa2_job array in drmaa2_j structure.

       Parameters:
           jaj - pointer to drmaa2_job array structure.
           substate Side-Effects: none- state of the drmaa2_job in drmaa2_j structure

       Side-Effects: none

       Returns:
           drmaa2_errorjstate - returns current DRMAA2drmaa2_SUCCESSjob ifstate
successful
    drmaa2_jinfoerror drmaa2_jinfoj_createhold (void)drmaa2_j j)
           drmaa2_jinfoj_createhold() - createsHolds athe drmaa2_job in infodrmaa2_j structure.

  and returns its pointer  Parameters:
      Side-Effects: none    j - pointer to drmaa2_job structure.

       ReturnsSide-Effects: none

       Returns:
     drmaa2_jinfo - pointer to newly allocated drmaa2_jinfo structure NULLerror - ifReturns allocationDRMAA2_SUCCESS failson andsuccess DRMAA2_OUT_OF_RESOURCE error is setINVALID_STATE if job state is invalid for hold

   voiddrmaa2_error drmaa2_jinfoj_freerelease (drmaa2_jinfoj j)
 * jiRef)         drmaa2_jinfoj_freerelease() - freesReleases the drmaa2_job infoin drmaa2_j structure and its inner data types.

        Parameters:
           jiRefj - pointer to drmaa2_job info structure.

       Side-Effects: none

       Returns:
        Returns:
           void   drmaa2_error - Returns DRMAA2_SUCCESS on success DRMAA2_INVALID_STATE if job state is invalid for release

   drmaa2_error drmaa2_stringj_listresume (drmaa2_jinfo_impl_spec (void)j j)
           drmaa2_jinfo_impl_specj_resume() - ListsResumes the drmaadrmaa2_job specin implementations supported for job info (e.g. drmaa, drmaa2)drmaa2_j structure.

        Side-EffectsParameters:
none         Returns:   j - pointer to      drmaa2_string_listjob structure.

      Return valuesSide-Effects: none

       Returns:
 list of drmaa spec implementations supported     drmaa2_error - Returns DRMAA2_SUCCESS on success DRMAA2_INVALID_STATE NULLif -job Ifstate thisis featureinvalid isfor notresume
supported,
set drmaa2_lasterror_v to DRMAA2drmaa2_UNSUPPORTED_OPERATION

   void error drmaa2_jsessionj_freesuspend (drmaa2_jsession * js)j j)
           drmaa2_jsession_free Freesj_suspend() - Suspends the memorydrmaa2_job ofin Job session pointed by jsdrmaa2_j structure.

         Parameters:
           jsj - pointer to drmaa2_jsessionjob structure.

       Side-Effects: none

       Returns:
           drmaa2_error - Returns: DRMAA2_SUCCESS on success DRMAA2_INVALID_STATE if job state is invalid for  voidsuspend

   drmaa2_stringerror drmaa2_jsessionj_get_contactterminate (const drmaa2_jsessionj jsj)
           drmaa2_jsession_get_contactj_terminate() - ReturnsTerminates the DRMS name of the drmaa2_job in drmaa2_jobj sessionstructure.

       Parameters:
           jsj - pointer to drmaa2_job sessionstructure.

       Side-Effects: none

       Returns:
        Returns:   drmaa2_error - Returns DRMAA2_SUCCESS on     drmaa2_string - returns the DRMS name from drmaa2_jsessionsuccess DRMAA2_INVALID_STATE if job state is invalid for terminate

   drmaa2_jarrayerror drmaa2_jsessionj_getwait_job_arraystarted (const drmaa2_jsessionj jsj, const drmaa2time_stringt jobarrayIdtimeout)
           drmaa2_jsessionj_get_job_arraywait_started() - returnsBlocks till the specifieddrmaa2_job jobis arraystarted fromor thetill drmaa2_jobtimeout sessionexpires

       Parameters:
           jsj - pointer to drmaa2_job sessionstructure.
           jobarrayIdtimeout - JobTimeout arrayin id which needs to be retrievedtime_t format.

           Side-Effects: none

     

         Returns:
           drmaa2_jarrayerror - returns pointer to drmaa2_jarray with specified jobarrayId in the job session

   drmaa2_string_list drmaa2_jsession_get_job_categories (const drmaa2_jsession js)
       drmaa2_jsession_get_job_categories - returns the string list of drmaa2_job categories in the drmaa2_job session

 DRMAA2_SUCCESS if successful DRMAA2_TIMEOUT if timeout happened

   drmaa2_error drmaa2_j_wait_terminated (const drmaa2_j j, const time_t timeout)
     Parameters:      drmaa2_j_wait_terminated() - Blocks till the drmaa2_job jsis -terminated pointeror totill drmaa2_jobtimeout sessionexpires

       Side-EffectsParameters:
none           j - pointer to drmaa2_job structure.
 Returns:            drmaa2_string_listtimeout - returnsTimeout listin of job categories from drmaa2_jsessiontime_t format.

      drmaa2_j_list drmaa2_jsession_get_jobs (const drmaa2_jsession js, const drmaa2_jinfo filter) Side-Effects: none

       Returns:
   drmaa2_jsession_get_jobs - returns list of jobs in the drmaa2_joberror session- matchingreturns theDRMAA2_SUCCESS jobinfoif filtersuccessful DRMAA2_TIMEOUT if timeout happened

   Parameters:
   void drmaa2_jarray_free (drmaa2_jarray * ja)
       jsdrmaa2_jarray_free - pointerfrees tothe drmaa2_job sessionarray jsstructure pointed by ja

       filter - filter for getting jobs with specific conditionsParameters:
           ja Side-Effects: nonepointer to DRMAA jo array

            ReturnsSide-Effects: none

       Returns:
 drmaa2_j_list - returns list of jobs matching the drmaa2_job filter providedvoid

   drmaa2_string drmaa2_jsessionjarray_get_session_nameid (const drmaa2_jsessionjarray jsja)
       drmaa2_jsessionjarray_get_session_name - returns id() Gets the sessionid namefrom fromdrmaa2 drmaa2_job sessionarray.

       Parameters:
           jsja - pointer to drmaa2_job sessionarray

       Side-Effects: none

       Returns:
           Returns:drmaa2_string - job id of drmaa2_job array NULL - if fails and drmaa2DRMAA2_INVALID_stringARGUMENT -error returns session name from drmaa2_jsessionis set

   drmaa2_jarrayjtemplate drmaa2_jsessionjarray_runget_bulkjob_jobstemplate (const drmaa2_jsession js_, const drmaa2_jtemplate jt_, unsigned long begin_index_, unsigned long end_index_, unsigned long step_, unsigned long
       max_parallel_)
       Write description of function herejarray ja)
       drmaa2_jarray_get_job_template - returns the drmaa2_job template used to submit the drmaa2_job array.

       Parameters:
           js_ja - pointer to drmaa2_job sessionarray

          jt_ - Job template to be considered or usedSide-Effects: none

            begin_index_ - Starting index of drmaa2_job array Returns:
           enddrmaa2_index_jtemplate - returns Endingjob indextemplate offrom drmaa2_job array NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set

 step_ - Increment between each jobs
  drmaa2_j_list drmaa2_jarray_get_jobs (const drmaa2_jarray ja)
        max_parallel_ - Maximum paralleldrmaa2_jarray_get_jobs() Returns the list of jobs toin runthe drmaa2_job array structure.

    Side-Effects: none  Parameters:
           ja - Pointer to Returns:drmaa2_job array structure

        drmaa2_jarray - returns pointer to drmaa2_jarray if successful returns NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid returns NULL and sets last error to
           DRMAA2_INTERNAL if any internal error occurs

   drmaa2_j drmaa2_jsession_run_jobSide-Effects: none

       Returns:
           drmaa2_j_list - gets list of drmaa2_jobs from drmaa2_jarray NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set

   drmaa2_string drmaa2_jarray_get_session_name (const drmaa2_jsession js_, const drmaa2_jtemplate jt_jarray ja)
       drmaa2_jarray_jsessionget_runsession_jobname - runsgets jobthe insession thename jobin session withwhich the drmaa2_job array templateis specifiedsubmitted

       Parameters:
           js_ja - pointer to drmaa2_job sessionarray

       Side-Effects: none

       Returns:
           drmaa2_string - returns session name jt_ - Job template that needs to be run

 from drmaa2_job array NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set

   drmaa2_error drmaa2_jarray_hold (drmaa2_jarray ja)
     Side-Effects: none drmaa2_jarray_hold - holds the drmaa2_job array

          ReturnsParameters:
           drmaa2_jja - returns pointer to drmaa2_job which isarray
newly
started in the job session returns NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid returns NULL and sets
Side-Effects: none

       Returns:
          last error to DRMAA2_INVALID_SESSIONSUCCESS if sessionsuccessful namedrmaa2_error isif invalidfails

   drmaa2_jerror drmaa2_jsession_wait_any_startedjarray_release (const drmaa2_jsession js, const drmaa2_j_list l, const time_t timeout)
 jarray ja)
     drmaa2_jsession_wait_any_started - blocks till the drmaa2_job in the drmaa2_jobjarray_release session- started orreleases till the timedrmaa2_job outarray

       Parameters:
           jsja - pointer to drmaa2_job sessionarray

       Side-Effects: none

  l - list of drmaa2_jobs Returns:
          timeout -DRMAA2_SUCCESS timeoutif tosuccessful waitdrmaa2_error if eventfails
has
not occurred  drmaa2_error drmaa2_jarray_resume (drmaa2_jarray ja)
   Side-Effects: none   drmaa2_jarray_resume - resumes the drmaa2_job array

        ReturnsParameters:
           drmaa2_jja - returns pointer to drmaa2_job which started returns NULL and last error is set to DRMAA2_TIMEOUT if timeout happens array

       Side-Effects: none

       Returns:
           drmaa2_j drmaa2_jsession_wait_any_terminated (const drmaa2_jsession js, const drmaa2_j_list l, const time_t timeoutDRMAA2_SUCCESS if successful drmaa2_error if fails

   drmaa2_error drmaa2_jarray_suspend (drmaa2_jarray ja)
       drmaa2_jsession_wait_any_terminatedjarray_suspend - blocks tillsuspends the drmaa2_job array

  in the drmaa2_job session ended orParameters:
till the time out        ja Parameters:- pointer to drmaa2_job array

      js Side-Effects: none

pointer  to drmaa2_job session   Returns:
        l - list of   DRMAA2_SUCCESS if successful drmaa2_jobserror if fails

   drmaa2_error drmaa2_jarray_terminate (drmaa2_jarray ja)
   timeout - timeout to wait if event has not occursdrmaa2_jarray_terminate - terminates the drmaa2_job array

       Side-EffectsParameters:
none           ja - pointer to drmaa2_job array

Returns:       Side-Effects: none

  drmaa2_j  - returns pointer toReturns:
drmaa2_job which terminated returns NULL and last error is set to DRMAA2_TIMEOUTSUCCESS if timeout happens successful drmaa2_error if fails

   drmaa2_jtemplatejinfo drmaa2_jtemplatejinfo_create (void)
        drmaa2_jtemplatejinfo_create() - creates a drmaa2_job templateinfo structure and returns its pointer

       Side-Effects: none

       

       Returns:
           drmaa2_jtemplatejinfo - pointer to newly allocated drmaa2_jtemplatejinfo ifstructure allocated NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set

   void drmaa2_jtemplatejinfo_free (drmaa2_jtemplatejinfo * jtemplatejiRef)
        drmaa2_jtemplatejinfo_free() - frees athe drmaa2_job templateinfo structure and its inner data types

       Parameters:
           jtemplatejiRef - pointer to drmaa2_job templateinfo structure.

       Side-Effects: none



              Returns:
           void

   drmaa2_string_list drmaa2_jtemplatejinfo_impl_spec (void)
       drmaa2_jtemplatejinfo_impl_spec - Lists the drmaa spec implementations supported for job templateinfo (e.g. drmaa, drmaa2)

       Side-Effects: none

       Returns:
           drmaa2_string_list - list of drmaa spec implementations supported NULL Return- values:If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

 list of drmaa spec implementations supported
void drmaa2_jsession_free (drmaa2_jsession * js)
       drmaa2_jsession_free Frees the NULLmemory -of IfJob thissession feature ispointed notby supported,js
set
drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION     drmaa2_error drmaa2_lasterror (void)Parameters:
         This function returnsjs the- lastpointer occurredto errordrmaa2_jsession.

       Side-Effects: none

       Returns:
        Returns:   void

   drmaa2_string drmaa2_jsession_get_contact (const  drmaa2_errorjsession js)
       drmaa2_string drmaa2jsession_lasterrorget_textcontact (void)- Returns the DRMS name of the drmaa2_job Thissession
function
returns the last occurred error in string. Parameters:
       Side-Effects: none   js - pointer to drmaa2_job session.

        Returns:Side-Effects: none

       Returns:
  drmaa2_string - newly allocated string of last error NULL -DRMAA2_SUCCESS Ifif nosuccessful drmaa2_error textif existsfails

   drmaa2_errorjarray drmaa2_list_addjsession_get_job_array (const drmaa2_listjsession ljs, const void * value) drmaa2_string jobarrayId)
       drmaa2_jsession_get_job_array - Thisreturns functionthe addsspecified anjob elementarray tofrom the list. drmaa2_job session

       Parameters:
           ljs - Pointerpointer to drmaa listdrmaa2_job session.
           valuejobarrayId - pointerJob toarray the elementid which needs to be insertedretrieved

       Side-Effects: none

      

        Returns:
           drmaa2_errorjarray - returns pointer to drmaa2_jarray with specified jobarrayId Returnin values:the job session NULL - if fails     and DRMAA2_INVALID_ARGUMENT DRMAA2_OUT_OF_RESOURCE DRMAA2_SUCCESS error is set

   drmaa2_list drmaa2string_list_create (const drmaa2_listtype t, const drmaa2_list_entryfree callback)
       This function creates a drmaa list.
jsession_get_job_categories (const drmaa2_jsession js)
       Parameters:
           t - Type of the list which needs to be createddrmaa2_jsession_get_job_categories - returns the string list of drmaa2_job categories in the drmaa2_job session

       Parameters:
            callbackjs - Call back functionpointer to call when free is called.drmaa2_job session

        Side-Effects: none

       Returns:
        Returns:   drmaa2_string_list - returns list of job categories  from drmaa2_listjsession NULL - if fails and drmaa2DRMAA2_INVALID_ARGUMENT error is set

   drmaa2_j_list_del drmaa2_jsession_get_jobs (const drmaa2_listjsession ljs, const longdrmaa2_jinfo posfilter)
       This function deletes an element from the list.drmaa2_jsession_get_jobs - returns list of jobs in the drmaa2_job session matching the jobinfo filter

       Parameters:
           ljs - Pointerpointer to drmaa2_job drmaasession listjs
           posfilter - positionfilter offor thegetting elementjobs whichwith needs to be deletedspecific conditions

       Side-Effects: none

    

          Returns:
           drmaa2_j_errorlist - returns list of jobs matching the drmaa2_job Returnfilter values:provided NULL - if fails and       DRMAA2_INVALID_ARGUMENT DRMAA2_SUCCESS error is set

   voiddrmaa2_string drmaa2_jsession_get_listsession_freename (const drmaa2_listjsession * ljs)
       s This function frees a drmaa listdrmaa2_jsession_get_session_name - returns the session name from drmaa2_job session.

       Parameters:
           ljs - Pointerpointer to drmaadrmaa2_job listsession

       Side-Effects: none

       Returns:
           drmaa2_string - returns session name Returns:from drmaa2_jsession NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set

void   drmaa2_jarray drmaa2_jsession_run_bulk_jobs (const void* drmaa2_listjsession js_get, (const drmaa2_list l, long index)_jtemplate jt_, unsigned long begin_index_, unsigned long end_index_, unsigned long step_, unsigned long
       max_parallel_)
This function gets the element form a particularWrite positiondescription of thefunction listhere.

       Parameters:
           ljs_ - Pointerpointer to drmaadrmaa2_job listsession
           indexjt_ - postionJob template fromto whcihbe theconsidered dataor hasused
to be taken         Side-Effects: none

  begin_index_ - Starting index of drmaa2_job array
             Returns:
    end_index_ - Ending index of drmaa2_job array
      void* - pointer to the elementstep_ retured- asIncrement void*between NULLeach -jobs
If the position is not valid     long drmaa2max_listparallel_size (const drmaa2_list l)
  - Maximum parallel jobs to run

   This function returns the size of the list.Side-Effects: none

         ParametersReturns:
           ldrmaa2_jarray - Pointerreturns pointer to drmaadrmaa2_jarray listif successful NULL and sets last error to  Side-Effects: none

       
DRMAA2_INVALID_ARGUMENT if any argument is invalid NULL and sets last error to DRMAA2_INTERNAL
       Returns:    if any internal error occurs

  long drmaa2_j drmaa2_jsession_run_job (const drmaa2_jsession drmaa2js_machineinfo, const drmaa2_machineinfo_create (voidjtemplate jt_)
        drmaa2_jsession_machineinforun_create()job - createsruns ajob drmaa2_machineinfoin infothe structurejob andsession returnswith itsthe pointerdrmaa2_job template specified

     Side-Effects: none Parameters:
           js_ - pointer to drmaa2_job Returns:session
           drmaa2jt_machineinfo - pointer Job template that needs to newlybe allocatedrun
drmaa2_machineinfo
structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set Side-Effects: none

     void drmaa2_machineinfo_free (drmaa2_machineinfo * miRef) Returns:
        This function frees thedrmaa2_j pre-allocated drmaareturns machinepointer infoto structure.job which is newly started in the job session Parameters:NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid miRefNULL -and Pointersets tolast drmaa machineerror infoto
        Side-Effects: none  DRMAA2_INVALID_SESSION if session name is invalid

   drmaa2_j drmaa2_jsession_wait_any_started (const drmaa2_jsession js,  Returns:
   const drmaa2_j_list l, const time_t timeout)
       void

   drmaa2_string_list drmaa2_machineinfo_impl_spec (void)
       drmaa2_machineinfo_impl_spec - Lists the machine info spec implementations supporteddrmaa2_jsession_wait_any_started - blocks till the drmaa2_job in the drmaa2_job session started or till the time out

       Parameters:
          Side-Effects: nonejs - pointer to drmaa2_job session
   Returns:        l - list of drmaa2_string_listjobs
           timeout Return- values:timeout to wait if event has not occurred

   list of machineinfo spec implementations supportedSide-Effects: none

       Returns:
  NULL - If this feature is not supported, set drmaa2_lasterror_vj - returns pointer to DRMAA2_UNSUPPORTED_OPERATION

   void drmaa2_msession_free (drmaa2_msession * ms)drmaa2_job which started NULL and last error is set to DRMAA2_TIMEOUT if timeout happens

   drmaa2_j_list drmaa2_msessionjsession_getwait_allany_jobsterminated (const drmaa2_msessionjsession ms_js, const drmaa2_jinfo filter_)_j_list l, const time_t timeout)
       drmaa2_jsession_wait_any_terminated - blocks Returnstill the listdrmaa2_job ofin allthe jobs i.e. DRMAA2 jobs and the jobs submitted out of DRMAA2 library also. The list or number of jobs returned should adhere to DRMS policies. Ex: The list might bedrmaa2_job session ended or till the time out

       Parameters:
           js - pointer to drmaa2_job session
          limited tol contain- onlylist theof drmaa2_jobs
seen by the DRMAA2 user.       timeout - Parameters:timeout to wait if event has not occurs

   ms_ - pointer to drmaa2_msession created earlier Side-Effects: none

       Returns:
   filter_ - of type drmaa2_jinfo (through which we candrmaa2_j query- jobsreturns perpointer jobstate,to drmaa2_job ownerwhich andterminated perNULL queueand etclast error is set to DRMAA2_TIMEOUT if timeout happens
Side-Effects:
none   drmaa2_jtemplate drmaa2_jtemplate_create (void)
        drmaa2_jtemplate_create() - creates a Returns:drmaa2_job template structure and returns its pointer

    drmaa2_j_list if succeeds NULL if failsSide-Effects: none

    drmaa2_machineinfo_list drmaa2_msession_get_all_machines (const drmaa2_msession ms_, const drmaa2_string_list names_) Returns:
           Returnsdrmaa2_jtemplate list- ofpointer machinesto ordrmaa2_jtemplate hostsif availableallocated forNULL submitting- jobsif inallocation thefails DRMS system.

 and DRMAA2_OUT_OF_RESOURCE error is set

    Parameters:
  void drmaa2_jtemplate_free (drmaa2_jtemplate * jtemplate)
        ms_ pointer to drmaa2_msession created earlier
drmaa2_jtemplate_free() - frees a drmaa2_job template structure and its inner data types

       Parameters:
 names_ a list of queue names acts as filter i.e. wejtemplate fetch- infopointer ofto onlydrmaa2_job thesetemplate queuesstructure.

       Side-Effects: none

       

       Returns:
           drmaa2_machineinfo_list if succeeds NULL if fails.void

   drmaa2_queueinfostring_list drmaa2_msessionjtemplate_getimpl_all_queuesspec (const drmaa2_msession ms_, constvoid)
       drmaa2_string_list names_)
       Returns list of queues available for submitting jobs in the DRMS system.jtemplate_impl_spec - Lists the drmaa spec implementations supported for job template (e.g. drmaa, drmaa2)

       Side-Effects: none

       ParametersReturns:
           ms_ pointer to drmaa2_msession created earlier
      drmaa2_string_list - list of drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   namesdrmaa2_error a list of queue names acts as filter i.e. we fetch info of only these queuesdrmaa2_lasterror (void)
       This function returns the last occurred error.

       Side-Effects: none

       Returns:
     or   MT-Safe   drmaa2_error

    Returns:
drmaa2_string drmaa2_lasterror_text (void)
       This function returns drmaa2_queueinfo_list if succeeds NULL if fails.the last occurred error in string.

     drmaa2_r_list drmaa2_msession_get_all_reservations (const drmaa2_msession ms_) Side-Effects: none

       Returns:
the list of all advance reservations visible for the user running thedrmaa2_string DRMAA-based application. The list or number of jobs returned should adhere to DRMS policies. Ex: The list might
  - newly allocated string of last error NULL - If no error text exists

   drmaa2_error drmaa2_list_add (drmaa2_list l, const void * value)
    be limited to containThis onlyfunction theadds reservationsan seenelement byto the DRMAA2 userlist.

       Parameters:
           ms_ pointerl - Pointer to drmaa2_msession created earlier drmaa list
           value Side-Effects: nonepointer to the element which needs to be inserted

        Returns:Side-Effects: none

       Returns:
  drmaa2_j_list if succeeds NULL if fails    drmaa2_error void- drmaa2DRMAA2_notificationINVALID_freeARGUMENT
(drmaa2_notification
* nRef)        This function frees the pre-allocated drmaa notification structure.· DRMAA2_OUT_OF_RESOURCE

           Parameters:· DRMAA2_SUCCESS

   drmaa2_list drmaa2_list_create (const drmaa2_listtype t, const nRef - Pointer to drmaa notificationdrmaa2_list_entryfree callback)
       This function creates a  Side-Effects: nonedrmaa list.

       Parameters:
         Returns:  t - Type of the list which needs to be voidcreated
    drmaa2_string_list drmaa2_notification_impl_spec (void)     callback -  drmaa2_notification_impl_spec - Lists the notification spec implementations supportedCall back function to call when free is called.

       Side-Effects: none

       Returns:
           drmaa2_list

   drmaa2_stringerror drmaa2_list_del (drmaa2_list l, long pos)
    Return  values: This function deletes an element from the list.

  list of notification spec implementations supportedParameters:
           NULLl - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION Pointer to drmaa list
           pos - position of the element which needs to be deleted

   drmaa2_jsession drmaa2_open_jsession (const char * session_name_)    Side-Effects: none

       drmaa2_open_jsession - Opens an already existing drmaa2_job sessionReturns:
           drmaa2_error - DRMAA2_INVALID_ARGUMENT

Parameters:           · sessionDRMAA2_name_SUCCESS
-
Session name of thevoid drmaa2_job session which needs to be openedlist_free (drmaa2_list * l)
       s This function frees Side-Effects: none
a drmaa list

       Parameters:
       Returns:    l - Pointer to drmaa list

 drmaa2_jsession - returns pointer to drmaa2_jsession for a session which is already present Side-Effects: none

       Returns:
drmaa2_msession drmaa2_open_msession (const char * contact_)      void

Opens the monitoring session.const void* drmaa2_list_get (const drmaa2_list l, long index)
 Parameters:      This function gets the element form contact_a -particular Contactposition of the sessionlist.

       Side-EffectsParameters:
none           l - Pointer to drmaa list
  Returns:         index - postion drmaa2_msessionfrom ifwhcih the session exists NULL if the session does not exist and if session name is invalid and also sets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT error data has to be taken

       Side-Effects: none

       Returns:
       drmaa2_rsession drmaa2_open_rsession (const char void* session_name_)
       Opens the previously created session.
 - pointer to the element retured as void* NULL - If the position is not valid

   long drmaa2_list_size  Parameters:
(const drmaa2_list l)
       This function returns session_name_ - Name the size of the sessionlist.

 

    Side-Effects: none  Parameters:
           l - Pointer to Returns:drmaa list

       Side-Effects: none
drmaa2_rsession
if a session exists NULL if the sessionReturns:
does not exist and if session name is invalid and also sets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT error.long - size of list

   drmaa2_queueinfomachineinfo drmaa2_queueinfomachineinfo_create (void)
        drmaa2_queueinfomachineinfo_create() - creates a drmaa2_queueinfomachineinfo info structure and returns its pointer

       Side-Effects: none

 

             Returns:
           drmaa2_queueinfomachineinfo - pointer to newly allocated drmaa2_queueinfomachineinfo structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set

   void drmaa2_queueinfomachineinfo_free (drmaa2_queueinfomachineinfo * qiRefmiRef)
       This function frees the pre-allocated drmaa queueinfomachine info structure.

       Parameters:
           qiRefmiRef - Pointer to drmaa machine queueinfoinfo

       Side-Effects: none

       

       Returns:
           void

   drmaa2_string_list drmaa2_queueinfomachineinfo_impl_spec (void)
       drmaa2_queueinfomachineinfo_impl_spec - Lists the queuemachine info spec implementations supported

       Side-Effects: none

       Returns:
           drmaa2_string_list

       Return values:


       Returns:
 list of queueinfo spec implementations supported     drmaa2_string_list -list of machineinfo spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   void drmaa2_rmsession_free (drmaa2_rmsession * rms)
   drmaa2_stringj_list drmaa2_rmsession_get_idall_jobs (const drmaa2_msession ms_, const drmaa2_rjinfo r)
       Get the reservation id from a given reservation object.

       Parameters:filter_)
       Returns the list of all jobs i.e. DRMAA2 jobs and the jobs submitted out of DRMAA2 library also. The list or number of jobs returned should adhere to DRMS policies. Ex: The list might be
       limited to contain  r - given reservation objectonly the jobs seen by the DRMAA2 user.

       Parameters:
           Sidems_ -Effects: nonepointer to drmaa2_msession created earlier
    Returns:       filter_ - of  type drmaa2_stringjinfo (through which we can query jobs per jobstate, job Returnowner values:and per queue etc

       Side-Effects: reservationnone
id
    drmaa2_rinfo drmaa2_r_get_info (const drmaa2_r r) Returns:
        Get the reservation info from a given reservation object.drmaa2_j_list if succeeds NULL if fails

   drmaa2_machineinfo_list drmaa2_msession_get_all_machines (const  Parameters:
  drmaa2_msession ms_, const drmaa2_string_list names_)
       Returns rlist -of givenmachines reservationor objecthosts available for submitting jobs in the   Side-Effects: noneDRMS system.

        ReturnsParameters:
           drmaa2ms_rinfo pointer to       Return values:
 drmaa2_msession created earlier
         - reservation infonames_ objecta list of queue names drmaa2_rtemplate drmaa2_r_get_reservation_template (const drmaa2_r r)
       Get the reservation template from a given reservation object.acts as filter i.e. we fetch info of only these queues.

       Side-Effects: none

       ParametersReturns:
           r - given reservation object
drmaa2_machineinfo_list if succeeds NULL if fails.

   drmaa2_queueinfo_list drmaa2_msession_get_all_queues  Side-Effects: none

 (const drmaa2_msession ms_, const drmaa2_string_list names_)
     Returns:  Returns list of queues available for submitting jobs in the drmaa2_rtemplateDRMS system.

      Return valuesParameters:
           - reservation template

ms_ pointer to drmaa2_msession created earlier
  drmaa2_string drmaa2_r_get_session_name (const drmaa2_r r)
       Get the reservation session name from a given reservation object         names_ a list of queue names acts as filter i.e. we fetch info of only these queues.

       ParametersSide-Effects: none

       Returns:
 r - given reservation object      drmaa2_queueinfo_list if succeeds Side-Effects: none
NULL if fails.

   drmaa2_r_list drmaa2_msession_get_all_reservations (const drmaa2_msession ms_)
Returns:       Returns the list of all drmaa2_stringadvance reservations visible for the user running the DRMAA-based Returnapplication. values:The list or number of jobs returned should adhere to DRMS policies. -Ex: reservationThe sessionlist namemight
    drmaa2_error drmaa2_r_terminate (drmaa2_r r)
       Terminate a given reservation be limited to contain only the reservations seen by the DRMAA2 user.

       Parameters:
           r - given reservation objectms_ pointer to drmaa2_msession created earlier

       Side-Effects: none

       Returns:
           drmaa2_error_j_list if succeeds NULL if fails

   void drmaa2_notification_free (drmaa2_notification * nRef)
Return values:      This function frees the pre-allocated drmaa DRMAA2_SUCCESSnotification structure.

       Parameters:
 DRMAA2_DENIED_BY_DRMS     drmaa2_error drmaa2_register_event_notification (const drmaa2_callback callback) nRef - Pointer to drmaa notification

Registers a drmaa2_callback with the DRMS library. For the first phase of implementation we do not support this. Side-Effects: none

       Returns:
        Parameters:   void

   drmaa2_string_list drmaa2_notification_impl_spec (void)
 callback - a structure of type drmaa2_callback containing_notification_impl_spec - Lists the detailsnotification ofspec callbackimplementations function,supported
event
etc         Side-Effects: none

       Returns:
            Returns:
           DRMAA2_UNSUPPORTED_OPERATION error if fails DRMAA2_SUCCESS if succeedsdrmaa2_string_list - list of notification spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   drmaa2_rinfojsession drmaa2_rinfoopen_createjsession (voidconst char * session_name_)
        drmaa2_rinfoopen_create()jsession - Opens createsan already aexisting drmaa2_reservation info structure and returns its pointerjob session

       Parameters:
           session_name_ Side-Effects: none- Session name of the drmaa2_job session which needs to be opened

       Side-Effects: none

       Returns:
           drmaa2_rinfojsession - returns pointer to newly allocated drmaa2_rinfo structure drmaa2_jsession for a session which is already present NULL - if allocation fails and DRMAA2_OUTINVALID_OF_RESOURCEARGUMENT error is set

   voiddrmaa2_msession drmaa2_rinfoopen_freemsession (drmaa2_rinfoconst char * riRefcontact_)
       This function freesOpens the pre-allocated drmaa rinfo structuremonitoring session.

       Parameters:
           riRefcontact_ - PointerContact toof drmaathe reservationsession
info
        Side-Effects: none

       Returns:
        Returns:   drmaa2_msession if the session exists NULL if the session voiddoes not exist and if drmaa2_string_list drmaa2_rinfo_impl_spec (void)
       Lists the drmaa spec implementations supported for reservation info (e.g. drmaa, drmaa2)session name is invalid and also sets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT error

   drmaa2_rsession drmaa2_open_rsession (const char * session_name_)
       Opens the previously Side-Effects: nonecreated session.

       ReturnsParameters:
           drmaa2session_stringname_list - Name of the  session.

 Return values:     Side-Effects: none

    list of drmaa specReturns:
implementations supported          drmaa2_rsession if NULLa -session Ifexists thisNULL feature is not supported, set if sets drmaa2_lasterror_v to DRMAA2_UNSUPPORTEDINVALID_OPERATIONARGUMENT error.

  void drmaa2_rsession_freequeueinfo (drmaa2_rsession * rs)queueinfo_create (void)
        drmaa2_rsessionqueueinfo_freecreate() Frees- thecreates memorya ofdrmaa2_queueinfo Reservationstructure sessionand pointed by rs

       Parameters:
           rs - pointer to drmaa2_rsession.returns its pointer

       Side-Effects: none

       Returns:
        Returns:   drmaa2_queueinfo - pointer to newly allocated drmaa2_queueinfo structure NULL void- if allocation fails and drmaa2_stringDRMAA2_OUT_OF_RESOURCE error is set

   void drmaa2_rsessionqueueinfo_get_contactfree (const drmaa2_rsessionqueueinfo * rsqiRef)
       GetThis thefunction contactfrees ofthe apre-allocated givendrmaa drmaa2queueinfo reservation sessionstructure.

       Parameters:
           rsqiRef - givenPointer to reservationdrmaa sessionqueueinfo

       Side-Effects: none

       Returns:
           void

   drmaa2_string_list drmaa2_queueinfo_impl_spec (void)
       drmaa2_queueinfo_impl_spec  Return values:
- Lists the queue info spec implementations supported

       Side-Effects: none

       Returns:
 - contact name associated with reservation session    drmaa2_string_list -list of queueinfo spec implementations supported  NULL - ifIf reservationthis sessionfeature is not invalidsupported, set drmaa2_lasterror_v set to DRMAA2_INVALIDUNSUPPORTED_SESSIONOPERATION

   void drmaa2_r_free (drmaa2_rsession_get_reservation (constr * r)
   drmaa2_rsession rs, string drmaa2_r_get_id (const drmaa2_stringr reservationIdr)
       Get the reservation objectid from a specificgiven reservation session with the object.

       Parameters:
           r - given reservation id.object

       ParametersSide-Effects: none

       Returns:
  rs   - given reservation session   drmaa2_string

       reservationIdReturn -values:
given reservation id         Side-Effects: nonereservation id

   drmaa2_rinfo drmaa2_r_get_info (const drmaa2_r r)
Returns:       Get the reservation info from a given drmaa2_rreservation object.

      Return valuesParameters:
           r - given reservation interfaceobject

          NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
Side-Effects: none

       Returns:
           ·drmaa2_rinfo if- reservation idinfo object isNULL invalid, drmaa2_lasterror_v set to- if fails and DRMAA2_INVALID_ARGUMENT error is set

   drmaa2_r_listrtemplate drmaa2_rsessionr_get_reservation_reservationstemplate (const drmaa2_rsessionr rs_r)
       Get all the reservation objectstemplate from a specificgiven reservation sessionobject.

       Parameters:
           rs_r - given reservation sessionobject

       Side-Effects: none

       Returns:
           drmaa2_r_list

       Return values:
           rtemplate- - reservation interface list
           template NULL - if reservation session is invalid, drmaa2_lasterror_v set to if fails and DRMAA2_INVALID_SESSIONARGUMENT error is set

   drmaa2_string drmaa2_rsessionr_get_session_name (const drmaa2_rsessionr rsr)
       Get the reservation session name offrom a given drmaa2 reservation sessionobject.

       Parameters:
           rsr - given reservation sessionobject

       Side-Effects: none

       Returns:
           drmaa2_string - reservation session name NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
Return
values:   drmaa2_error drmaa2_r_terminate (drmaa2_r r)
     - session nameTerminate associateda withgiven reservation session.

       Parameters:
           NULLr - ifgiven reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION object

       Side-Effects: none

       Returns:
           drmaa2_error - on success DRMAA2_SUCCESS DRMAA2_DENIED_BY_DRMS if failed

   drmaa2_rerror drmaa2_rsessionregister_requestevent_reservationnotification (const drmaa2_rsession rs, const drmaa2_rtemplate rt_callback callback)
       CreatesRegisters a reservationdrmaa2_callback objectwith inthe aDRMS specific reservation session withlibrary. For the givenfirst reservationphase template.of itimplementation alsowe evaluatesdo reservationnot templatesupport forthis.
the
mandatory attributes and sends the request  Parameters:
     to DRMS.     callback - a structure Parameters:of type drmaa2_callback containing the details of callback function, event etc

rs - given reservation session   Side-Effects: none

      rt_ -Returns:
given reservation template         Side-Effects: none

   DRMAA2_SUCCESS if succeeds DRMAA2_UNSUPPORTED_OPERATION error if fails

  Returns: drmaa2_rinfo drmaa2_rinfo_create (void)
        drmaa2_r   drmaa2_rinfo_create() - creates a drmaa2_reservation info Returnstructure values:and returns its pointer

       Side-Effects: none
reservation
interface       Returns:
    NULL - if reservation session is invalid, drmaa2_lasterror_v setrinfo - pointer to DRMAA2_INVALID_SESSIONnewly allocated drmaa2_rinfo structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is ·set
if
reservation template evaluation fails,void drmaa2_lasterrorrinfo_v set to DRMAA2_UNSUPPORTED_ATTRIBUTE

free (drmaa2_rinfo * riRef)
       This function frees ·the ifpre-allocated DRMSdrmaa rejectsrinfo reservationstructure.
request,
drmaa2_lasterror_v set to DRMAA2_DENIED_BY_DRMS    Parameters:
drmaa2_rtemplate drmaa2_rtemplate_create (void)        This functionriRef frees- thePointer pre-allocatedto drmaa rtemplatereservation structure.info

       Side-Effects: none

       Returns:
           Returns:void

   drmaa2_string_list drmaa2_rinfo_impl_spec (void)
    drmaa2_rtemplate   Lists the void drmaa2_rtemplate_free (drmaa2_rtemplate * rt)
       This function frees the pre-allocated drmaa rtemplate structure.drmaa spec implementations supported for reservation info (e.g. drmaa, drmaa2)

       Side-Effects: none

       ParametersReturns:
           rtdrmaa2_string_list - Pointerlist toof drmaa rtemplatespec implementations supported NULL - If this feature is Side-Effects: none

  not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   void drmaa2_rsession_free (drmaa2_rsession * rs)
    Returns:   drmaa2_rsession_free Frees the memory of Reservation session pointed by voidrs

   drmaa2_string_list drmaa2_rtemplate_impl_spec (void)      Parameters:
    Lists the drmaa spec implementations supported for reservationrs template (e.g. drmaa, drmaa2)- pointer to drmaa2_rsession.

       Side-Effects: none

       Returns:
           drmaa2_string_listvoid

   drmaa2_string drmaa2_rsession_get_contact (const  Return values:drmaa2_rsession rs)
       Get the   listcontact of drmaaa specgiven implementationsdrmaa2 supportedreservation session.

       Parameters:
 NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   drmaa2_error drmaa2_set_instance_value (void * instance, const char * name, const char * value)rs - given reservation session

       Side-Effects: none

      void drmaa2_slotinfo_free (drmaa2_slotinfo * siRef) Returns:
          This function frees the pre-allocated drmaa slotinfo.

       Parameters:
      drmaa2_string - contact name associated with reservation session NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION

    siRef - Pointer to drmaa slotinfo
drmaa2_r drmaa2_rsession_get_reservation (const drmaa2_rsession rs, const drmaa2_string reservationId)
       Side-Effects: none

       

 Get the reservation object from a specific reservation session with the given reservation id.

    Returns:   Parameters:
        void   rs - void drmaa2_string_free (drmaa2_string * str)given reservation session
         This function freesreservationId the- previouslygiven allocated drmaa2_string.reservation id

       ParametersSide-Effects: none

       Returns:
 str - pointer to pre allocated drmaa2_string    drmaa2_r- reservation NULL   Side-Effects: noneif reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION

        Returns:   · if reservation id is invalid, drmaa2_lasterror_v set to voidDRMAA2_INVALID_ARGUMENT

   drmaa2_r_boollist drmaa2_rsession_get_supportsreservations (const drmaa2_capabilityrsession crs_)
       drmaa2_supportsGet -all returnsthe truereservation ifobjects drmaafrom supportsa thespecific provided drmaa2_capabilityreservation session.

       Parameters:
           crs_ - drmaa2_capabilitygiven enumreservation valuesession

       Side-Effects: none

       Returns:
           Returns:
           drmaa2_versiondrmaa2_r_list - reservation interface list NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION

   voiddrmaa2_string drmaa2_rsession_get_versionsession_freename (const drmaa2_versionrsession *rs)
vRef)       Get Thisthe session functionname freesof thea pre-allocatedgiven drmaadrmaa2 versionreservation structuresession.

       Parameters:
           vRefrs - Pointergiven toreservation drmaa versionsession

       Side-Effects: none

       

       Returns:

          void   

Sample Example

Code Block
languagecpp
themeEclipse
titleExample1: DRMAA2 Simple Application
linenumberstrue
 	drmaa2_jsession js; /* Jobstring - session object*/		name associated with reservation session drmaa2_jtemplate jt; /* JobNULL - if reservation session template*/
    drmaa2_j j;  /* Job object*/
    ...
    ...
	...
    /* Create and open job session */
    js = drmaa2_create_jsession("testsession", DRMAA2_UNSET_STRING);is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION

   drmaa2_r drmaa2_rsession_request_reservation (const drmaa2_rsession rs, const drmaa2_rtemplate rt_)
     if (js ==Creates NULL)a {reservation object in a 		 ...
       return;
    }
    ...
    ...
	...

    /* Create job template */
    jt = drmaa2_jtemplate_create();
    jt->remoteCommand = strdup("/bin/date");
    j = drmaa2_jsession_run_job(js, jt);specific reservation session with the given reservation template. it also evaluates reservation template for the mandatory attributes and sends the request
       to DRMS.

       Parameters:
           rs - given reservation session
        ... 	...  rt_ -  drmaa2_j_wait_terminated(j, DRMAA2_INFINITE_TIME);given reservation template

   drmaa2_jtemplate_free(&jt);     drmaa2_destroy_jsession("testsession");Side-Effects: none

   ...    Returns:
... 	...     drmaa2_j_free(&j);     drmaa2_jsession_free(&js);
    ...
    ...
	...
Code Block
languagecpp
themeEclipse
titleExample2: DRMAA2 Advance Application
linenumberstrue
 	...r- reservation NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION

    ... 	...     drmaa2_jtemplate · if reservation template evaluation fails, drmaa2_lasterror_v jtset =to drmaa2DRMAA2_jtemplate_create(); /* job template object */
    drmaa2_rtemplate   UNSUPPORTED_ATTRIBUTE

       · if DRMS rejects reservation request, drmaa2_lasterror_v set to DRMAA2_DENIED_BY_DRMS

   rtdrmaa2_rtemplate = drmaa2_rtemplate_create (void);
  /* reservation template object */ This function frees  drmaa2_string_list   the pre-allocated drmaa rtemplate structure.

 cl = drmaa2_list_create(DRMAA2_STRINGLIST, NULL); / *create list of strings */ Side-Effects: none

     drmaa2_dict  Returns:
         env = drmaa2_dict_create(NULL); /* create a dictionary */rtemplate

   void drmaa2_rtemplate_free (drmaa2_rtemplate * rt)
     drmaa2_jsession js = drmaa2_create_jsession("myjsession", NULL); /* open sessions to DRM system */This function frees the pre-allocated drmaa rtemplate structure.

     if (js ==Parameters:
NULL) {         ... rt - Pointer to drmaa rtemplate

 ...      Side-Effects: none

return;     }  Returns:
  drmaa2_rsession rs = drmaa2_create_rsession("myrsession", NULL); /* create a reservation sessionvoid
*/
    if (rs == NULL)drmaa2_string_list drmaa2_rtemplate_impl_spec (void)
       {Lists the drmaa spec implementations supported for reservation template (e.g.. drmaa, drmaa2)

     ...  Side-Effects: none

    return;   Returns:
 }       drmaa2_msession ms = drmaa2_open_msession(NULL); 					 /*create and open monitoring session */

    ml = drmaa2_msession_get_all_machines(ms, DRMAA2_UNSET_LIST);string_list - list of drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION

   drmaa2_error drmaa2_set_instance_value (void /* determine instance, const char * name, ofconst first machinechar */ value)
   ifvoid (drmaa2_listslotinfo_size(ml) < 1) {free (drmaa2_slotinfo * siRef)
     	...  This function frees the pre-allocated drmaa slotinfo.
return;
    }   Parameters:
 m = (drmaa2_machineinfo)drmaa2_list_get(ml, 0);     drmaa2_list_add(cl, m->name);     siRef rt->maxSlots =Pointer 4;to drmaa slotinfo

                  Side-Effects: none

       Returns:
           void

   void drmaa2_string_free (drmaa2_string * /*str)
perform advance reservation */    This ...function frees the previously allocated rt->machineOS=DRMAA2_LINUX;drmaa2_string.

    rt->candidateMachines = cl; Parameters:
   r = drmaa2_rsession_request_reservation(rs, rt);     str jt->remoteCommand = strdup("/bin/date");   pointer to pre allocated drmaa2_string

       Side-Effects: none

       Returns:
      /* submit job */  void

 jt->reservationId = drmaa2_r_get_id(r);
    drmaa2_dict_set(env, "PBS_SCP", "/usr/bin/scp");
    jt->jobEnvironment = env;
    j = drmaa2_jsession_run_job(js, jt);bool drmaa2_supports (const drmaa2_capability c)
       drmaa2_supports - returns true if drmaa supports the provided drmaa2_capability

     drmaa2_j_wait_terminated(j, DRMAA2_INFINITE_TIME);  Parameters:
           c - drmaa2_capability enum value
/*
Wait for termination and print exit status */
 Side-Effects: none

  ji = drmaa2_j_get_info(j);   Returns:
 ... 	... 	...      /* close sessions,drmaa2_version
cleanup
*/    void drmaa2_jtemplateversion_free(&jt);
    drmaa2_rtemplate_free(&rt);
    drmaa2_jinfo_free(&ji);
    drmaa2_j_free(&j);
    drmaa2_r_free(&r); (drmaa2_version * vRef)
       This function frees the pre-allocated drmaa version structure.

       Parameters:
           drmaa2_close_msession(ms);
    drmaa2_close_rsession(rs);vRef - Pointer to drmaa version

   drmaa2_close_jsession(js);     drmaa2_msession_free(&ms);Side-Effects: none

   drmaa2_rsession_free(&rs);     drmaa2_jsession_free(&js);Returns:
      ...     ...
void


Source code licensing

GNU Affero General Public License

Questions

Question

Outcome

How to do Black box testing ? Are there any application available to do black-box/manual testing ?


As PTL framework doesnt  give session related automation, how to do automation?
Do we need to add customs DRMAAv2 APIs to support all IFL API's?

Not Doing


References