Commit Graph

2083 Commits

Author SHA1 Message Date
Nickolas Davis
adb6bc4c37 Change StackTrace failure condition in UnitTestError.cxx 2019-09-12 14:37:55 -04:00
nadavi
e3ab59fb2f limit the count to the actual number of function calls 2019-09-11 16:12:18 -06:00
nadavi
b71421c8a0 have Run() take int references (so that multiple calls with argc will allow loguru to correctly modify the value) 2019-09-11 16:12:18 -06:00
nadavi
8917bbe72b Supply the default log level only through cmake args 2019-09-11 16:12:18 -06:00
nadavi
a0b164b42c remove static var, directly init logging to INFO level for testing inside Run Function 2019-09-11 16:12:18 -06:00
nadavi
374989fc2c remove duplicate include 2019-09-11 16:12:18 -06:00
nadavi
325c75fd70 store What as a member var 2019-09-11 16:12:18 -06:00
nadavi
ede1f78323 something is still fishy 2019-09-11 16:12:18 -06:00
nadavi
ac0faa3d97 different strack traces for different machines 2019-09-11 16:12:18 -06:00
nadavi
3449f2dfb7 fix warning, only declare variable if logging is set 2019-09-11 16:12:18 -06:00
nadavi
7d8158301b something was overwritten... 2019-09-11 16:12:18 -06:00
nadavi
9f49bbab86 additional cmake fixes, improve default log level setting 2019-09-11 16:12:18 -06:00
nadavi
1fc542d068 add simple unit tests for Error 2019-09-11 16:12:18 -06:00
Nick Davis
f9a1afee69 store StackTrace in Error 2019-09-11 16:12:18 -06:00
Nick Davis
7562949075 Turned on Logging by default, set to WARNING level 2019-09-11 16:12:18 -06:00
Allison Vacanti
885cce3914 Add ArrayPortalDecorator. 2019-09-11 12:50:59 -04:00
Allison Vacanti
29ea46fa52 Refactor IsWritableArrayHandle to use PortalSupportsSets. 2019-09-11 12:50:17 -04:00
Allison Vacanti
dc98517b98 Clean up ArrayHandleCounting.
- Remove Set method (fixes IsWritableArrayHandle check)
- s/ConstantValueType/ValueType/, looks like a copy/paste error.
2019-09-11 12:50:17 -04:00
Allison Vacanti
0dad55a042 Remove return statements in functions that return void. 2019-09-11 12:50:17 -04:00
Allison Vacanti
abdd458b8f Remove unused member variable in Algorithm functor. 2019-09-11 12:50:17 -04:00
Kenneth Moreland
b95b7d6109 Merge topic 'get-cast-array-from-field'
630768600 Suppress CUDA warnings
5fa02057a Rely less on overload resolution for ApplyPolicy
26d7bfd0d Force ArrayPolicy of a specific type to the right template
6c136b978 Remove vtkm::BaseComponent
07c59fcf7 Update filters with secondary fields to use new policy method
3039a18ba Add ability to get an array from a Field for a particular type
2b6e6da6c Add ability to get VariantArrayHandle as an ArrayHandleMultiplexer
6323d6803 Add recursive component queries to VecTraits

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1829
2019-09-10 12:05:13 -04:00
Kenneth Moreland
6307686008 Suppress CUDA warnings
There was a warning comes from the functors in support of the portals
for ArrayHandleMultiplexer. The template has no good way to determine
whether the object it is calling is for control or execution, so it
supports both. It is not useful to warn when it happens to compile only
for the host.
2019-09-09 18:33:38 -06:00
Allison Vacanti
b9affb7edc Disable copy for RAII helper. 2019-09-09 17:59:38 -04:00
Allison Vacanti
ea0bbfeefc Increase CUDA stack size for ParticleAdvection worklets.
Sometimes the CUDA runtime would not allocate sufficient stack
space for the particle advection code to run. This issue was exposed by
!1737 -- for some reason, once those changes to unrelated filters/worklets
are added to VTK, CUDA allocates less stack and the following tests would
fail:

UnitTestLagrangianFilterCUDA
UnitTestLagrangianStructuresFilterCUDA
UnitTestStreamlineFilterCUDA
UnitTestStreamSurfaceFilterCUDA

These were fixed by increasing the stack size in the particle advection
worklet Run(...) methods.

