Simon Sticko [Wed, 1 Feb 2023 18:30:24 +0000 (19:30 +0100)]
Make sure all Kokkos headers are installed
One of the Kokkos headers has a .h extension and not .hpp as the
others. Add *.h to the the pattern of headers we copy over when we
install the library.
Matthias Maier [Thu, 26 Jan 2023 01:53:59 +0000 (19:53 -0600)]
Test cgal/cgal_intersect_simplices_1d_3d: constrain to version 5.5 or newer
The test fails with the following assertion:
--------------------------------------------------------
An error occurred in line <557> of file <source/cgal/intersections.cc> in function [...]
The violated condition was:
false
Additional information:
This function requires a version of CGAL greater or equal than 5.5.
--------------------------------------------------------
So, let's simply not run this particular test in this case.
Matthias Maier [Thu, 26 Jan 2023 01:04:39 +0000 (19:04 -0600)]
Test gmsh/gmsh_api_(01|02|03|04): add output variants
It seems that there was a change in more recent versions of gmsh and the
mesh output changed. These output variants seem to be stable among a
number of architectures and linux distributions so I simply commit them.
The output is similar to the main version and seems to be a "superset".
(It looks like older gmsh versions removed unused points ?!)
If we ever start to increase the number of output variants again I
suggest to change the test to ".run_only" and not compare unstable
output.
Matthias Maier [Tue, 24 Jan 2023 02:40:58 +0000 (20:40 -0600)]
CMake: add_test(): allow concurrent runs of tests with shared targets
In order to make this possible we define an *additional* test (and test
target) that depends on the executable target and ensures that the
target is in place before it is called concurrently.
Matthias Maier [Wed, 25 Jan 2023 04:36:31 +0000 (22:36 -0600)]
cgal: disable diagnostics when including CGAL headers
This works around a hard to trace compilation warning that can be
triggered in some configurations in CGAL and Boost headers:
In file included from /usr/include/CGAL/Static_filtered_predicate.h:15,
from /usr/include/CGAL/Lazy_kernel.h:18,
from /usr/include/CGAL/Exact_predicates_exact_constructions_kernel.h:27,
from /usr/include/CGAL/Arr_segment_traits_2.h:30,
from /usr/include/CGAL/Gps_segment_traits_2.h:20,
from /usr/include/CGAL/Boolean_set_operations_2/complement.h:27,
from /usr/include/CGAL/Boolean_set_operations_2.h:21,
from /srv/temp/dealii/source/cgal/intersections.cc:33:
/usr/include/CGAL/Epic_converter.h: In member function ‘std::pair<CGAL::Segment_3<CGAL::Epick>, bool> CGAL::Epic_converter<IK>::operator()(const typename IK::Segment_3&) const [with IK = CGAL::Simple_cartesian<CGAL::Interval_nt<false> >]’:
/usr/include/CGAL/Epic_converter.h:305:29: note: ‘<anonymous>’ declared here
305 | return std::make_pair(Segment_3(),false);
| ^~~~~~~~~~~
In constructor ‘constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = CGAL::Segment_3<CGAL::Epick>; _U2 = bool; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = CGAL::Segment_3<CGAL::Epick>; _T2 = bool]’,
inlined from ‘constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = CGAL::Segment_3<CGAL::Epick>; _T2 = bool]’ at /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_pair.h:746:72,
inlined from ‘std::pair<CGAL::Segment_3<CGAL::Epick>, bool> CGAL::Epic_converter<IK>::operator()(const typename IK::Segment_3&) const [with IK = CGAL::Simple_cartesian<CGAL::Interval_nt<false> >]’ at /usr/include/CGAL/Epic_converter.h:309:28:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_pair.h:535:11: warning: ‘<anonymous>’ may be used uninitialized [-Wmaybe-uninitialized]
535 | : first(std::forward<_U1>(__x)), second(std::forward<_U2>(__y)) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/CGAL/Epic_converter.h: In member function ‘std::pair<CGAL::Segment_3<CGAL::Epick>, bool> CGAL::Epic_converter<IK>::operator()(const typename IK::Segment_3&) const [with IK = CGAL::Simple_cartesian<CGAL::Interval_nt<false> >]’:
/usr/include/CGAL/Epic_converter.h:309:29: note: ‘<anonymous>’ declared here
309 | return std::make_pair(Segment_3(),false);
| ^~~~~~~~~~~
Matthias Maier [Wed, 25 Jan 2023 03:01:03 +0000 (21:01 -0600)]
CMake: Silence a warning about HDF5_ROOT containing NOTFOUND
The FindHDF5.cmake package might set HDF5_DIR to "HDF5_DIR-NOTFOUND"
(even though it finds and configures an HDF5 installation without a
problem). This isn't terribly elegant, but us setting HDF5_ROOT to that
variable triggers a bogus warning.
Matthias Maier [Wed, 25 Jan 2023 02:35:14 +0000 (20:35 -0600)]
CMake: silence the CMAKE_CXX_EXTENSIONS warning when including Kokkos
The CMAKE_CXX_EXTENSIONS variable controls whether CMake sets the
"CXX_EXTENSIONS" property for a target. If this property is set then
CMake ensures that gnu extensions are enabled by default by using
corresponding -std=gnu1X flags instead of -std=cxx1X flags.
Kokkos forcefully disables this variable as soon as FindKOKKOS.cmake is
included with a prominent warning. Thus simply set the variable prior to
including FindKOKKOS.cmake.
On a sidenote - Kokkos' workaround here is not really effective: We
currently do not use the CXX_STANDARD target property but set the
language standard by hand. Thus, the variable is simply ignored.
Also, even if a project happens to use the CMAKE_CXX_STANDARD variable,
this generally doesn't work as the project that includes
FindKOKKOS.cmake can simply override the variable later.
David Wells [Tue, 24 Jan 2023 18:28:15 +0000 (13:28 -0500)]
Use initlog() in more tests.
These required a small amount of manual tidying-up but the script I used to
generate most of the changes is
#!/usr/bin/env python3
import sys
lines = list()
skip_next_if_blank = False
with open(sys.argv[1], 'r') as handle:
for line in handle:
if line != 'std::ofstream logfile("output");\n':
if "deallog.attach" not in line:
if skip_next_if_blank and line == "\n":
pass
else:
lines.append(line.replace("logfile",
"deallog.get_file_stream()"))
skip_next_if_blank = False
else:
skip_next_if_blank = True
found_main = False
line_after_main = -1
with open(sys.argv[1], 'w') as handle:
for line in lines:
handle.write(line)
if line.startswith("main("):
found_main = True
if found_main:
line_after_main = line_after_main + 1
if line_after_main == 1:
handle.write(" initlog();\n")