Commit Graph

9250 Commits

Author SHA1 Message Date
Kenneth Moreland
8f1c453c0b Support writing binary files to legacy VTK files
The legacy VTK file writer writes out in ASCII. This is helpful when a
human is trying to read the file. However, if you have more than a
trivial amount of data, the file can get impractically large. To get
around this, `VTKDataSetWriter` now has a flag that allows you to write
the data in binary format.
2021-10-11 13:08:59 -06:00
Kenneth Moreland
b4bb02830a Merge topic 'variant-get-unsupported-type'
e9da34310 Handle `Variant::Get` for types not supported by the `Variant`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2596
2021-10-08 08:31:32 -04:00
Kenneth Moreland
df6c43fa9a Merge topic 'reproduce-ci-fixes'
ecacc89b7 Make reproduce_ci_env.py more tolerant of scripts
28b800d21 Merge dictionaries when extending CI builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vicente Bolea <vicente.bolea@kitware.com>
Tested-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2598
2021-10-06 13:48:25 -04: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
ecacc89b7d Make reproduce_ci_env.py more tolerant of scripts
When `reproduce_ci_env.py` makes its docker container, it creates a pair
of scripts, `setup-gitlab-env.sh` and `run-gitlab-stage.sh`, inside the
container. These scripts came from the `before_script` and `script` CI
configuration parameters, respectively.

These two scripts were created by joining each item in the CI
configuration lists with `&&` onto a single line. However, this meant
that each list item had to be on its own line or it didn't work. A
recent configuration change meant that one of the configurations
contained multiple shell commands separated by newlines. This change
builds the script with multiple lines (which have to be carefully
escaped in the generated dockerfile).

Also modified these strings to escape quotes (`"`). This is important as
the dockerfile generates these scripts using an `echo` command that
needs to quote all of the arguments together.
2021-10-05 14:18:25 -06:00
Kenneth Moreland
28b800d21d Merge dictionaries when extending CI builds
When one CI build YAML spec extended another, the `reproduce_ci_env.py`
script was overwritting local configuration with the configuration being
extended. This change merges all configuration together (which appears
to be how the GitLab CI works).
2021-10-05 13:11:44 -06: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
Kenneth Moreland
ae3c7c096b Merge topic 'source-field-names'
03a4750a3 Change Oscillator output field name to oscillating
a3462b41c Change Wavelet output field name to RTData
ea1a55359 Name tangle source fields appropriately
a68422d45 Add GenerateIds filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2595
2021-10-05 10:59:48 -04: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
03a4750a3f Change Oscillator output field name to oscillating 2021-10-05 08:20:27 -06: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
Kenneth Moreland
a3462b41ce Change Wavelet output field name to RTData
This matches the output field name in VTK and ParaView for the
equivalent source. This change allows this source to be used as a drop-
in replacement for the VTK source (which could be very useful).
2021-10-04 13:44:27 -06:00
Kenneth Moreland
ea1a55359f Name tangle source fields appropriately
The `Tangle` source would create a point field generically named
`nodevar`. This name was not indicitive of the data or its source. Thus,
the output point field has been renamed `tangle`.

The `Tangle` source was also creating a cell field (named `cellvar`).
This field was really just a mirror of the cell indices (counting from 0
on up). This field has been removed from the input. If you want such a
field, you can now use the `GenerateIds` filter to add it to any data
set.
2021-10-04 13:44:27 -06:00
Kenneth Moreland
a68422d454 Add GenerateIds filter
This filter adds a pair of fields to a `DataSet` which mirror the
indices of the points and cells, respectively. These fields are useful
for tracking the provenance of the elements of a `DataSet` as it gets
manipulated by the filters. It is also convenient for adding indices to
operations designed for fields and for testing purposes.
2021-10-04 13:44:18 -06:00
Kenneth Moreland
e9da343109 Handle Variant::Get for types not supported by the Variant
Previously, if you called `Get` on a `Variant` with a type that is not
in the list of types supported by the `Variant`, that would attempt to
look up the type at index `-1` and could spin the compiler into an
endless loop.

