Commit Graph

2742 Commits

Author SHA1 Message Date
Cyrus Harrison
abc7f77668 Merge topic 'task/2012_11_cuda_include_fix_release'
987a1fd8a fix include path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2633
2021-12-01 15:06:50 -05:00
Cyrus Harrison
987a1fd8a2 fix include path 2021-11-19 12:15:53 -08:00
Sujin Philip
6b81bf3355 Merge topic 'fix-ArrayGetValues'
4a37e02ff Add ArrayGetValues specilization for ArrayHandleCast

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2627
2021-11-10 12:10:18 -05:00
Vicente Bolea
be9ac1ef3f Merge topic 'fix-openmp-segfaul'
47ee1b247 OpenMP: fix race condition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2625
2021-11-08 20:56:16 -05:00
Vicente Adolfo Bolea Sanchez
47ee1b247a OpenMP: fix race condition 2021-11-08 16:39:40 -05:00
Sujin Philip
4a37e02ffe Add ArrayGetValues specilization for ArrayHandleCast
ArrayGetValues for ArrayHandleCast needs to be handled specially as an
`UnknownArrayHandle::IsBaseComponentType` check inside the implementation
gives unexpected results for ArrayHandleCast.

With this fix, the values are first copied from the source array type and
then casted to the appropriate type before returning.
2021-11-08 14:37:49 -05:00
Kenneth Moreland
caf6ac98e8 Improve documentation of UnknownArrayHandle::IsType
Under some circumstances, `IsType` can return false for a type that
exactly matches the type used to create the `UnknownArrayHandle`.
This is because types like `ArrayHandleCast` get converted to
the array they contain. Thus, `IsType` will return false when it
is expected to be true. In most cases, you should use
`CanConvert`. The `IsType` documentation now points you there.
2021-11-04 10:59:00 -06:00
Cyrus Harrison
30967f9585 Merge topic 'task/2021_11_adj_opts_parser_include'
5c21e67d7 adjust options parser include path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2623
2021-11-02 15:56:30 -04:00
Cyrus Harrison
5c21e67d7d adjust options parser include path 2021-11-01 11:30:10 -07:00
Ben Boeckel
1ffc33adf2 CellSetExplicit: reword warning message
ParaView ends up triggering this in its test suite and the "failure"
mention ends up triggering the "failed test" condition in its test
harness. Reword to read more like a warning than an error.
2021-11-01 12:33:41 -04:00
Li-Ta Lo
42c89be5f3 Merge topic 'mergePartitionedDataset'
1355f82a0 fix type mismatch
59364939f remove unnecessary includes and change  to device_sources
8b7f720de remove unnecessary includes
f4605302e add unit test
09db96e58 add merge partitioned dataset capability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2613
2021-11-01 12:17:19 -04:00
Roxana Bujack
1355f82a0c fix type mismatch 2021-11-01 08:12:56 -06:00
Roxana Bujack
59364939f7 remove unnecessary includes and change to device_sources 2021-10-29 15:10:04 -06:00
Roxana Bujack
8b7f720de1 remove unnecessary includes 2021-10-28 15:39:42 -06:00
Roxana Bujack
f4605302ee add unit test 2021-10-28 15:36:20 -06:00
Li-Ta Lo
f6877fb394 fixed typo for multiplexer 2021-10-28 08:48:21 -06:00
Li-Ta Lo
957192ff5b remove VTKM_FORCE_USED, it is not the right solution 2021-10-27 14:09:10 -06:00
Roxana Bujack
09db96e58e add merge partitioned dataset capability 2021-10-18 15:37:13 -06:00
Li-Ta Lo
d59732766c remove comment about DeviceAdapter.h 2021-10-13 15:59:30 -06:00
Li-Ta Lo
08ad08b138 Merge branch 'master' into osc_refactor 2021-10-13 15:32:28 -06:00
Li-Ta Lo
7add915dd3 include DeviceAdapter.h in StorageVirtual.h 2021-10-13 14:40:51 -06:00
Li-Ta Lo
5448ffb28b decouple Timer.h from device compiler 2021-10-13 12:11:23 -06:00
Li-Ta Lo
e90b186ba8 do not use device compiler to compile source unit tests 2021-10-13 11:56:02 -06:00
Kenneth Moreland
d5acf91067 Fix dropped UnknownArrayHandle symbols
For some reason, GCC is dropping the templated function instances use
for the `UnknownArrayHandle` constructor. Apparently, something in the
compiler or the linker is being over aggressive about removing unused
symbols and is actually dropping symbols that are being used. Maybe it
is because the functions are not directly called but their pointers are
used.

