weizhouUMICH / SAIGE

GNU Lesser General Public License v3.0
188 stars 73 forks source link

Number of threads parameter step2_SPAtests.R #341

Closed rkarlssonlinner closed 3 years ago

rkarlssonlinner commented 3 years ago

Hi,

When I run step1_fitNULLGLMM.R, then I can control the number of threads with the --nThreads parameter, which works well. However, this parameter is, AFAIK, missing from step2_SPAtests.R. Am I misunderstanding something here? Will this parameter be implemented in step2_SPAtests.R?

Thanks!

weizhouUMICH commented 3 years ago

Hi @rkarlssonlinner, each Step 2 job uses one CPU.
For single-variant association tests, to split genome for multiple jobs at the same time, if the input is bgen, you may use the parameter --idstoIncludeFile to query by marker IDs for each job and if the input is vcf, you may specify --start and --end to run jobs by regions.

Thanks, Wei

weizhouUMICH commented 3 years ago

using R that automatically uses multiple CPUs slows down the Step 2, which only uses 1 CPU. The bash command export MKL_NUM_THREADS=1; export MKL_DYNAMIC=false; export OMP_NUM_THREADS=1; export OMP_DYNAMIC=false;

can be used to ensure the program only uses one CPU.

Thanks, Wei