sycomore icon indicating copy to clipboard operation
sycomore copied to clipboard

Code running on single core

Open GiadaFallo opened this issue 5 years ago • 1 comments

We are running the code on a Ubuntu Server 18.4 (all the needed dependencies are installed), but we cannot see the code running in multiple cores. Indeed we observed that the code uses just a single core (both with the local built version and with the one installed from pip). Is that the normal behaviour?


Furthermore we wanted to understand if it is right to compute a model for each species, is there any other way to create multiple species?

  • Operating system: Ubuntu Server 18.4
  • Sycomore version: latest
  • Python version: 3.6.9

GiadaFallo avatar Dec 04 '20 14:12 GiadaFallo

Running on a single core has become a feature with the integration of xsimd: after running benchmarks on various systems, using OpenMP has proven to actually slow down the code. This is caused by the small size of the loops in the EPG operators, as the time spent in synchronization is larger than the computation time. Your second question seems to imply that you want to test a model on multiple species: if this is the case, you can parallelize at the species level, using e.g. Python's multiprocessing or joblib modules, or MPI.

Regarding your second question, yes, each model must have a single species (I remember EPG has being described as a "single peak" model, although I can't find the source at the moment).

lamyj avatar Dec 04 '20 15:12 lamyj