-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.md~
190 lines (104 loc) · 9.03 KB
/
README.md~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#TeaLeaf - Kokkos
## Compling
This implementation has been configured with default values to simply compile with `make`.
The `TARGET` flag specifies which device will be targetted by the executable:
* OMP - CPU using OpenMP
* CUDA - NVIDIA GPU using CUDA
* MIC - Intel Xeon Phi using native compilation
This is currently defaulted to use OpenMP.
The `COMPILER` flag specifies which compiler suite to use, where both Intel and GNU compilers have been tested with this TeaLeaf implementation. This is currently defaulted to use the Intel compilers.
The MPI implementation can be changed using the `MPI_F90` and `MPI_CPP` flags. This is currently defaulted to use Intel MPI (mpiifort and mpiicpc).
The `KOKKOS_PATH` flag points to the root directory of a Kokkos installation. A full source Kokkos implementation is held locally to the application, but this can be removed and pointed to an existing install.
If compiling for CUDA, please note that there is a wrapper called `nvcc_wrapper` which lives inside kokkos/config/, and the `default_compiler` option must be changed to a valid C++ compiler. The current default for this compiler is `icpc`.
There are two optional defines that were used for testing and can be passed to the `OPTIONS` flag in the Makefile:
* ENABLE_TIMELOGGING - The timelogging module will read each new TeaLeaf output file and create a CSV entry with some important data such as wallclock time and success, but please note it is currently ugly and very inflexible.
* ENABLE_PROFILING - This enables some simple profiling for each of the functions in TeaLeaf, and prints results to output.
### Other Flags
The default compilation with the COMPILER flag set chooses the optimal
performing set of flags for the specified compiler, but with no hardware
specific options or IEEE compatability.
To produce a version that has IEEE compatiblity a further flag has to be set on
the compiler line.
`make IEEE=1`
* INTEL: -fp-model strict –fp-model source –prec-div –prec-sqrt
* GNU: -ffloat-store
Note that the MPI communications have been written to ensure bitwise identical
answers independent of core count. However under some compilers this is not
true unless the IEEE flags is set to be true. This is certainly true of the
Intel and Cray compiler. Even with the IEEE options set, this is not guarantee
that different compilers or platforms will produce the same answers. Indeed a
Fortran run can give different answers from a C run with the same compiler,
same options and same hardware.
Extra options can be added without modifying the makefile by setting the `OPTIONS` flag.
`make COMPILER=INTEL OPTIONS=-xavx`
Finally, a `DEBUG` flag can be set to use debug options for a specific compiler.
`make COMPILER=PGI DEBUG=1`
These flags are also compiler specific, and so will depend on the `COMPILER`
environment variable.
### File Input
The contents of tea.in defines the geometric and run time information, apart from task and thread counts.
A complete list of options is given below, where `<R>` shows the option takes a real number as an argument. Similarly `<I>` is an integer argument.
`initial_timestep <R>`
Set the initial time step for TeaLeaf. This time step stays constant through the entire simulation. The default value is
`end_time <R>`
Sets the end time for the simulation. When the simulation time is greater than this number the simulation will stop.
`end_step <I>`
Sets the end step for the simulation. When the simulation step is equal to this then simulation will stop.
In the event that both the above options are set, the simulation will terminate on whichever completes first.
`xmin <R>`
`xmax <R>`
`ymin <R>`
`ymax <R>`
The above four options set the size of the computational domain. The default domain size is a 10cm square.
`x_cells <I>`
`y_cells <I>`
The two options above set the cell count for each coordinate direction. The default is 10 cells in each direction.
The geometric information and initial conditions are set using the following keywords with three possible variations. Note that state 1 is always the ambient material and any geometry information is ignored. Areas not covered by other defined states receive the energy and density of state 1.
`state <I> density <R> energy <R> geometry rectangle xmin <R> ymin <R> xmax <R> ymax <R> `
Defines a rectangular region of the domain with the specified energy and density.
`state <I> density <R> energy <R> geometry circle xmin <R> ymin <R> radius <R>`
Defines a circular region of the domain with the specified energy and density.
`state <I> density <R> energy <R> geometry point xmin <R> ymin <R>`
Defines a cell in the domain with the specified energy and density.
Note that the generator is simple and the defined state completely fills a cell with which it intersects. In the case of over lapping regions, the last state takes priority. Hence a circular region will have a stepped interface and a point data will fill the cell it lies in with its defined energy and density.
`visit_frequency <I>`
This is the step frequency of visualisations dumps. The files produced are text base VTK files and are easily viewed in an application such as ViSit. The default is to output no graphical data. Note that the overhead of output is high, so should not be invoked when performance benchmarking is being carried out.
`summary_frequency <I>`
This is the step frequency of summary dumps. This requires a global reduction and associated synchronisation, so performance will be slightly affected as the frequency is increased. The default is for a summary dump to be produced every 10 steps and at the end of the simulation.
`tl_ch_cg_presteps <I>`
This option specifies the number of Conjugate Gradient iterations completed before the Chebyshev method is started. This is necessary to provide approximate minimum and maximum eigen values to start the Chebyshev method. The default value is 30.
`tl_ppcg_inner_steps <I>`
Number of inner steps to run when using the PPCG solver. The default value is 10.
`tl_ch_cg_errswitch`
If enabled alongside Chebshev/PPCG solver, switch when a certain error is reached instead of when a certain number of steps is reached. The default for this is off.
`tl_ch_cg_epslim`
Default error to switch from CG to Chebyshev when using Chebyshev solver with the tl_cg_ch_errswitch option enabled. The default value is 1e-5.
`tl_check_result`
After the solver reaches convergence, calculate ||b-Ax|| to make sure the solver has actually converged. The default for this option is off.
`tl_preconditioner_type`
This keyword invokes the pre-conditioner. Options are:
* `none` - No preconditioner.
* `jac_diag` - Diagonal Jacobi preconditioner. Typically reduces condition number by around 5% but may not reduce time to solution
* `jac_block` - Block Jacobi preconditioner (with a currently hardcoded block size of 4). Typically reduces the condition number by around 50% but may not reduce time to solution
`tl_use_jacobi`
This keyword selects the Jacobi method to solve the linear system. Note that this a very slowly converging method compared to other options. This is the default method is no method is explicitly selected.
`tl_use_cg`
This keyword selects the Conjugate Gradient method to solve the linear system.
`tl_use_ppcg`
This keyword selects the Conjugate Gradient method to solve the linear system.
`tl_use_chebyshev`
This keyword selects the Chebyshev method to solve the linear system.
`profiler_on`
This option turns the code's coarse grained internal profiler end. Timing information is reported at the end of the simulation in the tea.out file. The default is no profiling.
`verbose_on`
The option prints out extra information such as residual per iteration of a solve.
`tl_max_iters <I>`
This option provides an upper limit of the number of iterations used for the linear solve in a step. If this limit is reached, then the solution vector at this iteration is used as the solution, even if the convergence criteria has not been met. For this reason, care should be taken in the comparison of the performance of a slowly converging method, such as Jacobi, as the convergence criteria may not have been met for some of the steps. The default value is 1000.
`tl_eps <R>`
This option sets the convergence criteria for the selected solver. It uses a least squares measure of the residual. The default value is 1.0e-10.
`tl_coefficient_density
This option uses the density as the conduction coefficient. This is the default option.
`tl_coefficient_inverrse_density
This option uses the inverse density as the conduction coefficient.
`test_problem <I>`
This keyword selects a standard test with a "known" solution. Test problem 1 is automatically generated if the tea.in file does not exist. Test problems 2-5 are shipped in the TeaLeaf repository. Note that the known solution for an iterative solver is not an analytic solution but is the solution for a single core simulation with IEEE options enabled with the Intel compiler and a strict convergence of 1.0e-15. The difference to the expected solution is reported at the end of the simulation in the tea.out file. There is no default value for this option.