pio.h 688 Bytes
Newer Older
1
2
#ifndef PIO_H
#define PIO_H
Deike Kleberg's avatar
Deike Kleberg committed
3

4
5
6
7
#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

Deike Kleberg's avatar
Deike Kleberg committed
8
9
10
#include <stdlib.h>
#include "mpi.h"

11
12
13
14
15
16
17
18
19
20
enum {
  PIO_NONE=0,
  PIO_MPI_NONB=1,
  PIO_POSIX_NONB=2,
  PIO_POSIX_ASYNCH=3,
  PIO_POSIX_FPGUARD_SENDRECV=4,
  PIO_POSIX_FPGUARD_THREAD_REFUSE=5,
  PIO_POSIX_FPGUARD_THREAD=6,
};

Deike Kleberg's avatar
Deike Kleberg committed
21
22
23
typedef struct{
  int type;
  MPI_Comm comm;
24
  int color;
Deike Kleberg's avatar
Deike Kleberg committed
25
26
27
28
  int size;
  int rank;
  int specialRank;
  MPI_Comm collectorComm;
29
}pioInfo;
Deike Kleberg's avatar
Deike Kleberg committed
30

31
32
33
int pioInit ( int ptype, MPI_Comm comm, int *color, int *nnodes,
              MPI_Comm *pioCollComm );
void pioFinalize ();
Deike Kleberg's avatar
Deike Kleberg committed
34
35
36
37
38
int pioFileOpenW ( const char* );
int pioFileClose ( int );
size_t pioFileWrite ( int, int, const void*, size_t );

#endif