Instead, check for the case where you are attempting to get a type from
the `Variant` not listed in its templat arguments. In this case, instead
of producing a compiler error, produce a runtime error. Although this
increases the possibility that a bad compile path is being generated, it
simplifies creating templated code that produces cases we don't care
about.
2021-10-04 10:19:25 -06:00
Vicente Bolea
0f42446698 Merge topic 'expand-include-testing-lib'
557124f6f testing/Testing.h when VTKm_ENABLE_TESTING_LIBRARY

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2593
2021-10-04 12:17:19 -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
557124f6fc testing/Testing.h when VTKm_ENABLE_TESTING_LIBRARY 2021-10-01 13:17:16 -04:00
Vicente Bolea
a607679cb1 Merge topic 'enable-testing-lib-find-pkg'
521ef15fe Expose VTKm_ENABLE_TESTING_LIBRARY in find_package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2592
2021-09-30 18:55:27 -04:00
Vicente Adolfo Bolea Sanchez
521ef15fee Expose VTKm_ENABLE_TESTING_LIBRARY in find_package 2021-09-30 16:13:51 -04:00
Vicente Bolea
7b737ed2d5 Merge topic 'add-enable-testing-lib'
b83b4f888 CMake: adds VTKm_ENABLE_TESTING_LIB

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !2586
2021-09-29 11:15:18 -04:00
Vicente Adolfo Bolea Sanchez
b83b4f8880 CMake: adds VTKm_ENABLE_TESTING_LIB 2021-09-28 16:58:18 -04:00
Vicente Bolea
bc9e881842 Merge topic 'update-tbb-to-2020'
46b026882 CI: add ubuntu2004 with tbb 2020 build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2584
2021-09-28 16:35:16 -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
7aae612d95 Merge topic 'scatter-extrude-cells'
b4df612c3 Check indices with CellSetExtrude reverse look up
36352912b Support scatter/mask for CellSetExtrude

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !2589
2021-09-28 07:57:25 -04: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
Vicente Bolea
546d491d46 Merge topic 'ci-fix-kokkos-version'
11bf684f3 CI: updates kokkos version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2579
2021-09-24 10:56:20 -04:00
Vicente Adolfo Bolea Sanchez
11bf684f3c CI: updates kokkos version 2021-09-20 18:23:16 -04:00
Vicente Bolea
5c3fa80afc Merge topic 'fix-instatiations-paths'
c0eb7138c Instatiations: fix paths templates inside project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2583
2021-09-20 17:25:22 -04:00
Vicente Adolfo Bolea Sanchez
c0eb7138cb Instatiations: fix paths templates inside project
When VTKm is used inside another CMAKE project the instatitations will
include its filers with the relative path from the top lever of the
parent project instead of the top level of the VTKm project. This commit
resolves that.
2021-09-20 16:10:29 -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
44472f460e Merge topic 'warning-no-logging'
964ef29e0 Suppress warning when logging is turned off

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2581
2021-09-17 11:35:47 -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
964ef29e06 Suppress warning when logging is turned off
There was a case where a VTK-m exception was caught and then used in a
logging message. That is fine, but if VTK-m logging is turned off, that
code is removed and the exception variable goes unused.

There was a time when it was common to have logging turned off in VTK-m,
but now it is almost always on. There is one old-style dashboard that
has logging turned off and is giving a warning about this variable not
being used. It went unnoticed because the dashboard was down at the
time. This should fix the issue.
2021-09-17 05:34:26 -06:00
Nickolas Davis
b168c2003b Merge topic 'openmp-runtime-device-config'
277c33600 implement openmp runtime device configuration testing
1c4d6810a implement openmp runtime device configuration and update code to use it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2573
2021-09-16 19:21:32 -04: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
James Kress
ff71975709 Merge topic 'Update_Threshold'
0e6228bbd Updating threshold to return all or part in range.
d28bdec48 Merge remote-tracking branch 'upstream/master'
f42d73fa0 Merge remote-tracking branch 'upstream/master'
74c4d3479 Merge remote-tracking branch 'upstream/master'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2566
2021-09-09 13:32:52 -04:00
Kenneth Moreland
3309fe1760 Merge topic 'triangulate-single-cell-type'
4239d13b3 Make triangulate implementation more general
1bd70d9c2 Enable triangulation on CellSetSingleType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2572
2021-09-09 08:11:28 -04:00