Commit Graph

10743 Commits

Author SHA1 Message Date
Kenneth Moreland
d38efa87f2 Allow fields of any type in NDHistogram
Use the ability to extract array components to compute bins of
dimensions.
2023-02-04 09:24:23 -05:00
Kenneth Moreland
763389bd4e Merge topic 'field-conversion-interp-any-field'
d26d76dea Fix construction issue for XGC arrays in topology map fetch
634847ce2 Change PointAverage to work on fields of any type
0c13917c1 Change CellAverage to work on fields of any type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2979
2023-02-04 09:19:26 -05:00
Kenneth Moreland
d26d76deaf Fix construction issue for XGC arrays in topology map fetch
The `Fetch::Load` for an input array of a topology map for an XGC array
(that uses `ConnectivityExtrude`) was failing to compile because it
creates a return `Vec` and then fills it. That does not work if the
input array has values that cannot be default constructed. This is the
case for `ArrayHandleRecombineVec`, which creates values that lazily
pull data out of portals.

Change the code to careful construct the return `Vec` such that it does
not require the default constructor of the components.
2023-02-03 14:52:06 -05:00
Kenneth Moreland
634847ce20 Change PointAverage to work on fields of any type
The previous version of the `PointAverage` filter used a float fallback
to handle most array types. The problem with this approach other than
converting field types perhaps unexpectantly is that it does not work
with every `Vec` size. This change uses the extract by component feature
of `UnknownArrayHandle` to handle every array type.

To implement this change the `PointAverage` worklet had to be changed to
handle recombined vecs. This change resulted in a feature degridation
where it can no longer be compiled for inputs of incompatible `Vec`
sizes. This feature dates back to when worklets like this were exposed
in the interface. This worklet class is now hidden away from the exposed
interface, so this degredation should not affect end users. There are
some unit tests that use this worklet to test other features, and these
had to be updated.
2023-02-03 14:52:04 -05:00
Kenneth Moreland
0c13917c1e Change CellAverage to work on fields of any type
The previous version of the `CellAverage` filter used a float fallback
to handle most array types. The problem with this approach other than
converting field types perhaps unexpectantly is that it does not work
with every `Vec` size. This change uses the extract by component feature
of `UnknownArrayHandle` to handle every array type.

To implement this change the `CellAverage` worklet had to be changed to
handle recombined vecs. This change resulted in a feature degridation
where it can no longer be compiled for inputs of incompatible `Vec`
sizes. This feature dates back to when worklets like this were exposed
in the interface. This worklet class is now hidden away from the exposed
interface, so this degredation should not affect end users. There are
some unit tests that use this worklet to test other features, and these
had to be updated.
2023-02-03 14:51:40 -05:00
Kenneth Moreland
5173f65176 Merge topic 'mir-interp-any-field'
29ecbbb00 Map fields of any type in MIRFilter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2977
2023-02-03 13:48:36 -05:00
Kenneth Moreland
29ecbbb005 Map fields of any type in MIRFilter
Use the ability to extract array components to handle any array in the
map field.
2023-02-03 08:34:08 -05:00
Kenneth Moreland
9978397fc8 Merge topic 'clean-grid-interp-any-field'
a478081de Clean up point mapping in CleanGrid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2976
2023-02-02 20:28:07 -05:00
Kenneth Moreland
a478081dea Clean up point mapping in CleanGrid
Use the `MapFieldPermutation` function when mapping point coordinates
for points that are removed. (This function was already being used for
the rest of the fields.) Also remove some unneeded code in the
`CleanGrid` worklets.
2023-02-02 12:13:54 -05:00
Kenneth Moreland
3a02a45729 Merge topic 'contour-interp-any-field'
719d347fd Update contour filter's field map to work on any field type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2973
2023-02-02 12:08:14 -05:00
Zhe Wang
2d8b3ef33f Merge topic 'add_statistics_filter'
58acf3a43 add statistics filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2957
2023-02-01 22:32:34 -05:00
Kenneth Moreland
ce5ac9bfb0 Merge topic 'update-kokkos'
447b8e711 Fill input to test of array extract from stride array
726bb0910 Fix floating point exception in Kokkos sort
89245c3df Remove NUMA regions option
4912d1d04 Update --kokkos-threads to --kokkos-num-threads
9f77e1118 Do not test if Kokkos device id does not match
fa30d6774 Update the minimum Kokkos required to 3.7
3a96e9429 ci: update Kokkos docker images
674572419 Use Kokkos 3.7.1  in the CI builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2967
2023-02-01 14:46:23 -05:00
Sujin Philip
ecb6f8d6d4 Merge topic 'refactor-runtimedevicetracker' into release-2.0
c7a2a7b30 Refactor RuntimeDeviceTracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2971
2023-01-31 10:44:50 -05:00
Sujin Philip
9b48c03b9e Merge branch 'release-2.0' 2023-01-31 10:44:50 -05:00
Sujin Philip
5fdb2cd770 Merge topic 'refactor-runtimedevicetracker'
c7a2a7b30 Refactor RuntimeDeviceTracker

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2971
2023-01-31 10:44:50 -05:00
Kenneth Moreland
719d347fd9 Update contour filter's field map to work on any field type
Use the extract component functionality to get data from any type of
array. This prevents converting fields to `vtkm::DefaultFloat` and
supports any size `Vec` in the component.
2023-01-30 13:14:56 -07:00
Kenneth Moreland
447b8e711e Fill input to test of array extract from stride array
I was getting some floating point exceptions which may have come from
reading garbage as floating point values.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
726bb09108 Fix floating point exception in Kokkos sort
THe current version of sort in Kokkos does not check whether the array
is of size 0, and that messes up its bin calculation. If the size of the
array is less than 2, skip the sort since the order cannot change.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
89245c3df5 Remove NUMA regions option
This configuration option was only added because Kokkos has such a flag.
But this flag is now deprecated in Kokkos and has no effect, so remove
it from VTK-m.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
4912d1d042 Update --kokkos-threads to --kokkos-num-threads
The former has been deprecated for the latter.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
9f77e11185 Do not test if Kokkos device id does not match
There was a regression test to check for an exception if the requested
Kokkos device id did not match the `KOKKOS_DEVICE_ID` environment
variable. New versions of Kokkos do not throw an exception (they just
pick one over the other), so remove this check.
2023-01-30 09:53:57 -07:00
Kenneth Moreland
fa30d6774c Update the minimum Kokkos required to 3.7
This was suggested by a developer on the Kokkos team.
2023-01-30 09:53:56 -07:00
Vicente Adolfo Bolea Sanchez
3a96e94297 ci: update Kokkos docker images 2023-01-30 09:53:56 -07:00
Kenneth Moreland
674572419c Use Kokkos 3.7.1 in the CI builds
This was recommended to us by the Kokkos team.
2023-01-30 09:53:56 -07:00
Kenneth Moreland
b495b205b5 Merge topic 'fpe-apple'
4e9c63b62 Enable floating point exceptions on apple

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2970
2023-01-30 11:52:34 -05:00
Sujin Philip
c7a2a7b30e Refactor RuntimeDeviceTracker
Simplifies the code by using modern C++ features
2023-01-30 09:41:19 -05:00
Jay
58acf3a43f add statistics filter 2023-01-30 10:21:47 +00:00
Kenneth Moreland
4e9c63b629 Enable floating point exceptions on apple
Clang for apple does not support `fpenableexcept`, so make a special way
to turn them on to help developers debug code. This code is based on the
suggestions at:

