1. drmaa2_jinfo_create(3)
  2. DRMAA2
  3. drmaa2_jinfo_create(3)

NAME

drmaa2_jinfo_create - drmaa2_jinfo_create, Creates a new job info object.

SYNOPSIS

#include "drmaa2.h"

define DRMAA2_UNSET_BOOL DRMAA2_FALSE

define DRMAA2_UNSET_STRING NULL

define DRMAA2_UNSET_NUM -1

define DRMAA2_UNSET_ENUM -1

define DRMAA2_UNSET_LIST NULL

define DRMAA2_UNSET_DICT NULL

define DRMAA2_UNSET_TIME ((time_t) -3)

define DRMAA2_UNSET_CALLBACK NULL

define DRMAA2_UNSET_JINFO NULL

define DRAMA2_UNSET_VERSION NULL

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);

DESCRIPTION

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.

RETURN VALUES

Returns a newly allocated drmaa2_jinfo object or NULL in case of an error (like out-of-memory).

EXAMPLE

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);
}

SEE ALSO

drmaa2_jinfo_free(3), drmaa2_mession_get_all_jobs(3), drmaa2_jsession_get_jobs(3)

AUTHOR

Copyright Univa Corporation 2013

  1. Univa Corporation
  2. October 2013
  3. drmaa2_jinfo_create(3)