Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Holzer
pystencils
Commits
1230f299
Commit
1230f299
authored
Dec 29, 2020
by
Markus Holzer
Browse files
Fixed Parallel Datahandling test case
parent
84d05b12
Pipeline
#29040
passed with stage
in 32 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils_tests/test_datahandling.py
View file @
1230f299
...
...
@@ -29,7 +29,7 @@ def basic_iteration(dh):
def
access_and_gather
(
dh
,
domain_size
):
dh
.
add_array
(
'f1'
,
dtype
=
np
.
dtype
(
np
.
int
32
))
dh
.
add_array
(
'f1'
,
dtype
=
np
.
dtype
(
np
.
int
8
))
dh
.
add_array_like
(
'f2'
,
'f1'
)
dh
.
add_array
(
'v1'
,
values_per_cell
=
3
,
dtype
=
np
.
int64
,
ghost_layers
=
2
)
dh
.
add_array_like
(
'v2'
,
'v1'
)
...
...
@@ -40,7 +40,7 @@ def access_and_gather(dh, domain_size):
# Check symbolic field properties
assert
dh
.
fields
.
f1
.
index_dimensions
==
0
assert
dh
.
fields
.
f1
.
spatial_dimensions
==
len
(
domain_size
)
assert
dh
.
fields
.
f1
.
dtype
.
numpy_dtype
==
np
.
int
32
assert
dh
.
fields
.
f1
.
dtype
.
numpy_dtype
==
np
.
int
8
assert
dh
.
fields
.
v1
.
index_dimensions
==
1
assert
dh
.
fields
.
v1
.
spatial_dimensions
==
len
(
domain_size
)
...
...
@@ -92,7 +92,7 @@ def synchronization(dh, test_gpu=False):
return
field_name
+=
'Gpu'
dh
.
add_array
(
field_name
,
ghost_layers
=
1
,
dtype
=
np
.
int
32
,
cpu
=
True
,
gpu
=
test_gpu
)
dh
.
add_array
(
field_name
,
ghost_layers
=
1
,
dtype
=
np
.
int
8
,
cpu
=
True
,
gpu
=
test_gpu
)
# initialize everything with 1
for
b
in
dh
.
iterate
(
ghost_layers
=
1
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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