Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
7523a889
Commit
7523a889
authored
May 23, 2018
by
Martin Bauer
Browse files
Datahandling arrays are not filled by default any more
- updates in lbmpy benchmark -> enables better numa placement
parent
fe9d5123
Changes
3
Hide whitespace changes
Inline
Side-by-side
datahandling/serial_datahandling.py
View file @
7523a889
...
...
@@ -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"
)
...
...
kerncraft_coupling/generate_benchmark.py
View file @
7523a889
...
...
@@ -19,7 +19,7 @@ void dummy(double *);
extern int var_false;
{{kernel
C
ode}}
{{kernel
_c
ode}}
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}}({{call
A
rgument
L
ist}});
{{kernelName}}({{call
_a
rgument
_l
ist}});
// Dummy calls
{%- for field_name, dataType, size in fields %}
...
...
@@ -100,10 +100,10 @@ def generate_benchmark(ast, likwid=False):
args
=
{
'likwid'
:
likwid
,
'kernel
C
ode'
:
generate_c
(
ast
),
'kernel
_c
ode'
:
generate_c
(
ast
),
'kernelName'
:
ast
.
function_name
,
'fields'
:
fields
,
'constants'
:
constants
,
'call
A
rgument
L
ist'
:
","
.
join
(
call_parameters
),
'call
_a
rgument
_l
ist'
:
","
.
join
(
call_parameters
),
}
return
benchmark_template
.
render
(
**
args
)
timeloop.py
View file @
7523a889
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment