Commit Graph

74 Commits

Author SHA1 Message Date
NAThompson
331b80a783 More understandable VTKm options for symbol visibility. 2020-05-12 16:02:16 -04:00
Robert Maynard
53158aa2ea Don't allow ninja job pool sizes to be negative
If the job pool size becomes negative, ninja treats
it as an absurdly large positive integer and
errors out.
2019-12-19 08:44:12 -05:00
Robert Maynard
f578c90685 Make sure vtkm_setup_job_pool() doesn't output any status 2019-12-03 11:32:14 -05:00
Robert Maynard
7fc7c61a9b VTK-m use a jobs pool for compiling large compilation units.
When building with the ninja generator VTK-m now uses a job pool
to help limit the chances of a machine going out of memory
when compiling VTK-m.
2019-11-29 15:49:54 -05:00
Robert Maynard
1bfcce19dd VTK-m builds with separate function sections to allow smaller binaries
Consumers of VTK-m when enabling of dropping of unused functions
will see VTK-m functions dropped. Previously this didn't happen
as VTK-m didn't build object files with the correct flags for this.

By allowing the linker to remove unused symbols we see a significant
saving the file size of VTK-m tests, examples, and benchmarks.
An OpenMP build of the tests and benchmarks goes from 168MB to
141MB which is roughly a 16% filesize reduction.

Initially I had presumed that these changes would increase link times.
But in measurements the total wall time for compilation of VTK-m has
stayed about the same ( seeing a decrease of 1.5% ). Presumably the
increased computation is offset by the reduction in file writing.
2019-09-11 13:34:25 -04:00
Robert Maynard
e37c2061cf vtkm_add_target_information now supports multiple targets
Instead of having to be called for each target you can now
pass multiple targets at once. Do note that if you pass multiple
targets you will need to pass all the sources from those targets
that need to be 'device' compiled.
2019-09-11 09:17:52 -04:00
Robert Maynard
a65afa11ba Export CUDA static library requirements properly
This is a work around while we wait on requiring CMake 3.15 for all
cuda builds. At that point we can replace this with setting
`requires_static_builds` as part of the EXPORT_PROPERTIES of the
vtkm_cuda target.

This has been tested with the ascent proxy
2019-08-27 13:34:49 -04:00
Robert Maynard
6b0614e577 EXTEND_VTKM used to determine consumers by vtkm_add_target_information
The EXTEND_VTKM is now checked to determine when a shared library
consumer of VTK-m is allowed.
2019-08-27 13:32:29 -04:00
Robert Maynard
3c1339504f Another turn on the wheel to get VTK-m to export CUDA flags
This is a work around while we wait on requiring CMake 3.15 for all
cuda builds. At that point we can replace this with setting
`cuda_architecture_flags` as part of the EXPORT_PROPERTIES of the
vtkm_cuda target.

This has been tested with the ascent proxy
2019-08-26 16:54:43 -04:00
Robert Maynard
ea50e82aac Move VTK-m CMake testing wrappers to the testing folder
The VTK-m testing infrastructure isn't public facing so it doesn't
need to be installed or clutter the main VTKmWrappers file.

At the same time I have refactored the code to make it clearer
to understand, and remove unused options.
2019-07-09 13:32:23 -04:00
Robert Maynard
0b7dd7c38e Add CMake vtkm_add_target_information() to make using vtk-m easier
The function allows consumers to modify an existing target to allow
for correct compilation with VTK-m.
2019-07-09 13:32:23 -04:00
Robert Maynard
e934e2273c vtkm_library WRAP_FOR_CUDA renamed to clarify the intent of the property
We want the option name to be clear that it might be applicable for
more than just CUDA. If VTK-m ever supported something like SYCL
it would not be clear that those sources should go in `WRAP_FOR_CUDA`.
2019-07-09 13:04:07 -04:00
Robert Maynard
a2e6660fdd Remove unused vtkm_compile_as_cuda CMake function 2019-07-09 13:04:07 -04:00
Robert Maynard
65f169b311 VTK-m now will now error when mixing CUDA and shared builds 2019-07-09 11:48:22 -04:00
Robert Maynard
fb6235e0e9 VTK-m and DIY now properly export MPI requirements.
Previously an installed version of VTK-m wasn't relocatable as
it had system MPI paths. Additionally the installed vtkm_diy target
would depend on MPI but not `find_package(MPI)`
2019-06-24 14:48:01 -04:00
Robert Maynard
e298e05bc9 Test will now fail if programs such as UBSAN output "runtime error" 2019-06-18 13:53:32 -04:00
Robert Maynard
b43d615334 Make VTK-m use consistent symbol visibility for tests. 2019-06-17 15:19:17 -04:00
Robert Maynard
ff687016ee For VTK-m libs all includes of DeviceAdapterTagCuda happen from cuda files
It is very easy to cause ODR violations with DeviceAdapterTagCuda.
If you include that header from a C++ file and a CUDA file inside
the same program we an ODR violation. The reasons is that the C++
versions will say the tag is invalid, and the CUDA will say the
tag is valid.

