drmaa2_close_msession
- drmaa2_close_msession, Closes an open monitoring session
#include "drmaa2.h"
drmaa2_error drmaa2_close_msession(drmaa2_msession ms);
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.
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.
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);
}
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)
Copyright Univa Corporation 2013