Skip to content

Compilation failure with icpx 2024.0.1 and OpenMP backend #2205

@bernhardmgruber

Description

@bernhardmgruber

alpaka 1.0 and also the develop branch fail to compile with icpx 2024.0.1 when the OpenMP backend is turned on:

CXX=/opt/intel/oneapi/compiler/2024.0/bin/icpx cmake -Dalpaka_ACC_CPU_B_SEQ_T_OMP2_ENABLE=ON -DBUILD_TESTING=ON ..
make accTest

Error:

/home/bgruber/dev/alpaka/include/alpaka/atomic/AtomicOmpBuiltIn.hpp:191:25: error: the statement for 'atomic compare capture' must be '{v=x; cond-update-stmt}', '{cond-update-stmt v = x;}', 'if(x==e) {x=d;} else {v=x;}', '{r=x==e; if(r) {x=d;}}' or '{r=x==e; if(r) {x=d;} else {v=x;}}' where x, r, and v are lvalue expressions with scalar type
  191 |                         ref = value;
      |                         ^~~
/home/bgruber/dev/alpaka/include/alpaka/atomic/AtomicOmpBuiltIn.hpp:191:25: note: expected compound statement containing one assignment
  191 |                         ref = value;
      |                         ^~~
/home/bgruber/dev/alpaka/include/alpaka/atomic/AtomicOmpBuiltIn.hpp:210:25: error: the statement for 'atomic compare capture' must be '{v=x; cond-update-stmt}', '{cond-update-stmt v = x;}', 'if(x==e) {x=d;} else {v=x;}', '{r=x==e; if(r) {x=d;}}' or '{r=x==e; if(r) {x=d;} else {v=x;}}' where x, r, and v are lvalue expressions with scalar type
  210 |                         ref = value;
      |                         ^~~
/home/bgruber/dev/alpaka/include/alpaka/atomic/AtomicOmpBuiltIn.hpp:210:25: note: expected compound statement containing one assignment
  210 |                         ref = value;
      |                         ^~~
/home/bgruber/dev/alpaka/include/alpaka/atomic/AtomicOmpBuiltIn.hpp:263:21: error: the statement for 'atomic compare capture' must be '{v=x; cond-update-stmt}', '{cond-update-stmt v = x;}', 'if(x==e) {x=d;} else {v=x;}', '{r=x==e; if(r) {x=d;}}' or '{r=x==e; if(r) {x=d;} else {v=x;}}' where x, r, and v are lvalue expressions with scalar type
  263 |                     old = ref;
      |                     ^~~
/home/bgruber/dev/alpaka/include/alpaka/atomic/AtomicOmpBuiltIn.hpp:263:21: note: expected if statement
  263 |                     old = ref;
      |                     ^~~
3 errors generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions