portage: fix compile on icc (#14707)

This commit is contained in:
Christoph Junghans 2020-01-31 12:35:20 -07:00 committed by GitHub
parent 09e318fc84
commit 47ee690076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,24 @@
--- portage.orig/portage/search/pairs.cc 2018-07-16 13:42:12.000000000 -0600
+++ portage/portage/search/pairs.cc 2020-01-09 15:32:43.289085000 -0700
@@ -323,8 +323,8 @@
// check for completely outside source boxes
bool outside = false;
for (size_t m=0;m<dim;m++) {
- if (y[m][j]<=cminmax[0][m]) outside=true;
- if (y[m][j]>=cminmax[1][m]) outside=true;
+ if (y[m][j]<=cminmax[0][m]) { outside=true; break; }
+ if (y[m][j]>=cminmax[1][m]) { outside=true; break; }
}
if (outside) return pairlist;
@@ -347,8 +347,8 @@
// check that y is contained
bool inside = true;
for(size_t m=0; m<dim; m++) {
- if (y[m][j] <= xll[m]) inside = false;
- if (y[m][j] >= xur[m]) inside = false;
+ if (y[m][j] <= xll[m]) { inside = false; break; }
+ if (y[m][j] >= xur[m]) { inside = false; break; }
}
// add pair: put x's in this y-cell onto neighbor list, if inside

View File

@ -31,6 +31,9 @@ class Portage(CMakePackage):
# fixed in version above 1.2.2
patch('rel-with-deb-info.patch', when='@1.2.2')
# intel/19.0.4 got an ICE (internal compiler error) compiling pairs.cc
patch('p_intel_ice.patch', when='@1.2.2')
variant('mpi', default=True, description='Support MPI')
depends_on("cmake@3.1:", type='build')