https://stackoverflow.com/questions/37819235/how-do-you- enable-floating-point-exceptions-for-clang-in-os-x

https://stackoverflow.com/questions/71821666/trapping-floating-point-exceptions-and-signal-handling-on-apple-silicon

This code is actually disabled because it does not work on all known
platforms (most notably one of the dashboard machines). However, I
would like to keep the code there to assist debugging.
2023-01-27 14:08:11 -07:00
Zhe Wang
48d612c28a Merge topic 'add_composite_vector_filter'
90e1e82b8 add composite filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2962
2023-01-26 11:46:39 -05:00
Vicente Bolea
92aba8b544 Merge topic 'fix-perftest'
9b268bce6 perftest: reorder fixtures; fetch vtk/vtk-m objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2968
2023-01-26 04:07:04 -05:00
Jay
90e1e82b86 add composite filter 2023-01-26 04:48:23 +00:00
Kenneth Moreland
b62d3a5975 Merge topic 'clip-interp-any-field'
1889447d8 Update clip filter's field map to work on any field type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2969
2023-01-25 10:14:31 -05:00
Vicente Adolfo Bolea Sanchez
9b268bce63 perftest: reorder fixtures; fetch vtk/vtk-m objects 2023-01-25 18:43:52 +09:00
Kenneth Moreland
1889447d82 Update clip filter's field map to work on any field type
The previous implementation of the map field in the clip filters
(`ClipWithField` and `ClipWithImplicitFunction`) checked for common field
types and interpolated those. If the field value type did not match, it
would either convert the field to floats (which is at odds with what VTK
does) or fail outright if the `Vec` length is not supported.

The map field function for clip has been changed to support all possible
types. It does this by using the extract component functionality to get
data from any type of array.
2023-01-24 11:14:51 -07:00
Kenneth Moreland
0513eaf5fc Merge topic 'output-vec-like-fix'
eda6dc39f Support using arrays with dynamic Vec-likes as output arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2963
2023-01-24 12:28:03 -05:00
Kenneth Moreland
eda6dc39f2 Support using arrays with dynamic Vec-likes as output arrays
When you use an `ArrayHandle` as an output array in a worklet (for example,
as a `FieldOut`), the fetch operation does not read values from the array
during the `Load`. Instead, it just constructs a new object. This makes
sense as an output array is expected to have garbage in it anyway.

