Commit Graph

10066 Commits

Author SHA1 Message Date
Kenneth Moreland
c7053f584c Merge topic 'deallocate-after-finalize'
9855db096 Add test for array and datas that are cleaned up after finalize

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2801
2022-07-12 14:33:30 -04:00
Kenneth Moreland
961ba26306 Merge topic 'intermittent-timer-failures'
ef58bd9c4 Fix intermittent UnitTestTimer failures with CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2817
2022-07-12 12:35:17 -04:00
Kenneth Moreland
5659d74bd4 Merge topic 'resizable-arrayhandle-buffer-vec'
05f144eb1 Allow ArrayHandle to have a runtime selectable number of buffers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2798
2022-07-12 12:04:24 -04:00
Kenneth Moreland
ef58bd9c4a Fix intermittent UnitTestTimer failures with CUDA
We have been noticing occasional failures of UnitTestTimer on the
dashboard for CUDA devices. The timer seems to be recording less time
than is actually elapsed.

The problem might be that the CUDA timer actually inserts fences to the
CUDA stream rather than record the current time. Thus, the actual time
might start after some pending operations complete.

To attempt to match the UnitTestTimer measurements closer to wall-clock
time, add a synchronize before starting the timer.
2022-07-12 08:52:12 -06:00
Vicente Bolea
076d2dd4f0 Merge topic 'fix-macos-developer-dir'
a0a270b42 CI: update DEVELOPER_DIR to conform to standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !2815
2022-07-11 18:00:04 -04:00
Vicente Adolfo Bolea Sanchez
a0a270b42d CI: update DEVELOPER_DIR to conform to standard
It also corrects the tags needed to run this build
2022-07-11 16:09:13 -04:00
Vicente Bolea
3ae5511211 Merge topic 'add-macos-build'
e26455076 CI: adds gitlab macos_xcode13 build
464524a4b Worklet: remove unused var in WaveletDWT
c661e4afb CI: refactor cmake.sh file
5c5ec868d CI: updates cmake sha256sum for macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2810
2022-07-11 14:57:55 -04:00
Vicente Bolea
d672851dca Merge topic 'add-release-roadmap'
01619f75f doc: add release roadmap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2785
2022-07-11 14:55:19 -04:00
Vicente Adolfo Bolea Sanchez
e264550768 CI: adds gitlab macos_xcode13 build 2022-07-11 14:06:29 -04:00
Gunther Weber
9352374039 Merge topic 'fix-gcc-compuile-error-on-mac'
af65a4e63 Fix compile error when using GCC on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2722
2022-07-11 12:42:26 -04:00
Kenneth Moreland
ad8657a670 Merge topic 'realloc-moved-vector'
f598656d5 Enable reallocation of ArrayHandleBasic with moved std::vector

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2811
2022-07-11 11:28:54 -04:00
Kenneth Moreland
3d6bee140b Merge topic 'test-device-source'
9e8e2c140 Fix problem with imprecise float comparison
80f15aa8d Fix dispatcher invoke error test for asychronous schedules
b504597a9 Fix warnings about unreachable statements
567b62608 Remove warnins about unused functions
163d59179 Add DEVICE_SOURCES to vtkm_unit_tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2806
2022-07-11 11:26:26 -04:00
Kenneth Moreland
05f144eb19 Allow ArrayHandle to have a runtime selectable number of buffers
Previously, the number of buffers held by an `ArrayHandle` had to be
determined statically at compile time by the storage. Most of the time
this is fine. However, there are some exceptions where the number of
buffers need to be selected at runtime. For example, the
`ArrayHandleRecombineVec` does not specify the number of components it
uses, and it needed a hack where it stored buffers in the metadata of
another buffer, which is bad.

This change allows the number of buffers to vary at runtime (at least at
construction). The buffers were already managed in a `std::vector`. It
now no longer forces the vector to be a specific size.
`GetNumberOfBuffers` was removed from the `Storage`. Instead, if the
number of buffers was not specified at construction, an allocation of
size 0 is done to create default buffers.

