Skip to content

Commit b407512

Browse files
committed
Exporting OpenBLAS thread pool variable prior to running deepsomatic
1 parent 613d69e commit b407512

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

workflow/rules/somatic.smk

+15
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,21 @@ rule deepsomatic:
797797
tmp=$(mktemp -d -p "{params.tmpdir}")
798798
trap 'du -sh "${{tmp}}"; rm -rf "${{tmp}}"' EXIT
799799
800+
# Export OpenBLAS variable to
801+
# control the number of threads
802+
# in a thread pool. By setting
803+
# this variable to 1, work is
804+
# done in the thread that ran
805+
# the operation, rather than
806+
# disbatching the work to a
807+
# thread pool. If this option
808+
# is not provided, it can lead
809+
# to nested parallelism.
810+
# See this issue for more info:
811+
# https://github.com/google/deepsomatic/issues/28
812+
export OPENBLAS_NUM_THREADS=1
813+
814+
# Run deepsomatic
800815
run_deepsomatic \\
801816
--model_type={params.dv_model_type} \\
802817
--ref={params.genome} \\

0 commit comments

Comments
 (0)