Skip to content

Commit

Permalink
fix threading when there's only 1 core
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed Dec 22, 2023
1 parent b0f5f0d commit 0b2a16c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Snakefiles/c4-findErrors.sm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ rule computeErrors:
cd 0-correction/find-errors-jobs

range=`cat ../../{input.range}`
ncpus=`expr {threads} - 1` # One CPU is used for I/O.
if [ {threads} -gt 1 ]; then
ncpus=`expr {threads} - 1` # One CPU is used for I/O.
else
ncpus={threads}
fi

cat > ./{wildcards.nnnn}.sh <<EOF
#!/bin/sh
Expand Down

0 comments on commit 0b2a16c

Please sign in to comment.