Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: parameter packs not expanded with ‘...’ #102

Closed
ghost opened this issue Jun 30, 2017 · 12 comments
Closed

error: parameter packs not expanded with ‘...’ #102

ghost opened this issue Jun 30, 2017 · 12 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2017

Hi. I'm trying to build xgboost that contains nccl package.

gcc 6.4.0
ubunut 17.04

But the comiler craches with the following error message:

[ 64%] Building NVCC (Device) object nccl/CMakeFiles/cuda_compile_1.dir/src/cuda_compile_1_generated_reduce_scatter.cu.o
/usr/include/c++/6/tuple:605:4: error: parameter packs not expanded with ‘...’:
                bool>::type=true>
    ^
/usr/include/c++/6/tuple:605:4: note:         ‘_Elements’
...... <more 20 lines of the same error>

Any ideas?

@nluehr
Copy link
Contributor

nluehr commented Jun 30, 2017

Looks like your gcc version is not supported by CUDA. https://devtalk.nvidia.com/default/topic/949770/cuda-8-0rc-supporting-gcc6-/

@intractabilis
Copy link

intractabilis commented Dec 13, 2021

Looks like your gcc version is not supported by CUDA. https://devtalk.nvidia.com/default/topic/949770/cuda-8-0rc-supporting-gcc6-/

I have the same issue with CUDA 11.5 and GCC 11, which IS a supported compiler according to https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html.

@intractabilis
Copy link

The voice of one crying in the wilderness... De profundis ad te clamavi, NVIDIAAAAAAAA....

@jbachan
Copy link
Collaborator

jbachan commented Dec 27, 2021

Is it the exact same compiler message as originally posted? If not, perhaps I can find a way to workaround nvcc's issue. But if nvcc is choking on standard library headers like <tuple> then there may not be much I can do. This isn't a NCCL bug after all.

@intractabilis
Copy link

Since 4 years has passed, and the version of the compiler was incremented 5 times, the error message is not exactly the same.

/home/user/gcc-env/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^
/home/user/gcc-env/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/home/user/gcc-env/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^

The error happens while compiling a generated file with extension .compute_86.cudafe1.cpp. So, whatever the problem is, it is in that file and has nothing to do with system headers.

It seems like NVCC is sensitive to the minor version of the compiler. The workaround was to have a second compiler with version 11.1 and specify -ccbin /path/to/gcc11.1 in CUDA_NVCC_FLAGS.

@Medoalmasry
Copy link

If someone is facing the same issue, I checked the difference between gcc 11.2 and 11.1
you can just hide both templates

 /**
      template<typename _Functor,
               typename _Constraints = _Requires<_Callable<_Functor>>>
        function(_Functor&& __f)
        noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>())
        : _Function_base()
        {
          static_assert(is_copy_constructible<__decay_t<_Functor>>::value,
              "std::function target must be copy-constructible");
          static_assert(is_constructible<__decay_t<_Functor>, _Functor>::value,
              "std::function target must be constructible from the "
              "constructor argument");

          using _My_handler = _Handler<_Functor>;

          if (_My_handler::_M_not_empty_function(__f))
            {
              _My_handler::_M_init_functor(_M_functor,
                                           std::forward<_Functor>(__f));
              _M_invoker = &_My_handler::_M_invoke;
              _M_manager = &_My_handler::_M_manager;
            }
        }
        **/

rigaya added a commit to rigaya/NVEnc that referenced this issue Feb 20, 2022
fedora32 + cuda11でそのままビルドすると、g++ 10.3のchrono周りのエラーが発生する。
参照: NVIDIA/nccl#494
  gcc 10.2 OK
  gcc 10.3, 11.0, 11.1 broken
  gcc 10.4, gcc 11.2 OK
そのため、dnf downgradeでgccを10.0に戻して対処した。

fedora34の現在のgccは11.2.1のため、この問題は解消しているが、gcc-11.2.1-9からstd::functionがらみの別の問題が発生する。
参照: NVIDIA/nccl#102
@geoeo
Copy link

geoeo commented Apr 30, 2022

This has reappeared on ubuntu jammy. Default (Aptitude) gcc is 11.2 and cuda version is 11.6.

@gpecke
Copy link

gpecke commented May 1, 2022

Taking std_function.h from a different gcc version fixed this for me for the time being.

@geoeo
Copy link

geoeo commented May 1, 2022

For me I had to manually install the 11.6 toolkit. The aptitude version is 11.5 !

@kekegg
Copy link

kekegg commented Jul 9, 2022

Taking std_function.h from gcc 11.1 fixed this for me for the time being. I'm compiling gromacs with gpu support in ubuntu 22.04 with gcc 11.2.

@intractabilis
Copy link

intractabilis commented Jul 11, 2022

The problem is in CUDAFE. FE stands for front-end, it's a C++ front-end based on the EDG front-end. As far as I understand, it heavily modifies your code (for example, brings local variables to the global scope), and, obviously, introduces bugs on the way. I think probably NVIDIA doesn't have money to update the EDG version, and, thus, simply ignores this bug.

@nachovizzo
Copy link

For CMake based projects I managed to sort this problem out by installing an older compiler and telling nvcc which is the host compiler

 cmake -DCMAKE_CUDA_HOST_COMPILER=/usr/bin/g++-10 ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants