Commit Graph

589 Commits

Author SHA1 Message Date
Kenneth Moreland
310579b9a7 Load options from environment variables
Some common VTK-m options such as the device and log level could be
specified on the command line but not through environment variables. It is
not always possible to set VTK-m command line options, so environment
variables are added.

Also added documentation to the user's guide about what options are
available and how to set them.
2024-07-02 12:47:34 -04:00
Kenneth Moreland
9a8638aef2 Update version, acknowledgements, and other meta information 2024-06-28 13:42:23 -04:00
Kenneth Moreland
41a088f6ce Add guide chapter on unknown array handle 2024-06-28 13:42:23 -04:00
Vicente Adolfo Bolea Sanchez
c1c7b0df50 release: 2.2.0-rc1 release notes 2024-06-24 17:41:03 -04:00
Kenneth Moreland
4335e43e50 Merge topic 'allow-backward-compatibility'
b2997bcbe Support backward compatibility in CMake package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3234
2024-06-24 09:05:49 -04:00
Kenneth Moreland
b2997bcbe8 Support backward compatibility in CMake package
VTK-m development is in a mode where backward compatibility should be
maintained between minor versions of the software. (You may get deprecation
warnings, but things should still work.) To match this behavior, the
generated CMake package now supports finding versions with the same major
release and the same or newer minor release. For example, if an external
program does this

``` cmake
find_package(VTKm 2.1 REQUIRED)
```

