compomics / ms2pip

MS²PIP: Fast and accurate peptide spectrum prediction for multiple fragmentation methods, instruments, and labeling techniques.
https://ms2pip.readthedocs.io
Apache License 2.0
35 stars 18 forks source link

NumExpr safe limit for number of threads threads #172

Closed JB91451 closed 1 year ago

JB91451 commented 2 years ago

Dear all,

I run MS2PIP on a workstation which would has 24 cores and therefore set --num_cpu accordingly. however, when running the program, there is a warning that "NumExpr detected 24 cores but 'NUMEXPR_MAX_THREADS' not set, so enforcing safe limit of 8. NumExpr defaulting to 8 threads." I guess it is not possible to set NUMEXPR_MAX_THREADS directly during the ms2pip call? If so, would it be possible to couple this value with the --num_cpu option for a future release?

Best regards, Juergen

RalfG commented 2 years ago

Dear Juergen,

Apologies for the late reply. Thank you for reporting this issue!

NumExpr is a downstream dependency of DeepLC. In DeepLC itself, the environment variable NUMEXPR_MAX_THREADS is set as the configured number of cores. Expected behavior would be that MS²PIP passes its --num_cpu value on to DeepLC, which would then set NUMEXPR_MAX_THREADS. As this currently does not seem to be the case, we will look into it.

In the meantime, you can set the NUMEXPR_MAX_THREADS environment variable yourself when running MS²PIP:

Best, Ralf

RalfG commented 1 year ago

Fixed in #193