Re: [PATCH] Disable tests that aren't valid in parallel mode

2019-10-02 Thread Jonathan Wakely

On 01/10/19 21:59 +0100, Jonathan Wakely wrote:

Tested x86_64-linux (normal and parallel modes), committed to trunk.



commit b11c8f480fe1cd5696ec1a8f0db481c5f45429b8
Author: Jonathan Wakely 
Date:   Tue Oct 1 20:31:51 2019 +0100

   Disable tests that aren't valid in parallel mode
   
   Tests that depend on debug mode can't be tested in parallel mode.
   
   * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for

   parallel mode.
   * testsuite/20_util/hash/84998.cc: Likewise.
   * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: 
Likewise.
   * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: 
Likewise.
   * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
   * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
   * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
   * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
   * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
   * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
   Likewise.
   * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
   Likewise.
   * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
   Likewise.
   * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
   Likewise.
   * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
   Likewise.
   * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: 
Likewise.
   * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
   * testsuite/25_algorithms/copy/86658.cc: Likewise.
   * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
   * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
   * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
   * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.


The remaining failures for 'make check-parallel' are all in tests for C++20
constexpr and move-only function objects.

We should just document that Parallel Mode only really meets the C++03
requirements. For C++17 there are new parallel algorithms, and once
those are able to use OpenMP we should consider deprecating Parallel
Mode entirely.

This documents the limitation. Committed to trunk.

commit 5fad726cad1b930930caeb4f6c070ebde813cb02
Author: Jonathan Wakely 
Date:   Wed Oct 2 15:43:54 2019 +0100

Document non-conformance of parallel mode to recent C++ standards

* doc/xml/manual/parallel_mode.xml: Add caveat about support for
recent standards.
* doc/html/*: Regenerate.

diff --git a/libstdc++-v3/doc/xml/manual/parallel_mode.xml b/libstdc++-v3/doc/xml/manual/parallel_mode.xml
index 60e2088b2a1..ab7d2f2b56b 100644
--- a/libstdc++-v3/doc/xml/manual/parallel_mode.xml
+++ b/libstdc++-v3/doc/xml/manual/parallel_mode.xml
@@ -13,17 +13,31 @@
 
 
  The libstdc++ parallel mode is an experimental parallel
-implementation of many algorithms the C++ Standard Library.
+implementation of many algorithms of the C++ Standard Library.
 
 
 
 Several of the standard algorithms, for instance
 std::sort, are made parallel using OpenMP
-annotations. These parallel mode constructs and can be invoked by
+annotations. These parallel mode constructs can be invoked by
 explicit source declaration or by compiling existing sources with a
 specific compiler flag.
 
 
+
+  
+The parallel mode has not been kept up to date with recent C++ standards
+and so it only conforms to the C++03 requirements.
+That means that move-only predicates may not work with parallel mode
+algorithms, and for C++20 most of the algorithms cannot be used in
+constexpr functions.
+  
+  
+For C++17 and above there are new overloads of the standard algorithms
+which take an execution policy argument. You should consider using those
+instead of the non-standard parallel mode extensions.
+  
+
 
 Intro
   


[PATCH] Disable tests that aren't valid in parallel mode

2019-10-01 Thread Jonathan Wakely

Tested x86_64-linux (normal and parallel modes), committed to trunk.
commit b11c8f480fe1cd5696ec1a8f0db481c5f45429b8
Author: Jonathan Wakely 
Date:   Tue Oct 1 20:31:51 2019 +0100

Disable tests that aren't valid in parallel mode

Tests that depend on debug mode can't be tested in parallel mode.

* testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
parallel mode.
* testsuite/20_util/hash/84998.cc: Likewise.
* testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
* testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
Likewise.
* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
Likewise.
* testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
* testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
* testsuite/25_algorithms/copy/86658.cc: Likewise.
* testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
* testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
* testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
* testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc b/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc
index 31242760179..bdc41507424 100644
--- a/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc
+++ b/libstdc++-v3/testsuite/17_intro/using_namespace_std_tr1_neg.cc
@@ -18,7 +18,7 @@
 // .
 
 // NB: parallel-mode uses TR1 bits...
-#undef _GLIBCXX_PARALLEL
+// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
 
 #include 
 #include 
diff --git a/libstdc++-v3/testsuite/20_util/hash/84998.cc b/libstdc++-v3/testsuite/20_util/hash/84998.cc
index 1cf57e9073c..b00df223415 100644
--- a/libstdc++-v3/testsuite/20_util/hash/84998.cc
+++ b/libstdc++-v3/testsuite/20_util/hash/84998.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-D_GLIBCXX_DEBUG" }
 // { dg-do compile { target c++11 } }
+// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
 
 // PR libstdc++/84998
 
diff --git a/libstdc++-v3/testsuite/23_containers/deque/types/pmr_typedefs_debug.cc b/libstdc++-v3/testsuite/23_containers/deque/types/pmr_typedefs_debug.cc
index ac96584a6e0..9bee219b58f 100644
--- a/libstdc++-v3/testsuite/23_containers/deque/types/pmr_typedefs_debug.cc
+++ b/libstdc++-v3/testsuite/23_containers/deque/types/pmr_typedefs_debug.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-std=gnu++17 -D_GLIBCXX_DEBUG" }
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
 
 #include 
 static_assert(std::is_same_v<
diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/pmr_typedefs_debug.cc b/libstdc++-v3/testsuite/23_containers/forward_list/pmr_typedefs_debug.cc
index 7df01d530f8..66138ba830c 100644
--- a/libstdc++-v3/testsuite/23_containers/forward_list/pmr_typedefs_debug.cc
+++ b/libstdc++-v3/testsuite/23_containers/forward_list/pmr_typedefs_debug.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-std=gnu++17 -D_GLIBCXX_DEBUG" }
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
 
 #include 
 static_assert(std::is_same_v<
diff --git a/libstdc++-v3/testsuite/23_containers/list/pmr_typedefs_debug.cc b/libstdc++-v3/testsuite/23_containers/list/pmr_typedefs_debug.cc
index d59f8c41d1d..b1bb271aa1c 100644
--- a/libstdc++-v3/testsuite/23_containers/list/pmr_typedefs_debug.cc
+++ b/libstdc++-v3/testsuite/23_containers/list/pmr_typedefs_debug.cc
@@ -17,6 +17,7 @@
 
 // { dg-options "-std=gnu++17 -D_GLIBCXX_DEBUG" }
 // { dg-do compile { target c++17 } }
+// { dg-skip-if "" { *-*-* } { "-D_GLIBCXX_PARALLEL" } }
 
 #include 
 static_assert(std::is_same_v<
diff --git a/libstdc++-v3/testsuite/23_containers/map/pmr_typedefs_debug.cc b/libstdc++-v3/testsuite/23_containers/map/pmr_typedefs_debug.cc
index d06673027e5..c959b6957ed 100644
--- a/libstdc++-v3/testsuite/23_containers/map/pmr_typedefs_debug.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/pmr_typedefs_debug.cc
@@ -17,6