The biggest change is to the interface of the storage object methods,
which now take `std::vector` instead of pointers to `Buffer` objects.
This adds a little hastle in having to copy subsets of this `vector`
when a storage object has multiple sub-arrays. But it does simplify some
of the templating.
2022-07-11 07:48:25 -06:00
Vicente Adolfo Bolea Sanchez
464524a4b2 Worklet: remove unused var in WaveletDWT 2022-07-09 13:29:26 -04:00
Vicente Adolfo Bolea Sanchez
c661e4afba CI: refactor cmake.sh file 2022-07-08 17:42:47 -04:00
Vicente Adolfo Bolea Sanchez
5c5ec868d3 CI: updates cmake sha256sum for macOS 2022-07-08 17:42:47 -04:00
Kenneth Moreland
f598656d53 Enable reallocation of ArrayHandleBasic with moved std::vector
It is possible to create an `ArrayHandleBasic` from a `std::vector`. It
is possible to move the `vector` into the `ArrayHandle` such that the
`ArrayHandle` takes over the memory. When you do this, the `ArrayHandle`
should be able to resize the data if necessary. However, this was not
working.

There were actually 3 problems that were colluding to lead to this
incorrect behavior.

1. The `Buffer` object was not allowing the reallocation of pinned data.
Pinned data means that the `Buffer`'s memory is pointing to some user
data that should stay where it is. Instead, the `Buffer` should attempt
to reallocate the pinned data using its registered realloc method. This
registered realloc method should be the think to throw the exception if
reallocation is not supported. (Technically, the memory doesn't really
need to be pinned since the data is moved and the user no longer has
direct access to it. But for implementation reasons, moved `vector` data
is pinned.)

2. The `InvalidRealloc` function was not properly throwing an exception.
This was not noticed since `Buffer` was inappropriately throwing an
exception for it.

3. The reallocation method `StdVectorReallocater` had a bad assert that
crashed the program during reallocation.
2022-07-08 11:49:16 -06:00
Kenneth Moreland
9e8e2c140c Fix problem with imprecise float comparison 2022-07-08 10:31:37 -04:00
Kenneth Moreland
80f15aa8de Fix dispatcher invoke error test for asychronous schedules 2022-07-08 06:57:43 -06:00
Kenneth Moreland
b504597a99 Fix warnings about unreachable statements 2022-07-08 06:35:13 -06:00
Kenneth Moreland
567b626080 Remove warnins about unused functions
nvcc is giving me lots of annoying warnings about unused functions.
Typically, this warning is given when a function declared as static or
in an anonymous namespace is never used. The "functions" in question are
not really functions. They are templated methods (in a class in an
anonymous namespace).

Specificaly, I'm getting errors like this:

```
/.../vtkm/cont/testing/UnitTestArrayHandleDecorator.cxx(96): warning #177-D: function "<unnamed>::DecoratorTests::InvertibleDecorImpl::CreateFunctor(PortalTs&&...) const [with PortalTs=<vtkm::cont::internal::decor::GetWritePortalType<vtkm::cont::ArrayHandleCounting<signed char>>, vtkm::cont::internal::decor::GetWritePortalType<vtkm::cont::ArrayHandleConstant<signed char>>, vtkm::cont::internal::decor::GetWritePortalType<vtkm::cont::ArrayHandle<vtkm::Int8, vtkm::cont::StorageTagBasic>>>]" was declared but never referenced
```

That said, these warnings appear to be an annoying but harmless bug in
nvcc. This warning is in error because

1. The method in question is _definitely_ being used.
2. I'm pretty sure this warning should not be given for a templated
method even if it was never used. SFINAE alone should be enough
justification to allow this to exist without warning.

