Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
transonic
Commits
55c927d6c927
Commit
8cf8c717
authored
Oct 04, 2018
by
Pierre Augier
Browse files
No fluiddyn in the tests
parent
3d8a6ced58a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
data_tests/classic.py
View file @
55c927d6
import
numpy
as
np
from
fluiddyn.util
import
mpi
from
fluidpythran
import
FluidPythran
fp
=
FluidPythran
()
...
...
@@ -19,21 +17,3 @@ fp = FluidPythran()
@
fp
.
pythranize
def
func
(
a
,
b
):
return
(
a
*
np
.
log
(
b
)).
max
()
if
__name__
==
"__main__"
:
n0
,
n1
=
100
,
200
a0
=
np
.
random
.
rand
(
n0
,
n1
)
a1
=
np
.
random
.
rand
(
n0
,
n1
)
result
=
func
(
a0
,
a1
)
if
mpi
.
nb_proc
>
1
:
result
=
mpi
.
comm
.
allreduce
(
result
,
op
=
mpi
.
MPI
.
MAX
)
mpi
.
printby0
(
result
)
a0
=
(
1000
*
a0
).
astype
(
int
)
result
=
func
(
a0
,
a1
)
if
mpi
.
nb_proc
>
1
:
result
=
mpi
.
comm
.
allreduce
(
result
,
op
=
mpi
.
MPI
.
MAX
)
mpi
.
printby0
(
result
)
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