aboutsummaryrefslogtreecommitdiff
path: root/src/ioStreamedHDF5GH.h
blob: ea8acbab7f1911d5f6af54f93c0cc3f366dad890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 /*@@
   @header    ioStreamedHDF5GH.h
   @date      Jun 20 2000
   @author    Thomas Radke
   @desc 
              The GH extensions structure for IOStreamedHDF5.
   @version $Id$
 @@*/

#ifndef _IOSTREAMEDHDF5_IOSTREAMEDHDF5GH_H_
#define _IOSTREAMEDHDF5_IOSTREAMEDHDF5GH_H_

#include "BetaThorns/IOHDF5Util/src/ioHDF5UtilGH.h"


/* IOStreamedHDF5 GH extension structure */
typedef struct
{
  /* how often to output */
  int  out_every;

  /* array of variable output requests */
  /* FIXME: make this a linked list of requests
            to allow for multiple requests per variable
            (eg. with different hyperslab parameters) */
  ioSlab **slablist;

  /* the last iteration output */
  int   *out_last;

  /* sockets to output data and checkpoint files to */
  int data_socket;
  int checkpoint_socket;

  /* file access property list used to write checkpoint files */
  hid_t checkpoint_fapl;

  /* flag indicating whether we want timing info on checkpointing/recovery
     and corresponding array of Cactus timers */
  int print_timing_info;
  int timers[IOHDF5_NUM_TIMERS];

  /* filename for advertising the hostname / port number information */
  char *advertised_filename;
} ioStreamedHDF5GH;

#ifdef __cplusplus
extern "C"
{
#endif

/* prototypes of functions to be registered as IOStreamedHDF5's I/O method */
int IOStreamedHDF5_OutputGH (const cGH *GH);
int IOStreamedHDF5_TriggerOutput (const cGH *GH, int);
int IOStreamedHDF5_TimeFor (const cGH *GH, int);
int IOStreamedHDF5_OutputVarAs (const cGH *GH, const char *var, const char *alias);
int IOStreamedHDF5_Recover (cGH *GH, const char *basefilename, int called_from);

/* other function prototypes */
int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias);

#ifdef __cplusplus
} // extern "C"
#endif

#endif  /* _IOSTREAMEDHDF5_IOSTREAMEDHDF5GH_H_ */