The easiest way around the spurious error is to declare these structures
in a namespace with a name.
2022-07-08 06:28:51 -06:00
Kenneth Moreland
163d591795 Add DEVICE_SOURCES to vtkm_unit_tests
The `vtkm_unit_tests` function in the CMake build now allows you to specify
which files need to be compiled with a device compiler using the
`DEVICE_SOURCES` argument. Previously, the only way to specify that unit
tests needed to be compiled with a device compiler was to use the
`ALL_BACKENDS` argument, which would automatically compile everything with
the device compiler as well as test the code on all backends.
`ALL_BACKENDS` is still supported, but it no longer changes the sources to
be compiled with the device compiler.
2022-07-08 06:28:51 -06:00
Kenneth Moreland
f07d57bec3 Merge topic 'check-algorithm-tests'
56fa8688f Check results of Algorithm tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2808
2022-07-08 08:25:47 -04:00
Kenneth Moreland
56fa8688f1 Check results of Algorithm tests
The `UnitTestAlgorithm` test was running several device algorithms, but
it was not checking the results of any of them. (In fact, it was not
even setting values in the input arrays.) So, it verified that the
execution did not crash, but did not verify correctness.

Add checks to the results to make sure this executed correctly. (Part of
the reason for this change was a warning that popped up because a result
value was never used.)
2022-07-07 15:21:25 -06:00
Kenneth Moreland
6aefb601f2 Merge topic 'cuda-arch-old-cmake'
8ae353ec0 Fix CUDA Architecture for CI with old CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2807
2022-07-07 16:56:12 -04:00
Kenneth Moreland
8ae353ec0b Fix CUDA Architecture for CI with old CMake
The configuration for CI changed to using the newer CMake option
`CMAKE_CUDA_ARCHITECTURES` for turing builds instead of the now
depreciated `VTKm_CUDA_Architecture` setting. However, this new
setting only works for newer versions of CMake, and some of the
CI docker images still have older versions of CMake.

This happened to work on the CI because the CI was run on
machines that had the right CUDA device installed (I guess), but
did not work with the `reproduce_ci_env.py` utility. Fix this
by checking the CMake version first.
2022-07-07 10:16:32 -06:00
Kenneth Moreland
6f0a28cf7c Merge topic 'vtk-file-voxels'
b2ce30e69 Fix bug with voxels in legacy vtk files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2805
2022-07-06 17:18:11 -04:00
Kenneth Moreland
b2ce30e690 Fix bug with voxels in legacy vtk files
The legacy VTK file reader for unstructured grids had a bug when reading
cells of type voxel. VTK-m does not support the voxel cell type in
unstructured grids (i.e. explicit cell sets), so it has to convert them to
hexahedron cells. A bug in the reader was mangling the cell array index
during this conversion.
2022-07-06 09:37:29 -06:00
Vicente Bolea
2a5b792b02 Merge topic 'updates-vtkm-version'
102658b13 version.txt: updates to dev v1.8.9999

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !2790
2022-07-03 12:58:50 -04:00
Kenneth Moreland
9855db0961 Add test for array and datas that are cleaned up after finalize
It is the case that arrays might be deallocated from a device after the
device is closed. This can happen, for example, when an `ArrayHandle` is
declared globally. It gets constructed before VTK-m is initialized. This
is OK as long as you do not otherwise use it until VTK-m is initialized.
However, if you use that `ArrayHandle` to move data to a device and that
data is left on the device when the object closes, then the
`ArrayHandle` will be left holding a reference to invalid device memory
once the device is shut down. This can cause problems when the
`ArrayHandle` destructs itself and attempts to release this memory.

