pbdNCDF4 (version 0.1-4)

nc_var_par_access: 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

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.

Value

Returns, invisibly, 0 or NetCDF error integer.

Details

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

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

Run this code
## 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)

Run the code above in your browser using DataCamp Workspace