Skip to content

Using std::reduce causes intel compiler to not work #297

@amartyads

Description

@amartyads

The newly added StaticIrregDomainDecomposition.cpp uses std::reduce, something that causes compilation to fail when compiling with icpx on HSUper. The compilation succeeds, however, if user does module load gcc before compilation. This is probably because the LD_LIBRARY_PATH gets populated with libraries from gcc, and then the compiler can find std::reduce.

Changing reduce to accumulate can be an easy fix, and since the operation is performed only once, it shouldn't be too heavy.

@HomesGH and @JakNiem initially found this bug on HSUper.

Bug replicated on HSUper
icpx version: Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
default gcc version: g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
gcc version after ml gcc: g++ (Spack GCC) 12.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions