我要评分
获取效率
正确性
完整性
易理解

Writing in Array Mode

Function Syntax

  • Write data of any type in array mode.

    int ncmpi_put_vara(int fileId, int variableId, const MPI_Offset* start, const MPI_Offset* count, const void *data, MPI_Offset bufCount, MPI_Datatype buftype)

  • Write data of the char type in array mode.

    int ncmpi_put_vara_text(int fileId, int variableId, const MPI_Offset* start, const MPI_Offset* count, const char *buf)

  • Write data of the double type in array mode.

    int ncmpi_put_vara_double(int fileId, int varid, const MPI_Offset* start, const MPI_Offset* count, const double *op)

  • Write data of the int type in array mode.

    int ncmpi_put_vara_int(int fileId, int varid, const MPI_Offset* start, const MPI_Offset* count, const int *op)

  • Write data of the long type in array mode.

    int ncmpi_put_vara_long(int fileId, int varid, const MPI_Offset* start, const MPI_Offset* count, const long *op)

  • Write data of the float type in array mode.

    int ncmpi_put_vara_float(int fileId, int varid, const MPI_Offset* start, const MPI_Offset* count, const float *op)

  • Write data collectively in array mode.

    int ncmpi_put_vara_all(int fileId, int variableId, const MPI_Offset* start, const MPI_Offset* count, const void *data, MPI_Offset bufcount, MPI_Datatype buftype)

  • Write data of the char type collectively in array mode.

    int ncmpi_put_vara_text_all(int fileId, int varid, const MPI_Offset* start, const MPI_Offset* count, const char *op)

  • Write data of the int type collectively in array mode.

    int ncmpi_put_vara_int_all(int fileId, int variableId, const MPI_Offset* start, const MPI_Offset* count, const int *data)

  • Write data of the long type collectively in array mode.

    int ncmpi_put_vara_long_all(int fileId, int variableId, const MPI_Offset* start, const MPI_Offset* count, const long *data)

  • Write data of the float type collectively in array mode.

    int ncmpi_put_vara_float_all(int fileId, int varid, const MPI_Offset* start, const MPI_Offset* count, const float *op)

Parameters

Parameter

Description

Value Range

Input/Output

fileId

File ID

Non-negative integer

Input

varid/variableId

Variable ID

Non-negative integer

Input

*start

Offset of the write start position

Non-empty

Input

*count

Write size

Non-empty

Input

*buf

Pointer to the data to write

Non-empty

Input

*data

Pointer to the data to write

Non-empty

Input

*op

Pointer to the data to write

Non-empty

Input

bufcount/bufCount

Number of data records to write

Non-negative integer

Input

buftype

Write type

Non-empty

Input

Return Value

  • Success: NC_NOERR
  • Failure: An error code is returned.

Error Code

Error Code

Description

NC_EBADID

Invalid ncid

NC_ENOTINDEP

Independent I/O operation attempted in collective mode

NC_EINVALCOORDS

Specified index exceeding the rank range of the specified variable

NC_ENOTVAR

Invalid variable ID