Skip to content

Commit 96384d1

Browse files
committed
restore old heat_transfer for adios 1.x
1 parent 6bea159 commit 96384d1

26 files changed

+163
-700
lines changed

Tutorial/heat_transfer/Makefile

Lines changed: 66 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,81 @@
1+
include make.settings
2+
3+
## Set ADIOS_DIR here or before doing make
4+
override ADIOS_FINC=-I${ADIOS_DIR}/include
5+
override ADIOS_FLIB=`${ADIOS_DIR}/bin/adios_config -l -f`
16

27
default:
3-
@echo "Make targets at this level are for cleaning only:"
4-
@echo " clean-code : recursively delete objects and binaries"
5-
@echo " clean-data : recursively delete files created by the examples"
6-
@echo " distclean : clean-code and clean-data"
8+
@echo "Make targets: fort hdf5 phdf5 adios1 adios2 noxml"
9+
@echo " fort: build example with text output(io_fort.F90)"
10+
@echo " hdf5_a: build example with HDF5, separate timesteps (io_hdf5_a.F90)"
11+
@echo " hdf5_b: build example with HDF5, combined timesteps (io_hdf5_b.F90)"
12+
@echo " phdf5: build example with Parallel HDF5 (io_phdf5.F90)"
13+
@echo " adios1: build example with ADIOS (io_adios_gpp.F90)"
14+
@echo " adios2: build example with ADIOS (io_adios.F90)"
15+
@echo " noxml: build example with ADIOS (io_adios_noxml.F90)"
716

817
all: default
918
help: default
1019

11-
subdirs = simulation analysis stage_write
1220

13-
clean-data:
14-
rm -f *.o *.mod *.fh core.*
15-
rm -f fort.*
16-
rm -f *.png minmax
17-
rm -rf *.bp *.bp.dir *.idx
18-
rm -f *.h5
19-
rm -f conf *.sst *.insitumpi
20-
for dir in $(subdirs); do echo "Clean $${dir}"; (cd $${dir}; make clean-data); done
21+
io_hdf5_a.o : io_hdf5_a.F90
22+
${FC} ${FFLAGS} -c ${HDF5_FINC} $<
23+
24+
io_hdf5_b.o : io_hdf5_b.F90
25+
${FC} ${FFLAGS} -c ${HDF5_FINC} $<
26+
27+
io_phdf5.o : io_phdf5.F90
28+
${FC} ${FFLAGS} -c ${PHDF5_FINC} $<
29+
30+
gwrite_heat.fh: heat_transfer.xml
31+
${ADIOS_DIR}/bin/gpp.py heat_transfer.xml
32+
rm -f gread_heat.fh
33+
34+
io_adios_gpp.o : gwrite_heat.fh io_adios_gpp.F90
35+
${FC} ${FFLAGS} -c ${ADIOS_FINC} io_adios_gpp.F90
36+
37+
io_adios.o : io_adios.F90
38+
${FC} ${FFLAGS} -c ${ADIOS_FINC} $<
39+
40+
io_adios_noxml.o : io_adios_noxml.F90
41+
${FC} ${FFLAGS} -c ${ADIOS_FINC} $<
42+
43+
%.o : %.F90
44+
${FC} ${FFLAGS} -c $<
2145

22-
clean-code:
46+
fort: heat_vars.o io_fort.o heat_transfer.o
47+
${FC} ${FFLAGS} -o heat_transfer_fort $^
48+
49+
hdf5_a: heat_vars.o io_hdf5_a.o heat_transfer.o
50+
libtool --mode=link --tag=FC ${FC} ${FFLAGS} -o heat_transfer_hdf5_a $^ ${HDF5_FLIB}
51+
52+
hdf5_b: heat_vars.o io_hdf5_b.o heat_transfer.o
53+
libtool --mode=link --tag=FC ${FC} ${FFLAGS} -o heat_transfer_hdf5_b $^ ${HDF5_FLIB}
54+
55+
phdf5: heat_vars.o io_phdf5.o heat_transfer.o
56+
libtool --mode=link --tag=FC ${FC} ${FFLAGS} -o heat_transfer_phdf5 $^ ${PHDF5_FLIB}
57+
58+
adios1: heat_vars.o io_adios_gpp.o heat_transfer.o
59+
${FC} ${FFLAGS} -o heat_transfer_adios1 $^ ${ADIOS_FLIB}
60+
61+
adios2: heat_vars.o io_adios.o heat_transfer.o
62+
${FC} ${FFLAGS} -o heat_transfer_adios2 $^ ${ADIOS_FLIB}
63+
64+
noxml: heat_vars.o io_adios_noxml.o heat_transfer.o
65+
${FC} ${FFLAGS} -o heat_transfer_noxml $^ ${ADIOS_FLIB}
66+
67+
clean:
2368
rm -f *.o *.mod *.fh core.*
2469
rm -f heat_transfer_fort
25-
rm -f heat_transfer_adios1 heat_transfer_adios1_gpp heat_transfer_adios1_noxml
26-
rm -f heat_transfer_adios2 heat_transfer_noxml
70+
rm -f heat_transfer_adios1 heat_transfer_adios2 heat_transfer_noxml
2771
rm -f heat_transfer_hdf5_a heat_transfer_hdf5_b heat_transfer_phdf5
28-
for dir in $(subdirs); do echo "Clean $${dir}"; (cd $${dir}; make clean-code); done
29-
30-
distclean: clean-code clean-data
31-
3272

