getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Tunc Bahcecioglu
Subject: [Getfem-commits] (no subject)
Date: Tue, 25 Dec 2018 05:15:23 -0500 (EST)

branch: devel-tunc_bahcecioglu_intel2019_fix
commit 7db9249a64a002131a80001c414f9d4a029ae8c9
Author: tunc_bahcecioglu <address@hidden>
Date:   Tue Dec 25 11:14:34 2018 +0100

    fixed SEH exceptions created by a wrong optimization by the INTEL c++ 2019 
compiler
---
 src/getfem_assembling_tensors.cc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/getfem_assembling_tensors.cc b/src/getfem_assembling_tensors.cc
index 378863c..74478e3 100644
--- a/src/getfem_assembling_tensors.cc
+++ b/src/getfem_assembling_tensors.cc
@@ -581,7 +581,12 @@ namespace getfem {
         tensor_mask m(trng,ti);
         v.resize(r*target_dim);
         tensor_ranges cnt(2);
-        for (cnt[1]=0; cnt[1] < r; cnt[1]++) {
+        for (index_type i=0; i < r; ++i) {
+          // the value in cnt[1] is not directly used as the loop variable
+          // as this makes the INTEL 2019 compiler wrongly optimize the loop 
check,
+          // making the outer loop go one more than it needs to;
+          // creating SEH exceptions
+          cnt[1] = i;
           for (index_type k=0; k < target_dim; ++k) {
             cnt[0] = k*qmult + (cnt[1]%qmult); //(cnt[1] % qmult)*target_dim + 
k;
             m.set_mask_val(m.lpos(cnt), true);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]