This is a problem for some special arrays that contain `Vec`-like objects
that are sized dynamically. For example, if you use an
`ArrayHandleGroupVecVariable`, each entry is a dynamically sized `Vec`. The
array is referenced by creating a special version of `Vec` that holds a
reference to the array portal and an index. Components are retrieved and
set by accessing the memory in the array portal. This allows us to have a
dynamically sized `Vec` in the execution environment without having to
allocate within the worklet.

The problem comes when we want to use one of these arrays with `Vec`-like
objects for an output. The typical fetch fails because you cannot construct
one of these `Vec`-like objects without an array portal to bind it to. In
these cases, we need the fetch to create the `Vec`-like object by reading
it from the array. Even though the data will be garbage, you get the
necessary buffer into the array (and nothing more).

Previously, the problem was fixed by creating partial specializations of
the `Fetch` for these `ArrayHandle`s. This worked OK as long as you were
using the array directly. However, the approach failed if the `ArrayHandle`
was wrapped in another `ArrayHandle` (for example, if an `ArrayHandleView`
was applied to an `ArrayHandleGroupVecVariable`).

To get around this problem and simplify things, the basic `Fetch` for
direct output arrays is changed to handle all cases where the values in the
`ArrayHandle` cannot be directly constructed. A compile-time check of the
array's value type is checked with `std::is_default_constructible`. If it
can be constructed, then the array is not accessed. If it cannot be
constructed, then it grabs a value out of the array.
2023-01-23 13:02:40 -07:00
Kenneth Moreland
679a61bb71 Merge topic 'resize-extracted-components'
23469cab6 Add ability to resize ArrayHandleRecombineVec
2061e95ef Add ability to resize ArrayHandleStride

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2964
2023-01-23 14:09:10 -05:00
Vicente Bolea
ff340c268a Merge topic 'fix-testing-h' into release-2.0
a6f2a93c4 testing: remove vtkm/cont/testing relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2965
2023-01-20 02:13:27 -05:00
Vicente Bolea
673706c96c Merge branch 'release-2.0' 2023-01-20 02:13:27 -05:00
Vicente Bolea
caadd3248d Merge topic 'fix-testing-h'
a6f2a93c4 testing: remove vtkm/cont/testing relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2965
2023-01-20 02:13:27 -05:00
Sujin Philip
f8af0b17f4 Merge topic 'cuda-12-fixes'
5d0481342 Fix compile issues when using cuda 12

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2960
2023-01-19 14:42:28 -05:00
Vicente Adolfo Bolea Sanchez
a6f2a93c40 testing: remove vtkm/cont/testing relative path 2023-01-19 17:11:20 +09:00
Kenneth Moreland
23469cab68 Add ability to resize ArrayHandleRecombineVec
This feature enables the ability to anonomously create an array (such as
with `UnknownArrayHandle::NewInstance()`) and then use that as an output
array.
2023-01-18 14:29:23 -06:00
Kenneth Moreland
2061e95efe Add ability to resize ArrayHandleStride
This feature enables the ability to anonomously create an array (such as
with `UnknownArrayHandle::NewInstance()`) and then use that as an output
array. Although resizing `ArrayHandleStride` is a little wonky, it
allows worklets to resize them after creation rather than having to know
what size to make and allocating the array.
2023-01-18 14:29:23 -06:00
Sujin Philip
5d0481342a Fix compile issues when using cuda 12
CUDA 12 adds a `cub::Swap` function that creates ambiguity with `vtkm::Swap`.
This happens when a function from the `cub` namespace is called with an object
of a class defined in the `vtkm` namespace as an argument. If that function
has an unqualified call to `Swap`, it results in ADL being used, causing the
templated functions `cub::Swap` and `vtkm::Swap` to conflict.
2023-01-18 12:06:35 -05:00
Oliver Ruebel
146b051436 Merge topic 'add_hdf5_reader'
44c276174 Remove bad import and fix warning in ContourTreeAppDataIO.h
113e6be32 Remove bad import in ContourTreeApp distributed
27d3d403f Remove bade import in streamline_mpi example
0e5aeb10f Update contour_tree_distributed/CMakeLists.txt
565772854 Merge branch 'master' into add_hdf5_reader
fbc313186 Fix error in ContourTreeAppDataIO
63ec3f3bc Updated contour tree distributed IO to use CellSetStructured
b0952365f Merge remote-tracking branch 'origin/master' into add_hdf5_reader
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2802
2023-01-17 12:39:30 -05:00
Mark Bolstad
5197ad3d20 Merge topic 'override_ctest_timeout'
841da4169 Follow better CMake/VTK-m practices
c5ce6cb96 Replace if/then with string parameter
95c641559 Add cmake flag to override default ctest timeouts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2958
2023-01-17 12:02:54 -05:00
oruebel
44c2761740 Remove bad import and fix warning in ContourTreeAppDataIO.h 2023-01-16 18:26:32 -08:00
oruebel
113e6be327 Remove bad import in ContourTreeApp distributed 2023-01-16 18:25:48 -08:00
oruebel
27d3d403f6 Remove bade import in streamline_mpi example 2023-01-16 18:25:17 -08:00