2
* ADIOS is freely available under the terms of the BSD license described
3
* in the COPYING file in the top level directory of this source distribution.
5
* Copyright (c) 2008 - 2009. UT-BATTELLE, LLC. All rights reserved.
8
#ifndef ADIOS_TRANSPORT_HOOKS_H
9
#define ADIOS_TRANSPORT_HOOKS_H
15
#define FORWARD_DECLARE_EMPTY(a) \
16
void adios_##a##_init (const char * parameters \
17
,struct adios_method_struct * method \
19
int adios_##a##_open (struct adios_file_struct * fd \
20
,struct adios_method_struct * method, void * comm \
22
enum ADIOS_FLAG adios_##a##_should_buffer (struct adios_file_struct * fd \
23
,struct adios_method_struct * method \
25
void adios_##a##_write (struct adios_file_struct * fd \
26
,struct adios_var_struct * v \
28
,struct adios_method_struct * method \
30
void adios_##a##_get_write_buffer (struct adios_file_struct * fd \
31
,struct adios_var_struct * v \
34
,struct adios_method_struct * method \
36
void adios_##a##_read (struct adios_file_struct * fd \
37
,struct adios_var_struct * v \
39
,uint64_t buffer_size \
40
,struct adios_method_struct * method \
42
void adios_##a##_close (struct adios_file_struct * fd \
43
,struct adios_method_struct * method \
45
void adios_##a##_finalize (int mype, struct adios_method_struct * method) {} \
46
void adios_##a##_end_iteration (struct adios_method_struct * method) {} \
47
void adios_##a##_start_calculation (struct adios_method_struct * method) {} \
48
void adios_##a##_stop_calculation (struct adios_method_struct * method) {}
50
//#ifdef ADIOS_EMPTY_TRANSPORTS
51
// this is defined in the lint program to get empty implementations
52
//#define FORWARD_DECLARE(a) FORWARD_DECLARE_EMPTY(a) \
54
#define FORWARD_DECLARE(a) \
55
void adios_##a##_init (const char * parameters \
56
,struct adios_method_struct * method \
58
int adios_##a##_open (struct adios_file_struct * fd \
59
,struct adios_method_struct * method, void * comm \
61
enum ADIOS_FLAG adios_##a##_should_buffer (struct adios_file_struct * fd \
62
,struct adios_method_struct * method \
64
void adios_##a##_write (struct adios_file_struct * fd \
65
,struct adios_var_struct * v \
67
,struct adios_method_struct * method \
69
void adios_##a##_get_write_buffer (struct adios_file_struct * fd \
70
,struct adios_var_struct * v \
73
,struct adios_method_struct * method \
75
void adios_##a##_read (struct adios_file_struct * fd \
76
,struct adios_var_struct * v \
78
,uint64_t buffer_size \
79
,struct adios_method_struct * method \
81
void adios_##a##_close (struct adios_file_struct * fd \
82
,struct adios_method_struct * method \
84
void adios_##a##_finalize (int mype, struct adios_method_struct * method); \
85
void adios_##a##_end_iteration (struct adios_method_struct * method); \
86
void adios_##a##_start_calculation (struct adios_method_struct * method); \
87
void adios_##a##_stop_calculation (struct adios_method_struct * method);
90
///////////////////////////////////////////////////////////////////////////////
91
///////////////////////////////////////////////////////////////////////////////
92
//// SETUP YOUR NEW TRANSPORT METHODS BELOW (FOLLOW THE PATTERN): ////
93
//// 1. Add an entry to the ADIOS_IO_METHOD updating the ADIOS_METHOD_COUNT////
94
//// 2. Add a FOWARD_DECLARE line (assuming standard naming) ////
95
//// 3. Add an entry to ADIOS_PARSE_METHOD_SETUP for the string and ID ////
96
//// 4. Add an entry to ADIOS_INIT_TRANSPORTS_SETUP for name to ID ////
97
///////////////////////////////////////////////////////////////////////////////
98
///////////////////////////////////////////////////////////////////////////////
100
struct adios_method_struct;
101
struct adios_file_struct;
102
struct adios_var_struct;
103
// the list of the methods that have been integrated
104
// VTK and POSIX_ASCII are placeholders reserved for future use
105
enum ADIOS_IO_METHOD {ADIOS_METHOD_UNKNOWN = -2
106
,ADIOS_METHOD_NULL = -1
107
,ADIOS_METHOD_MPI = 0
108
,ADIOS_METHOD_DATATAP = 1
109
,ADIOS_METHOD_POSIX = 2
110
,ADIOS_METHOD_DART = 3
111
,ADIOS_METHOD_VTK = 4
112
,ADIOS_METHOD_POSIX_ASCII = 5
113
,ADIOS_METHOD_MPI_CIO = 6
114
,ADIOS_METHOD_PHDF5 = 7
115
,ADIOS_METHOD_PROVENANCE = 8
116
,ADIOS_METHOD_MPI_STRIPE = 9
117
,ADIOS_METHOD_MPI_LUSTRE = 10
118
,ADIOS_METHOD_MPI_STAGGER = 11
119
,ADIOS_METHOD_MPI_AGG = 12
120
,ADIOS_METHOD_ADAPTIVE = 13
121
,ADIOS_METHOD_POSIX1 = 14
122
,ADIOS_METHOD_NC4 = 15
123
,ADIOS_METHOD_MPI_AMR = 16
124
,ADIOS_METHOD_MPI_AMR1 = 17
125
,ADIOS_METHOD_NSSI_STAGING = 18
126
,ADIOS_METHOD_NSSI_FILTER = 19
127
,ADIOS_METHOD_DIMES = 20
128
,ADIOS_METHOD_COUNT = 21
131
// forward declare the functions (or dummies for internals use)
132
#if !defined(_NOMPI) || !defined (ADIOS_EMPTY_TRANSPORTS)
134
FORWARD_DECLARE(mpi_lustre)
135
FORWARD_DECLARE(mpi_cio)
136
FORWARD_DECLARE(mpi_stripe)
137
FORWARD_DECLARE(mpi_stagger)
138
FORWARD_DECLARE(mpi_aggregate)
139
FORWARD_DECLARE(mpi_amr)
140
FORWARD_DECLARE(mpi_amr1)
141
FORWARD_DECLARE(phdf5)
143
FORWARD_DECLARE(nssi)
144
FORWARD_DECLARE(nssi_filter)
147
#ifdef ADIOS_EMPTY_TRANSPORTS
148
FORWARD_DECLARE_EMPTY(datatap)
149
FORWARD_DECLARE_EMPTY(posix)
150
FORWARD_DECLARE_EMPTY(posix1)
151
FORWARD_DECLARE_EMPTY(provenance)
152
FORWARD_DECLARE_EMPTY(adaptive)
154
FORWARD_DECLARE(datatap)
155
FORWARD_DECLARE(posix)
156
FORWARD_DECLARE(posix1)
157
FORWARD_DECLARE(provenance)
158
FORWARD_DECLARE(adaptive)
161
#if defined(HAVE_DART) && !defined(ADIOS_EMPTY_TRANSPORTS)
162
FORWARD_DECLARE(dart)
166
FORWARD_DECLARE(dimes)
170
#undef FORWARD_DECLARE