1 | /* $Id: drmaa_base.h 2 2009-10-12 09:51:22Z mamonski $ */ |
---|
2 | /* |
---|
3 | * FedStage DRMAA utilities library |
---|
4 | * Copyright (C) 2006-2008 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 __DRMAA_UTILS__DRMAA_BASE_H |
---|
21 | #define __DRMAA_UTILS__DRMAA_BASE_H |
---|
22 | |
---|
23 | #ifdef HAVE_CONFIG_H |
---|
24 | # include <config.h> |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <drmaa_utils/common.h> |
---|
28 | #include <drmaa_utils/thread.h> |
---|
29 | |
---|
30 | struct fsd_drmaa_singletone_s { |
---|
31 | /** Global session object */ |
---|
32 | fsd_drmaa_session_t *session; |
---|
33 | fsd_mutex_t session_mutex; |
---|
34 | |
---|
35 | fsd_drmaa_session_t *(*new_session)( |
---|
36 | fsd_drmaa_singletone_t *self, |
---|
37 | const char *contact |
---|
38 | ); |
---|
39 | |
---|
40 | fsd_template_t *(*new_job_template)( |
---|
41 | fsd_drmaa_singletone_t *self |
---|
42 | ); |
---|
43 | |
---|
44 | const char* (*get_contact)( fsd_drmaa_singletone_t *self ); |
---|
45 | void (*get_version)( |
---|
46 | fsd_drmaa_singletone_t *self, |
---|
47 | unsigned *major, unsigned *minor |
---|
48 | ); |
---|
49 | const char* (*get_DRM_system)( fsd_drmaa_singletone_t *self ); |
---|
50 | const char* (*get_DRMAA_implementation)( fsd_drmaa_singletone_t *self ); |
---|
51 | |
---|
52 | fsd_iter_t * (* |
---|
53 | get_attribute_names)( |
---|
54 | fsd_drmaa_singletone_t *self ); |
---|
55 | |
---|
56 | fsd_iter_t * (* |
---|
57 | get_vector_attribute_names)( |
---|
58 | fsd_drmaa_singletone_t *self ); |
---|
59 | |
---|
60 | int (*wifexited)( int *exited, int stat, |
---|
61 | char *error_diagnosis, size_t error_diag_len ); |
---|
62 | int (*wexitstatus)( int *exit_status, int stat, |
---|
63 | char *error_diagnosis, size_t error_diag_len ); |
---|
64 | int (*wifsignaled)( int *signaled, int stat, |
---|
65 | char *error_diagnosis, size_t error_diag_len ); |
---|
66 | int (*wtermsig)( char *signal, size_t signal_len, int stat, |
---|
67 | char *error_diagnosis, size_t error_diag_len ); |
---|
68 | int (*wcoredump)( int *core_dumped, int stat, |
---|
69 | char *error_diagnosis, size_t error_diag_len ); |
---|
70 | int (*wifaborted)( int *aborted, int stat, |
---|
71 | char *error_diagnosis, size_t error_diag_len ); |
---|
72 | }; |
---|
73 | |
---|
74 | extern fsd_drmaa_singletone_t _fsd_drmaa_singletone; |
---|
75 | |
---|
76 | #endif /* __DRMAA_UTILS__DRMAA_BASE_H */ |
---|