Pierre Augier (LEGI), Cyrille Bonamy (LEGI), Eric Maldonado (Irstea), Franck Thollard (ISTerre), Christophe Picard (LJK), Loïc Huder (ISTerre)
handled by the OS
share memory and can use at the same time different CPU cores
How?
OpenMP (Natively in C / C++ / Fortran. For Python: Pythran, Cython, ...)
In Python: threading
and concurrent.futures
⚠️ in Python, one interpreter per process (~) and the Global Interpreter Lock (GIL)...
In a Python program, different threads can run at the same time (and take advantage of multicore)
But... the Python interpreter runs the Python bytecodes sequentially !
Terrible 🐌 for CPU bounded if the Python interpreter is used a lot !
No problem for IO bounded !
No problem for extensions when the interpreter is not used !