Commit 402058d9 authored by Pierre Augier's avatar Pierre Augier
Browse files

TRANSONIC_MPI_TIMEOUT

parent 029a1c11993c
Pipeline #31360 passed with stage
in 9 minutes and 37 seconds
......@@ -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
------------------------------------
......
......@@ -25,6 +25,8 @@ Examples
ipynb/executed/demo_jit
examples/inlined/txt
examples/writing_benchmarks/bench
ipynb/executed/bench_fxfy
Modules Reference
-----------------
......
......@@ -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>`_:
......
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment