Description Usage Arguments Methods Examples
R6 classes and methods for ADIOS2 file operations.
1 |
path |
File path. |
config |
An ADIOS2 config file. |
io_name |
The IO configuration ("io name" key) to use. |
comm |
A communicator number from pbdMPI if the package is installed
with MPI support; will use |
mode |
|
new()
adios_R6$new(path, config, io_name, comm = NULL, mode = "read")
path
File path.
config
An ADIOS2 config file.
io_name
The IO configuration ("io name" key) to use.
comm
A communicator number from pbdMPI if the package is installed
with MPI support; will use MPI_COMM_WORLD
by default. Otherwise
the param is ignored.
mode
"read"
or "write"
.
Open the file.
available_variables()
adios_R6$available_variables()
List available variables in a file.
close()
adios_R6$close()
Close the file.
fileinfo()
adios_R6$fileinfo()
Returns basic file info.
print()
adios_R6$print()
Print some basic file information.
advance()
adios_R6$advance(timeout = 10)
timeout
Timeout in seconds between trying to advance the step in the case data is being read in streams (otherwise ignored).
Advance the step when using time steps for reading/writing.
step()
adios_R6$step()
Returns the current time step.
read()
adios_R6$read(var)
var
String name of the desired variable.
Reads the array of a variable into R memory. Returns NULL
when the steps are finished.
read_to_buf()
adios_R6$read_to_buf(var, buf)
var
String name of the desired variable.
buf
Buffer space.
Reads the array of a variable into pre-allocated R memory. If the buffer is inappropriately sized, terrible things may happen. Does nothing when the steps are finished.
write()
adios_R6$write(var, x)
var
String name of the desired variable.
x
R vector/matrix object.
Write the R vector/matrix to a file.
clone()
The objects of this class are cloneable with this method.
adios_R6$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 | ## Not run:
suppressMessages(library(hola))
ad = adios("/path/to/my/dataset")
myvar_step_0 = ad$read("my_variable")
ad$advance()
myvar_step_2 = ad$read("my_variable")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.