File Operations
Function Syntax
- Create a file in collective mode.
int ncmpi_create(MPI_Comm comm, const char* name, int mode, MPI_Info info, int* idPoint);
- Read a file.
int ncmpi_open(MPI_Comm comm, const char* name, int mode, MPI_Info info, int* idPoint);
- Close a file.
- End the define mode.
- Enter the independent data mode.
- End the independent data mode.
- Print an error message corresponding to an error code.
Parameters
Parameter |
Description |
Value Range |
Input/Output |
|---|---|---|---|
fileId |
File ID |
Non-negative integer |
Input |
*name |
Path name |
Non-empty string of less than 256 bytes |
Input |
mode |
Access mode |
Non-empty |
Input |
info |
MPI information |
Non-empty |
Input |
*idPoint |
Pointer to the file ID |
Non-empty |
Output |
err |
Error code |
Integer |
Input |
Return Value
- Success: NC_NOERR
- Failure: An error code is returned.
Error Code
Error Code |
Description |
|---|---|
NC_EBADID |
Invalid fileId |
NC_EBAD_FILE |
Invalid file name |
NC_ENOMEM |
Null pointer or invalid memory |
Parent topic: PnetCDF Bridging Functions