Rate This Document
Findability
Accuracy
Completeness
Readability

Writing in Single-Element Mode

Function Syntax

  • Write data of any type in single-element mode.

    int ncmpi_put_var1(int fileId, int variableId, const MPI_Offset* start, const void* data, MPI_Offset bufcount, MPI_Datatype buftype);

  • Write data of the double type in single-element mode.

    int ncmpi_put_var1_double(int fileId, int variableId, const MPI_Offset* start, const double* data);

Parameters

Parameter

Description

Value Range

Input/Output

fileId

File ID

Non-negative integer

Input

varId

Variable ID

Non-negative integer

Input

*start

Offset of the write start position

Non-empty

Input

*data

Pointer to the data to write

Non-empty

Input

bufcount

Write size

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