The solution to this is that any compilation unit that includes
DeviceAdapterTagCuda from a version of VTK-m that has CUDA enabled
must be invoked by the cuda compiler.
2019-04-22 10:39:54 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
001d1b0f47 VTK-m can now build and test against temporary installed vtkm.
We now have a couple of the examples also being built against
the installed version of VTK-m as a test. This allow us to verify
that VTK-m installs and can be found properly.
2019-04-03 18:08:56 -04:00
Allison Vacanti
04a464cc4b Update cuda detection to create vtkm::cuda as an interface library. 2019-03-26 14:53:42 -04:00
Robert Maynard
24e71d251b VTK-m yet again has properly installed headers.
Fixes the install issues mentioned in #342
2019-01-24 14:26:40 -05:00
Robert Maynard
4ec5bae02d Remove VTK-m TestBuild infrastructure
The purpose of the TestBuild infrastructure was to confirm that
VTK-m didn't have any lexical issues when it was a pure header
only project. As we now move to have more compiled components
the need for this form of testing is mitigated. Combined
with the issue of TestBuilds causing MSVC issues, we should
just remove this infrastructure.
2019-01-16 10:04:33 -06:00
Robert Maynard
f1e1a524e9 Require CMake 3.8 to build VTK-m. 2019-01-09 16:01:22 -05:00
Robert Maynard
deb4946a41 Make sure vtk-m libraries under CUDA 8 are always built statically 2018-12-27 14:35:56 -05:00
Robert Maynard
2a8f7ec4c7 Fix more build system issues with separable compilation 2018-12-27 13:19:40 -05:00
Sujin Philip
7c27bedc08 Enable Separable Compilation for CUDA 2018-12-27 13:19:40 -05:00
Allison Vacanti
cdb1f5680a Add vtkm::cont::Initialize.
Also
- Renamed vtkm::cont::make_DeviceAdapterIdFromName to just overload
  make_DeviceAdapterId.
- Refactored CMake logic for unit tests
  - Since we're now querying the device tracker for the names, they
    cannot be all caps.
- Updated usages of InitLogging to use Initialize instead.
- Added changelog.
2018-12-13 10:15:44 -05:00
Allison Vacanti
8baacca525 Link vtkm_developer_flags directly into vtkm libraries.
This should properly propogate the flags to superprojects.
2018-12-06 13:56:18 -05:00
Haocheng LIU
0d39806f4f Rename worklet testing executable
Now it's in accordance with vtkm testing name convension as
UnitTests_vtkm_worklet_testing.
2018-11-29 15:51:41 -05:00
Haocheng LIU
9d330cb541 Fix a logic flaw in vtkm_unit_tests function
This commit fixes a logic flaw that will wrongly append `--device=`
to tests that does not specified devices.
2018-11-27 14:31:32 -05:00
Haocheng LIU
8859636672 Merge worklet testing executables into a device dependent shared library
VTK-m has been updated to replace old per device worklet testing executables with a device
dependent shared library so that it's able to accept a device adapter
at runtime.
Meanwhile, it updates the testing infrastructure APIs. vtkm::cont::testing::Run
function would call ForceDevice when needed and if users need the device
adapter info at runtime, RunOnDevice function would pass the adapter into the functor.