An RAII helper has been added that will restore the previous stack size
in case an exception is thrown, and the KDTree code has been updated
to use this helper when it adjusts the CUDA stack allocation.
2019-09-09 16:06:23 -04:00
Kenneth Moreland
6c136b978e Remove vtkm::BaseComponent
This functionality has been superseded by VecTraits::BaseComponentType.
The new functionality also supports replacing the BaseComponentType.
2019-09-09 13:01:03 -06:00
Kenneth Moreland
3039a18baf Add ability to get an array from a Field for a particular type
This is done through a new version of ApplyPolicy. This version takes
a type of the array as its first template argument, which must be
specified.

This requires having a list of potential storage to try. It will use
that to construct an ArrayHandleMultiplexer containing all potential
types. This list of storages comes from the policy. A StorageList
item was added to the policy.

Types are automatically converted. So if you ask for a vtkm::Float64 and
field contains a vtkm::Float32, it will the array wrapped in an
ArrayHandleCast to give the expected type.
2019-09-09 08:19:15 -06:00
Kenneth Moreland
2b6e6da6ca Add ability to get VariantArrayHandle as an ArrayHandleMultiplexer 2019-09-09 08:19:15 -06:00
Kenneth Moreland
a0df206c93 Use default float to build explicit data sets
The DataSetBuilderExplicitIterative class used to use an ArrayHandle of
vtkm::Vec3f_32 values, which are always of type Float32. This can cause
unexpected results when using double precision by default (i.e. when
FloatDefault is set to Float64). Change that to give Float32 values by
default.
2019-09-08 14:44:57 -06:00
Allison Vacanti
6f426a57be Allow ArrayCopy to copy read-only implicit arrays. 2019-09-04 15:11:52 -04:00
Allison Vacanti
12ab99b300 Simplify IsWritableArrayHandle usage.
IsWritableArrayHandle can now be used directly as `std::true_type` or
`std::false_type` without having to pull the `type` member out of a
dependent namespace.
2019-09-04 15:11:51 -04:00
Allison Vacanti
e8afcfd7d8 Merge topic '405_partitioned_ds'
63050f68f `MultiBlock` renamed to `PartitionedDataSet`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1821
2019-09-04 07:22:07 -04:00
Allison Vacanti
e143eaf2e6 Merge topic 'ScanExclusiveExtend'
afe1bd12d Add `ScanExtended` device algorithm.
1480efaeb Add perf logging to DeviceAdapterAlgorithmSerial.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1824
2019-09-04 07:21:37 -04:00
Robert Maynard
41ac138d6d Merge topic 'cellsets_dont_have_names'
3b89bc0db CellSet classes don't require a name
5cd47a706 DataSetBuilders don't require a cellset name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1820
2019-09-03 15:37:32 -04:00
Allison Vacanti
afe1bd12dd Add ScanExtended device algorithm.
This behaves just like `ScanExclusive`, but rather than returning the
total sum, it is appended to the end of the output array.

This is in preparation for the CellSetExplicit refactoring described in
issue #408.
2019-09-03 15:02:41 -04:00
Allison Vacanti
1480efaeba Add perf logging to DeviceAdapterAlgorithmSerial. 2019-09-03 14:19:10 -04:00
Allison Vacanti
63050f68fc MultiBlock renamed to PartitionedDataSet
The `MultiBlock` class has been renamed to `PartitionedDataSet`, and its API
has been refactored to refer to "partitions", rather than "blocks".
Additionally, the `AddBlocks` method has been changed to `AppendPartitions` to
more accurately reflect the operation performed. The associated
`AssignerMultiBlock` class has also been renamed to
`AssignerPartitionedDataSet`.

This change is motivated towards unifying VTK-m's data model with VTK. VTK has
started to move away from `vtkMultiBlockDataSet`, which is a hierarchical tree
of nested datasets, to `vtkPartitionedDataSet`, which is always a flat vector
of datasets used to assist geometry distribution in multi-process environments.
This simplifies traversal during processing and clarifies the intent of the
container: The component datasets are partitions for distribution, not
organizational groupings (e.g. materials).

