Commit 7523a889 authored by Martin Bauer's avatar Martin Bauer
Browse files

Datahandling arrays are not filled by default any more

- updates in lbmpy benchmark
-> enables better numa placement
parent fe9d5123
......@@ -104,7 +104,6 @@ class SerialDataHandling(DataHandling):
byte_offset = ghost_layers * np.dtype(dtype).itemsize
cpu_arr = create_numpy_array_with_layout(layout=layout_tuple, alignment=alignment,
byte_offset=byte_offset, **kwargs)
cpu_arr.fill(np.inf)
if alignment and gpu:
raise NotImplementedError("Alignment for GPU fields not supported")
......
......@@ -19,7 +19,7 @@ void dummy(double *);
extern int var_false;
{{kernelCode}}
{{kernel_code}}
int main(int argc, char **argv)
......@@ -32,8 +32,8 @@ int main(int argc, char **argv)
{%- for field_name, dataType, size in fields %}
// Initialization {{field_name}}
double * {{field_name}} = aligned_malloc(sizeof({{dataType}}) * {{size}}, 32);
for (int i = 0; i < {{size}}; ++i)
double * {{field_name}} = (double *) aligned_malloc(sizeof({{dataType}}) * {{size}}, 32);
for (unsigned long long i = 0; i < {{size}}; ++i)
{{field_name}}[i] = 0.23;
if(var_false)
......@@ -60,7 +60,7 @@ int main(int argc, char **argv)
for (; repeat > 0; --repeat)
{
{{kernelName}}({{callArgumentList}});
{{kernelName}}({{call_argument_list}});
// Dummy calls
{%- for field_name, dataType, size in fields %}
......@@ -100,10 +100,10 @@ def generate_benchmark(ast, likwid=False):
args = {
'likwid': likwid,
'kernelCode': generate_c(ast),
'kernel_code': generate_c(ast),
'kernelName': ast.function_name,
'fields': fields,
'constants': constants,
'callArgumentList': ",".join(call_parameters),
'call_argument_list': ",".join(call_parameters),
}
return benchmark_template.render(**args)
......@@ -78,6 +78,7 @@ class TimeLoop:
"""
# Run a few time step to get first estimate
if number_of_time_steps_for_estimation == 'auto':
self.run(1)
iterations, total_time = self.run_time_span(0.5)
duration_of_time_step = total_time / iterations
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment