Switch between collective and individual parallel access

Description

Switches between the default individual access and collective access for a variable in a file that was opened with nc_open_par or nc_create_par.

Usage

1
  nc_var_par_access(nc, var, collective = TRUE, verbose = FALSE)

Arguments

nc

An object of class ncdf4 (as returned by either function nc_open_par or function nc_create_par), indicating what file to read from.

var

Variable name or id.

collective

use collective method to read and write.

verbose

If TRUE, then messages are printed out during execution of this function.

Details

Default parallel access is individual for variables. Collective access allows coordination between simultaneous requests within a communicator.

Value

Returns, invisibly, 0 or NetCDF error integer.

Author(s)

George Ostrouchov, Pragneshkumar Patel pragnesh@utk.edu, Wei-Chen Chen, and Drew Schmidt.

References

Programming with Big Data in R Website: http://r-pbd.org/

See Also

nc_open_par, nc_create_par, ncdim_def, ncvar_def.

Examples

1
2
3
4
5
6
7
## Not run: 
### Under command mode, run the demo with 2 processors by
### (Use Rscript.exe for windows system)
mpiexec -np 2 Rscript -e "demo(ncwrite,'pbdNCDF4',ask=F,echo=F)"
mpiexec -np 2 Rscript -e "demo(ncread,'pbdNCDF4',ask=F,echo=F)"

## End(Not run)