DerrickWood / kraken2

The second version of the Kraken taxonomic sequence classification system
MIT License
733 stars 274 forks source link

kraken2-build --threads option error: OMP only wants you to use 1 threads #293

Open rosscampbell7 opened 4 years ago

rosscampbell7 commented 4 years ago

I am using kraken2 to build a custom database on a Cray XC40/50 high performance computing environment. I have reserved 2 nodes with 44 cores each and execute kraken2-build with the command below:

kraken2-build --build --db test --threads 88

This generates the error build_db: OMP only wants you to use 1 threads

I run parallel processes on this system all the time, but kraken2-build seems to have a problem getting those threads. Does anyone know what might be the cause/solution to this?

Laura-Alex commented 4 years ago

Disclaimer: I am only a beginner, but I've had the same error message and wanted to share my solution in case it helps.

For me, what helped was specifically calling Open MP. Even though I can use multi-threading on my HPC environment without doing so, it appears to be required for the --build function of Kraken2.

In practice, this meant I added a couple of lines to my job script:

`module load intel-suite

include

include

export OMP_NUM_THREADS=32`

The exact way of calling Open MP on your machine might be different, so you'll have to check. Also, if you're already using Open MP, please don't mind me!