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
9d7111e3d23b
Commit
402058d9
authored
Jan 21, 2022
by
Pierre Augier
Browse files
TRANSONIC_MPI_TIMEOUT
parent
029a1c11993c
Pipeline
#31360
passed with stage
in 9 minutes and 37 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
9d7111e3
...
...
@@ -180,6 +180,7 @@ Transonic is sensible to environment variables:
default backend "pythran" is quite robust. There are now 3 other backends:
"cython", "numba" and "python" (prototypes).
- :code:`TRANSONIC_MPI_TIMEOUT` sets the MPI timeout (default to 5 s).
A short tour of Transonic public API
------------------------------------
...
...
doc/index.rst
View file @
9d7111e3
...
...
@@ -25,6 +25,8 @@ Examples
ipynb/executed/demo_jit
examples/inlined/txt
examples/writing_benchmarks/bench
ipynb/executed/bench_fxfy
Modules Reference
-----------------
...
...
src/transonic/config.py
View file @
9d7111e3
...
...
@@ -17,7 +17,9 @@ Transonic is sensible to the environment variables:
- :code:`FLUID_COMPILE_JIT` can be set to false to disable the
compilation of jited functions. This can be useful for unittests.
Bye the way, for performance, it is important to configure Pythran with a file
- :code:`TRANSONIC_MPI_TIMEOUT` sets the MPI timeout (default to 5 s).
By the way, for performance, it is important to configure Pythran with a file
`~/.pythranrc
<https://pythran.readthedocs.io/en/latest/MANUAL.html#customizing-your-pythranrc>`_:
...
...
src/transonic/mpi.py
View file @
9d7111e3
...
...
@@ -7,6 +7,9 @@ import os
from
pathlib
import
Path
from
time
import
time
,
sleep
mpi_timeout
=
float
(
os
.
environ
.
get
(
"TRANSONIC_MPI_TIMEOUT"
,
"5"
))
if
"TRANSONIC_NO_MPI"
in
os
.
environ
:
nb_proc
=
1
rank
=
0
...
...
@@ -46,7 +49,7 @@ else:
_tag
=
3
*
7
*
9
*
sum
(
ord
(
letter
)
for
letter
in
"mpi transonic"
)
def
bcast
(
value
,
root
=
0
,
timeout
=
5.0
,
tag
=
_tag
):
def
bcast
(
value
,
root
=
0
,
timeout
=
mpi_timeout
,
tag
=
_tag
):
"""MPI broadcast
Should do something similar to::
...
...
@@ -101,7 +104,7 @@ else:
return
value
def
barrier
(
timeout
=
5
):
def
barrier
(
timeout
=
mpi_timeout
):
if
timeout
is
not
None
:
bcast
(
"barrier"
,
timeout
=
timeout
,
tag
=
_tag
+
4
)
comm
.
barrier
()
...
...
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