瀏覽代碼

fix default max number of nodes in simgrid case

Samuel Thibault 8 年之前
父節點
當前提交
02c7c8e43d
共有 1 個文件被更改,包括 15 次插入11 次删除
  1. 15 11
      configure.ac

+ 15 - 11
configure.ac

@@ -2020,8 +2020,12 @@ AC_ARG_ENABLE(maxnodes, [AS_HELP_STRING([--enable-maxnodes=<nnodes>],
 
 if test x$maxnodes = x0 ; then
 	if test x$enable_simgrid = xyes ; then
-		# We still need the room for the virtual CUDA/OpenCL devices
-		maxnodes=16
+		# We need the room for the virtual CUDA/OpenCL devices
+		nodes=`expr 4 + $nmaxcudadev + $nmaxopencldev + $nmaxmicdev + 1 + $nmaxmpidev`
+		if test $nodes -gt 32
+		then
+			nodes=32
+		fi
 	else
 		# We have one memory node shared by all CPU workers, one node per GPU
 		# and per MIC device
@@ -2045,16 +2049,16 @@ if test x$maxnodes = x0 ; then
 			nodes=`expr $nodes + 1`
 		fi
 
-        #nmaxmpidev = 0 if mpi master-slave is disabled
-        nodes=`expr $nodes + $nmaxmpidev`
-
-		# set maxnodes to the next power of 2 greater than nodes
-		maxnodes=1
-		while test "$maxnodes" -lt "$nodes"
-		do
-			maxnodes=`expr $maxnodes \* 2`
-		done
+		#nmaxmpidev = 0 if mpi master-slave is disabled
+		nodes=`expr $nodes + $nmaxmpidev`
  	fi
+
+	# set maxnodes to the next power of 2 greater than nodes
+	maxnodes=1
+	while test "$maxnodes" -lt "$nodes"
+	do
+		maxnodes=`expr $maxnodes \* 2`
+	done
 fi
 if test $maxnodes -gt 32 ; then
 	AC_MSG_ERROR([selected number of nodes ($maxnodes) can not be greater than 32])