Newer
Older
examples/heatTransfer
Podhorszki, Norbert
committed
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.
Podhorszki, Norbert
committed
1. write: illustrates the Write API as well as has implementations of other IO libraries
Podhorszki, Norbert
committed
2. 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)
3. 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.
Podhorszki, Norbert
committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Example
1. 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
2. Read the output step-by-step and print data into text files (data.<rank> 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:
1. Engines for file-based output and post-mortem reading: i
* BPFileWriter/BPFileReader
* HDF5Writer/HDF5Reader
* ADIOS1Writer/ADIOS1Reader
2. Engines for in situ execution
* DataManWriter/DataManReader
(Must run writer and reader with the same number of processes and same decomposition)