examples/heatTransfer
This example solves a 2D Poisson equation for temperature in homogeneous media using finite differences. This examples shows a straight-forward way to hook an application to the ADIOS2 library for its IO.
-
write: illustrates the Write API as well as has implementations of other IO libraries
- adios 1.x
- hdf5
- phdf5
-
read: illustrates the Read API that allows running the reader either as
- post-mortem to read all output steps
- in situ to read step by step as the writer outputs them (need to run with a suitable engine)
-
read_fileonly: illustrates reading all output steps at once (a single read statement) into a single contiguous memory block. This approach only works for post-mortem processing.
Example
- Produce an output
Writer usage: heatTransfer config output N M nx ny steps iterations config: XML config file to use output: name of output data file/stream N: number of processes in X dimension M: number of processes in Y dimension nx: local array size in X dimension per processor ny: local array size in Y dimension per processor steps: the total number of steps to output iterations: one step consist of this many iterations
$ mpirun -np 12 ./bin/heatTransfer_write_adios2 ../examples/heatTransfer/heat.xml heat 4 3 5 10 10 10
- Read the output step-by-step and print data into text files (data. per reader process)
Reader Usage: heatRead config input N M config: XML config file to use input: name of input data file/stream N: number of processes in X dimension M: number of processes in Y dimension
$ mpirun -np 2 ./bin/heatTransfer_read ../examples/heatTransfer/heat.xml heat 2 1
Notes:
- Engines for file-based output and post-mortem reading: i
- BPFileWriter/BPFileReader
- HDF5Writer/HDF5Reader
- ADIOS1Writer/ADIOS1Reader
-
Engines for in situ execution
- DataManWriter/DataManReader (Must run writer and reader with the same number of processes and same decomposition)