Caching from mpi code

Hello, numba community!

I have a project that uses nimba and MPI GitHub - Konjkov/pycasino: Python realisation of Casino (QMC) program.
If I run it in multithreaded mode (mpiexec) for the first time (without caches), the process of creating caches takes extremely long time or sometimes hangs. Is it possible to change the code so that only the first thread (on every node) is involved in creating caches so that unnecessary race condition does not arise?

Best wishes, Vladimir.