Optional Parser is bumped from 1.3 to 1.7.
2018-11-23 10:13:56 -05:00
Robert Maynard
a423cf056c TestBuild header paths are shorter to make windows happy.
ContourTreeAugumneted paths became too long and caused msvc
to fail to construct pdb paths
2018-10-16 15:01:39 -04:00
Robert Maynard
48cc2f661a Make sure VTK-m runs all OpenMP tests serially.
Fixes issue #276.
OpenMP tests when run in parallel exhibit negative scaling as we
have N openMP processes each spawning N threads. We speculate that
this causes excessive context switching and swapping and reduces
performance.
2018-08-08 10:01:18 -04:00
luz.paz
940c891886 Misc. typos
Found via `codespell` and `grep`
more typos

includes source typo change and a typo that needs further review
follow-up typos


Follow-up typos


Revert a commit
2018-06-14 16:49:11 -04:00
Allison Vacanti
193447078f Add vtkm_taotuple to build system. 2018-05-16 11:45:11 -04:00
Robert Maynard
4a75023115 UnitTests with an explicitly backend pass it as a compile def
Previously the backend was not past as a compile definition which
would cause serial worklet tests to use the TBB backend if
it was enabled.
2018-05-11 14:21:36 -04:00
Kenneth Moreland
5c5fb020a8 Merge topic 'fix-test-header-builds'
d393468e Add any OpenGL link targets to test builds
8b9c0f50 Re-add non testable files to test build sources
ffd98463 Load correct file extension in header test build
7c5f44a6 Fix warnings about no symbols
289a4bc1 Differentiate between header files with different extensions
9571c9b5 Fix vtkm_add_header_build_test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1160
2018-04-25 23:01:10 -04:00
Kenneth Moreland
d393468e9c Add any OpenGL link targets to test builds 2018-04-24 11:47:26 -04:00
Robert Maynard
4234fe4cb1 Merge topic 'correct_specify_visbility_controls'
51da7fab VTK-m now correctly specifies hidden symbol visibility be default.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1163
2018-04-23 09:06:58 -04:00
Robert Maynard
51da7faba2 VTK-m now correctly specifies hidden symbol visibility be default.
This correct very weird runtime crashes that showed up under CUDA 7.5
2018-04-20 14:30:51 -04:00
Kenneth Moreland
8b9c0f50f1 Re-add non testable files to test build sources
The vtkm_add_header_build_test was changed to identify "valid" header
files that were actually tested and only adding those to the source
list. This was a mistake. A big part of the point of adding headers that
are not tested to the test build sources is to list them to an IDE.
2018-04-19 15:31:41 -06:00
Kenneth Moreland
ffd98463f5 Load correct file extension in header test build
Not all VTK-m headers end in .h, but the created test build files
assumed that it was loading in a .h file. Fixed that.
2018-04-19 15:14:32 -06:00
Kenneth Moreland
7c5f44a65d Fix warnings about no symbols
The test build file did not actually define any symbols, so the linker
might give a warning about it not being used in the library. Define some
unique symbol so that the linker will not complain.
2018-04-19 15:10:57 -06:00
Kenneth Moreland
289a4bc1aa Differentiate between header files with different extensions
If you tried to create test builds of a header.h and header.hxx, you
would get an error about building two files with the same name (tried to
build header.cxx for both of them). Fixed this by adding the original
extension name to the source file name.
2018-04-19 15:02:33 -06:00
Kenneth Moreland
9571c9b54f Fix vtkm_add_header_build_test
The CMake configuration stopped creating any of the test builds. There
were a couple of errors introduced into this function that needed to be
fixed.

First, the condition on whether the testing should be skipped got
reversed. It was trying to create test build files for all the headers
that were not supposed to be built instead of the ones that were.

Second, the list of source files to build was not created correctly. The
set command that stored the name of the source file got removed, and so
nothing was being added to the list. I restored the variable and used
that consistently for the source file name.
2018-04-19 14:31:30 -06:00
Robert Maynard
e62978853b Remove usage of CMake commands that don't exist in CMake 3.3 2018-04-19 15:31:43 -04:00
Robert Maynard
8c7c1be232 Specify an RPATH for CUDA runtime on OSX so tests will run 2018-04-17 14:05:07 -04:00
Utkarsh Ayachit
d5b48645a3 Merge topic '217-add-distribute-testing-support'
3211c150 add support to run test with MPI.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1148
2018-04-12 14:26:47 -04:00
Robert Maynard
2d522503b0 VTK-m library naming convention is now restored how it was done for v1.2 2018-04-11 16:50:56 -04:00