...
export LD_LIBRARY_PATH=/usr/lib/libdrmaa2.so ./<drmaa2_app>
...
CPP-Style Class definition
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
namespace drmaa2
{
/** Forward declaration**/
class Job;
class JobArray;
struct QueueInfo;
struct MachineInfo;
struct SlotInfo;
class Reservation;
class JobSession;
class JobTemplate;
class JobInfo;
class ReservationInfo;
class ReservationTemplate;
class callback
{
public:
virtual void notify (notification notification);
};
class Reservation
{
public:
string getReservationId (void) const;
ReservationSession getSession (void) const;
ReservationTemplate getReservationTemplate (void) const;
ReservationInfo getInfo (void);
void terminate (void);
};
class JobArray
{
public:
string getJobArrayId (void) const;
vector <Job> getJobs (void) const;
JobSession getSession (void) const;
JobTemplate getJobTemplate (void) const;
void suspend (void);
void resume (void);
void hold (void);
void release (void);
void terminate (void);
};
/**
Every ReservationSession instance acts as container for advance reservations
in the DRM system. Every Reservation instance SHALL belong only to one
ReservationSession instance
*/
class ReservationSession
{
public:
string getContact (void) const;
string getSessionName (void) const;
Reservation getReservation (string reservationId);
Reservation requestReservation (ReservationTemplate reservationTemplate);
set <Reservation> getReservations (void);
};
/**
A job session instance acts as container for job instances controlled
through the DRMAA API. The session methods support the submission of new
jobs and the monitoring of existing jobs
*/
class JobSession
{
public:
string getSontact (void) const;
string getSessionName (void) const;
set <string> getJobCategories (void) const;
vector <job> getJobs (JobInfo filter);
JobArray getJobArray (string jobArrayId);
job runJob (JobTemplate jobTemplate);
JobArray runBulkJobs (JobTemplate jobTemplate,
long beginIndex,
long endIndex,
long step,
long maxParallel);
job waitAnyStarted (vector <job> jobs, time_t timeout);
job waitAnyTerminated (vector <job> jobs, time_t timeout);
};
/**
The MonitoringSession interface provides a set of stateless methods for
fetching information about the DRM system and the DRMAA implementation itself.
*/
class MonitoringSession
{
public:
set <Reservation> getAllReservations (void);
vector <Job> getAllJobs (JobInfo filter);
set <QueueInfo> getAllQueues (set <string> names);
set <MachineInfo> getAllMachines (set <string> names);
};
/**
The SessionManager interface is the main interface of a DRMAA implementation for
establishing communication with the DRM system. By the help of this interface, sessions
for job management, monitoring,and/or reservation management can be maintained.
*/
class SessionManager
{
public:
string getDrmsName (void) const;
version getDrmsVersion (void) const;
version getDrmaaVersion (void) const;
bool supports (capability capability);
JobSession createJobSession (string sessionName,
string contactString);
ReservationSession createReservationSession (string sessionName,
string contactString);
MonitoringSession createMonitoringSession (string contactString);
JobSession openJobSession (string sessionName);
ReservationSession openReservationSession (string sessionName);
void closeJobSession (JobSession s);
void closeReservationSession (ReservationSession s);
void closeMonitoringSession (MonitoringSession s);
void destroyJobSession (string sessionName);
void destroyReservationSession (string sessionName);
set <string> getJobSessions (void);
set <string> getReservationSessions (void);
void registerEventNotification (callback callback);
};
};
|
C-Style APIs definition
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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 **/ |
...