Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7942 Discussions

gromacs 5.1.1 build fails with PS XE 2016 because of gcc 5.1 headers(?)

Don_K_1
Beginner
408 Views

Trying to build gromacs using icc and icpc from Paralle Studio XE 2016 fails. I assume this a problem interacting with gcc 5 headers...

/usr/include/c++/5/bits/stl_iterator_base_types.h(154): error: name followed by "::" must be a class or namespace name
        typedef typename _Iterator::iterator_category iterator_category;
                         ^
          detected during:
            instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" at line 163
            instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" at line 176 of "/home/xxxx/projects/gromacs-5.1.1/src/gromacs/topology/atomsbuilder.cpp"

I know you are aware of this problem but thought I'd throw another log on the fire since it has been your "number 1 priority" for going on 3 months now.

https://software.intel.com/en-us/forums/intel-c-compiler/topic/565143

Is there a workaround for this or other information.

Best wishes --Don

0 Kudos
4 Replies
Kittur_G_Intel
Employee
408 Views

Hi Don,
There's no general workaround available until it's fixed and the release is out. Of course, it's being worked on and I'll positively inform you and keep you updated as soon as a fix for the issue you mention at: https://software.intel.com/en-us/forums/intel-c-compiler/topic/565143 is out. Appreciate your patience till then.That said, if the code can be changed to avoid the need for the forwarding “trick” from the STL overloads that take two iterator ranges by ensuring that the two arguments types do not match each other would workaround the problem. Again, it depends on the code context and hence there's no general workaround until the release with the fix is out though:

For example:
#include <vector>
void foo(int n) {
#ifdef OK
   std::vector<int> V(n, (long) 1);    // this will work because the type of the first argument is int and the type of the second argument is not int
#else
   std::vector<int> V(n, 1);   // this will give an error
#endif
}

Thanks,
Kittur

0 Kudos
Kittur_G_Intel
Employee
408 Views

Hi Don,
This issue is fixed in the latest 16.0 update 2 release which you can download from the Intel registration center and test it out, appreciate much.
Kittur

0 Kudos
Don_K_1
Beginner
408 Views

Great! I'll try it again, thanks  --Don

0 Kudos
Kittur_G_Intel
Employee
408 Views

Sure, thanks Don for the patience through this.

Kittur

0 Kudos
Reply