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
Christoph Alt
pystencils
Commits
4827649e
Commit
4827649e
authored
Aug 19, 2021
by
Markus Holzer
Committed by
Michael Kuron
Aug 19, 2021
Browse files
Fix pipeline
parent
b70ac70a
Changes
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
4827649e
...
...
@@ -261,7 +261,8 @@ pycodegen-integration:
-
cd ../pygrandchem
-
py.test -v -n $NUM_CORES --junitxml=report.xml .
-
cd ../walberla/build/
-
make CodegenJacobiCPU CodegenJacobiGPU CodegenPoissonCPU CodegenPoissonGPU MicroBenchmarkGpuLbm LbCodeGenerationExample UniformGridBenchmarkGPU_trt UniformGridBenchmarkGPU_entropic_kbc_n4 FluctuatingMRT
-
make -j $NUM_CORES CodegenJacobiCPU CodegenJacobiGPU CodegenPoissonCPU CodegenPoissonGPU MicroBenchmarkGpuLbm LbCodeGenerationExample
-
make -j $NUM_CORES multiphaseCPU multiphaseGPU FluctuatingMRT FlowAroundSphereCodeGen
-
cd apps/benchmarks/UniformGridGPU
-
make -j $NUM_CORES
-
cd ../UniformGridGenerated
...
...
pystencils/kerncraft_coupling/kerncraft_interface.py
View file @
4827649e
...
...
@@ -71,7 +71,10 @@ class PyStencilsKerncraftKernel(KernelCode):
while
cur_node
is
not
None
:
if
isinstance
(
cur_node
,
LoopOverCoordinate
):
loop_counter_sym
=
cur_node
.
loop_counter_symbol
loop_info
=
(
loop_counter_sym
.
name
,
cur_node
.
start
,
cur_node
.
stop
,
1
)
loop_info
=
(
loop_counter_sym
.
name
,
sp
.
Integer
(
cur_node
.
start
),
sp
.
Integer
(
cur_node
.
stop
),
sp
.
Integer
(
1
))
# If the correct step were to be provided, all access within that step length will
# also need to be passed to kerncraft: cur_node.step)
self
.
_loop_stack
.
append
(
loop_info
)
...
...
pystencils/stencil.py
View file @
4827649e
...
...
@@ -423,14 +423,14 @@ def plot_3d(stencil, figure=None, axes=None, data=None, textsize='8'):
def
draw
(
self
,
renderer
):
xs3d
,
ys3d
,
zs3d
=
self
.
_verts3d
xs
,
ys
,
zs
=
proj3d
.
proj_transform
(
xs3d
,
ys3d
,
zs3d
,
renderer
.
M
)
xs
,
ys
,
zs
=
proj3d
.
proj_transform
(
xs3d
,
ys3d
,
zs3d
,
self
.
axes
.
M
)
self
.
set_positions
((
xs
[
0
],
ys
[
0
]),
(
xs
[
1
],
ys
[
1
]))
FancyArrowPatch
.
draw
(
self
,
renderer
)
if
axes
is
None
:
if
figure
is
None
:
figure
=
plt
.
figure
()
axes
=
figure
.
gca
(
projection
=
'3d'
)
axes
=
figure
.
add_subplot
(
projection
=
'3d'
)
try
:
axes
.
set_aspect
(
"equal"
)
except
NotImplementedError
:
...
...
@@ -446,7 +446,7 @@ def plot_3d(stencil, figure=None, axes=None, data=None, textsize='8'):
r
=
[
-
1
,
1
]
for
s
,
e
in
combinations
(
np
.
array
(
list
(
product
(
r
,
r
,
r
))),
2
):
if
np
.
sum
(
np
.
abs
(
s
-
e
))
==
r
[
1
]
-
r
[
0
]:
axes
.
plot
3D
(
*
zip
(
s
,
e
),
color
=
"k"
,
alpha
=
0.5
)
axes
.
plot
(
*
zip
(
s
,
e
),
color
=
"k"
,
alpha
=
0.5
)
for
d
,
annotation
in
zip
(
stencil
,
data
):
assert
len
(
d
)
==
3
,
"Works only for 3D stencils"
...
...
pystencils_tests/test_buffer_gpu.py
View file @
4827649e
...
...
@@ -38,7 +38,7 @@ def _generate_fields(dt=np.uint8, stencil_directions=1, layout='numpy'):
index_dimensions
=
1
if
stencil_directions
>
1
else
0
).
astype
(
dt
).
flat
gpu_src_arr
=
gpuarray
.
to_gpu
(
src_arr
)
gpu_dst_arr
=
gpuarray
.
zeros
_like
(
gpu_src_arr
)
gpu_dst_arr
=
gpuarray
.
empty
_like
(
gpu_src_arr
)
size
=
int
(
np
.
prod
(
src_arr
.
shape
))
gpu_buffer_arr
=
gpuarray
.
zeros
(
size
,
dtype
=
dt
)
...
...
pystencils_tests/test_random.py
View file @
4827649e
...
...
@@ -78,9 +78,8 @@ def test_rng(target, rng, precision, dtype, t=124, offsets=(0, 0), keys=(0, 0),
int_reference
=
np
.
empty
(
dh
.
shape
+
(
4
,),
dtype
=
int
)
for
x
in
range
(
dh
.
shape
[
0
]):
for
y
in
range
(
dh
.
shape
[
1
]):
r
=
Philox
(
counter
=
t
+
(
x
+
offset_values
[
0
])
*
2
**
32
+
(
y
+
offset_values
[
1
])
*
2
**
64
,
r
=
Philox
(
counter
=
t
+
(
x
+
offset_values
[
0
])
*
2
**
32
+
(
y
+
offset_values
[
1
])
*
2
**
64
-
1
,
key
=
keys
[
0
]
+
keys
[
1
]
*
2
**
32
,
number
=
4
,
width
=
32
,
mode
=
"sequence"
)
r
.
advance
(
-
4
,
counter
=
False
)
int_reference
[
x
,
y
,
:]
=
r
.
random_raw
(
size
=
4
)
if
precision
==
'float'
or
dtype
==
'float'
:
...
...
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