To get around this problem, mark these templated functions in
UnknownArrayHandle.h with the `used` attribute to force the compiler/
linker to keep them. There should be no consequence to that as these
function templates are only instantiated if they are used.
2021-10-13 07:33:13 -06:00
Kenneth Moreland
9ff36b954a Merge topic 'single-type-reverse-connection'
c699a1708 Fix performance issue with CellSetSingleType reverse connections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2597
2021-10-05 17:02:28 -04:00
Kenneth Moreland
c699a17087 Fix performance issue with CellSetSingleType reverse connections
When building the reverse connections (visit points with cells) for
`CellSetSingleType`, the fast path for building these was not built due
to a templating error.
2021-10-05 12:53:57 -06:00
Jieyang Chen
723e133055 Merge topic 'hip-support'
a157c0e84 Add changes for supporting Kokkos/HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2554
2021-10-05 10:42:55 -04:00
Kenneth Moreland
d2c296aa00 Merge topic 'unknownarray-copy-methods'
d1160638b Add copy methods to `UnknownArrayHandle`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2590
2021-10-05 10:15:45 -04:00
Jieyang Chen
a157c0e846 Add changes for supporting Kokkos/HIP
Some of the unit tests for serial and kokkos are disable for hipcc to
properly compile.
VTKM_MATH_ASSERT and VTKM_TEST_ASSERT fail to compile with HIP in
execution environment so they are disabled with building with HIP.
Kokkos::finalize is causing error so it is temporarily disabled.
2021-10-01 15:27:00 -04:00
Vicente Adolfo Bolea Sanchez
b83b4f8880 CMake: adds VTKm_ENABLE_TESTING_LIB 2021-09-28 16:58:18 -04:00
Vicente Adolfo Bolea Sanchez
46b0268825 CI: add ubuntu2004 with tbb 2020 build 2021-09-28 19:46:11 +00:00
Kenneth Moreland
d1160638b7 Add copy methods to UnknownArrayHandle
`vtkm::cont::UnknownArrayHandle` now provides a set of method that
allows you to copy data from one `UnknownArrayHandle` to another. The
first method, `DeepCopyFrom`, takes a source `UnknownArrayHandle` and
deep copies the data to the called one. If the `UnknownArrayHandle`
already points to a real `ArrayHandle`, the data is copied into that
`ArrayHandle`. If the `UnknownArrayHandle` does not point to an existing
`ArrayHandle`, then a new `ArrayHandleBasic` with the same value type as
the source is created and copied into.

The second method, `CopyShallowIfPossibleFrom` behaves similarly to
`DeepCopyFrom` except that it will perform a shallow copy if possible.
That is, if the target `UnknownArrayHandle` points to an `ArrayHandle`
of the same type as the source `UnknownArrayHandle`, then a shallow copy
occurs and the underlying `ArrayHandle` will point to the source. If the
types differ, then a deep copy is performed. If the target
`UnknownArrayHandle` does not point to an `ArrayHandle`, then the
behavior is the same as the `=` operator.

One of the intentions of these new methods is to allow you to copy
arrays without using a device compiler (e.g. `nvcc`). Calling
`ArrayCopy` requires you to include the `ArrayCopy.h` header file, and
that in turn requires device adapter algorithms. These methods insulate
you from these.
2021-09-28 10:46:58 -06:00
Kenneth Moreland
b4df612c37 Check indices with CellSetExtrude reverse look up
Previously, the check for visit points with cells for `CellSetExtrude`
only looked at the count of incident cells. This expands the check to
make sure that it actually returns the expected cells.
2021-09-27 13:49:26 -06:00
Kenneth Moreland
36352912bc Support scatter/mask for CellSetExtrude
Scheduling topology map workets for `CellSetExtrude` always worked, but
the there were indexing problems when a `Scatter` or a `Mask` was used.
This has been corrected, and now `Scatter`s and `Mask`s are supported on
topology maps on `CellSetExtrude`.
2021-09-27 13:27:02 -06:00
Kenneth Moreland
2abeec79de Merge topic 'reverseconnection-precompiled'
050f47f86 Suppress deprecation warning for CellSetSingleType::GetCellShape
e74c0732c Compile reverse connectivity builder into vtkm_cont library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2578
2021-09-27 09:30:18 -04:00
Kenneth Moreland
f768fb11bc Merge topic 'scan-extended'
35b646011 Clarify ScanExtended

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2582
2021-09-24 16:42:04 -04:00
Nickolas Davis
c5569012e2 Merge topic 'tbb-runtime-device-config'
166e76f66 implement tbb runtime device configuration testing
9baa7cd9f Implement tbb runtime device configuration and update vtkm to use it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2574
2021-09-20 15:35:41 -04:00
Nickolas Davis
166e76f66a implement tbb runtime device configuration testing 2021-09-20 10:25:03 -06:00
Nickolas Davis
9baa7cd9fa Implement tbb runtime device configuration and update vtkm to use it 2021-09-20 10:24:23 -06:00
Kenneth Moreland
050f47f862 Suppress deprecation warning for CellSetSingleType::GetCellShape
The superclass method `CellSetExplicit::GetCellShape()` is marked
deprecated because it is a slow way to access the cell shape. However,
this deprecation is causing a warning with MSVC when implementing the
subclass `CellSetSingleType`'s override of that method (which is not
slow). Suppress this warning.
2021-09-17 09:48:26 -06:00
Kenneth Moreland
e74c0732c5 Compile reverse connectivity builder into vtkm_cont library
Because `CellSetExplicit` is a templated class, the implementation of
most of its features is part of the header files. One of the things that
was included was the code to build the reverse connectivity links. That
is, it figured out which cells were incident on each point using the
standard connections of which points comprise which cells.

