Commit Graph

2922 Commits

Author SHA1 Message Date
Dave Pugmire
7d2d7fe1cc Add a new unstructured cell locator 2022-11-22 09:51:40 -05:00
Kenneth Moreland
3e1339f9a7 Remove deprecated features from VTK-m
With the major revision 2.0 of VTK-m, many items previously marked as
deprecated were removed. If updating to a new version of VTK-m, it is
recommended to first update to VTK-m 1.9, which will include the deprecated
features but provide warnings (with the right compiler) that will point to
the replacement code. Once the deprecations have been fixed, updating to
2.0 should be smoother.
2022-11-17 07:12:31 -06:00
Kenneth Moreland
4ca64f0f09 Back out of DataSet::CopyPartsFromExcept method
This method is too unwieldy. Instead go back to `CopyStructure` and
other direct copy methods.
2022-11-11 07:53:20 -07:00
Kenneth Moreland
2d30e6d45a Coordinate systems are stored as Fields
Previously, `DataSet` managed `CoordinateSystem`s separately from `Field`s.
However, a `CoordinateSystem` is really just a `Field` with some special
attributes. Thus, coordiante systems are now just listed along with the
rest of the fields, and the coordinate systems are simply strings that
point back to the appropriate field. (This was actually the original
concept for `DataSet`, but the coordinate systems were separated from
fields for some now obsolete reasons.)
2022-11-11 06:17:58 -07:00
Kenneth Moreland
dbc2364e35 Merge topic 'ghost-cell-api'
a58c2cdac Change how cell ghost levels are set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2924
2022-11-11 08:00:29 -05:00
Kenneth Moreland
bd0a59a3fd Merge topic 'fix-log-scope'
74ed1c4cd Fix VTKM_LOG_SCOPE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2923
2022-11-10 12:18:41 -05:00
Kenneth Moreland
74ed1c4cd0 Fix VTKM_LOG_SCOPE
The `VTKM_LOG_SCOPE` macro was not working as intended. It was supposed
to print a log message immediately and then print a second log message
when leaving the scope along with the number of seconds that elapsed
between the two messages.

This was not what was happening. The second log message was being
printed immediately after the first. This is because the scope was taken
inside of the `LogScope` method. The macro has been rewritten to put the
tracking in the right scope.
2022-11-10 07:12:19 -07:00
Kenneth Moreland
a58c2cdacf Change how cell ghost levels are set
The name of the methods were changed from `AddGhostCellField` to
`SetGhostCellField` since only one field can be marked as the cell
ghost. Also automatically select a field that matches
`GetGlobalCellFieldName` if nothing else is set.
2022-11-09 08:40:37 -07:00
Kenneth Moreland
6db2a8ea37 Merge topic 'cont-portal-token'
54f0ef2a8 Support providing a Token to ReadPortal and WritePortal

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2916
2022-11-02 13:06:59 -04:00
Kenneth Moreland
63702d5d13 Check to make sure that the fields in a DataSet are the proper length
It is possible in a `DataSet` to add a point field (or coordinate system)
that has a different number of points than reported in the cell set.
Likewise for the number of cells in cell fields. This is very bad practice
because it is likely to lead to crashes in worklets that are expecting
arrays of an appropriate length.

Although `DataSet` will still allow this, a warning will be added to the
VTK-m logging to alert users of the inconsistency introduced into the
`DataSet`. Since warnings are by default printed to standard error, users
are likely to see it.
2022-11-01 12:05:59 -06:00
Kenneth Moreland
27b27bde8e Merge topic 'expose-variant'
c029ac113 Expose the Variant helper class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2907
2022-11-01 13:50:32 -04:00
Kenneth Moreland
54f0ef2a88 Support providing a Token to ReadPortal and WritePortal
When managing portals in the execution environment, `ArrayHandle` uses the
`Token` object to ensure that the memory associated with a portal exists
for the length of time that it is needed. This is done by creating the
portal with a `Token` object, and the associated portal objects are
guaranteed to be valid while that `Token` object exists. This is supported
by essentially locking the array from further changes.

`Token` objects are typically used when creating a control-side portal with
the `ReadPortal` or `WritePortal`. This is not to say that a `Token` would
not be useful; a control-side portal going out of scope is definitely a
problem. But the creation and distruction of portals in the control
environment is generally too much work for the possible benefits.

