ralna / spral

Sparse Parallel Robust Algorithms Library
https://ralna.github.io/spral/
Other
102 stars 27 forks source link

[CI] Update meson.yml #180

Closed amontoison closed 6 months ago

amontoison commented 6 months ago

@mjacobse Can you help us to fix this error? https://github.com/ralna/spral/actions/runs/7483445621/job/20368703491?pr=180#step:10:320

jfowkes commented 6 months ago

@amontoison I would suggest that you do what the Makefile build system currently does and only use nvcc/nvc++ for building the CUDA sources as opposed to all of SPRAL.

mjacobse commented 6 months ago

We are talking about

/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/share/llvm/bin/llc: error: /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/share/llvm/bin/llc: /tmp/nvc++ew2moH1KAcc.ll:10314:148: error: use of undefined value '%dblk'
        invoke void  @_ZN5spral5ssids3cpu17ldlt_app_internal5BlockIdLi32ENS1_14BuddyAllocatorIiSaIdEEEE6backupINS2_10CopyBackupIdNS4_IdS5_EEEEEEvRT_ (ptr %dblk, ptr  %22) mustprogress

right? This looks like a compiler bug to me. The error is raised by llc which compiles LLVMs intermediate representation to assembly, so long after dealing with the C++ code itself. Since the error appears to be about the hidden this argument for the member function Block<...>::backup<...>, perhaps using a free-function instead would be a workaround. But ideally I think this should be fixed in the compiler.

jfowkes commented 6 months ago

Thanks @mjacobse, agreed let's just use nvcc for the CUDA until this gets fixed.

jfowkes commented 6 months ago

Further to the above, Nick gets an NVFORTRAN-F-0000-Internal compiler error when compiling src/ssids/gpu/factor.f90. Googling this suggests that Nvidia have quite a lot of work to do to bring nvfortran up to spec (it's based on the old pgfortran compiler).

amontoison commented 6 months ago

We are talking about

/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/share/llvm/bin/llc: error: /opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/share/llvm/bin/llc: /tmp/nvc++ew2moH1KAcc.ll:10314:148: error: use of undefined value '%dblk'
        invoke void  @_ZN5spral5ssids3cpu17ldlt_app_internal5BlockIdLi32ENS1_14BuddyAllocatorIiSaIdEEEE6backupINS2_10CopyBackupIdNS4_IdS5_EEEEEEvRT_ (ptr %dblk, ptr  %22) mustprogress

right? This looks like a compiler bug to me. The error is raised by llc which compiles LLVMs intermediate representation to assembly, so long after dealing with the C++ code itself. Since the error appears to be about the hidden this argument for the member function Block<...>::backup<...>, perhaps using a free-function instead would be a workaround. But ideally I think this should be fixed in the compiler.

We also have an internal error in the same file for the icpc compiler on all platform. icpx will not be released on Mac so it will never be fixed in the compiler. If it's not a lot of work we should try to use the free-function.

jfowkes commented 6 months ago

Again that's an issue with icpc which has been deprecated and dropped from all the latest Intel compiler releases. There is no point doing lots of work just to support a deprecated compiler. Intel is no longer an option on macs unfortunately.

amontoison commented 6 months ago

@jfowkes I commented the failing platforms for CI. If one day something is fixed upstream, we will be able to easily test the new version of the compilers.

I also added the OpenMP flag -mp for NVIDIA compilers in the main meson.build.

jfowkes commented 6 months ago

@amontoison looks great, are you happy for this to be merged? I am.

amontoison commented 6 months ago

@jfowkes Yes, we can merge the PR.

jfowkes commented 6 months ago

@amontoison great could you rebase master onto your branch just so we can see if it works with the other changes that you've made to meson.build in the other PR?

amontoison commented 6 months ago

done :+1: