Merge branch origin/release-2020 into master
[alexxy/gromacs.git] / src / gromacs / domdec / domdec_setup.cpp
index 3889a62043d2631425cc1ec46d05a820fd80f85d..7799aec5ae25044b6f3384b7b8ff6ff58b9781f4 100644 (file)
@@ -759,7 +759,10 @@ real getDDGridSetupCellSizeLimit(const gmx::MDLogger& mdlog,
 
     return cellSizeLimit;
 }
-void checkForValidRankCountRequests(const int numRanksRequested, const bool usingPme, const int numPmeRanksRequested)
+void checkForValidRankCountRequests(const int  numRanksRequested,
+                                    const bool usingPme,
+                                    const int  numPmeRanksRequested,
+                                    const bool checkForLargePrimeFactors)
 {
     int numPPRanksRequested = numRanksRequested;
     if (usingPme && numPmeRanksRequested > 0)
@@ -777,7 +780,7 @@ void checkForValidRankCountRequests(const int numRanksRequested, const bool usin
     // Once the rank count is large enough, it becomes worth
     // suggesting improvements to the user.
     const int minPPRankCountToCheckForLargePrimeFactors = 13;
-    if (numPPRanksRequested >= minPPRankCountToCheckForLargePrimeFactors)
+    if (checkForLargePrimeFactors && numPPRanksRequested >= minPPRankCountToCheckForLargePrimeFactors)
     {
         const int largestDivisor = largest_divisor(numPPRanksRequested);
         /* Check if the largest divisor is more than numPPRanks ^ (2/3) */