From: Timo Heister Date: Wed, 25 Feb 2015 22:33:07 +0000 (-0500) Subject: add failing test on intel 15 X-Git-Tag: v8.3.0-rc1~414^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F607%2Fhead;p=dealii.git add failing test on intel 15 This adds a simplified version of vector-vector.cc that fails in release mode on Intel. --- diff --git a/tests/lac/intel-15-bug.cc b/tests/lac/intel-15-bug.cc new file mode 100644 index 0000000000..ba9c68f0a4 --- /dev/null +++ b/tests/lac/intel-15-bug.cc @@ -0,0 +1,90 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 1998 - 2015 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + +// intel 15.0 compiler bug. This is a simplification of tests/lac/vector-vector +// It only triggers when using TBB (it will use two threads) and only with +// SIMD for long double. + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + +typedef int size_type; + +template + struct Vectorization_add_v +{ + Number *val; + Number *v_val; + + void operator() (const tbb::blocked_range &range) const + { + DEAL_II_OPENMP_SIMD_PRAGMA + for (size_type i=range.begin(); i d1(N), d2(N); + for (unsigned int i=0; i vector_add; + vector_add.val = &d1[0]; + vector_add.v_val = &d2[0]; + + if (1) + { + //fails: + tbb::parallel_for (tbb::blocked_range (0, + N, + 2), + vector_add, + tbb::auto_partitioner()); + } + else + { + // works: + vector_add(tbb::blocked_range (0,1,2)); + vector_add(tbb::blocked_range (1,3,2)); + } + + deallog << "result: " << d1[N-1] << " should be 3" << std::endl; +} + +int main() +{ + std::ofstream logfile("output"); + deallog << std::fixed; + deallog << std::setprecision(2); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + check(); +} + + diff --git a/tests/lac/intel-15-bug.output b/tests/lac/intel-15-bug.output new file mode 100644 index 0000000000..d92c1c6bb0 --- /dev/null +++ b/tests/lac/intel-15-bug.output @@ -0,0 +1,2 @@ + +DEAL::result: 3.00 should be 3