However, under certain circumstances it could be useful to use a `Token` to
get a control-side portal. For example, if the `PrepareForExecution` method
of an `ExecutionObjectBase` needs to fill a small `ArrayHandle` on the
control side to pass to the execution side, it would be better to use the
provided `Token` object when doing so. This change allows you to optionally
provide that `Token` when creating these control-side portals.
2022-11-01 09:29:17 -06:00
Kenneth Moreland
c029ac113d Expose the Variant helper class
For several versions, VTK-m has had a `Variant` templated class. This acts
like a templated union where the object will store one of a list of types
specified as the template arguments. (There are actually 2 versions for the
control and execution environments, respectively.)

Because this is a complex class that required several iterations to work
through performance and compiler issues, `Variant` was placed in the
`internal` namespace to avoid complications with backward compatibility.
However, the class has been stable for a while, so let us expose this
helpful tool for wider use.
2022-11-01 07:52:41 -06:00
Roxana Bujack
0fa9c8d954 Merge topic 'partitionedCellLocator'
25f2ebf02 add partitioned cell locator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2893
2022-11-01 08:33:28 -04:00
roxana bujack
25f2ebf026 add partitioned cell locator 2022-11-01 11:08:18 +01:00
Kenneth Moreland
ef3c4c65c9 Merge topic 'no-execution-whole-array'
294581375 Removed ExecutionWholeArray class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2905
2022-10-31 14:41:54 -04:00
Kenneth Moreland
ea560e9486 Remove deprecated virtual methods
Several revisions ago, the ability to use virtual methods in the
execution environment was deprecated. Completely remove this
functionality for the VTK-m 2.0 release.
2022-10-28 10:56:52 -06:00
Kenneth Moreland
2945813755 Removed ExecutionWholeArray class
`ExecutionWholeArray` is an archaic class in VTK-m that is a thin wrapper
around an array portal. In the early days of VTK-m, this class was used to
transfer whole arrays to the execution environment. However, now the
supported method is to use `WholeArray*` tags in the `ControlSignature` of
a worklet.

Nevertheless, the `WholeArray*` tags caused the array portal transferred to
the worklet to be wrapped inside of an `ExecutionWholeArray` class. This
is unnecessary and can cause confusion about the types of data being used.

Most code is unaffected by this change. Some code that had to work around
the issue of the portal wrapped in another class used the `GetPortal`
method which is no longer needed (for obvious reasons). One extra feature
that `ExecutionWholeArray` had was that it provided an subscript operator
(somewhat incorrectly). Thus, any use of '[..]' to index the array portal
have to be changed to use the `Get` method.
2022-10-27 15:07:41 -06:00
Kenneth Moreland
ad1e7b5bdb Add module mechanism
This mechanism sets up CMake variables that allow a user to select which
modules/libraries to create. Dependencies will be tracked down to ensure
that all of a module's dependencies are also enabled.

The modules are also arranged into groups.
Groups allow you to set the enable flag for a group of modules at once.
Thus, if you have several modules that are likely to be used together,
you can create a group for them.

This can be handy in converting user-friendly CMake options (such as
`VTKm_ENABLE_RENDERING`) to the modules that enable that by pointing to
the appropriate group.
2022-10-26 12:51:05 -06:00
Vicente Bolea
0fb0cb5e9f Merge topic 'oclf-in-every-mr'
d60c370d1 CI: Enable Ascent builds in MR
e4d23a4ae CI: remove unused variable warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2858
2022-10-25 16:57:08 -04:00
Vicente Adolfo Bolea Sanchez
e4d23a4ae6 CI: remove unused variable warnings 2022-10-25 15:40:48 -04:00
Kenneth Moreland
6f84d938aa AddHelp option to Initialize should add --help argument
When you used the `AddHelp` option to `Initialize`, it added a
`--vtkm-help` option and `-h`, but not `--help`, which was weird. It
also avoided adding `--vtkm-help` when `AddHelp` was not used, but did
print out a usage statement under other circumstances.

