1 /*! \file 2 * 3 * Main header file for the Parallel C API. 4 * 5 * Copyright 2010 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 #ifndef NETCDF_PAR_H 14 #define NETCDF_PAR_H 1 15 16 #include <mpi.h> 17 18 #if defined(__cplusplus) 19 extern "C" { 20 #endif 21 22 /** Use with nc_var_par_access() to set parallel access to independent. */ 23 #define NC_INDEPENDENT 0 24 /** Use with nc_var_par_access() to set parallel access to collective. */ 25 #define NC_COLLECTIVE 1 26 27 /* Create a file and enable parallel I/O. */ 28 extern int 29 nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info, 30 int *ncidp); 31 32 /* Open a file and enable parallel I/O. */ 33 extern int 34 nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info, 35 int *ncidp); 36 37 /* Change a variable from independent (the default) to collective 38 * access. */ 39 extern int 40 nc_var_par_access(int ncid, int varid, int par_access); 41 42 extern int 43 nc_create_par_fortran(const char *path, int cmode, int comm, 44 int info, int *ncidp); 45 extern int 46 nc_open_par_fortran(const char *path, int mode, int comm, 47 int info, int *ncidp); 48 49 #if defined(__cplusplus) 50 } 51 #endif 52 53 #endif /* NETCDF_PAR_H */ 54