drmaa2_jinfo_create
- drmaa2_jinfo_create, Creates a new job info object.
#include "drmaa2.h"
typedef struct { drmaa2_string jobId; int exitStatus; drmaa2_string terminatingSignal; drmaa2_string annotation; drmaa2_jstate jobState; drmaa2_string jobSubState; drmaa2_string_list allocatedMachines; drmaa2_string submissionMachine; drmaa2_string jobOwner; long long slots; drmaa2_string queueName; time_t wallclockTime; long long cpuTime; time_t submissionTime; time_t dispatchTime; time_t finishTime; } drmaa2_jinfo_s;
typedef drmaa2_jinfo_s * drmaa2_jinfo;
drmaa2_jinfo drmaa2_jinfo_create(void);
Allocates memory for a job info object, UNSETs all values (DRMAA2_UNSET_STRING, DRMAA2_UNSET_LIST etc.), and returns the object. The object must be freed by the caller. This function is required for creating a job filter based on a drmaa2_jinfo
object.
Returns a newly allocated drmaa2_jinfo
object or NULL in case of an error (like out-of-memory).
drmaa2_jinfo filter = drmaa2_jinfo_create();
drmaa2_j_list running_jobs = NULL;
if (filter != NULL) {
filter->jobState = DRMAA2_RUNNING;
running_jobs = drmaa2_msession_get_all_jobs(ms, filter);
/* do something with the list of running jobs ... */
drmaa2_list_free(&running_jobs);
drmaa2_jinfo_free(&filter);
}
drmaa2_jinfo_free(3), drmaa2_mession_get_all_jobs(3), drmaa2_jsession_get_jobs(3)
Copyright Univa Corporation 2013