1. drmaa2_get_instance_value(3)
  2. DRMAA2
  3. drmaa2_get_instance_value(3)

NAME

drmaa2_get_instance_value - drmaa2_get_instance_value, Returns the value of a UGE specific attribute.

SYNOPSIS

#include "drmaa2.h"

drmaa2_string drmaa2_get_instance_value(const void instance, const char name);

DESCRIPTION

Reads out a Univa(R) Grid Engine(TM) specific attribute value with the given name from the object given as instance argument. A copy of the value is returned to the caller as drmaa2_string. The value must be free by the caller. A instance must be one of the following types: * jtemplate * jinfo * rtemplate * rinfo * queueinfo * machineinfo * notification

RETURN VALUES

Returns a copy of the attribute value as drmaa2_string or NULL in case the Univa(R) Grid Engine(TM) specific value is not set or not available. In case of an error the error code and error text is set for the calling thread.

EXAMPLE

drmaa2_jtemplate jt = drmaa2_jtemplate_create();
drmaa2_string_list uge_attributes = drmaa2_jtemplate_impl_spec();

if (uge_attributes != NULL) {
   long size, i;
   size = drmaa2_list_size(uge_attributes);
   for (i = 0; i < size; i++) {
      drmaa2_string attr = drmaa2_list_get(uge_attributes, i);
      if (strcmp(attr, "JTEMPLATE_SPECIAL_ATTRIBUTE") == 0) {
         drmaa2_string val;
         drmaa2_set_instance_value(jt, attr, strdup("My Value"));
         /* read "My Value" out ... */
         val = drmaa2_get_instance(jt, attr);
         /* val is "My Value" */
         drmaa2_string_free(&val);
      }
      printf("Additionally supported attribute: %s\n", attr);
   }
   drmaa2_list_free(&uge_attributes);
}

SEE ALSO

drmaa2_jtemplate_impl_spec(3), drmaa2_jinfo_impl_spec(3), drmaa2_rtemplate_impl_spec(3), drmaa2_rinfo_impl_spec(3), drmaa2_queueinfo_impl_spec(3), drmaa2_machineinfo_impl_spec(3), drmaa2_notification_impl_spec(3), drmaa2_get_instance_value(3), drmaa2_describe_attribute(3), drmaa2_set_instance_value(3)

AUTHOR

Copyright Univa Corporation 2013

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