MACS icon indicating copy to clipboard operation
MACS copied to clipboard

Q: Limit number of threads

Open dwesche opened this issue 7 years ago • 6 comments

Hi,

I'm running macs2 through miniconda3 on a shared server. It looks like macs2 by default uses the maximum number of available cores to spawn subprocesses during peak calling, thereby blocking anyone else from using the server. How can I limit the number of processes macs2 is allowed to run? I'm unable to find an option for that.

Thanks!

dwesche avatar May 01 '18 01:05 dwesche

A very relevant question, I also experienced this behavior, which is really bad in a shared environment.

chrarnold avatar Nov 28 '18 13:11 chrarnold

I have also experienced this behavior.

sprouffske avatar May 14 '19 11:05 sprouffske

The multiprocessing function in MACS2 hasn't been implemented. Could you provide more information on this issue?

taoliu avatar Aug 14 '19 18:08 taoliu

MACS2 uses all available cores at least at some timepoints or parts in the workflow, despite not specifying this anywhere as a command line option. Bad behavior, because of the greediness and therefore using all resources , particularly for shared environments.

chrarnold avatar Aug 14 '19 19:08 chrarnold

@chrarnold Could you provide more detail? Such as MACS2 version and command line? Don't see where in the MACS2 code the multi-threading is implemented. But if you can provide more detail such as in which step it happens, it would be very helpful.

taoliu avatar Aug 14 '19 19:08 taoliu

This is probably multithreading by BLAS (https://stackoverflow.com/questions/17053671/how-do-you-stop-numpy-from-multithreading) at least this is what I often see (and have to explicitely disable) in R on machines that have a multithread-ready BLAS library in place.

ATpoint avatar Dec 07 '22 11:12 ATpoint