Of course, building these links is non-trivial, and it used multiple
DPPs to engage the device. It meant that header had to include the
device adapter algorithms and therefore required a device compiler. We
want to minimize this where possible.

To get around this issue, a non-templated function was added to find the
reverse connections of a `CellSetExplicit`. It does this by passing in
`UnknownArrayHandle`s for the input arrays. (The output visit-points-
with-cells arrays are standard across all template instances.) The
implementation first iterates over all `CellSetExplicit` versions in
`VTKM_DEFAULT_CELL_SETS` and attempts to retrieve arrays of those types.
In the unlikely event that none of these arrays work, it copies the data
to `ArrayHandle<vtkm::Id>` and uses those.
2021-09-17 09:48:21 -06:00
Kenneth Moreland
585ac97043 Merge topic 'consolidate-count-to-offset'
4c6522de2 Precompile ConvertNumComponentsToOffsets
b1343474c Consolidate count-to-offset algorithms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2580
2021-09-17 11:44:34 -04:00
Kenneth Moreland
35b6460110 Clarify ScanExtended
Make it more clear that ScanExtended increases the array size by
1, what ranges the exclusive and inclusive scan cover, and the
features of the first and last entries.
2021-09-17 09:09:38 -06:00
Kenneth Moreland
4c6522de2b Precompile ConvertNumComponentsToOffsets
`ConvertNumComponentsToOffsets` has been changed to provide a pre-
compiled version for common arrays. This helps with the dual goals of
compiling less device code and allowing data set builders to not have to
use the device compiler. For cases where you need to compile
`ConvertNumComponentsToOffsets` for a different kind of array, you can
use the internal `ConvertNumComponentsToOffsetsTemplate`.
2021-09-16 14:27:14 -06:00
Kenneth Moreland
b1343474c1 Consolidate count-to-offset algorithms
For no particularly good reason, there were two functions that converted
and array of counts to an array of offsets: `ConvertNumComponentsToOffsets`
and `ConvertNumIndicesToOffsets`. These functions were identical, except
one was defined in `ArrayHandleGroupVecVariable.h` and the other was
defined in `CellSetExplicit.h`.

These two functions have been consolidated into one (which is now called
`ConvertNumComponentsToOffsets`). The consolidated function has also been
put in its own header file: `ConvertNumComponentsToOffsets.h`.

Normally, backward compatibility would be established using deprecated
features. However, one of the things being worked on is the removal of
device-specific code (e.g. `vtkm::cont::Algorithm`) from core classes like
`CellSetExplicit` so that less code needs to use the device compiler
(especially downstream code).

Part of this change removed unnecessary includes of `Algorithm.h` in
`ArrayHandleGroupVecVariable.h` and `CellSetExplicit.h`. This header had to
be added to some classes that were not including it themselves.
2021-09-16 14:24:41 -06:00
Nickolas Davis
277c336000 implement openmp runtime device configuration testing 2021-09-15 14:23:00 -06:00
Nickolas Davis
1c4d6810aa implement openmp runtime device configuration and update code to use it 2021-09-15 14:22:59 -06:00
Kenneth Moreland
2f3a3d7e6e Merge topic 'cell-metrics-single-cell-type'
5191909b5 Fix MeshQuality to work with CellSetSingleType
ecf36ed39 Fix compile errors in CellSetSingleType::CompleteAddingCells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2556
2021-09-08 15:11:55 -04:00
Kenneth Moreland
c494963626 Merge topic 'arrayhandle-mutable-const'
a2a8dcdfd Allow a `const ArrayHandle` to be reallocated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2570
2021-09-02 19:39:57 -04:00
Nickolas Davis
a2e2d5631a Merge topic 'cuda-runtime-device-config'
5530d86e4 update cuda examples to use RuntimeDeviceConfiguration
eaba40724 Call GetRuntimeConfiguration before GetRuntimeDeviceTracker in Initialize
9730de807 remove cudaGetDevice calls, favor runtime device config
adac415f1 implement cuda runtime device configuraton

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2565
2021-09-02 12:43:54 -04:00