# error in brigand.hpp VTKm

**URL:** https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953
**Category:** ParaView Support
**Tags:** vtkm
**Created:** [May 29, 2019, 5:59am UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953 "2019-05-29T05:59:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![uturuncoglu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/uturuncoglu/32/1530_2.png) [@uturuncoglu](https://discourse.paraview.org/u/uturuncoglu)
#### Post date: [May 29, 2019, 5:59am UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/1 "2019-05-29T05:59:33Z")

</div>

Hi,

When I try to build ParaView 5.6.0 from source, I am getting following error related with VTKm. Is it known problem? If yes, is there any fix for it?

[14%] Building CUDA object VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/CMakeFiles/vtkm\_cont.dir/ArrayRangeCompute.cu.o  
/glade/work/turuncu/COP\_CL/progs/paraview-5.6.0/src/VTK/ThirdParty/vtkm/vtk-m/vtkm/internal/brigand.hpp:534:87: error: expansion pattern ‘typename brigand::detail::apply\<Pred, brigand::list\<Args …\> \>::type::type:: value’ contains no argument packs  
static constexpr bool s\_v[] = { ::brigand::apply\<Pred, Ts\>::type::value… };  
^  
/glade/work/turuncu/COP\_CL/progs/paraview-5.6.0/src/VTK/ThirdParty/vtkm/vtk-m/vtkm/internal/brigand.hpp:1560:193: error: expansion pattern ‘typename std::conditional\<typename brigand::detail::apply\<Pred, brigand::list\<Args …\> \>::type:: value, brigand::list\<\>, brigand::list\<Args …\> \>::type’ contains no argument packs  
struct remove\_if\<L\<Ts…\>, Pred\>  
^  
/glade/work/turuncu/COP\_CL/progs/paraview-5.6.0/src/VTK/ThirdParty/vtkm/vtk-m/vtkm/internal/brigand.hpp:1560:196: error: template argument 2 is invalid  
struct remove\_if\<L\<Ts…\>, Pred\>  
^  
/glade/work/turuncu/COP\_CL/progs/paraview-5.6.0/src/VTK/ThirdParty/vtkm/vtk-m/vtkm/internal/brigand.hpp:1594:190: error: expansion pattern ‘typename std::conditional\<typename brigand::detail::apply\<Pred, brigand::list\<Args …\> \>::type:: value, brigand::list\<Args …\>, brigand::list\<\> \>::type’ contains no argument packs  
struct filter\<L\<Ts…\>, Pred\>  
^  
/glade/work/turuncu/COP\_CL/progs/paraview-5.6.0/src/VTK/ThirdParty/vtkm/vtk-m/vtkm/internal/brigand.hpp:1594:193: error: template argument 2 is invalid  
struct filter\<L\<Ts…\>, Pred\>  
^  
make[2]: \*\*\* [VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/CMakeFiles/vtkm\_cont.dir/ArrayRangeCompute.cu.o] Error 1  
make[1]: \*\*\* [VTK/ThirdParty/vtkm/vtk-m/vtkm/cont/CMakeFiles/vtkm\_cont.dir/all] Error 2

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [May 29, 2019, 12:15pm UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/2 "2019-05-29T12:15:58Z")

</div>

@robert.maynard

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.paraview.org/user_avatar/discourse.paraview.org/robert.maynard/32/93_2.png) [@robert.maynard](https://discourse.paraview.org/u/robert.maynard)
#### Post date: [May 29, 2019, 12:23pm UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/3 "2019-05-29T12:23:37Z")

</div>

@uturuncoglu What version of CUDA are you using?

---

<div class="post-metadata">

### Author: ![uturuncoglu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/uturuncoglu/32/1530_2.png) [@uturuncoglu](https://discourse.paraview.org/u/uturuncoglu)
#### Post date: [May 29, 2019, 3:39pm UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/4 "2019-05-29T15:39:06Z")

</div>

Hi Robert,

nvcc: NVIDIA ® Cuda compiler driver  
Copyright © 2005-2018 NVIDIA Corporation  
Built on Sat\_Aug\_25\_21:08:01\_CDT\_2018  
Cuda compilation tools, release 10.0, V10.0.130

When I deactivate CUDA and keep VTKm it pass. It is probably related with CUDA.

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.paraview.org/user_avatar/discourse.paraview.org/robert.maynard/32/93_2.png) [@robert.maynard](https://discourse.paraview.org/u/robert.maynard)
#### Post date: [May 29, 2019, 3:50pm UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/5 "2019-05-29T15:50:18Z")

</div>

The error message is coming from line ( brigand.hpp:534 ) which should only be encountered when compiling C++ files with clang or gcc. This means that for some reason your CUDA compiler is not defining the ` __CUDACC__ ` or ` __CUDACC_VER_MAJOR__ ` correctly.

Out of curiosity what c++ compiler are you building with?

---

<div class="post-metadata">

### Author: ![uturuncoglu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/uturuncoglu/32/1530_2.png) [@uturuncoglu](https://discourse.paraview.org/u/uturuncoglu)
#### Post date: [May 29, 2019, 3:54pm UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/6 "2019-05-29T15:54:32Z")

</div>

I am using Intel compiler and version is 2018u4 and the operating system is Centos

---

<div class="post-metadata">

### Author: ![robert.maynard](https://discourse.paraview.org/user_avatar/discourse.paraview.org/robert.maynard/32/93_2.png) [@robert.maynard](https://discourse.paraview.org/u/robert.maynard)
#### Post date: [May 30, 2019, 3:41pm UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/7 "2019-05-30T15:41:21Z")

</div>

Okay I now understand what happened. This isn’t related to your host compiler but is a bug in the older version of VTK-m that is shipped with ParaView 5.6.

What you can do is apply these two VTK-m commits to your version to support CUDA 10.

- [https://gitlab.kitware.com/vtk/vtk-m/commit/e3ef8ed52c42397993fb9a8df322148d0ae474ef](https://gitlab.kitware.com/vtk/vtk-m/commit/e3ef8ed52c42397993fb9a8df322148d0ae474ef)
- [https://gitlab.kitware.com/vtk/vtk-m/commit/23c5f118238e7b0ae2d83c82da3afea49e3e4996](https://gitlab.kitware.com/vtk/vtk-m/commit/23c5f118238e7b0ae2d83c82da3afea49e3e4996)

---

<div class="post-metadata">

### Author: ![uturuncoglu](https://discourse.paraview.org/user_avatar/discourse.paraview.org/uturuncoglu/32/1530_2.png) [@uturuncoglu](https://discourse.paraview.org/u/uturuncoglu)
#### Post date: [May 31, 2019, 6:26am UTC](https://discourse.paraview.org/t/error-in-brigand-hpp-vtkm/1953/8 "2019-05-31T06:26:22Z")

</div>

Hi Robert,

As you suggested, I applied patches and install again. Now, it compiles without any problem. Thanks for your help.

–ufuk
