1. drmaa2_destroy_jsession
  2. DRMAA2
  3. drmaa2_destroy_jsession

NAME

drmaa2_destroy_jsession

drmaa2_destroy_jsession(3) -- drmaa2_destroy_jsession, Destroys a persistent DRMAA2 job session ================================================================?==============================

SYNOPSIS

#include "drmaa2.h"

drmaa2_error drmaa2_destroy_jsession(const char * session_name);

DESCRIPTION

Removes a persistent DRMAA2 job session with the given from the Univa(R) Grid Engine(TM) qmaster process. The session must belong to the user of the application otherwise an failure is returned. Only Univa(R) Grid Engine(TM) admins and operators are allowed to delete other job sessions. If a job session is removed while an other application uses it, the behaviour is undefined. Existing DRMAA2 job session names can be fetched wth the drmaa2_get_jsession_names(3) function.

Note: In Univa(R) Grid Engine(TM) DRMAA2 job sessions can be listed, created, and deleted also by qconf(3) calls.

RETURN VALUES

On success DRMAA2_SUCCESS is returned. In case case of an failure the error code indicating the failure reason is returned and a description is set for the calling thread. The failure description can be fetched with the drmaa2_lasterror_text(3) function call.

EXAMPLE

drmaa2_jsession js = drmaa2_create_jsession("mysession", NULL);

if (js == NULL) {
   /* an error happend */
   drmaa2_string error = drmaa2_lasterror_text();
   fprintf(stderr, "Error during creation of job session with the name %s: %s\n", 
              "mysession", error);
   drmaa2_string_free(&error);
} else {
   /* do something with the job session */
   ...
   /* close jsession */
   drmaa2_jsession_close(js);
   /* free jsession */
   drmaa2_jsession_free(&js);

   /* remove the job session from the Univa(R) Grid Engine(TM) master process */
   if (drmaa2_destroy_jsession("mysession") != DRMAA2_SUCCESS) {
      /* an error happend */
      drmaa2_string error = drmaa2_lasterror_text();
      fprintf(stderr, "Error during destruction of job session with the name %s: %s\n", 
                  "mysession", error);
      drmaa2_string_free(&error);
   }
}

SEE ALSO

drmaa2_close_jsession(3), drmaa2_open_jsession(3), drmaa2_create_jsession(3),drmaa2_get_jsession_names(3), drmaa2_jsession_free(3), drmaa2_jsession_get_jobs(3), drmaa_jsession_get_job_categories(3), drmaa2_jsession_run_job(3), drmaa2_jsession_run_bulk_jobs(3), drmaa2_jsession_wait_any_started(3), drmaa2_jsession_wait_any_terminated(3), drmaa2_jsession_get_contact(3), drmaa2_jsession_get_session_name(3), drmaa2_jsession_get_job_array(3)

AUTHOR

Copyright Univa Corporation 2013

  1. Univa Corporation
  2. October 2013
  3. drmaa2_destroy_jsession