The VTK-m devices should gracefully handle deallocations that happen
after device shutdown.
2022-07-01 12:36:55 -06:00
Li-Ta Lo
a513a0458f Merge topic 'process_cell_field_cleanup'
533c0548d remove more unused ProcessCellField and ProcessPointField
9269a3a3d removed unused ProcessCellField

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2799
2022-06-30 17:18:58 -04:00
Li-Ta Lo
2c328844c6 Merge topic 'contour_tree_refactor3'
48da3a460 blame auto-complete
0ce48aaae restore damage CLion did to #include
709c2974e restore default parameters for deprecated constructor
62e2c3a89 move deprecated constructor to deprecated class
81ce881b0 add newline
d1cede4d2 migrated ContourTreeUniformDistributed filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2795
2022-06-30 12:49:05 -04:00
Li-Ta Lo
48da3a460e blame auto-complete 2022-06-30 10:03:27 -06:00
Li-Ta Lo
533c0548da remove more unused ProcessCellField and ProcessPointField 2022-06-30 09:57:37 -06:00
Li-Ta Lo
0ce48aaaed restore damage CLion did to #include 2022-06-30 09:31:20 -06:00
Li-Ta Lo
9269a3a3d4 removed unused ProcessCellField 2022-06-30 09:27:09 -06:00
Kenneth Moreland
5488a08987 Merge topic 'copy-invalid-variant'
5e476d703 Enable copying invalid variants

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2794
2022-06-30 10:43:41 -04:00
Kenneth Moreland
8f5a9fe9c7 Merge topic 'osx-type-comparison'
e312c5435 Fix type comparison on OSX

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2797
2022-06-30 10:43:26 -04:00
Li-Ta Lo
709c2974ed restore default parameters for deprecated constructor 2022-06-30 08:00:02 -06:00
Kenneth Moreland
e312c54356 Fix type comparison on OSX
`UnknownArrayHandle` compares `std::type_index` objects to check whether a
requested type is the same as that held in the array handle. However, it is
possible that different translation units can create different but
equivalent `std::type_info`/`std::type_index` objects. In this case, the
`==` operator might return false for two equivalent types. This can happen
on OSX.

To get around this problem, `UnknownArrayHandle` now does a more extensive
check for `std::type_info` object. It first uses the `==` operator to
compare them (as before), which usually works but can possibly return
`false` when the correct result is `true`. To check for this case, it then
compares the name for the two types and returns `true` iff the two names
are the same.
2022-06-30 07:37:27 -06:00
Li-Ta Lo
62e2c3a898 move deprecated constructor to deprecated class 2022-06-30 07:33:40 -06:00
Kenneth Moreland
5e476d7030 Enable copying invalid variants
There was a bug where if you attempted to copy a variant that was not
valid (i.e. did not hold an object), a seg fault could happen. This has
been changed to set the target variant to also be invalid.
2022-06-30 06:24:03 -06:00
Li-Ta Lo
81ce881b0a add newline 2022-06-29 15:01:20 -06:00
Li-Ta Lo
d1cede4d2b migrated ContourTreeUniformDistributed filter 2022-06-29 14:58:10 -06:00
Li-Ta Lo
22ee3c3fa5 Merge topic 'contour_tree_refactor2'
62ac60929 restore ContourTreeAugmented worklet unit test
62e8c1831 fixed CMakeLists.txt identation
4ea27a6c6 add installation of header files
7c8dbcde2 migrated ContourTreeAugmented filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2793
2022-06-29 14:00:32 -04:00
Li-Ta Lo
62ac60929a restore ContourTreeAugmented worklet unit test 2022-06-29 10:10:19 -06:00
Li-Ta Lo
62e8c18310 fixed CMakeLists.txt identation 2022-06-28 14:53:44 -06:00
Li-Ta Lo
4ea27a6c61 add installation of header files 2022-06-28 07:10:19 -06:00
Kenneth Moreland
08139ba27e Merge topic 'split-mesh-quality'
6e5ad1a32 Add changelog for splitting MeshQuality filter
7f96fce77 Move MeshQualityAspectGamma to its own filter
c3fcc9464 Move MeshQualityAspectRatio to its own filter
5288afa5d Move MeshQualityCondition to its own filter
86c0e1a96 Move MeshQualityDiagonalRatio to its own filter
0adf88fbd Move MeshQualityDimension to its own filter
cb119cf23 Move MeshQualityJacobian to its own filter
2431d4fef Move MeshQualityMaxAngle to its own filter
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2792
2022-06-28 08:13:43 -04:00
Li-Ta Lo
7c8dbcde28 migrated ContourTreeAugmented filter 2022-06-27 18:01:42 -06:00