Parallel Computing

The Linux version of LDAK is compiled using the Intel MKL Libraries and openMP. These allow you to run LDAK in parallel (when multiple CPUs are available). To do this, use the option --max-threads. For example, add --max-threads 4 to a command to run LDAK on four CPUs.

Parallelization is most effective for commands that involve large-scale matrix algebra (e.g., Calculating Kinships, REML and Calculating Taggings). It is also effective for LDAK-KVIK and the Prediction Tools (both when using individual-level data and summary statistics). For these commands, I regularly run LDAK using either two or four CPUs.

Please be aware that the benefits of parallelization reduce as the number of CPUs increases (which is why I never use more than eight CPUs). Further, it is generally more efficient to divide a large jobs into multiple smaller jobs, than increase the number of CPUs. For example, if Thinning Predictors using data that spans 22 chromosomes, it would be more efficient to run 22 single-chromosome jobs, each using one CPU, than to run the genome-wide job using 22 CPUs (however, the former requires more complicated scripting).

Note that the Mac version of LDAK does not allow for parallelization (to obtain a parallel version, you will have to compile yourself).
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Example:

Here is a parallel version of the example from Calculate Kinships. It uses the binary PLINK files human.bed, human.bim and human.fam from the Test Datasets, and assumes the Human Default Model (see Technical Details for more information).

./ldak.out --calc-kins-direct HumDef --bfile human --power -.25 --max-threads 4

In this example, LDAK will use four CPUs (which I would expect to be about two times faster than running the same command using one CPU).