Ref #405
2019-09-03 12:42:23 -04:00
Kenneth Moreland
11aed6a794 Add template cases to GetHumanReadableSize/GetSizeString
One of the dashboard compilers was complaining about not being able to
resolve which overload to use for std::size_t. (Perhaps on CUDA
std::size_t is sometimes not an unsigned 64-bit integer.) Try to correct
this by adding a templated method that casts anything to vtkm::UInt64.
2019-09-02 18:12:20 -06:00
Kenneth Moreland
02987c3839 Enable human readable sizes for vtkm::Id
The functions GetHumanReadableSize and GetSizeString accepted a
vtkm::UInt64 as the size, which should hold pretty much any reasonable
memory size and is compatible with std::size_t. But it has a different
sign-ness as vtkm::Id. So if you are holding an array size with vtkm::Id
(which is common), you could get a compiler warning when using these
functions, which is annoying. So, for convenience add a second form of
these methods that takes a vtkm::Id and automatically converts.
2019-09-02 11:19:23 -06:00
Robert Maynard
3b89bc0db2 CellSet classes don't require a name 2019-09-02 10:39:58 -04:00
Robert Maynard
5cd47a7065 DataSetBuilders don't require a cellset name 2019-09-02 09:05:56 -04:00
Robert Maynard
89fa2c0293 Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet
By removing the ability to have multiple CellSets in a DataSet
we can simplify the following things:

  - Cell Fields now don't require a CellSet name when being constructed
  - Filters don't need to manage what the active cellset is
2019-09-02 09:04:51 -04:00
Kenneth Moreland
b0b000263e Write out all test data sets in VTKDataSetWriter
Although convenient, one of the issues of creating data with
MakeTestDataSet is that it is hard to look at the data created. It is
often helpful to be able to bring in the data into something like
ParaView or VisIt to play with it. To enable that, write them all out as
part of UnitTestVTKDataSetWriter.
2019-08-29 16:48:53 -06:00
nadavi
cdcc311dc2 removed ArrayPortalShrink 2019-08-28 12:45:44 -06:00
Kenneth Moreland
871b444800 Merge topic 'vtk-file-metadata-information-skip'
a9bbb6ead Permute cells inline
d37ab7732 Add ability to read FIELD section in vtk legacy files
19a610f5e Fix skipping over information in vtk files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1797
2019-08-27 09:24:48 -04:00
Kenneth Moreland
0e0fae5769 Merge topic 'point-transform-transforms-points'
1f8030a6e Add non-const version of DataSet::Get methods
69226803c Make PointTransform actually transform the points

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1803
2019-08-26 18:46:24 -04:00
Kenneth Moreland
1f8030a6e8 Add non-const version of DataSet::Get methods
A non-const version of GetCoordinateSystem was added to implement a
change to the point transform filter. To make things symmetric (and
provide likely future needs), also add non-const versions of getting the
fields and cell sets.
2019-08-26 13:58:11 -06:00
Allison Vacanti
ff7db97807 Add RuntimeDeviceTracker::PrintSummary for debugging. 2019-08-26 14:58:31 -04:00
Kenneth Moreland
d37ab77326 Add ability to read FIELD section in vtk legacy files
Previously, the VTK file readers just skipped over everything in FIELD
sections. However, it is common for many point and cell fields to be
written in this section (it is how ParaView writes out most of its
data). This change will allow these fields to be read in correctly.
2019-08-26 12:36:55 -06:00
Kenneth Moreland
69226803c2 Make PointTransform actually transform the points
The primary (likely only) use of PointTransform is to perform affine
transform on the position of the mesh. However, PointTransform did not
actually move the mesh. Rather, it just created a new field with the
transformed points.

Now, the output has its coordinate system replaced with the transformed
one generated (in addition to be added as a field). This can be turned
off (but defaults to on).

Also changed the constructor to turn on UseCoordinateSystemAsField so
that by default the filter operates on the existing coordinate system
and replaces it with the new coordinate system.

Also removed the template parameter on the filter. That added an
unnecessary complication to using it.
2019-08-26 12:29:24 -06:00
Allison Vacanti
673e3d38df Merge topic '372_unify_atomic_interfaces'
884616788 Simplify and extend AtomicArray implementation.
9560c4f63 Limit testing dispatch of atomic array to only atomic types.
0e728c800 Update atomic interfaces to support Add/CAS for UInt32/64.
720b452eb Force AtomicArray to use only basic storage arrays.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1802
2019-08-26 10:07:10 -04:00