1. drmaa2_close_msession(3)
  2. DRMAA2
  3. drmaa2_close_msession(3)

NAME

drmaa2_close_msession - drmaa2_close_msession, Closes an open monitoring session

SYNOPSIS

#include "drmaa2.h"

drmaa2_error drmaa2_close_msession(drmaa2_msession ms);

DESCRIPTION

Closes an active monitoring session. In case there is no other session (job sessions) open, the DRMAA2 library disengages from qmaster. In case of open job sessions the subscription scope is decreased so that less information is sent periodically from the Univa(R) Grid Engine(TM) qmaster process. All jobs belonging to the monitoring session (and which are not part of any open job session) are reaped from internal caches. Especially finished jobs are removed and are not available anymore even after re-opening a monitoring job session.

After closing the monitoring session the monitoring session object is invalid and must be freed by the drmaa2_msession_free(3) function.

RETURN VALUES

Returns DRMAA2_SUCCESS in case the session could be closed or an DRMAA2 error code indicating the error. In case of an error the drmaa2_lasterror_text(3) prints more detailed information.

EXAMPLE

drmaa2_msession ms = drmaa2_open_msession(NULL);

if (ms != NULL) {
   ...
   if (DRMAA2_SUCCESS != drmaa2_close_msession(ms)) {
      drmaa2_string error = drmaa2_lasterror_text();
      fprintf(stderr, "Error during closing the monitoring session: %s\n", error);
      drmaa2_string_free(&error);
   }
   drmaa2_msession_free(&ms);
}

SEE ALSO

drmaa2_msession_free(3), drmaa2_open_msession(3), drmaa2_msession_get_all_jobs(3), drmaa2_msession_get_all_queues(3), drmaa2_msession_get_all_machines(3)

AUTHOR

Copyright Univa Corporation 2013

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