1 /*! \file
2  *
3  * Main header file for the Parallel C API.
4  *
5  * Copyright 2018 University Corporation for Atmospheric
6  * Research/Unidata. See COPYRIGHT file for more info.
7  *
8  * This header file is for the parallel I/O functions of netCDF.
9  *
10  * \author Ed Hartnett
11  */
12 
13 /*
14  * In order to use any of the netcdf_XXX.h files, it is necessary
15  * to include netcdf.h followed by any netcdf_XXX.h files.
16  * Various things (like EXTERNL) are defined in netcdf.h
17  * to make them available for use by the netcdf_XXX.h files.
18 */
19 
20 #ifndef NETCDF_PAR_H
21 #define NETCDF_PAR_H 1
22 
23 #include <vtk_mpi.h>
24 
25 /** Use with nc_var_par_access() to set parallel access to independent. */
26 #define NC_INDEPENDENT 0
27 /** Use with nc_var_par_access() to set parallel access to collective. */
28 #define NC_COLLECTIVE 1
29 
30 #if defined(__cplusplus)
31 extern "C" {
32 #endif
33 
34 /* Create a file and enable parallel I/O. */
35     EXTERNL int
36     nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
37                   int *ncidp);
38 
39 /* Open a file and enable parallel I/O. */
40     EXTERNL int
41     nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,
42                 int *ncidp);
43 
44 /* Change a variable from independent (the default) to collective
45  * access. */
46     EXTERNL int
47     nc_var_par_access(int ncid, int varid, int par_access);
48 
49     EXTERNL int
50     nc_create_par_fortran(const char *path, int cmode, int comm,
51                           int info, int *ncidp);
52     EXTERNL int
53     nc_open_par_fortran(const char *path, int mode, int comm,
54                         int info, int *ncidp);
55 
56 #if defined(__cplusplus)
57 }
58 #endif
59 
60 #endif /* NETCDF_PAR_H */
61