netcdf_par.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2010 University Corporation for Atmospheric
  3. * Research/Unidata. See COPYRIGHT file for more info.
  4. *
  5. * This header file is for the parallel I/O functions of netCDF.
  6. *
  7. */
  8. /* "$Id: netcdf_par.h,v 1.1 2010/06/01 15:46:49 ed Exp $" */
  9. #ifndef NETCDF_PAR_H
  10. #define NETCDF_PAR_H 1
  11. #include <mpi.h>
  12. #include <netcdf.h>
  13. #if defined(__cplusplus)
  14. extern "C" {
  15. #endif
  16. /* Use these with nc_var_par_access(). */
  17. #define NC_INDEPENDENT 0
  18. #define NC_COLLECTIVE 1
  19. /* Create a file and enable parallel I/O. */
  20. extern int
  21. nc_create_par(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
  22. int *ncidp);
  23. /* Open a file and enable parallel I/O. */
  24. extern int
  25. nc_open_par(const char *path, int mode, MPI_Comm comm, MPI_Info info,
  26. int *ncidp);
  27. /* Change a variable from independent (the default) to collective
  28. * access. */
  29. extern int
  30. nc_var_par_access(int ncid, int varid, int par_access);
  31. extern int
  32. nc_create_par_fortran(const char *path, int cmode, int comm,
  33. int info, int *ncidp);
  34. extern int
  35. nc_open_par_fortran(const char *path, int mode, int comm,
  36. int info, int *ncidp);
  37. #if defined(__cplusplus)
  38. }
  39. #endif
  40. #endif /* NETCDF_PAR_H */