then CMake will link to 2.1 (of course) as well as newer minor releases
(e.g., 2.2, 2.3, etc.). It will not, however, match older versions (e.g.,
2.0, 1.9), nor will it match any version after the next major release
(e.g., 3.0).
2024-06-21 15:28:42 -04:00
Kenneth Moreland
c6ad00aefd Merge topic 'guide-fancy-arrays'
3e6963092 Add guide chapter on fancy array handles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3231
2024-06-21 14:45:38 -04:00
Kenneth Moreland
3e69630925 Add guide chapter on fancy array handles 2024-06-05 17:51:14 -04:00
Kenneth Moreland
3933adc450 Merge topic 'obsolete-thrust-patch'
4a4466e7c Disable Thrust patch that is no longer needed in modern Thrust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3230
2024-06-04 16:46:23 -04:00
Kenneth Moreland
4a4466e7c8 Disable Thrust patch that is no longer needed in modern Thrust
There is a Thrust patch that works around an issue in Thrust 1.9.4
(https://github.com/NVIDIA/thrust/issues/972). The underlying issue
should be fixed in recent versions. In recent versions of CUDA, the patch
breaks (https://gitlab.kitware.com/vtk/vtk-m/-/issues/818).

This change fixes the problem by disabling the patch where it is not
needed.
2024-06-04 11:01:43 -04:00
Kenneth Moreland
f2b73fe2e4 Merge topic 'safe-cuda-runtime-config'
f42f59d68 Fix crash when CUDA device is disabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gunther Weber <ghweber@lbl.gov>
Merge-request: !3216
2024-05-17 08:20:39 -04:00
Kenneth Moreland
a87adb479f Merge topic 'safe-cuda-runtime-config' into release-2.1
f42f59d68 Fix crash when CUDA device is disabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Gunther Weber <ghweber@lbl.gov>
Merge-request: !3216
2024-05-17 08:20:38 -04:00
Kenneth Moreland
98168fc2ff Merge topic 'guide-memory-layout'
8e570c8b6 Add user guide chapter on memory layout in ArrayHandles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3219
2024-05-15 16:06:15 -04:00
Kenneth Moreland
c9417825e5 Merge topic 'fix-old-cuda-atomics'
78e06d5dc Fix old cuda atomics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3209
2024-05-15 15:42:51 -04:00
Kenneth Moreland
af3ab951c4 Merge topic 'fix-old-cuda-atomics' into release-2.1
78e06d5dc Fix old cuda atomics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3209
2024-05-15 15:42:51 -04:00
Kenneth Moreland
8e570c8b64 Add user guide chapter on memory layout in ArrayHandles 2024-05-13 08:12:22 -06:00
Kenneth Moreland
d26ac66dcb Merge topic 'intel-finites' into release-2.1
b93ee30ab Enable non-finite values with Intel compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !3213
2024-05-07 13:08:00 -04:00
Kenneth Moreland
bf0390b8e1 Merge topic 'intel-finites'
b93ee30ab Enable non-finite values with Intel compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !3213
2024-05-07 13:08:00 -04:00
Kenneth Moreland
f42f59d685 Fix crash when CUDA device is disabled
There was an issue where if VTK-m was compiled with CUDA support but then
run on a computer where no CUDA device was available, an inappropriate
exception was thrown (instead of just disabling the device). The
initialization code should now properly check for the existance of a CUDA
device.
2024-05-03 17:03:20 -04:00
Kenneth Moreland
72c17927d3 Merge topic 'extract-geometry-permutation'
49518e505 Fix bug with ExtractGeometry filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3215
2024-05-03 13:06:32 -04:00
Kenneth Moreland
49518e5054 Fix bug with ExtractGeometry filter
The `ExtractGeometry` filter was outputing datasets containing
`CellSetPermutation` as the representation for the cells. Although this is
technically correct and a very fast implementation, it is essentially
useless. The problem is that any downstream processing will have to know
that the data has a `CellSetPermutation`. None do (because the permutation
can be on any other cell set type, which creates an explosion of possible
cell types).

Like was done with `Threshold` a while ago, this problem is fixed by deep
copying the result into a `CellSetExplicit`. This behavior is consistent
with VTK.
2024-05-03 09:22:56 -04:00
Kenneth Moreland
b93ee30ab5 Enable non-finite values with Intel compiler
The Intel compiler by default turns on an optimization that assumes that
all floating point values are finite. This breaks any ligitimate uses of
non-finite values including checking values with functions like `isnan`
and `isinf`. Turn off this feature for the intel compiler.
2024-04-25 09:38:15 -04:00
Kenneth Moreland
78e06d5dcd Fix old cuda atomics
There are some overloads for atomic adds of floating point numbers for
older versions of cuda that do not include them directly. These were
misnamed and thus not properly overloading the generic implementation.
This caused compile errors with older versions of cuda.
2024-04-02 13:45:15 -04:00
Spiros Tsalikis
fc3845ec89 AtomicArrayExecutionObject: Allow order of atomic operations 2024-03-22 15:02:55 -04:00
Kenneth Moreland
282aa82957 Add guide chapter on working with cells 2024-03-13 09:18:33 -04:00
Kenneth Moreland
28683930e3 Updated constructors for mesh info classes to conform with other filters
The `CellMeasures` and `MeshQuality` filters had constructors that took the
metric that the filter should generate. However, this is different than the
iterface of the rest of the filters. To make the interface more consistent,
these filters now have a default (no argument) constructor, and the metric
to compute is selected via a method. This makes it more clear what is being
done.

In addition, the documentation for these two classes is updated.
2024-03-07 20:47:09 -05:00
Kenneth Moreland
2fe05097eb Add continued filter implementation chapter 2024-02-28 12:51:07 -05:00
Kenneth Moreland
e9ba5bf8c7 Add math section to users guide 2024-02-20 11:03:04 +09:00
Kenneth Moreland
af28ec2766 Merge topic 'hints'
c44f68649 Add hints to device adapter scheduler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !3189
2024-02-17 07:47:19 -05:00
Kenneth Moreland
97269b9860 Fix documentation for methods from FilterField
MR !3195 moved methods from `FilterField` to `Filter`. Needed to update
the documentation to do this as well.
2024-02-16 20:38:53 +09:00
Kenneth Moreland
eba02710de Merge topic 'deprecate-filter-field'
a17ebdf52 Deprecated `vtkm::filter::FilterField`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3195
2024-02-14 19:05:25 -05:00
Vicente Adolfo Bolea Sanchez
d5a90cba1e update readthedocs-sphinx-search 2024-02-14 12:03:42 -05:00
Kenneth Moreland
05dbd670b3 Add worklet error handling section to users guide 2024-02-13 08:42:04 +09:00
Kenneth Moreland
a17ebdf52a Deprecated vtkm::filter::FilterField
The original design of the filter base class required several specialized
base classes to control what information was pulled from the input
`DataSet` and provided to the derived class. Since the filter base class was
redesigned, the derived classes all get a `DataSet` and pull their own
information from it. Thus, most specialized filter base classes became
unnecessary and removed.

The one substantial exception was the `FilterField`. This filter base class
managed input and output arrays. This was kept separate from the base
`Filter` because not all filters need the ability to select this
information.

That said, this separation has not been particularly helpful. There are
several other features of `Filter` that does not apply to all subclasses.
Furthermore, there are several derived filters that are using `FilterField`
merely to pick a single part, like selecting a coordinate system, and
ignoring the rest of the abilities.

Thus, it makes more sense to deprecate `FilterField` and have these classes
inherit directly from `Filter`.
2024-02-12 08:13:19 +09:00
Kenneth Moreland
c44f686496 Add hints to device adapter scheduler
The `DeviceAdapter` provides an abstract interface to the accelerator
devices worklets and other algorithms run on. As such, the programmer has
less control about how the device launches each worklet. Each device
adapter has its own configuration parameters and other ways to attempt to
optimize how things are run, but these are always a universal set of
options that are applied to everything run on the device. There is no way
to specify launch parameters for a particular worklet.

To provide this information, VTK-m now supports `Hint`s to the device
adapter. The `DeviceAdapterAlgorithm::Schedule` method takes a templated
argument that is of the type `HintList`. This object contains a template
list of `Hint` types that provide suggestions on how to launch the parallel
execution. The device adapter will pick out hints that pertain to it and
adjust its launching accordingly.

These are called hints rather than, say, directives, because they don't
force the device adapter to do anything. The device adapter is free to
ignore any (and all) hints. The point is that the device adapter can take
into account the information to try to optimize for itself.

A provided hint can be tied to specific device adapters. In this way, an
worklet can further optimize itself. If multiple hints match a device
adapter, the last one in the list will be selected.

The `Worklet` base now has an internal type named `Hints` that points to a
`HintList` that is applied when the worklet is scheduled. Derived worklet
classes can provide hints by simply defining their own `Hints` type.
2024-02-09 10:42:23 -05:00
Kenneth Moreland
fa2eb79b07 Merge topic 'guide-worklet-types'
3b1bfa0cd Add reference documentation for Worklet types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3184
2024-02-08 16:05:26 -05:00
Kenneth Moreland
b4ba836890 Reduce doxygen warnings 2024-02-08 10:57:11 -05:00
Kenneth Moreland
9c42db5c71 Fix sphinx/breathe warning about function reference
The breathe parser was having trouble with using `{}` inside of a
declspec for the return value. Replace this with parenthesis, which
cannot be confused with the openning of the function.
2024-02-08 10:39:46 -05:00
Kenneth Moreland
723c9ed2f0 Support Fill for ArrayHandleStride
Previously, if you called `Fill` on an `ArrayHandleStride`, you would get
an exception that said the feature was not supported. It turns out that
filling values is very useful in situations where, for example, you need to
initialize an array when processing an unknown type (and thus dealing with
extracted components).

This implementation of `Fill` first attempts to call `Fill` on the
contained array. This only works if the stride is set to 1. If this does
not work, then the code leverages the precompiled `ArrayCopy`. It does this
by first creating a new `ArrayHandleStride` containing the fill value and a
modulo of 1 so that value is constantly repeated. It then reconstructs an
`ArrayHandleStride` for itself with a modified size and offset to match the
start and end indices.

Referencing the `ArrayCopy` was tricky because it kept creating circular
dependencies among `ArrayHandleStride`, `ArrayExtractComponent`, and
`UnknownArrayHandle`. These dependencies were broken by having
`ArrayHandleStride` directly use the internal `ArrayCopyUnknown` function
and to use a forward declaration of `UnknownArrayHandle` rather than
including its header.
2024-02-02 13:50:21 -05:00
Kenneth Moreland
3b1bfa0cdd Add reference documentation for Worklet types 2024-01-29 12:26:08 -05:00
Kenneth Moreland
d77c5812c3 Deprecate the GetCounts() method in Keys objects
The `vtkm::worklet::Keys` object held a `SortedValuesMap` array, an
`Offsets` array, a `Counts` array, and (optionally) a `UniqueKeys` array.
Of these, the `Counts` array is redundant because the counts are trivially
computed by subtracting adjacent entries in the offsets array. This pattern
shows up a lot in VTK-m, and most places we have moved to removing the
counts and just using the offsets.

This change removes the `Count` array from the `Keys` object. Where the
count is needed internally, adjacent offsets are subtracted. The deprecated
`GetCounts` method is implemented by copying values into a new array.
2024-01-25 16:13:54 -05:00
Kenneth Moreland
b1b6cb65c0 Add documentation of logging 2024-01-04 15:25:07 -05:00
Kenneth Moreland
3c9249871a Merge topic 'contour-int-isovalue' into release-2.1
8fc341e71 Allow floating-point isovalues for contours of integer fields

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3169
2024-01-02 11:28:56 -05:00
Kenneth Moreland
974e964920 Merge topic 'contour-int-isovalue'
8fc341e71 Allow floating-point isovalues for contours of integer fields

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3169
2024-01-02 11:28:56 -05:00
Kenneth Moreland
f1e3bed044 Add advanced types chapter to user's guide 2023-12-18 14:22:40 -07:00
Kenneth Moreland
8fc341e716 Allow floating-point isovalues for contours of integer fields
The flying edges version of the contouring filter converted the isovalues
provided into the same type as the field. This is fine for a floating point
field, but for an integer field the isovalue was truncated to the nearest
integer.

This is problematic because it is common to provide a fractional isovalue
(usually N + 0.5) for integer fields to avoid degenerate cases of the
contour intersecting vertices. It also means the behavior changes between
an integer type that is directly supported (like a `signed char`) or an
integer type that is not directly supported and converted to a floating
point field (like potentially a `char`).

This change updates the worklets to allow the isovalue to have a different
type than the field and to always use a floating point type for the
isovalue.
2023-12-15 16:26:17 -07:00
Kenneth Moreland
cba1068bec Update the developing algorithms section of the user's guide 2023-12-08 08:50:18 -05:00
Vicente Bolea
b2ed7975d1 Merge topic 'update-roadmap'
1ffe862fe update roadmap

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3162
2023-12-01 19:21:04 -05:00
Vicente Adolfo Bolea Sanchez
1ffe862fed update roadmap 2023-11-30 22:45:51 -05:00
Kenneth Moreland
45ad2fb50d Add documentation of MergeDataSets filter to user's guide 2023-11-30 18:36:29 -05:00