jsxlei / SCALE

Single-cell ATAC-seq analysis via Latent feature Extraction
MIT License
97 stars 17 forks source link

CPU control #9

Open TheSallyGardens opened 4 years ago

TheSallyGardens commented 4 years ago

Hello, I've try your SCALE tools.I want to know how you can control the CPU usage.

jsxlei commented 4 years ago

SCALE can only use single core of CPU for now while supports multi-GPUs on cuda device.

TheSallyGardens commented 4 years ago

SCALE can only use single core of CPU for now while supports multi-GPUs on cuda device. I have 56 cores on my server.When I use SCALE,It takes up the whole core.

TheSallyGardens commented 4 years ago

SCALE can only use single core of CPU for now while supports multi-GPUs on cuda device.

For training data.

jsxlei commented 4 years ago

Try torch.set_num_threads(1) or refer to this link: https://github.com/pytorch/pytorch/issues/16894.

jsxlei commented 4 years ago

Add OMP_NUM_THREADS=1 or MKL_NUM_THREADS=1 before SCALE.py. e.g. OMP_NUM_THREADS=1 SCALE.py -d xx which works on our centos system, to use multi-cores, just modify the OMP_NUM_THREADS=num you want

TheSallyGardens commented 4 years ago

Add OMP_NUM_THREADS=1 or MKL_NUM_THREADS=1 before SCALE.py. e.g. OMP_NUM_THREADS=1 SCALE.py -d xx which works on our centos system, to use multi-cores, just modify the OMP_NUM_THREADS=num you want

Thank you for your answer.