73+
distclean: clean
74+
rm -f fort.*
75+
rm -f *.png minmax
76+
rm -rf *.bp *.bp.dir *.idx
77+
rm -f *.h5
78+
rm -f conf
3379

3480

3581

Tutorial/heat_transfer/README

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
1-
2D Heat Transfer example
1+
2D Heat Transfer example
22
Fortran 90 code, 2D array with 2D decomposition
33

44
1. Build
55
--------
66
Edit make.settings
77
- compiler and compiler options
8-
- ADIOS 2.x installation directory
9-
- optionally
10-
ADIOS 1.x installation directory
11-
Parallel HDF5 installation directory
8+
- ADIOS installation directory
129

13-
$ cd simulation
14-
$ make adios2
15-
$ cd ..
16-
17-
$ cd analysis
18-
$ make adios2 steps2
19-
$ cd ..
10+
$ make adios
2011

2112
2. Run
2213
-------
2314

24-
$ ./simulation heat_transfer_adios2
15+
$ ./heat_transfer
2516
Usage: heat_transfer output N M nx ny steps iterations
2617
output: name of output file
2718
N: number of processes in X dimension
@@ -31,7 +22,7 @@ $ ./simulation heat_transfer_adios2
3122
steps: the total number of steps to output
3223
iterations: one step consist of this many iterations
3324

34-
$ mpirun -np 12 simulation/heat_transfer_adios2 heat 4 3 40 50 6 500
25+
$ mpirun -np 12 ./heat_transfer_adios1 heat 4 3 40 50 6 500
3526

3627
will perform the calculation
3728
- on 12 processes
@@ -40,10 +31,8 @@ will perform the calculation
4031
- producing an output of 6 steps stored in heat.bp
4132

4233
$ bpls -l heat.bp T
43-
integer gndx scalar = 160
44-
double T 6*{150, 160} = -0.263389 / 2.9984 / null / null
45-
integer gndy scalar = 150
46-
double dT 6*{150, 160} = -0.000847309 / 0.00227756 / null / null
34+
double T 6*{150, 160} = 0.000212009 / 999.47 / 442.536 / 318.995
35+
double dT 6*{150, 160} = 6.27403e-06 / 0.720097 / 0.135503 / 0.115625
4736

4837
$ ./plot_heat.sh heat.bp
4938
$ eog .
@@ -52,31 +41,16 @@ $ eog .
5241
---------------
5342
Staging demos
5443
---------------
55-
5644
A 100 output step on less processes, with more computation between steps.
57-
In adios2.xml, use "SST" for engine of the io group "heat"
58-
59-
In two terminal windows:
60-
61-
$ mpirun -n 4 simulation/heat_transfer_adios2 heat 2 2 300 300 100 600
62-
$ mpirun -n 2 analysis/heat_read_steps2 heat.bp
63-
64-
or
65-
66-
$ mpirun -n 4 simulation/heat_transfer_adios2 heat 2 2 300 300 100 600
67-
$ mpirun -n 2 /opt/adios2/bin/adios2_reorganize heat.bp staged.bp SST "" BPFile "" 2 1
68-
69-
70-
--- With ADIOS 1.x using heat_transfer_adios1 binary ---
7145

72-
If output method in adios1.xml is FLEXPATH,
46+
If output method in heat_transfer.xml is FLEXPATH,
7347
you need two terminals. Run the staging reader-writer in one terminal and
7448
the simulation in another terminal. The order of startup does not matter.
7549

7650
$ mpirun -np 2 stage_write/stage_write heat.bp staged.bp FLEXPATH "" MPI "" 2
7751
$ mpirun -np 4 ./heat_transfer_adios2 heat 2 2 300 300 100 600
7852

79-
If output method in adios1.xml is DATASPACES,
53+
If output method in heat_transfer.xml is DATASPACES,
8054
you need three terminals.
8155
Run the DataSpaces server first in one terminal and tell the app
8256
the number of servers and clients.

Tutorial/heat_transfer/adios2.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

Tutorial/heat_transfer/analysis/Makefile

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)