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
ift
NIFTy
Commits
60672433
Commit
60672433
authored
May 12, 2019
by
Martin Reinecke
Browse files
workaround for problem with random numers and MPI
parent
f1709dd5
Pipeline
#48171
passed with stages
in 17 minutes and 25 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
nifty5/extra.py
View file @
60672433
...
...
@@ -72,7 +72,7 @@ def _full_implementation(op, domain_dtype, target_dtype, atol, rtol,
def
_check_linearity
(
op
,
domain_dtype
,
atol
,
rtol
):
fld1
=
from_random
(
"normal"
,
op
.
domain
,
dtype
=
domain_dtype
)
fld2
=
from_random
(
"normal"
,
op
.
domain
,
dtype
=
domain_dtype
)
alpha
=
np
.
random
.
random
()
alpha
=
np
.
random
.
random
()
# FIXME: this can break badly with MPI!
val1
=
op
(
alpha
*
fld1
+
fld2
)
val2
=
alpha
*
op
(
fld1
)
+
op
(
fld2
)
_assert_allclose
(
val1
,
val2
,
atol
=
atol
,
rtol
=
rtol
)
...
...
test/test_operators/test_adjoint.py
View file @
60672433
...
...
@@ -37,6 +37,7 @@ _pow_spaces = [ift.PowerSpace(ift.RGSpace((17, 38), harmonic=True))]
pmp
=
pytest
.
mark
.
parametrize
dtype
=
list2fixture
([
np
.
float64
,
np
.
complex128
])
np
.
random
.
seed
(
42
)
@
pmp
(
'sp'
,
_p_RG_spaces
)
def
testLOSResponse
(
sp
,
dtype
):
...
...
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