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

intel 19.0.5 tuple compile error #8755

Closed
tjhei opened this issue Sep 14, 2019 · 3 comments
Closed

intel 19.0.5 tuple compile error #8755

tjhei opened this issue Sep 14, 2019 · 3 comments

Comments

@tjhei
Copy link
Member

tjhei commented Sep 14, 2019

Intel compiler produces various errors of this kind for me

$ icpc -v
icpc version 19.0.5.281 (gcc version 9.1.0 compatibility)

when using stdcxx17 mode (It seems like tuple support is broken). Errors look like:

/opt/apps/gcc/9.1.0/include/c++/9.1.0/tuple(553): error: pack "_UElements" does not have the same number of elements as "_Elements"
            __and_<is_nothrow_assignable<_Elements&, _UElements>...>::value;
                                                     ^
          detected during instantiation of "bool std::tuple<_Elements...>::__nothrow_assignable<_UElements...>() [with _Elements=<unsigned int, unsigned int, std::string, dealii::DataComponentInterpretation::DataComponentInterpretation>, _UElements=<>]" at line 5953 of "/scratch1/02578/theister/deal-git/source/base/data_out_base.cc"

the offending code:

       new_nonscalar_data_ranges[i] =
          std::tuple<unsigned int,
                     unsigned int,
                     std::string,
                     DataComponentInterpretation::DataComponentInterpretation>(
            std::get<0>(nonscalar_data_ranges[i]),
            std::get<1>(nonscalar_data_ranges[i]),
            std::get<2>(nonscalar_data_ranges[i]),
            DataComponentInterpretation::component_is_part_of_vector);

Minimal repo with icpc -std=cxx17 test.cc:

#include <string>
#include <vector>
#include <tuple>

int main()
{
  using mytuple=std::tuple<int,int,std::string>;
  std::vector<mytuple> vec(1);

  vec[0] = std::make_tuple(1,2,"hello");
}

By switching to cxx14 mode, everything compiles cleanly. I reported the bug to intel but we might need to blacklist/test/something for this.

@bangerth
Copy link
Member

:-( Can you at least work around this somehow?

@tjhei
Copy link
Member Author

tjhei commented Sep 15, 2019

Can you at least work around this somehow?

Yes, by compiling with DEAL_II_WITH_CXX17=off.

@drwells
Copy link
Member

drwells commented Jun 11, 2021

We should have added a check for this, but since intel 20 compiles cleanly and no one managed to write a fix I don't think its worth going back and adding a check for this older compiler.

@drwells drwells closed this as completed Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants