Matthias Maier [Thu, 15 Feb 2024 21:54:36 +0000 (15:54 -0600)]
base/mpi.cc: remove superfluous explicit instantiations of template variable
The `mpi.h` header already contains:
```
template <typename T>
const MPI_Datatype mpi_type_id_for_type = /* implementation detail */;
```
Meaning, the variable is known fully after including the header.
Furthermore, the `const` qualifier marks the (template) variable as
`static`. I.e., it has internal linkage.
Thus, we must not explicitly instantiate the variables (suggesting
"extern" linkage in all but the `mpi.cc` compilation unit). This
apparently not an issue with OpenMPI because `MPI_Datatype` is a
complex data structure. But it is an issue with mpich where
`MPI_Datatype` is a simple `int` - leading to a segmentation fault when
during program startup.
Matthias Maier [Wed, 17 Jan 2024 21:38:40 +0000 (15:38 -0600)]
CMake: fix compilation with bundled boost and modern clang
std::unary_function has been removed in C++17. Fix compilation with
clang and other compiles that enforce strict standard compliance by
exporting BOOST_NO_CXX98_FUNCTION_BASE,
This fixes compilation with gcc-13 that complains about the unqualified
identifier "task" changing meaning: it first refers to `class task` in
the offending line and later is defined as a member function `task()`:
```
FAILED: bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o
/usr/bin/c++ -DDO_ITT_NOTIFY -DNDEBUG -DUSE_PTHREAD -D__TBB_BUILD=1 -I/home/tamiko/workspace/dealii/build/bundled/tbb-2018_U2/src -I/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src -I/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include -I/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/rml/include -I/home/tamiko/workspace/dealii/build/include -I/home/tamiko/workspace/dealii/include -std=c++17 -fPIC -Wextra -Wmissing-braces -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wsuggest-override -Wswitch -Wsynth -Wwrite-strings -Wno-placement-new -Wno-deprecated-declarations -Wno-literal-suffix -Wno-psabi -Wno-class-memaccess -Wno-parentheses -Wno-unused-local-typedefs -Wno-implicit-fallthrough -Wno-stringop-overflow -Wno-deprecated-copy -fopenmp-simd -flifetime-dse=1 -O2 -funroll-loops -funroll-all-loops -fstrict-aliasing -MD -MT bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o -MF bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o.d -o bundled/tbb-2018_U2/src/CMakeFiles/bundled_tbb_release.dir/tbb/arena.cpp.o -c /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/arena.cpp
In file included from /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/scheduler_common.h:43,
from /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/scheduler.h:24,
from /home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/tbb/arena.cpp:23:
/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include/tbb/task.h:266:20: error: declaration of ‘tbb::task& tbb::internal::task_prefix::task()’ changes meaning of
task’ [-Wchanges-meaning]
266 | tbb::task& task() {return *reinterpret_cast<tbb::task*>(this+1);}
| ^~~~
/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include/tbb/task.h:225:9: note: used here to mean ‘class tbb::task’
225 | task* next_offloaded;
| ^~~~
/home/tamiko/workspace/dealii/bundled/tbb-2018_U2/src/../include/tbb/task.h:33:7: note: declared here
33 | class task;
| ^~~~
```
Matthias Maier [Thu, 29 Jun 2023 13:43:04 +0000 (08:43 -0500)]
Test: mpi/locally_owned_dofs_per_subdomain_02: do not compare output
The parallel partition that we compared in this test depends on metis,
and thus shows different (but valid) output depending on machine,
and chosen optimization level. Let us restrict this test to run only and
not compare the output.
Matthias Maier [Wed, 28 Jun 2023 16:05:46 +0000 (11:05 -0500)]
CMake: remove VTK configure option
Our CMake configure for VTK isn't quite prime-time ready. Given the fact
that we currently only support a very minimal infrastructure, let's just
remove the configure option for the release.
Matthias Maier [Tue, 27 Jun 2023 20:46:20 +0000 (15:46 -0500)]
CMake: enable -ffp-exceptions-behavior=strict when compiling with clang
We have to ensure that we emit floating-point instructions in debug mode
that preserve the occurence of floating-point exceptions and don't
introduce new ones. gcc plays nicely in this regard by enabling
`-ftrapping-math` per default, at least for the level of optimization we
have in debug mode. clang however is more aggressive and assumes that it
can optimize code disregarding precise floating-point exception
semantics.
We thus set `-ffp-exceptions-behavior=strict` in debug mode to ensure
that our testsuite doesn't run into false positive floating-point
exceptions. See https://github.com/dealii/dealii/issues/15496
Matthias Maier [Mon, 26 Jun 2023 19:46:28 +0000 (14:46 -0500)]
Test simplex/compute_point_locations_01: add output variant
With clang-16 libc++ we get a different order of quadrature points.
Verified manually that - apart from the order - all output quadrature
points match.
Matthias Maier [Mon, 26 Jun 2023 15:00:03 +0000 (10:00 -0500)]
Test mpi/p4est_bug_01: remove test
This test needs an external p4est library built with debug symbols,
otherwise it "fails" because we do not error out while running the test
"expect=run".
Let's remove this test for now.
The long standing bug it documents is reported in
https://github.com/dealii/dealii/issues/7428
See also
https://github.com/dealii/dealii/issues/9047