source: trunk/pbs_drmaa/session.h @ 85

Revision 85, 2.4 KB checked in by mmamonski, 8 years ago (diff)

PBS DRMAA autoclose connection

  • Property svn:keywords set to Id
Line 
1/* $Id$ */
2/*
3 *  FedStage DRMAA for PBS Pro
4 *  Copyright (C) 2006-2009  FedStage Systems
5 *
6 *  This program is free software: you can redistribute it and/or modify
7 *  it under the terms of the GNU General Public License as published by
8 *  the Free Software Foundation, either version 3 of the License, or
9 *  (at your option) any later version.
10 *
11 *  This program is distributed in the hope that it will be useful,
12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *  GNU General Public License for more details.
15 *
16 *  You should have received a copy of the GNU General Public License
17 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __PBS_DRMAA__SESSION_H
21#define __PBS_DRMAA__SESSION_H
22
23#ifdef HAVE_CONFIG_H
24#       include <config.h>
25#endif
26
27#include <drmaa_utils/session.h>
28
29#include <pbs_drmaa/pbs_conn.h>
30
31typedef struct pbsdrmaa_session_s pbsdrmaa_session_t;
32
33fsd_drmaa_session_t *pbsdrmaa_session_new( const char *contact );
34
35struct pbsdrmaa_session_s {
36        fsd_drmaa_session_t super;
37
38        void (*super_destroy)( fsd_drmaa_session_t *self );
39
40        void (*super_apply_configuration)(fsd_drmaa_session_t *self);
41
42        /*
43         * Pointer to standard wait_thread drmaa_utils function
44         */
45        void* (*super_wait_thread)( fsd_drmaa_session_t *self );
46
47        /*
48         * PBS connection handle
49         */
50        pbsdrmaa_pbs_conn_t *pbs_connection;
51
52        /*
53         * PBS folder - used by wait_thread which reads log files
54         */
55        char * pbs_home;
56
57        /*
58         * Wait thread reading logs active
59         */
60        bool wait_thread_log;
61
62        /*
63         * List of attributes which will be used to query jobs.
64         */
65        struct attrl *status_attrl;
66
67        /*
68         * Log file initial size - used by wait_thread which reads log files TODO: check if it can be safely moved to log_reader
69         */
70        off_t log_file_initial_size;
71
72        /*
73         * Time we checked log file initial size - used by wait_thread which reads log files TODO: check if it can be safely moved to log_reader
74         */
75        time_t log_file_initial_time;
76
77        /*
78         * Maximal number of retires in pbs_connect. Default 3
79         */
80        int max_retries_count;
81
82        /*
83         * Wait thread sleep time (in seconds). Default 1s.
84         */
85        int wait_thread_sleep_time;
86
87        /*
88         * The prefix of the directory where the job exit status information is stored (default: %HOME/.pbs-drmaa/
89         */
90        char *job_exit_status_file_prefix;
91
92        /*
93         * PBS Max connection time
94         */
95        int connection_max_lifetime;
96};
97
98#endif /* __PBS_DRMAA__SESSION_H */
99
Note: See TracBrowser for help on using the repository browser.