1. drmaa2_set_instance_value(3)
  2. DRMAA2
  3. drmaa2_set_instance_value(3)

NAME

drmaa2_set_instance_value - drmaa2_set_instance_value, Sets the value of a UGE specific attribute.

SYNOPSIS

#include "drmaa2.h"

drmaa2_error drmaa2_set_instance_value(void instance, const char name, const char *value)

DESCRIPTION

Sets a new value for the attribute with the given name in a DRMAA2 object (given by instance). A valid instance has one of the following types: * jtemplate * jinfo * rtemplate * rinfo * queueinfo * machineinfo * notification

RETURN VALUES

Returns DRMAA2_SUCCESS if the attribute name could be found and the value was set successfully in the DRMAA2 object.

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;
         if (DRMAA2_SUCCESS == (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_set_instance_value(3)