drmaa_jobtemplate(3)
π drmaa_jobtemplate β Grid Engine DRMAA job template handling π
okay bestie, sit DOWN. this is drmaa_jobtemplate(3), part of the Grid Engine DRMAA lineup, and it's literally the whole personality of "how do i describe a job before i send it". no cap. π
β¨ NAME β¨
drmaa_allocate_job_template, drmaa_delete_job_template, drmaa_set_attribute, drmaa_get_attribute, drmaa_set_vector_attribute, drmaa_get_vector_attribute, drmaa_get_next_attr_value, drmaa_get_num_attr_values, drmaa_release_attr_values β Grid Engine DRMAA job template handling π¦
πΈ SYNOPSIS πΈ
#include "drmaa.h"
int drmaa_allocate_job_template(
drmaa_job_template_t **jt,
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_delete_job_template(
drmaa_job_template_t *jt,
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_set_attribute(
drmaa_job_template_t *jt,
const char *name,
const char *value,
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_get_attribute(
drmaa_job_template_t *jt,
const char *name,
char *value,
size_t value_len,
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_set_vector_attribute(
drmaa_job_template_t *jt,
const char *name,
const char *value[],
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_get_vector_attribute(
drmaa_job_template_t *jt,
const char *name,
drmaa_attr_values_t **values,
char *error_diagnosis,
size_t error_diag_len
);
int drmaa_get_next_attr_value(
drmaa_attr_values_t* values,
char *value,
int value_len
);
int drmaa_get_num_attr_values(
drmaa_attr_values_t* values,
int *size
);
void drmaa_release_attr_values(
drmaa_attr_values_t* values
);
π DESCRIPTION π
so. the drmaa_allocate_job_template() function allocates a brand-new DRMAA job template into jt. and what IS a DRMAA job template, you ask? it's the lil description of all the specifics of jobs that get submitted using drmaa_run_job(3) and drmaa_run_bulk_jobs(3). it's giving "build-a-job workshop". π οΈβ¨
π drmaa_delete_job_template()
the drmaa_delete_job_template() function releases all resources associated with the DRMAA job template jt. and no, it does not touch your jobs β jobs that were submitted using the job template are not affected. so delete away, she's just cleaning up the template itself π
π§ drmaa_set_attribute()
the drmaa_set_attribute() function stores the value under name for the given DRMAA job template, jt. and listen β only non-vector attributes may be passed. do not try it with a vector, she will not play. π
π drmaa_get_attribute()
the drmaa_get_attribute() function returns into value up to value_len bytes from the string stored for the non-vector attribute, name, in the DRMAA job template, jt. cute lil read, no drama π
π drmaa_set_vector_attribute()
the drmaa_set_vector_attribute() function stores the strings in value under name in the list of vector attributes for the given DRMAA job template, jt. only vector attributes may be passed (yes, the mirror image of drmaa_set_attribute(), iconic duo fr fr).
β οΈ and thevaluepointer array must beNULLterminated. like, actually. do not forget theNULL. that's the whole vibe check.
π¦ drmaa_get_vector_attribute()
the drmaa_get_vector_attribute() function returns into values a DRMAA attribute string vector containing all the string values stored in the vector attribute, name. the values in the DRMAA values string vector can be extracted using drmaa_get_next_attr_value(3).
and here's the part where you take responsibility, bestie: the caller is responsible for releasing the DRMAA values string vector returned into values, using drmaa_release_attr_values(3). it's yours now. take care of it. π«Ά
β drmaa_get_next_attr_value()
each time drmaa_get_next_attr_value() is called it returns into value up to value_len bytes of the next entry stored in the DRMAA values string vector, values. and once the values list has been exhausted, DRMAA_ERRNO_NO_MORE_ELEMENTS is returned. that's the "no more content, babe" signal π
π drmaa_get_num_attr_values()
the drmaa_get_num_attr_values() returns into size the number of entries in the DRMAA values string vector.
π lowkey important: this function is only available in the 1.0 implementation. iykyk.
πΈ drmaa_release_attr_values()
the drmaa_release_attr_values() function releases all resources associated with the DRMAA values string vector, values. say thank you and let her go π«Άβ¨
π ENVIRONMENTAL VARIABLES π
SGE_ROOTβ specifies the location of the Grid Engine standard configuration files.SGE_CELLβ if set, specifies the default Grid Engine cell to be used. to address a Grid Engine cell, Grid Engine uses (in the order of precedence):- the name of the cell specified in the environment variable
SGE_CELL, if it is set. - the name of the default cell, i.e.
default.
- the name of the cell specified in the environment variable
SGE_DEBUG_LEVELβ if set, specifies that debug information should be written tostderr. in addition the level of detail in which debug information is generated is defined.SGE_QMASTER_PORTβ if set, specifies the tcp port on whichsge_qmaster(8)is expected to listen for communication requests. most installations will use a services map entry instead to define that port.
π₯ RETURN VALUES π₯
upon successful completion, drmaa_allocate_job_template(), drmaa_delete_job_template(), drmaa_set_attribute(), drmaa_get_attribute(), drmaa_set_vector_attribute(), drmaa_get_vector_attribute(), and drmaa_get_next_attr_value() return DRMAA_ERRNO_SUCCESS. anything else means an error, and up to error_diag_len characters of error related diagnosis information is then provided in the buffer error_diagnosis. so read the diagnosis, she's telling you what's wrong π
π ERRORS π
the drmaa_allocate_job_template(), drmaa_delete_job_template(), drmaa_set_attribute(), drmaa_get_attribute(), drmaa_set_vector_attribute(), drmaa_get_vector_attribute(), and drmaa_get_next_attr_value() functions will fail if:
π©Έ DRMAA_ERRNO_INTERNAL_ERROR
unexpected or internal DRMAA error, like system call failure, etc.
π©Έ DRMAA_ERRNO_DRM_COMMUNICATION_FAILURE
could not contact DRM system for this request.
π©Έ DRMAA_ERRNO_AUTH_FAILURE
the specified request is not processed successfully due to authorization failure.
π©Έ DRMAA_ERRNO_INVALID_ARGUMENT
the input value for an argument is invalid.
π©Έ DRMAA_ERRNO_NO_ACTIVE_SESSION
failed because there is no active session.
π©Έ DRMAA_ERRNO_NO_MEMORY
failed allocating memory.
the drmaa_set_attribute() and drmaa_set_vector_attribute() will fail if:
π©Έ DRMAA_ERRNO_INVALID_ATTRIBUTE_FORMAT
the format for the attribute value is invalid.
π©Έ DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE
the value for the attribute is invalid.
π©Έ DRMAA_ERRNO_CONFLICTING_ATTRIBUTE_VALUES
the value of this attribute is conflicting with a previously set attributes.
the drmaa_get_attribute() and drmaa_get_vector_attribute() will fail if:
π©Έ DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE
the specified attribute is not set in the DRMAA job template.
the drmaa_get_next_attr_value() will fail if:
π©Έ DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE
when there are no more entries in the vector.
π SEE ALSO π
drmaa_submit(3) and drmaa_attributes(3). go read those next, bestie, they're the sequel π«Ά
okay that's the whole page!! this one's from SGE 8.1.3pre, dated $Date: 2008-07-08 09:10:04 $, and it lives under drmaa_jobtemplate(3). periodt. π
β¨π
π¦ where this page comes from
- debian bookworm: gridengine-drmaa-dev 8.1.9+dfsg-10+b1 Β· SISSL
- debian trixie: gridengine-drmaa-dev 8.1.9+dfsg-13.1 Β· SISSL
- ubuntu jammy: gridengine-drmaa-dev 8.1.9+dfsg-10build1 Β· SISSL
- ubuntu noble: gridengine-drmaa-dev 8.1.9+dfsg-11build3 Β· SISSL
- ubuntu questing: gridengine-drmaa-dev 8.1.9+dfsg-13.1
- ubuntu resolute: gridengine-drmaa-dev 8.1.9+dfsg-13.2 Β· SISSL
- ubuntu stonking: gridengine-drmaa-dev 8.1.9+dfsg-13.2ubuntu1 Β· SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms