Browse Source

Fix computing nmaxworkers when nmaxpidev is 0

Samuel Thibault 4 years ago
parent
commit
aa5e57fff8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      configure.ac

+ 3 - 0
configure.ac

@@ -2148,6 +2148,9 @@ fi
 if test $maxcpus == 0
 then
 	nmaxworkers=`expr 16 \* \( \( \( $nmaxmpidev \* 64 \) + $nmaxcudadev + $nmaxopencldev + 15 \) / 16 \) `
+elif test $nmaxmpidev == 0
+then
+	nmaxworkers=`expr 16 \* \( \( $maxcpus + $nmaxcudadev + $nmaxopencldev + 15 \) / 16 \) `
 else
 	nmaxworkers=`expr 16 \* \( \( \( $nmaxmpidev \* $maxcpus \) + $nmaxcudadev + $nmaxopencldev + 15 \) / 16 \) `
 fi