This changes the behavior to add `--vtkm-help`, `--help`, and `-h` when
`AddHelp` is on and only `--vtkm-help` when it is off.
2022-10-24 14:38:37 -06:00
Kenneth Moreland
90c7e77075 Initialize DIY in vtkm::cont::Initialize
This has the side effect of initialing MPI_Init (and will also
call MPI_Finalize at program exit). However, if the calling
code has already called MPI_Init, then nothing will happen.
Thus, if the calling code wants to manage MPI_Init/Finalize,
it can do so as long as it does before it initializes VTK-m.
2022-10-07 14:54:33 -06:00
Mathieu Westphal
70ba476bd5 Fix doxygen groups 2022-09-09 10:37:31 +08:00
Dave Pugmire
0fb721207f Kick the dashboard builds. 2022-08-30 16:24:01 -04:00
Dave Pugmire
30d1d86a04 Method was deprecated during the rename within the MR. (Not a new method). 2022-08-30 10:35:03 -04:00
Dave Pugmire
a215ac3202 Use {} initialization of FieldCollection. 2022-08-29 16:53:17 -04:00
Dave Pugmire
98994026bb Change GetPartitionField to GetFieldFromPartition. 2022-08-29 14:57:36 -04:00
Dave Pugmire
fbe78b45cf Change all usage of IsField* to Is*Field. 2022-08-29 14:42:02 -04:00
Kenneth Moreland
e395fe8fe8 Rename methods for consistency. 2022-08-29 14:01:23 -04:00
Dave Pugmire
f69e598225 Change of Field::Association names. 2022-08-29 06:40:42 -04:00
Dave Pugmire
00b6657689 Address comments from Ken, Ollie. 2022-08-26 12:03:20 -04:00
Dave Pugmire
71c6f034d9 Use CreateResult mechanism for copying PDS fields. 2022-08-26 08:55:54 -04:00
Dave Pugmire
7d60c390ce Test PDS fields and filters. 2022-08-25 16:25:58 -04:00
Dave Pugmire
fa401ba016 Copy PDS fields in filter. Add more tests. 2022-08-25 09:28:35 -04:00
Dave Pugmire
75b9c398f0 Add new assocation, Partitions for a value per dataset. 2022-08-24 10:52:29 -04:00
Dave Pugmire
ae4c098009 Add fieldName to field creation. 2022-08-24 09:50:56 -04:00
Dave Pugmire
f9dbfe9303 Code cleanup. Add some comments. 2022-08-24 09:47:31 -04:00
Dave Pugmire
dc7b198541 Fix assoc name in PrintSummary 2022-08-23 07:19:57 -04:00
Dave Pugmire
def0f0989c Remove FieldCompare struct. 2022-08-23 07:17:16 -04:00
Dave Pugmire
0be4b4264d Add deprecated tag on old method. 2022-08-23 07:06:34 -04:00
Dave Pugmire
714e1226ce Create FieldCollection class. 2022-08-22 15:02:03 -04:00
Dave Pugmire
cbdb797f1e Add fields to vtkm::cont::PartitionedDataSet 2022-08-22 08:43:15 -04:00
Dave Pugmire
6a6bc011a6 Merge topic 'gpu_async_alloc'
770fa2964 Reset flag to previous value on exit.
dd16f738e remove example from cmake..
38714972a remove example for threaded multiblocks.
fc8b750e5 Fix type Set --> Get for CPU/GPU threads.
115db2175 fix compile error for cuda.
baac7e1fb Put sync memory into RuntimeDeviceTracker
8455972a0 Turn on thread-safe-ish mem alloc
9f4b786a7 Add option to thread-efficient mem alloc
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2845
2022-08-19 13:12:42 -04:00
Dave Pugmire
115db2175e fix compile error for cuda. 2022-08-16 10:57:01 -04:00
Dave Pugmire
baac7e1fb9 Put sync memory into RuntimeDeviceTracker 2022-08-15 14:30:13 -04:00
Kenneth Moreland
cfb137947e Remove inclusion of Kokkos_Parallel_Reduce.hpp
This header is now considered an internal header, and the latest
release commit of Kokkos does not allow you to include it. The
header gets included anyway with Kokkos_Core.hpp, so we can safely
just delete it.

See https://github.com/kokkos/kokkos/pull/5178
2022-08-12 15:22:03 -04:00
Dave Pugmire
9f4b786a7f Add option to thread-efficient mem alloc 2022-08-12 15:10:38 -04:00
Dave Pugmire
3920806a66 Address reviewer comments and suggestions. 2022-08-11 13:43:49 -04:00
Dave Pugmire
b441c9e23d Add Sync/Async memory allocator functions. 2022-08-10 15:09:53 -04:00