thelfer / MFrontGenericInterfaceSupport

This project aims at providing support for MFront generic behaviours. This project can be embedded in open-source and propriary sofware
35 stars 34 forks source link

Support for intel llvm-based compilers ? #124

Closed pbouda95 closed 7 months ago

pbouda95 commented 7 months ago

MGIS seems to not handle icx/icpx llvm-based intel compilers, contrary to tfel. This might be critical as icc ans icpc will be depreciated as of the end of 2023.

thelfer commented 7 months ago

I just tried icx/icpx and it worked fine.

thelfer commented 7 months ago

@pbouda95 Can we close this issue ?

pbouda95 commented 7 months ago

Hello @thelfer,

I don't think so. Here is a screeenshot of one of our compilation error while trying to use icx and icpx from oneAPI 2024: image

The same error occurs with oneAPI 2023.3 ...

Cheers,

thelfer commented 7 months ago

Ok, I'll check this.


De : Pascal Bouda @.***> Envoyé : lundi 4 décembre 2023 13:19:43 À : thelfer/MFrontGenericInterfaceSupport Cc : HELFER Thomas; Mention Objet : Re: [thelfer/MFrontGenericInterfaceSupport] Support for intel llvm-based compilers ? (Issue #124)

Hello @thelferhttps://github.com/thelfer,

I don't think so. Here is a screeenshot of one of our compilation error while trying to use icx and icpx from oneAPI 2024: image.png (view on web)https://github.com/thelfer/MFrontGenericInterfaceSupport/assets/55626239/63f868b8-5c7d-44ca-940e-9da6f7ccfd25

The same error occurs with oneAPI 2023.3 ...

Cheers,

— Reply to this email directly, view it on GitHubhttps://github.com/thelfer/MFrontGenericInterfaceSupport/issues/124#issuecomment-1838521421, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADKT72GSKIRTRZ4B75WJZ3TYHW5V7AVCNFSM6AAAAAA7H57DKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZYGUZDCNBSGE. You are receiving this because you were mentioned.Message ID: @.***>

thelfer commented 7 months ago

It works with 2021.2.0

thelfer commented 7 months ago

Also works with 2023....

$ CXX=icpx CC=icc cmake ../MFrontGenericInterfaceSupport/ -- The C compiler identification is Intel 20.2.10.20230609 -- The CXX compiler identification is Clang 17.0.0 -- Check for working C compiler: /home/th202608/codes/intel/oneapi/compiler/2023.2.0/linux/bin/intel64/icc -- Check for working C compiler: /home/th202608/codes/intel/oneapi/compiler/2023.2.0/linux/bin/intel64/icc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /home/th202608/codes/intel/oneapi/compiler/2023.2.0/linux/bin/icpx -- Check for working CXX compiler: /home/th202608/codes/intel/oneapi/compiler/2023.2.0/linux/bin/icpx -- works

thelfer commented 7 months ago

Ok, I found the explanation: the intel compiler was not supported by my version of cmake and was detected as Clang

The only thing to do is the change line 144 of cmake/modules/compilers.cmake as follows:

elseif(((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
        (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR
        (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) AND
pbouda95 commented 7 months ago

Thanks @thelfer, it seems to work like a charm now :+1: