Skip to content

C++ build errors with some intel compilers #2

@matthewhoffman

Description

@matthewhoffman

From @xylar:
I'm seeing build errors when I try to build MALI (without Albany) on Compy with intel and impi (the compass default settings from MPAS-Dev/compass#126):
In file included from Interface_velocity_solver.cpp(19):

Interface_velocity_solver.hpp(189): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
      const std::vector<std::vector<int>> procsSharingVertices,
                                       ^
Interface_velocity_solver.cpp(296): error: identifier "nullptr" is undefined
    if (bodyForce_F!=nullptr) {
                     ^
Interface_velocity_solver.cpp(758): error: space required between adjacent ">" delimiters of nested template argument lists (">>" is the right shift operator)
    std::vector<std::vector<int>> procsSharingVertices(nVertices);
                               ^
Interface_velocity_solver.cpp(1638): error: no suitable conversion function from "std::basic_string<char, std::char_traits<char>, std::allocator<char>>" to "const char *" exists
      outfile.open (name.str(), std::ios::out | std::ios::trunc);
                    ^
Interface_velocity_solver.cpp(1659): error: namespace "std" has no member "is_sorted"
         if(!std::is_sorted(indexToVertexID.begin(), indexToVertexID.end())) {
                  ^
Interface_velocity_solver.cpp(1840): warning #3496: lambda expressions are a C++11 feature
      std::sort(sortingIndices.begin(), sortingIndices.end(), [&](int il, int ir) {
                                                              ^
Interface_velocity_solver.cpp(1840): error: a template argument may not reference a local type
      std::sort(sortingIndices.begin(), sortingIndices.end(), [&](int il, int ir) {
      ^

I was able to build on Compy by adding -std=c++11 to the CXXFLAGS_OPT :
CXXFLAGS_OPT = -O3 -std=c++11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions