...
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
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
Requirements
The implementation of DRMAA2 specification for PBS Pro is broadly divided into the following requirements/user stories.
# | User Story | Importance | Notes |
---|
1 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-628 |
---|
|
| |
|
2 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-634 |
---|
|
|
|
|
3 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-631 |
---|
|
|
|
|
4 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-630 |
---|
|
|
|
|
5 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-629 |
---|
|
|
|
|
6 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-632 |
---|
|
|
|
|
7 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-633 |
---|
|
|
|
|
8 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-643 |
---|
|
|
|
|
9 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-626 |
---|
|
|
|
|
10 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-644 |
---|
|
|
|
|
11 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-636 |
---|
|
|
|
|
12 | Jira Legacy |
---|
server | JIRA (pbspro.atlassian.net) |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 32008a99-7831-3ff8-9638-3db0cd01164d |
---|
key | PP-673 |
---|
|
|
|
|
Architecture and design
Application stack
DRMAA2 Layout
Note : Document is part of https://troeger.eu/files/talks/ogf35.pdf
Domain model diagram
...
Image Added
ConnectionPool is a set of active 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 |
---|
name | DRMAA2Overviewstatemodel.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 Modified
Image RemovedImage Added
Source Directory structure in github
├── ...
├──
pbsproPBSPro
│ ├──
src│DRMAAv2 ├── ├── lib│ ├── ├── ├──
Libdrmaa2 #
DRMAAv2 module Top level directory
| ├──
├──
-- configure.ac DRMAAv2 module Top level directory │ ├── ├──
├──
├──
libdrmaa2 All the function prototypes and definitions included in this API. Autoconf and libtool specification to create library.│ ├── ├──
├──
├──
├──
-- drmaa2.cpp #
This file dictates the behavior of the final configure script that is generated by Autoconf.
| ├──
├──
-- INSTALL #
Instructions for successful compilation of this
| ├──
├──
-- autogen.sh #
This file provides automatic build system preparation and is useful for projects that use the GNU autotools.
| ├──
├──
-- AUTHORS #
Altair authors information API definitions
│| ├──
├──
├──
├──
├── -- drmaa2.hChangeLog #
Delta change information API and declaration
│| ├──
├── ├──
├──
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 ├──
function srcprototypes 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-testing
and declaration
│ ├──
m4 ├──
├──
cpp-binding #
CPP style class definitions for external use
│ ├──
├──
├──
-- drmaa2.hpp
#
Class level declaration
|
GNU
m4
macros├──
required
for
DRMAAv2│├──
├──src doc #
Core infrastructure source files
| ├──
├──
inc #
Core infrastructure internal include files
| ├──
├──
m4 Doxygen and man pages │#
GNU m4 -- Doxygen.in 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 #
Testing
| ├──
├──
├──
unittesting #
White-box testing
(using CppUnit).
| ├──
├──
├── benchmarks # Placeholder for Load and stress tests
Directory structure in target
├── ...
├──
$(PBSDRMAAV2_EXEC)│ ├──
libLIB)
│ ├── ├──
libdrmaav2.so
├──
$(DRMAAV2_INCLUDE)
│ ├──
include
c-binding
│ ├──
├──
drmaav2drmaa2.h
│ ├──
cpp-binding
│ ├──
├──
drmaav2.hpp
Dependent packages
PBSPro - libdrmaav2.so needs libpbs.so library for IFL calls
...
doxygen - for generating docs
Compiling DRMAA2 applications for PBS Pro
It is assumed that libdrmaa2.so or libdrmaa2.a is 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.
gcc -I /usr/include/drmaa2 -L/usr/lib/libdrmaa2.so <drmaa2_app> -ldrmaa2
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
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | Forward declaration required for API | collapseDRMAA2 app |
---|
linenumbers | true |
---|
|
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 * drmaa2_r;
/**
Note : Names ending with _s are forward declaration
**/ |
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | Job States defined in specification |
---|
collapse | true |
---|
|
typedef enum drmaa2_jstate {
DRMAA2_UNDETERMINED = 0,
DRMAA2_QUEUED = 1,
DRMAA2_QUEUED_HELD = 2,
DRMAA2_RUNNING#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 Binding | IFL 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 |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | CPP-style class defination |
---|
collapse | true |
---|
|
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_,
const long beginIndex_, const long endIndex_, const long =step_,
3, DRMAA2_SUSPENDED const long maxParallel_) = 0;
virtual const Job& waitAnyStarted(const = 4JobList& jobs_const,
DRMAA2_REQUEUED const TimeAmount timeout_) = 0;
virtual const Job& =waitAnyTerminated(const JobList& 5jobs_,
DRMAA2_REQUEUED_HELD const TimeAmount timeout_) = 0;
};
=class MonitoringSession 6,{
public:
DRMAA2_DONE virtual ~MonitoringSession(void);
virtual const MachineInfoList& getAllMachines(list<string> machines_) = 0;
virtual const ReservationList& getAllReservations(void) = 0;
= 7, virtual const DRMAA2_FAILED JobList& getAllJobs(JobInfo& filter_) = 0;
virtual const QueueInfoList& getAllQueues(list<string> queues_) = 0;
};
class SessionManager {
private:
= 8 } drmaa2_jstate SessionManager();
/**
Note : Refer DRMAA State Model in specfication
**/
|
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | API |
---|
collapse | true |
---|
|
drmaa2_error drmaa2_close_jsession (drmaa2_jsession js_) public:
/**
* SessionManager as singleton
*/
drmaa2_close_jsession - closes the drmaa2_job session pointed by js
static SessionManager& getInstance() = 0;
public:
virtual ~SessionManager(void);
Parameters: virtual const string& getDrmsName(void) const = 0;
js_ - pointervirtual to drmaa2_job session which needs to be closedconst Version& getDrmsVersion(void) const = 0;
virtual const Version& Side-Effects: none
getDrmaaVersion(void) const = 0;
virtual bool Returns:
supports(const DrmaaCapability& capability_) = 0;
virtual const drmaa2_error - returns DRMAA2_SUCCESS if successful DRMAA2_INVALID_SESSION if session is invalidJobSession& createJobSession(const string& sessionName_,
drmaa2_error drmaa2_close_msession (drmaa2_msession ms const string& contact_) = 0;
virtual Dis-associates monitoring session from DRMS. Should be callable only once else it should return DRMAA2_INVALID_SESSION error.
const JobSession& openJobSession(const string& sessionName_) = 0;
virtual void closeJobSession(JobSession& session_) = 0;
virtual void Parameters:
destroyJobSession(const string& sessionName_) = 0;
virtual ms_ - pointer to drmaa2 monitoring session created earlier.const ReservationSession& createReservationSession(
Side-Effects: none
const string& sessionName_, const string& contact_) = 0;
MT-Unsafe virtual const ReservationSession& openReservationSession(
Returns: const string& sessionName_) = DRMAA2_SUCCESS0;
if succeeds NULL and alsovirtual sets sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if fails
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.void closeReservationSession(ReservationSession& session_) = 0;
void destroyReservationSession(const string& sessionName_) = 0;
virtual const MonitoringSession& openMonitoringSession(
const string& contact_) = 0;
virtual void closeMonitoringSession(MonitoringSession& session_) Parameters:= 0;
virtual const StringList& getReservationSessionNames(void) = rs_0;
- pointer to drmaa2 reservationvirtual sessionconst created earlier.
StringList& getJobSessionNames(void) = 0;
};
Side-Effects: none
Returns:
DRMAA2_SUCCESS if succeeds NULL and also sets sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if fails
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
MT-Unsafe
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. |
C-Style binding APIs definition
Note: APIs are as defined in https://www.ogf.org/documents/GFD.230.pdf
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | Forward declaration required for API |
---|
collapse | true |
---|
|
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 * drmaa2_r;
/**
Note : Names ending with _s are forward declaration
**/ |
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | Job States defined in specification |
---|
collapse | true |
---|
|
typedef enum drmaa2_jstate {
DRMAA2_UNDETERMINED = 0,
DRMAA2_QUEUED = Parameters: 1,
DRMAA2_QUEUED_HELD session_name_ - Name of the session. = 2,
contactDRMAA2_RUNNING - DRMS name. Side-Effects: none = Returns: 3,
DRMAA2_SUSPENDED drmaa2_jsession if succeeds NULL if fails and sets DRMAA2_INVALID_ARGUMENT error. = drmaa2_string drmaa2_describe_attribute (const void * instance, const char * name)
drmaa2_error drmaa2_destroy_jsession (const char * session_name_) 4,
DRMAA2_REQUEUED drmaa2_destroy_jsession= - destroys5,
the drmaa2_job session pointed byDRMAA2_REQUEUED_HELD js Parameters: = 6,
sessionDRMAA2_name_DONE - pointer to drmaa2_job session which needs to be closed Side-Effects: none = 7,
DRMAA2_FAILED @return DRMAA2_SUCCESS if successful = 8
} drmaa2_jstate;
/**
Note : Refer DRMAA2_INVALID_ARGUMENT if session name is invalid
DRMAA State Model in specfication
**/
|
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | API |
---|
collapse | true |
---|
|
drmaa2_error drmaa2_destroyclose_rsessionjsession (const char * session_name_drmaa2_jsession js_)
Reaps the persisted or cached state information fordrmaa2_close_jsession - closes the givendrmaa2_job session name. pointed by js
Parameters:
session_namejs_ - Namepointer ofto thedrmaa2_job session. which needs to be closed
Side-Effects: none
Returns:
drmaa2_error - returns DRMAA2_SUCCESS if successful DRMAA2_INVALID_ARGUMENTSESSION if session name is invalid
drmaa2_dicterror drmaa2_dictclose_createmsession (const drmaa2_dict_entryfree callback)
This function creates a drmaa dictionarymsession ms_)
Dis-associates monitoring session from DRMS. Should be callable only once else it should return DRMAA2_INVALID_SESSION error.
Parameters:
callbackms_ - Call backpointer function to calldrmaa2 whenmonitoring freesession iscreated calledearlier.
Side-Effects: none
Returns:
DRMAA2_SUCCESS if succeeds NULL and also sets sets drmaa2_dict_lasterror_v to DRMAA2_INVALID_SESSION error if fails
drmaa2_error drmaa2_dictclose_delrsession (drmaa2_dict d, const char * key)rsession rs_)
Disassociates reservation session from DRMS. ThisShould functionbe deletescallable theonly entryonce withelse specifiedit keyshould from the dictionaryreturn DRMAA2_INVALID_SESSION error.
Parameters:
drs_ - Pointerpointer to drmaa dict drmaa2 reservation session created earlier.
Side-Effects: none
key - pointer to key stringReturns:
Side-Effects: none DRMAA2_SUCCESS if succeeds NULL and also sets Returns:
sets drmaa2_lasterror_v to DRMAA2_INVALID_SESSION error if fails
drmaa2_jsession drmaa2_error - DRMAA2_SUCCESS
_create_jsession (const char * session_name_, const char * contact_)
Creates a drmaa2 job session for a given name and contact.
· DRMAA2_INVALID_ARGUMENT Parameters:
void drmaa2_dict_free (drmaa2_dict * dRef) session_name_ This- functionName freesof athe drmaasession dict.
Parameters: contact_ - DRMS name.
dRef - Pointer to drmaa dictSide-Effects: none
Side-EffectsReturns:
none Returns: drmaa2_jsession if succeeds NULL if fails and sets drmaa2_lasterror_v to void
DRMAA2_INVALID_ARGUMENT error.
const char*drmaa2_rsession drmaa2_dictcreate_getrsession (const drmaa2_dict d char * session_name_, const char * keycontact_)
Creates Thisa drmaa2 functionreservation getssession thefor key'sa valuegiven fromname theand dictionarycontact.
Parameters:
dsession_name_ - PointerName toof drmaathe dictsession.
keycontact_ - pointer to keyDRMS stringname.
Side-Effects: none
Returns:
drmaa2_jsession if succeeds NULL if fails and sets char *DRMAA2_INVALID_ARGUMENT error.
drmaa2_boolstring drmaa2_dictdescribe_hasattribute (const void drmaa2_dict* dinstance, const char * keyname)
drmaa2_error drmaa2_destroy_jsession (const char * session_name_)
This function checks for the presence of key in the dictionary.drmaa2_destroy_jsession - destroys the drmaa2_job session pointed by js
Parameters:
dsession_name_ - Pointerpointer to drmaa dict
drmaa2_job session which needs to be closed
key Side- pointer to key stringEffects: none
@return
Side-Effects: none DRMAA2_SUCCESS if successful
Returns: DRMAA2_INVALID_ARGUMENT if session name is invalid
drmaa2_bool
drmaa2_string_listerror drmaa2_dictdestroy_listrsession (const drmaa2_dict d) char * session_name_)
Reaps Thisthe functionpersisted returnsor acached drmaastate listinformation offor keysthe ingiven thesession dictionaryname.
Parameters:
dsession_name_ - PointerName toof drmaathe dictsession.
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successful drmaa2DRMAA2_string_listINVALID_ARGUMENT if session name is invalid
drmaa2_errordict drmaa2_dict_setcreate (const drmaa2_dict d, const char * key, const char * val)
This function sets the key value pair to the dictionary.
Parameters:
_entryfree callback)
This dfunction -creates Pointer toa drmaa dictdictionary.
Parameters:
key - pointer to key string callback - Call back function to call valwhen -free pointeris tocalled.
value
string Side-Effects: none
Returns:
drmaa2_dict
drmaa2_error - DRMAA2_SUCCESSdrmaa2_dict_del (drmaa2_dict d, const char * key)
This function deletes the entry · DRMAA2_INVALID_ARGUMENT
drmaa2_string drmaa2_get_drmaa_name (void)with specified key from the dictionary.
Parameters:
drmaa2_get_drmaa_name - returns the DRM application name d - Pointer to drmaa dict
Parameters: key - void pointer to key string
Side-Effects: none
Returns:
· drmaa2_error Returns:- DRMAA2_SUCCESS
drmaa2_string· DRMAA2_INVALID_ARGUMENT
void drmaa2_versiondict_free (drmaa2_get_drmaa_version (voiddict * dRef)
drmaa2_get_drmaa_version - returns the DRM application versionThis function frees a drmaa dict.
Parameters:
dRef - void Pointer to drmaa dict
Side-Effects: none
Returns:
void
drmaa2_version const char* drmaa2_stringdict_get (const drmaa2_get_drms_name (voiddict d, const char * key)
drmaa2_get_drms_name - returns the DRM system nameThis function gets the key's value from the dictionary.
Parameters:
d - void Pointer to drmaa dict
key Side-Effects: none- pointer to key string
ReturnsSide-Effects: none
Returns:
drmaa2_string drmaa2_version drmaa2_get_drms_version (void) char *
drmaa2_getbool drmaa2_drmsdict_versionhas - returns the DRM system version
(const drmaa2_dict d, const char * key)
Parameters:This function checks for the presence of key in the dictionary.
- void Side-EffectsParameters:
none Returns: d - Pointer to drmaa dict
drmaa2_version drmaa2_string drmaa2_get_instance_value (const void * instance, const char * name) key - pointer to key string
drmaa2_string_list drmaa2_get_jsession_names (void)
Side-Effects: none
drmaa2_get_jsession_names - returns theReturns:
list of drmaa2_job sessions Side-Effects: nonedrmaa2_bool
drmaa2_string_list drmaa2_dict_list Returns:
(const drmaa2_dict d)
This function returns drmaa2_string_list - returnsa drmaa list of jobkeys sessionin names available NULL and last error is setthe dictionary.
drmaa2_string_list drmaa2_get_rsession_names (void)Parameters:
Get a listd of- allPointer reservationto sessiondrmaa names.dict
Side-Effects: none
Returns:
drmaa2_string_list - list of reservation sessions NULL - If there are no existing reservation sessions
drmaa2_error drmaa2_dict_set (drmaa2_dict d, const char * key, const char * val)
This function sets the key value pair ·to Ifthe thisdictionary.
feature
is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION Parameters:
void drmaa2_j_free (drmaa2_j * j) d - Pointer drmaa2_j_free - frees the drmaa2_job structure pointed by jto drmaa dict
key - pointer to key Parameters:string
jval - pointer to value drmaa2_jobstring
Side-Effects: none
Returns:
void drmaa2_string drmaa2_j_get_id (const drmaa2_j j)error - DRMAA2_SUCCESS
· DRMAA2_INVALID_ARGUMENT
drmaa2_string drmaa2_jget_getdrmaa_idname (void)
- Returns newly allocated drmaa2_get_drmaa_jobname id- stringreturns the DRM application name
Parameters: Parameters:
j - pointer to drmaa2_job structure.- void
Side-Effects: none
·
Returns:
drmaa2_string
-
Gets the job iddrmaa2_version from drmaa2_job NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
_get_drmaa_version (void)
drmaa2_get_drmaa_version - returns the DRM application version
drmaa2_jinfo drmaa2_j_get_info (const drmaa2_j j) Parameters:
drmaa2_j_get_info() - void
Gets
drmaa2_job info structure from the drmaa2_job in drmaa2_j structure. Side-Effects: none
ParametersReturns:
drmaa2_version
j
- pointer todrmaa2_string drmaa2_get_drms_job structure.name (void)
drmaa2_get_drms_name Side-Effects: none- returns the DRM system name
ReturnsParameters:
drmaa2_jinfo - returns drmaa2_jinfo if successful NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_jtemplate drmaa2_j_get_jt (const drmaa2_j j)- void
Side-Effects: none
Returns:
drmaa2_string
drmaa2_jversion drmaa2_get_drms_jtversion (void)
- Returns pointer of drmaa2_job template structure from Job._get_drms_version - returns the DRM system version
Parameters:
j - pointer to drmaa2_job structure.void
Side-Effects: none
Returns:
drmaa2_string - gets the session name from drmaa2_session NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_string drmaa2_j_get_session_name (const drmaa2_j j)
drmaa2_j_get_session_name() - Returns newly allocated session name string
Parameters:
version
drmaa2_string drmaa2_get_instance_value (const void * instance, const char * name)
drmaa2_string_list drmaa2_get_jsession_names (void)
drmaa2_get_jsession_names - returns jthe -list pointer toof drmaa2_job structure.sessions
Side-Effects: none
Returns:
drmaa2_string_list - getsreturns thelist sessionof name fromjob drmaa2_session NULLnames -available if failsNULL and DRMAA2_INVALID_ARGUMENTlast error is set
drmaa2_string_jstatelist drmaa2_jget_getrsession_statenames (constvoid)
drmaa2_j j, drmaa2_string * substate) Get a list of all reservation session names.
drmaa2_j_get_state() - Gets drmaa2_job state from the drmaa2_job in drmaa2_j structure. Side-Effects: none
ParametersReturns:
j - pointer to drmaa2_job structure.
substate - state of the drmaa2_job in drmaa2_j structure
Side-Effects: nonedrmaa2_string_list - list of reservation sessions NULL - If there are no existing reservation sessions
Returns: · If this feature is not supported, set drmaa2_lasterror_jstatev - returns current drmaa2_job stateto DRMAA2_UNSUPPORTED_OPERATION
drmaa2_errorvoid drmaa2_j_holdfree (drmaa2_j * j)
drmaa2_j_hold()free - Holdsfrees the drmaa2_job structure inpointed by drmaa2_j structure.
Parameters:
j - pointer to drmaa2_job
structure.
Side-Effects: none
Returns:
drmaa2_error - Returns DRMAA2_SUCCESS on success DRMAA2_INVALID_STATE if job state is invalid for holdvoid
drmaa2_errorstring drmaa2_j_releaseget_id (const drmaa2_j j)
drmaa2_j_releaseget_id() - Returns Releasesnewly theallocated drmaa2_job inid drmaa2_jstring
structure.
Parameters:
j - pointer to drmaa2_job structure.
Side-Effects: none
Returns:
Returns: drmaa2_string - Gets the job id from drmaa2_errorjob NULL - Returnsif DRMAA2_SUCCESS on successfails and DRMAA2_INVALID_STATEARGUMENT if joberror state is invalidset
for
release drmaa2_errorjinfo drmaa2_j_resumeget_info (const drmaa2_j j)
drmaa2_j_resumeget_info() - Resumes Gets drmaa2_job info structure from the drmaa2_job in drmaa2_j structure.
Parameters:
j - pointer to drmaa2_job structure.
Side-Effects: none
Returns:
drmaa2_errorjinfo - Returnsreturns DRMAA2_SUCCESS on successdrmaa2_jinfo if successful NULL - if fails and DRMAA2_INVALID_STATEARGUMENT if joberror state is invalidset
for
resume drmaa2_errorjtemplate drmaa2_j_suspendget_jt (const drmaa2_j j)
drmaa2_j_suspendget_jt() - SuspendsReturns pointer theof drmaa2_job in drmaa2_j structuretemplate structure from Job.
Parameters:
j - pointer to drmaa2_job structure.
Side-Effects: none
Returns:
drmaa2_errorstring - Returns DRMAA2_SUCCESS on success gets the session name from drmaa2_session NULL - if fails and DRMAA2_INVALID_STATE if job stateARGUMENT error is invalid forset
suspend
drmaa2_errorstring drmaa2_j_get_terminatesession_name (const drmaa2_j j)
drmaa2_j_get_session_terminatename() - TerminatesReturns thenewly drmaa2_joballocated insession drmaa2_j structure.name string
Parameters:
j - pointer to drmaa2_job structure.
Side-Effects: none
Returns:
drmaa2_errorstring - Returns DRMAA2_SUCCESS on success gets the session name from drmaa2_session NULL - if fails and DRMAA2_INVALID_STATE if job stateARGUMENT error is invalidset
for
terminate drmaa2_errorjstate drmaa2_j_waitget_startedstate (const drmaa2_j j, const time_t timeoutdrmaa2_string * substate)
drmaa2_j_waitget_startedstate() - Blocks till Gets drmaa2_job state from the drmaa2_job isin started or till timeout expires
drmaa2_j structure.
Parameters:
j - pointer to drmaa2_job structure.
timeoutsubstate - Timeout state of the drmaa2_job in timedrmaa2_tj format.structure
Side-Effects: none
Returns:
drmaa2_errorjstate - returns DRMAA2_SUCCESS if successful DRMAA2_TIMEOUT if timeout happened current drmaa2_job state
drmaa2_error drmaa2_j_wait_terminatedhold (const drmaa2_j j, const time_t timeout)
drmaa2_j_wait_terminatedhold() - Blocks tillHolds the drmaa2_job isin terminated or till timeout expiresdrmaa2_j structure.
Parameters:
j - pointer to drmaa2_job structure.
timeout - Timeout in time_t format.
Side-Effects: none
Returns:
drmaa2_error - returnsReturns DRMAA2_SUCCESS ifon successfulsuccess DRMAA2_TIMEOUTINVALID_STATE if timeout happened job state is invalid for hold
voiddrmaa2_error drmaa2_jarrayj_freerelease (drmaa2_jarray * ja)j j)
drmaa2_jarrayj_freerelease() - freesReleases the drmaa2_job arrayin drmaa2_j structure pointed by.
ja
Parameters:
jaj - pointer to DRMAA jo arraydrmaa2_job structure.
Side-Effects: none
Returns:
Side-Effects: none drmaa2_error - Returns: DRMAA2_SUCCESS on success DRMAA2_INVALID_STATE if job state is invalid for release
void
drmaa2_stringerror drmaa2_jarrayj_get_idresume (const drmaa2_jarrayj jaj)
drmaa2_jarrayj_get_idresume() Gets- Resumes the iddrmaa2_job fromin drmaa2 drmaa2_jobj arraystructure.
Parameters:
jaj - pointer to drmaa2_job arraystructure.
Side-Effects: none
Returns:
drmaa2_stringerror - job id of drmaa2_job array NULL -Returns DRMAA2_SUCCESS on success DRMAA2_INVALID_STATE if failsjob and DRMAA2_INVALID_ARGUMENT error is setstate is invalid for resume
drmaa2_jtemplateerror drmaa2_jarray_get_job_templatej_suspend (const drmaa2_jarrayj jaj)
drmaa2_jarray_get_job_templatej_suspend() - returnsSuspends the drmaa2_job template used to submit the in drmaa2_jobj arraystructure.
Parameters:
jaj - pointer to drmaa2_job arraystructure.
Side-Effects: none
Returns:
drmaa2_jtemplateerror - returnsReturns jobDRMAA2_SUCCESS templateon fromsuccess drmaa2_job array NULL -DRMAA2_INVALID_STATE if failsjob and DRMAA2_INVALID_ARGUMENT error is setstate is invalid for suspend
drmaa2_j_listerror drmaa2_jarrayj_get_jobsterminate (const drmaa2_jarrayj jaj)
drmaa2_jarrayj_get_jobsterminate() - ReturnsTerminates the list of jobsdrmaa2_job in the drmaa2_job arrayj structure.
Parameters:
jaj - Pointerpointer to drmaa2_job array structure.
Side-Effects: none
Returns:
drmaa2_j_listerror - Returns getsDRMAA2_SUCCESS liston ofsuccess drmaa2_jobs from drmaa2_jarray NULL -DRMAA2_INVALID_STATE if failsjob and DRMAA2_INVALID_ARGUMENT error is setstate is invalid for terminate
drmaa2_stringerror drmaa2_j_jarray_get_session_name (const drmaa2_jarray ja)wait_started (const drmaa2_j j, const time_t timeout)
drmaa2_jarrayj_get_session_namewait_started() - gets the session name in whichBlocks till the drmaa2_job array is submitted is started or till timeout expires
Parameters:
jaj - pointer to drmaa2_job array structure.
timeout - Timeout in time_t format.
Side-Effects: none
Returns:
drmaa2_stringerror - returns session name from drmaa2_job array NULL - if fails andDRMAA2_SUCCESS if successful DRMAA2_INVALID_ARGUMENTTIMEOUT errorif istimeout sethappened
drmaa2_error drmaa2_jarrayj_wait_holdterminated (const drmaa2_jarray ja)j j, const time_t timeout)
drmaa2_jarray_holdj_wait_terminated() - Blocks holdstill the drmaa2_job arrayjob is terminated or till timeout expires
Parameters:
jaj - pointer to drmaa2_job array structure.
timeout - Timeout in time_t format.
Side-Effects: none
Returns:
drmaa2_error - returns DRMAA2_SUCCESS if successful drmaa2DRMAA2_errorTIMEOUT if failstimeout happened
drmaa2_errorvoid drmaa2_jarray_releasefree (drmaa2_jarray * ja)
drmaa2_jarray_releasefree - releasesfrees the drmaa2_job array structure pointed by ja
Parameters:
ja - pointer to drmaa2_jobDRMAA jo array
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successful drmaa2_error if failsvoid
drmaa2_errorstring drmaa2_jarray_get_resumeid (const drmaa2_jarray ja)
drmaa2_jarray_resume - resumes theget_id() Gets the id from drmaa2 drmaa2_job array.
Parameters:
ja - pointer to drmaa2_job array
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successfuldrmaa2_string - job id of drmaa2_errorjob array NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_error drmaa2_jarray_suspend (jtemplate drmaa2_jarray_get_job_template (const drmaa2_jarray ja)
drmaa2_jarray_get_job_suspendtemplate - suspends returns the drmaa2_job template used to submit the drmaa2_job array.
Parameters:
ja - pointer to drmaa2_job array
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successfuldrmaa2_jtemplate - returns job template from drmaa2_errorjob array NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_errorj_list drmaa2_jarray_get_terminatejobs (const drmaa2_jarray ja)
drmaa2_jarray_terminate - terminatesget_jobs() Returns the drmaa2_joblist arrayof jobs Parameters:
ja - pointer to in the drmaa2_job array
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successful drmaa2_error if fails structure.
Parameters:
drmaa2_jinfo drmaa2_jinfo_create (void) drmaa2_jinfo_create()ja - createsPointer ato drmaa2_job infoarray structure and returns its pointer
Side-Effects: none
Returns:
drmaa2_jinfoj_list - pointergets list toof newlydrmaa2_jobs allocatedfrom drmaa2_jinfo structurejarray NULL - if allocation fails and DRMAA2_OUTINVALID_OF_RESOURCEARGUMENT error is set
voiddrmaa2_string drmaa2_jinfo_freejarray_get_session_name (const drmaa2_jinfojarray * jiRefja)
drmaa2_jarray_get_jinfosession_free()name - freesgets the session drmaa2_jobname infoin structurewhich andthe itsdrmaa2_job innerarray datais typessubmitted
Parameters:
jiRefja - pointer to drmaa2_job info structure.
array
Side-Effects: none
Returns:
Side-Effects: none drmaa2_string - returns session name Returns:from drmaa2_job array NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
void
drmaa2_error drmaa2_stringjarray_listhold (drmaa2_jinfo_impl_spec (voidjarray ja)
drmaa2_jinfojarray_impl_spechold - Listsholds the drmaa spec implementations supported for job info (e.g. drmaa, drmaa2) drmaa2_job array
Parameters:
ja Side-Effects: nonepointer to drmaa2_job array
Returns: Side-Effects: none
drmaa2_string_list - list of drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION Returns:
DRMAA2_SUCCESS if successful drmaa2_error if fails
voiddrmaa2_error drmaa2_jsessionjarray_freerelease (drmaa2_jsessionjarray * jsja)
drmaa2_jsessionjarray_freerelease - Freesreleases the memory of Job session pointed by jsdrmaa2_job array
Parameters:
jsja - pointer to drmaa2_jsession.job array
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successful drmaa2_error if voidfails
drmaa2_stringerror drmaa2_jsessionjarray_get_contactresume (const drmaa2_jsessionjarray jsja)
drmaa2_jsessionjarray_get_contactresume - Returns the DRMS name ofresumes the drmaa2_job sessionarray
Parameters:
jsja - pointer to drmaa2_job session.array
Side-Effects: none
Returns:
DRMAA2_SUCCESS if successful drmaa2_error if fails
drmaa2_jarrayerror drmaa2_jsession_get_job_arrayjarray_suspend (const drmaa2_jsession js, const drmaa2_string jobarrayId)jarray ja)
drmaa2_jarray_suspend - suspends the drmaa2_jsession_get_job_array - returns the specified job array from the array
Parameters:
ja - pointer to drmaa2_job sessionarray
ParametersSide-Effects: none
Returns:
js - pointer to drmaa2_job session. DRMAA2_SUCCESS if successful drmaa2_error if fails
jobarrayId - Job array id which needs to be retrieveddrmaa2_error drmaa2_jarray_terminate (drmaa2_jarray ja)
drmaa2_jarray_terminate - terminates Side-Effects: nonethe drmaa2_job array
ReturnsParameters:
drmaa2_jarrayja - returns pointer to drmaa2_jarrayjob array
with
specified jobarrayId in the job session NULL Side-Effects: ifnone
fails and DRMAA2_INVALID_ARGUMENT error is set Returns:
drmaa2_string_list drmaa2_jsession_get_job_categories (const drmaa2_jsession js) DRMAA2_SUCCESS if successful drmaa2_jsession_get_job_categories - returns the string list of drmaa2_job categories in the drmaa2_job session
error if fails
drmaa2_jinfo drmaa2_jinfo_create (void)
Parameters: drmaa2_jinfo_create() - creates a drmaa2_job info structure and returns js -its pointer to drmaa2_job
session
Side-Effects: none
Returns:
drmaa2_string_listjinfo - returnspointer listto of job categories fromnewly allocated drmaa2_jsessionjinfo structure NULL - if allocation fails and DRMAA2_INVALIDOUT_OF_ARGUMENTRESOURCE error is set
void drmaa2_jjinfo_listfree (drmaa2_jsession_get_jobs (const drmaa2_jsession js, const drmaa2_jinfo filter)jinfo * jiRef)
drmaa2_jinfo_free() - frees the drmaa2_job info structure and its inner data types
Parameters:
jiRef - pointer to drmaa2_jsession_get_jobs - returns list of jobs in the drmaa2_job session matching the jobinfo filterjob info structure.
Side-Effects: none
ParametersReturns:
void
js
- pointer todrmaa2_string_list drmaa2_jinfo_impl_jobspec session(void)
js drmaa2_jinfo_impl_spec - Lists the drmaa filterspec -implementations filtersupported for gettingjob jobs with specific conditionsinfo (e.g. drmaa, drmaa2)
Side-Effects: none
Returns:
drmaa2_jstring_list - returns list of drmaa jobsspec implementations matchingsupported theNULL drmaa2_job- filterIf providedthis NULLfeature -is ifnot failssupported, andset DRMAA2drmaa2_INVALIDlasterror_ARGUMENTv error is setto DRMAA2_UNSUPPORTED_OPERATION
void drmaa2_string drmaa2_jsession_get_session_namefree (const drmaa2_jsession * js)
drmaa2_jsession_get_session_name - returns thefree Frees the memory of Job session namepointed from drmaa2_job session.by js
Parameters:
js - pointer to drmaa2_job sessionjsession.
Side-Effects: none
MT-Unsafe
Returns:
drmaa2_string -void
returns
session name from drmaa2_jsession NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_jarraystring drmaa2_jsession_runget_bulk_jobscontact (const drmaa2_jsession js_,)
const drmaa2_jtemplate jt_, unsigned long begin_index_, unsigned long enddrmaa2_index_, unsigned long step_, unsigned long
max_parallel_)
jsession_get_contact - Returns the DRMS name of the drmaa2_job session
Write description of function here.
Parameters:
js_ - pointer to drmaa2_job session.
Side-Effects: none
jt_ - JobReturns:
template to be considered or used DRMAA2_SUCCESS if successful drmaa2_error if fails
begin_index_
- Starting index ofdrmaa2_jarray drmaa2_jsession_get_job array
_array (const drmaa2_jsession js, const drmaa2_string jobarrayId)
end_index_drmaa2_jsession_get_job_array - Endingreturns indexthe ofspecified drmaa2_job array from the drmaa2_job session
step_ -Parameters:
Increment between each jobs js - pointer to maxdrmaa2_parallel_job -session.
Maximum parallel jobs to run jobarrayId Side-Effects: noneJob array id which needs to be retrieved
MT-Unsafe ReturnsSide-Effects: none
Returns:
drmaa2_jarray - returns pointer to drmaa2_jarray if successful NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid NULL and sets last errordrmaa2_jarray - returns pointer to DRMAA2drmaa2_INTERNALjarray with specified jobarrayId in the job session NULL - if fails if any internal error occursand DRMAA2_INVALID_ARGUMENT error is set
drmaa2_jstring_list drmaa2_jsession_runget_job_categories (const drmaa2_jsession js_, const drmaa2_jtemplate jt_)
drmaa2_jsession_runget_job_categories - returns runsthe jobstring inlist theof drmaa2_job sessioncategories within the drmaa2_job templatesession
specified
Parameters:
js_ - pointer to drmaa2_job session
jt_ - Job template that needs to be run
Side-Effects: none
Returns:
drmaa2_j - returns pointer to job which is newly started in the job session NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid NULL and sets last error to
:
drmaa2_string_list - returns list of job categories from drmaa2_jsession NULL - if fails and DRMAA2_INVALID_SESSIONARGUMENT if sessionerror name is invalidset
drmaa2_j_list drmaa2_jsession_waitget_any_startedjobs (const drmaa2_jsession js, const drmaa2_j_list l, const time_t timeoutjinfo filter)
drmaa2_jsession_waitget_any_startedjobs - blocksreturns tilllist theof drmaa2_jobjobs in the drmaa2_job session started or tillmatching the timejobinfo outfilter
Parameters:
js - pointer to drmaa2_job session js
l - list of drmaa2_jobs
timeout - timeout to wait if event has not occurred filter - filter for getting jobs with specific conditions
Side-Effects: none
Returns:
drmaa2_j_list - returns pointer to list of jobs matching the drmaa2_job which started NULL and last error is set to DRMAA2_TIMEOUT if timeout happensfilter provided NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_jstring drmaa2_jsession_waitget_anysession_terminatedname (const drmaa2_jsession js, const drmaa2_j_list l, const time_t timeout)
drmaa2_jsession_waitget_anysession_terminatedname - returns blocksthe session tillname thefrom drmaa2_job in the session.
Parameters:
js - pointer to drmaa2_job session
ended or till the time outSide-Effects: none
ParametersReturns:
jsdrmaa2_string - pointer toreturns session name from drmaa2_jobjsession sessionNULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_jarray drmaa2_jsession_run_bulk_jobs (const l - list of drmaa2_jobs
timeout - timeout to wait if event has not occursdrmaa2_jsession js_, const drmaa2_jtemplate jt_, unsigned long begin_index_, unsigned long end_index_, unsigned long step_, unsigned long
max_parallel_)
Write description of Side-Effects: nonefunction here.
ReturnsParameters:
drmaa2js_j - returns pointer to drmaa2_job whichsession
terminated NULL and last error is set to DRMAA2_TIMEOUT if timeout happens
drmaa2_jtemplate drmaa2_jtemplate_create (void)
drmaa2_jtemplate_create() - creates a drmaa2_job template structure and returns its pointer jt_ - Job template to be considered or used
Side-Effects: none begin_index_ - Starting index of Returns:drmaa2_job array
drmaa2end_index_jtemplate - Ending pointerindex toof drmaa2_jtemplatejob ifarray
allocated NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set step_ - Increment between void drmaa2_jtemplate_free (drmaa2_jtemplate * jtemplate)each jobs
drmaa2max_jtemplateparallel_free() - frees a drmaa2_job template structure and its inner data types Maximum parallel jobs to run
Side-Effects: none
ParametersReturns:
jtemplatedrmaa2_jarray - returns pointer to drmaa2_job template structure.
Side-Effects: none
jarray if successful NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid NULL and sets last error to DRMAA2_INTERNAL
Returns: if any internal error occurs
void drmaa2_j drmaa2_jsession_run_job (const drmaa2_string_listjsession js_, const drmaa2_jtemplate_impl_spec (void jt_)
drmaa2_jtemplatejsession_implrun_specjob - Listsruns thejob drmaa spec implementations supported for in the job template (e.g. drmaa, drmaa2)
session with the drmaa2_job template specified
Side-Effects: none
Returns Parameters:
drmaa2js_string_list - listpointer of drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATIONto drmaa2_job session
drmaa2_error drmaa2_lasterror (void) jt_ - Job template Thisthat functionneeds returnsto thebe lastrun
occurred error.
Side-Effects: none
Returns:
drmaa2_errorj - returns drmaa2_string drmaa2_lasterror_text (void)
This function returns the last occurred error in string.
Side-Effects: nonepointer to job which is newly started in the job session NULL and sets last error to DRMAA2_INVALID_ARGUMENT if any argument is invalid NULL and sets last error to
Returns: DRMAA2_INVALID_SESSION if session name is invalid
drmaa2_string - newly allocated string of last error NULL - If no error text existsj drmaa2_jsession_wait_any_started (const drmaa2_jsession js, const drmaa2_j_list l, const time_t timeout)
drmaa2_error_jsession_wait_any_started - blocks till the drmaa2_list_add (drmaa2_list l, const void * value)job in the drmaa2_job session started or till the time out
Parameters:
This function adds an element to the list. js - pointer to drmaa2_job Parameters:session
l - Pointerlist to drmaa listof drmaa2_jobs
valuetimeout - pointertimeout to thewait elementif whichevent needshas tonot beoccurred
inserted
Side-Effects: none
Returns:
drmaa2_errorj - DRMAA2_INVALID_ARGUMENTreturns pointer to drmaa2_job which started NULL and last error is set to · DRMAA2_OUT_OF_RESOURCETIMEOUT if timeout happens
· DRMAA2_SUCCESS
drmaa2_list drmaa2_list_createdrmaa2_j drmaa2_jsession_wait_any_terminated (const drmaa2_listtypejsession tjs, const drmaa2_j_list_entryfree callback)l, const time_t timeout)
This function creates a drmaa list.
Parameters:
t - Type of the list which needs to be created drmaa2_jsession_wait_any_terminated - blocks till the drmaa2_job in the drmaa2_job session ended or till the time out
Parameters:
js - pointer callbackto -drmaa2_job Callsession
back function to call when free is called. l - list of Side-Effects: nonedrmaa2_jobs
Returns: timeout - timeout to wait if event has not occurs
drmaa2_list drmaa2_error drmaa2_list_del (drmaa2_list l, long pos) Side-Effects: none
Returns:
This function deletes an element from the list. drmaa2_j - returns pointer to Parameters:drmaa2_job which terminated NULL and last error is set to DRMAA2_TIMEOUT if ltimeout -happens
Pointer
to drmaa list drmaa2_jtemplate drmaa2_jtemplate_create (void)
posdrmaa2_jtemplate_create() - positioncreates ofa thedrmaa2_job elementtemplate whichstructure needsand toreturns beits deletedpointer
Side-Effects: none
Returns:
drmaa2_errorjtemplate - DRMAA2_INVALID_ARGUMENTpointer to drmaa2_jtemplate if allocated NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error ·is DRMAA2_SUCCESSset
void drmaa2_listjtemplate_free (drmaa2_listjtemplate * ljtemplate)
s This function drmaa2_jtemplate_free() - frees a drmaadrmaa2_job listtemplate structure and its inner data types
Parameters: Parameters:
l - Pointer to drmaa list
Side-Effects: none
Returns:
void
const void* drmaa2_list_get (const drmaa2_list l, long index)
This function gets the element form a particular position of the list. jtemplate - pointer to drmaa2_job template structure.
Side-Effects: none
ParametersReturns:
lvoid
-
Pointer to drmaa drmaa2_string_list drmaa2_jtemplate_impl_spec (void)
drmaa2_jtemplate_impl_spec - Lists indexthe -drmaa postionspec fromimplementations whcihsupported thefor datajob has to be takentemplate (e.g. drmaa, drmaa2)
Side-Effects: none
Returns:
void*drmaa2_string_list - pointerlist toof thedrmaa elementspec returedimplementations assupported void* NULL - If thethis positionfeature is not valid
longsupported, set drmaa2_listlasterror_sizev (const drmaa2_list l)
This function returns the size of the list.
Parameters:
to DRMAA2_UNSUPPORTED_OPERATION
drmaa2_error drmaa2_lasterror (void)
This lfunction -returns Pointerthe tolast drmaaoccurred listerror.
Side-Effects: none
Returns:
long - size of listdrmaa2_error
drmaa2_machineinfostring drmaa2_machineinfolasterror_createtext (void)
drmaa2_machineinfo_create() - creates a drmaa2_machineinfo info structure and returns its pointerThis function returns the last occurred error in string.
Side-Effects: none
Returns:
drmaa2_machineinfostring - pointer to newly allocated drmaa2_machineinfo structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set
void drmaa2_machineinfo_free (drmaa2_machineinfo * miRef)
This function frees the pre-allocated drmaa machine info structure.
Parameters:
string of last error NULL - If no error text exists
drmaa2_error drmaa2_list_add (drmaa2_list l, const void miRef* -value)
Pointer to drmaa machine info This function adds an element to Side-Effects: nonethe list.
ReturnsParameters:
voidl - Pointer to drmaa drmaa2_string_list
drmaa2_machineinfo_impl_spec (void) drmaa2_machineinfo_impl_specvalue - Listspointer to the element machinewhich infoneeds specto implementationsbe supportedinserted
Side-Effects: none
Returns:
drmaa2_string_listerror -list ofDRMAA2_INVALID_ARGUMENT
machineinfo
spec implementations supported NULL - If this feature is not supported, set· drmaa2DRMAA2_OUT_lasterror_v to DRMAA2_UNSUPPORTED_OPERATIONOF_RESOURCE
void drmaa2_msession_free (drmaa2_msession * ms)· DRMAA2_SUCCESS
drmaa2_j_list drmaa2_msession_get_all_jobslist_create (const drmaa2_msessionlisttype ms_t, const drmaa2_list_jinfoentryfree filter_callback)
This function creates Returnsa thedrmaa 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 only the jobs seen by the DRMAA2 user. Parameters:
t - Type of the list which needs to be created
callback - Call back function to call when free is called.
Side-Effects: none
ParametersReturns:
msdrmaa2_list
- pointer to drmaa2_msession created earlier
filter_ - of type drmaa2_jinfo (through which we can query jobs per jobstate, job owner and per queue etc
Side-Effects: nonedrmaa2_error drmaa2_list_del (drmaa2_list l, long pos)
This function deletes an element from the list.
Parameters:
l - Pointer to drmaa list
pos - Returns:position of the element which needs to be deleted
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:
Returns list ofdrmaa2_error machines or hosts available for submitting jobs in the DRMS system.- DRMAA2_INVALID_ARGUMENT
· DRMAA2_SUCCESS
Parameters: void drmaa2_list_free (drmaa2_list * l)
ms_ pointers toThis drmaa2_msessionfunction createdfrees earliera drmaa list
Parameters:
names_ a list of queue names acts as filter i.e. we fetchl info- ofPointer onlyto thesedrmaa queues.list
Side-Effects: none
Returns:
drmaa2_machineinfo_listvoid
if
succeeds NULL if fails.
const void* drmaa2_queueinfo_list drmaa2_msession_get_all_queues (const drmaa2_msessionlist ms_l, const drmaa2_string_list names_)long index)
This Returnsfunction listgets ofthe queueselement availableform fora submittingparticular jobsposition inof the DRMS systemlist.
Parameters:
ms_ pointerl - Pointer to drmaa2_msessiondrmaa createdlist
earlier index names_- apostion listfrom ofwhcih queuethe namesdata actshas asto filter i.e. we fetch info of only these queues.be taken
Side-Effects: none
Returns:
void* - pointer to the element drmaa2_queueinfo_list if succeeds NULL if fails.retured as void* NULL - If the position is not valid
long drmaa2_r_list drmaa2_msession_get_all_reservations_size (const drmaa2_msessionlist ms_l)
This function returns the size Returnsof the list of all advance reservations visible for the user running the DRMAA-based application. The list or number of jobs returned should adhere to DRMS policies. Ex: The list might
be limited to contain only the reservations seen by the DRMAA2 user.
Parameters:.
Parameters:
l - Pointer to drmaa list
Side-Effects: none
Returns:
long - size of list
drmaa2_machineinfo drmaa2_machineinfo_create (void)
drmaa2_machineinfo_create() - creates a msdrmaa2_machineinfo info pointerstructure toand drmaa2_msessionreturns createdits earlierpointer
Side-Effects: none
Returns:
drmaa2_j_list if succeeds NULL if fails
machineinfo - pointer to newly allocated drmaa2_machineinfo structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set
void drmaa2_notificationmachineinfo_free (drmaa2_notificationmachineinfo * nRefmiRef)
This function frees the pre-allocated drmaa machine notificationinfo structure.
Parameters:
nRefmiRef - Pointer to drmaa notificationmachine info
Side-Effects: none
Returns:
void
drmaa2_string_list drmaa2_notificationmachineinfo_impl_spec (void)
drmaa2_notificationmachineinfo_impl_spec - Lists the machine notificationinfo spec implementations supported
Side-Effects: none
Returns:
drmaa2_string_list - list of notificationmachineinfo spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION
drmaa2_jsessionvoid drmaa2_openmsession_jsessionfree (constdrmaa2_msession char * session_name_ms)
drmaa2_open_jsession - Opens an already existing drmaa2_job session
Parameters:
drmaa2_j_list drmaa2_msession_get_all_jobs (const drmaa2_msession ms_, const drmaa2_jinfo filter_)
session_name_ - Session name of the drmaa2_job session which needs to be opened
Side-Effects: none
Returns:
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
drmaa2_jsessionlimited -to returnscontain pointeronly tothe drmaa2_jsessionjobs forseen aby sessionthe whichDRMAA2 isuser.
already
present NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set Parameters:
drmaa2_msession drmaa2_open_msession (const char * contactms_) - pointer to drmaa2_msession created earlier
Opens the monitoring session. filter_ - Parameters:of type drmaa2_jinfo (through which we can query jobs per jobstate, contact_job -owner Contactand ofper thequeue sessionetc
Side-Effects: none
Returns:
MT-Unsafe Returns:
drmaa2_j_list if succeeds NULL if fails
drmaa2_machineinfo_list drmaa2_msession_get_all_machines (const drmaa2_msession if 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
drmaa2_rsession drmaa2_open_rsession (const char * session_name_) ms_, const drmaa2_string_list names_)
Returns list of machines or hosts available for submitting jobs in the DRMS system.
Parameters:
ms_ Openspointer theto previouslydrmaa2_msession created session.earlier
Parameters: names_ a list of queue names acts as filter session_name_ - Namei.e. we fetch info of theonly these sessionqueues.
Side-Effects: none
Returns:
drmaa2_machineinfo_rsessionlist if a sessionsucceeds exists NULL if sets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT errorfails.
drmaa2_queueinfo_list drmaa2_msession_get_queueinfoall_createqueues (void)const drmaa2_msession ms_, const drmaa2_queueinfostring_create() - creates a drmaa2_queueinfo structure and returns its pointer
Side-Effects: nonelist names_)
Returns: list of queues available for submitting jobs in drmaa2_queueinfo - pointer to newly allocated drmaa2_queueinfo structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is setthe DRMS system.
void drmaa2_queueinfo_free (drmaa2_queueinfo * qiRef)Parameters:
Thisms_ functionpointer freesto the pre-allocated drmaa queueinfo structure.drmaa2_msession created earlier
Parameters: names_ a list of queue names acts as filter i.e. we qiReffetch -info Pointerof toonly drmaathese queueinfoqueues.
Side-Effects: none
Returns:
voiddrmaa2_queueinfo_list if succeeds NULL if fails.
drmaa2_stringr_list drmaa2_msession_queueinfoget_implall_specreservations (voidconst drmaa2_msession ms_)
drmaa2_queueinfo_impl_spec - Lists the queue info spec implementations supported
Side-Effects: none
Returns:
Returns the list of all advance reservations visible for the user running the DRMAA-based application. The list or number of jobs returned should adhere to DRMS policies. Ex: The list might
be drmaa2_string_list -list of queueinfo spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION
limited to contain only the reservations seen by the DRMAA2 user.
Parameters:
void drmaa2_r_free (drmaa2_r * r) drmaa2ms_string drmaa2_r_get_id (const pointer to drmaa2_rmsession r)created earlier
Get the reservation id from a given reservation object.Side-Effects: none
ParametersReturns:
r - given reservation object
drmaa2_j_list if succeeds NULL if fails
void drmaa2_notification_free Side-Effects: none(drmaa2_notification * nRef)
This Returns:function frees the pre-allocated drmaa notification structure.
drmaa2_string Parameters:
Return values: nRef - Pointer to drmaa notification
-
reservation id drmaa2_rinfo drmaa2_r_get_info (const drmaa2_r r) Side-Effects: none
Returns:
Get the reservation info from a given reservation object. void
Parameters:
drmaa2_string_list drmaa2_notification_impl_spec (void)
drmaa2_notification_impl_spec - Lists rthe -notification givenspec reservationimplementations objectsupported
Side-Effects: none
Returns:
drmaa2_rinfostring_list - reservation info object list of notification spec implementations supported NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION
drmaa2_rtemplatejsession drmaa2_r_get_reservation_templateopen_jsession (const drmaa2_r rchar * session_name_)
Get the reservation template from a given reservation object.drmaa2_open_jsession - Opens an already existing drmaa2_job session
Parameters:
r - given reservation objectsession_name_ - Session name of the drmaa2_job session which needs to be opened
Side-Effects: none
Returns:
drmaa2_rtemplate- - reservation templatejsession - returns pointer to drmaa2_jsession for a session which is already present NULL - if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_stringmsession drmaa2_r_get_session_nameopen_msession (const char * drmaa2contact_r r)
GetOpens the reservationmonitoring session name from a given reservation object.
Parameters:
rcontact_ - givenContact of reservationthe objectsession
Side-Effects: none
Returns:
drmaa2_string - reservationmsession if the session exists NULL if the session does not exist and if session name is invalid NULLand -also if fails andsets drmaa2_lasterror_v to DRMAA2_INVALID_ARGUMENT error is
set
drmaa2_errorrsession drmaa2_ropen_terminatersession (drmaa2_r r)const char * session_name_)
Opens Terminatethe apreviously givencreated reservationsession.
Parameters:
rsession_name_ - givenName of reservationthe objectsession.
Side-Effects: none
Returns:
drmaa2_error - on success DRMAA2_SUCCESSrsession if a session exists NULL if sets drmaa2_lasterror_v to DRMAA2_DENIEDINVALID_BY_DRMS if failedARGUMENT error.
drmaa2_errorqueueinfo drmaa2_registerqueueinfo_event_notificationcreate (const drmaa2_callback callbackvoid)
Registers a drmaa2_queueinfo_callbackcreate() with- thecreates DRMS library. For the first phase of implementation we do not support this.
Parameters:
a drmaa2_queueinfo structure and returns its pointer
Side-Effects: none
Returns:
callback - a structure of type drmaa2_callback containing the details ofdrmaa2_queueinfo callback- function,pointer eventto etcnewly allocated drmaa2_queueinfo structure NULL - if allocation fails Side-Effects: none
and DRMAA2_OUT_OF_RESOURCE error is set
Returns:
void drmaa2_queueinfo_free (drmaa2_queueinfo * qiRef)
This DRMAA2_SUCCESSfunction iffrees succeeds DRMAA2_UNSUPPORTED_OPERATION error if failsthe pre-allocated drmaa queueinfo structure.
drmaa2_rinfo drmaa2_rinfo_create (void) Parameters:
drmaa2_rinfo_create() - creates a drmaa2_reservation infoqiRef structure- andPointer returnsto itsdrmaa pointerqueueinfo
Side-Effects: none
Returns:
drmaa2_rinfovoid
-
pointer to newly allocateddrmaa2_string_list drmaa2_rinfo structure NULL - if allocation fails and DRMAA2_OUT_OF_RESOURCE error is set_queueinfo_impl_spec (void)
drmaa2_queueinfo_impl_spec - Lists the queue info spec implementations supported
void drmaa2_rinfo_free (drmaa2_rinfo * riRef)
Side-Effects: none
This function freesReturns:
the pre-allocated drmaa rinfo structure. drmaa2_string_list -list Parameters:of queueinfo spec implementations supported NULL - If this feature is not riRefsupported, - Pointerset drmaa2_lasterror_v to drmaaDRMAA2_UNSUPPORTED_OPERATION
reservation
info void drmaa2_r_free (drmaa2_r * r)
Side-Effects: none drmaa2_string drmaa2_r_get_id (const drmaa2_r r)
Returns: Get the reservation id from a given reservation voidobject.
drmaa2_string_list drmaa2_rinfo_impl_spec (void) Parameters:
Lists the drmaa spec implementations supported for reservationr info (e.g. drmaa, drmaa2)- given reservation object
Side-Effects: none
Returns:
drmaa2_string_list - list of drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION
Return values:
- reservation id
voiddrmaa2_rinfo drmaa2_r_rsessionget_freeinfo (const drmaa2_rsessionr * rsr)
drmaa2_rsession_free FreesGet the memoryreservation ofinfo Reservationfrom sessiona pointedgiven byreservation rsobject.
Parameters:
rsr - pointergiven to drmaa2_rsession.reservation object
Side-Effects: none
Returns:
drmaa2_rinfo - reservation info object NULL - voidif fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_stringrtemplate drmaa2_rsessionr_get_reservation_contacttemplate (const drmaa2_rsessionr rsr)
Get the reservation contacttemplate offrom a given drmaa2 reservation sessionobject.
Parameters:
rsr - given reservation sessionobject
Side-Effects: none
Returns:
drmaa2_stringrtemplate- - contact name associated with reservation sessiontemplate NULL - if reservationfails session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSIONand DRMAA2_INVALID_ARGUMENT error is set
drmaa2_rstring drmaa2_rsessionr_get_session_reservationname (const drmaa2_rsession rs, const drmaa2_string reservationIdr r)
Get the reservation objectsession name from a specific reservation session with the given reservation idobject.
Parameters:
rsr - given reservation session
reservationId - given reservation idobject
Side-Effects: none
Returns:
drmaa2_r- reservation NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
-Effects: none
Returns:
·drmaa2_string if- reservation session idname isNULL invalid, drmaa2_lasterror_v set to- if fails and DRMAA2_INVALID_ARGUMENT error is set
drmaa2_r_listerror drmaa2_rsessionr_get_reservationsterminate (const drmaa2_rsessionr rs_r)
Get all the reservation objects from Terminate a specificgiven reservation session.
Parameters:
rs_r - given reservation sessionobject
Side-Effects: none
Returns:
drmaa2_r_listerror - reservationon interfacesuccess list NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSIONDRMAA2_SUCCESS DRMAA2_DENIED_BY_DRMS if failed
drmaa2_stringerror drmaa2_rsessionregister_getevent_session_namenotification (const drmaa2_rsession rs)
Get the session name of a given drmaa2 reservation sessioncallback callback)
Registers a drmaa2_callback with the DRMS library. For the first phase of implementation we do not support this.
Parameters:
rscallback - givena reservationstructure sessionof type drmaa2_callback containing the details of callback Side-Effects: nonefunction, event etc
ReturnsSide-Effects: none
Returns:
drmaa2_string - session name associated with reservation session NULL -DRMAA2_SUCCESS if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSIONsucceeds DRMAA2_UNSUPPORTED_OPERATION error if fails
drmaa2_rrinfo drmaa2_rsessionrinfo_request_reservation (const drmaa2_rsession rs, const drmaa2_rtemplate rt_)
Creates a reservation object in a specific reservation session with the given reservation template. it also evaluates reservation template for the mandatory attributes and sends the requestcreate (void)
drmaa2_rinfo_create() - creates a drmaa2_reservation info structure and returns its pointer
to DRMS.Side-Effects: none
ParametersReturns:
rsdrmaa2_rinfo - givenpointer reservationto sessionnewly allocated drmaa2_rinfo structure NULL - if allocation fails rt_ - given reservation templateand DRMAA2_OUT_OF_RESOURCE error is set
void drmaa2_rinfo_free (drmaa2_rinfo * riRef)
Side-Effects: none This function frees Returns:the pre-allocated drmaa rinfo structure.
drmaa2_r- reservation NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
Parameters:
riRef - Pointer to drmaa reservation info
· if reservation template evaluation fails, drmaa2_lasterror_v set to DRMAA2_UNSUPPORTED_ATTRIBUTESide-Effects: none
Returns:
· if DRMS rejects reservation request, drmaa2_lasterror_v set to DRMAA2_DENIED_BY_DRMS void
drmaa2_string_rtemplatelist drmaa2_rinfo_rtemplateimpl_createspec (void)
Lists Thisthe drmaa functionspec freesimplementations thesupported pre-allocatedfor drmaareservation rtemplate structure.info (e.g. drmaa, drmaa2)
Side-Effects: none
Returns:
drmaa2_rtemplate_string_list - list of drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATION
void drmaa2_rtemplatersession_free (drmaa2_rtemplatersession * rtrs)
drmaa2_rsession_free Frees Thisthe functionmemory freesof theReservation pre-allocatedsession drmaapointed rtemplateby structure.rs
Parameters:
rtrs - Pointerpointer to drmaa rtemplatedrmaa2_rsession.
Side-Effects: none
Returns:
void
drmaa2_string_list drmaa2_rtemplatersession_implget_speccontact (voidconst drmaa2_rsession rs)
ListsGet the drmaacontact specof implementationsa supportedgiven fordrmaa2 reservation template (e.gsession.
drmaa,
drmaa2) Parameters:
Side-Effects: none Returns:rs - given reservation session
drmaa2_string_list Side-Effects: listnone
of
drmaa spec implementations supported NULL - If this feature is not supported, set drmaa2_lasterror_v to DRMAA2_UNSUPPORTED_OPERATIONReturns:
drmaa2_error drmaa2_set_instance_value (void * instance, const char * name, const char * value)
void drmaa2_slotinfo_free (drmaa2_slotinfo * siRef)
This function frees the pre-allocated drmaa slotinfo.
Parameters:string - contact name associated with reservation session NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
drmaa2_r drmaa2_rsession_get_reservation (const drmaa2_rsession rs, const drmaa2_string reservationId)
Get the reservation object from siRefa -specific Pointerreservation tosession drmaawith slotinfothe given reservation id.
Side-Effects: none Parameters:
Returns: rs - given reservation session
void void drmaa2_string_free (drmaa2_string * str)reservationId - given reservation id
This function frees the previously allocated drmaa2_string.Side-Effects: none
ParametersReturns:
str drmaa2_r- pointerreservation toNULL pre- allocatedif drmaa2_stringreservation session is invalid, drmaa2_lasterror_v set Side-Effects: noneto DRMAA2_INVALID_SESSION
Returns: · if reservation id is invalid, drmaa2_lasterror_v set to voidDRMAA2_INVALID_ARGUMENT
drmaa2_boolr_list 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:
drmaa2_versionr_list - reservation interface list NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
voiddrmaa2_string drmaa2_rsession_versionget_session_freename (const drmaa2_versionrsession rs)
* vRef) Get the Thissession functionname freesof thea pre-allocatedgiven drmaadrmaa2 versionreservation structuresession.
Parameters:
vRefrs - Pointergiven toreservation drmaasession
version
Side-Effects: none
Returns:
void |
Sample Example
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | Example1: DRMAA2 Simple Application |
---|
linenumbers | true |
---|
collapse | true |
---|
|
drmaa2_jsession js; /* Job session object*/
drmaa2_jtemplate jt; /* Job session template*/
drmaa2_j j; /* Job object*/
...
...
...
/* Create and open job session */
js = drmaa2_create_jsession("testsession", DRMAA2_UNSET_STRING);
if (js == NULL) {
...
return;
}
...
...
...
/* Create job template */
jt = drmaa2_jtemplate_create();
jt->remoteCommand = strdup("/bin/date");
j = drmaa2_jsession_run_job(js, jt);
...
...
drmaa2_j_wait_terminated(j, DRMAA2_INFINITE_TIME);
drmaa2_jtemplate_free(&jt);
drmaa2_destroy_jsession("testsession");
...
...
...
drmaa2_j_free(&j);
drmaa2_jsession_free(&js);
...
...
... |
Code Block |
---|
language | cpp |
---|
theme | Eclipse |
---|
title | Example2: DRMAA2 Advance Application |
---|
linenumbers | true |
---|
collapse | true |
---|
|
...
...
...
drmaa2_jtemplate jt = drmaa2_jtemplate_create(); /* job template object */
drmaa2_rtemplate rt = drmaa2_rtemplate_create(); /* reservation template object */
drmaa2_string_list cl = drmaa2_list_create(DRMAA2_STRINGLIST, NULL); / *create list of strings */
drmaa2_dict string - session name associated with reservation session NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
drmaa2_r drmaa2_rsession_request_reservation (const drmaa2_rsession rs, const drmaa2_rtemplate rt_)
Creates a reservation object in a 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_ - given reservation template
Side-Effects: none
Returns:
drmaa2_r- reservation NULL - if reservation session is invalid, drmaa2_lasterror_v set to DRMAA2_INVALID_SESSION
· if reservation template evaluation fails, drmaa2_lasterror_v set to DRMAA2_UNSUPPORTED_ATTRIBUTE
· if DRMS rejects reservation request, drmaa2_lasterror_v set to DRMAA2_DENIED_BY_DRMS
drmaa2_rtemplate drmaa2_rtemplate_create (void)
This function frees the pre-allocated drmaa rtemplate structure.
Side-Effects: none
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 firstchar machine */ 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);
rt->maxSlots = 4; siRef - Pointer to drmaa slotinfo
Side-Effects: none
Returns:
void
void drmaa2_string_free (drmaa2_string * str)
/* perform advance reservationThis */function frees the previously allocated ...
drmaa2_string.
rt->machineOS=DRMAA2_LINUX; rt->candidateMachines =Parameters:
cl; 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");bool drmaa2_supports (const drmaa2_capability c)
jt->jobEnvironment = env;
j = drmaa2_jsession_run_job(js, jt);
drmaa2_j_wait_terminated(j, DRMAA2_INFINITE_TIME);drmaa2_supports - returns true if drmaa supports the provided drmaa2_capability
Parameters:
/* Wait forc termination- anddrmaa2_capability printenum exitvalue
status
*/ ji = drmaa2_j_get_info(j);
Side-Effects: none
... ... ... Returns:
/* close sessions, cleanup */ drmaa2_jtemplate_free(&jt);version
void drmaa2_rtemplateversion_free(&rt);
(drmaa2_version * vRef)
This function frees the pre-allocated drmaa version structure.
drmaa2_jinfo_free(&ji); drmaa2_j_free(&j);Parameters:
drmaa2_r_free(&r); 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
...