Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Intel LLVM based compilers #1890

Closed
dkokron opened this issue Dec 21, 2022 · 14 comments
Closed

Port to Intel LLVM based compilers #1890

dkokron opened this issue Dec 21, 2022 · 14 comments
Assignees
Labels
⌛ Long Term Long term issues

Comments

@dkokron
Copy link

dkokron commented Dec 21, 2022

I have been attempting to port MAPL (feature/mathomp4/optional-openmp) to use the LLVM based compilers (ifx, icx and icpx) from the 2023.0.0 release of OneAPI. I ran into two problems, one of which I was able to work around.

The first workaround is to disable OpenMP. The ifx compiler likes to ICE when fiopenmp is included on the command line even if the source file doesn't include OpenMP directives. Disable inclusion of -fiopenmp flag by changing
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "NAG")
to
if (NOT CMAKE_Fortran_COMPILER_ID MATCHES "^(NAG|IntelLLVM)$")
in pfio/CMakeLists.txt and profiler/CMakeLists.txt

Haven't figured out how to work around the following error.
..../gridcomps/Cap/MAPL_Cap.F90(358): error #5623: Internal compiler error: internal abort Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
call MAPL_CapGridCompCreate(this%cap_gc, this%get_cap_rc_file(), &

The 2022.1.0 and 2022.2.1 releases of ifx reported the following error instead.
Cap/MAPL_Cap.F90(358): error #5533: Feature found on this line is not yet supported in ifx
call MAPL_CapGridCompCreate(this%cap_gc, this%get_cap_rc_file(), &

@mathomp4
Copy link
Member

@dkokron Thanks. I've asked NCCS for Intel 2023.0 to be installed on discover which is about the only way we can test this (since most of us develop on macOS and no ifx there).

@mathomp4
Copy link
Member

Also, so I don't forget, I'll add a reference to:

Goddard-Fortran-Ecosystem/pFUnit#404

where @scivision and @Leonard-Reuter talked about their experience with ifx and pFUnit.

@mathomp4
Copy link
Member

Note to @tclune I might just take this as an opportunity to make a flag that disables OpenMP builds everywhere in MAPL/GEOS. I tried this with @dkokron but I apparently didn't get it quite right (fun with generator expressions). But it must be doable!

@dkokron
Copy link
Author

dkokron commented Jan 5, 2023

Have you been able to reproduce this on Discover?

@mathomp4
Copy link
Member

mathomp4 commented Jan 5, 2023

Have you been able to reproduce this on Discover?

@dkokron Not yet. Still waiting on latest oneAPI to be installed. Soon I hope!

@dkokron
Copy link
Author

dkokron commented Jan 20, 2023

@mathomp4 Any update on this issue?

@stale
Copy link

stale bot commented Mar 22, 2023

This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days, it will be closed. You can add the "long term" tag to prevent the Stale bot from closing this issue.

@stale stale bot added the ❄️ Stale This issue has been marked stale label Mar 22, 2023
@mathomp4 mathomp4 added the ⌛ Long Term Long term issues label Mar 22, 2023
@stale stale bot removed the ❄️ Stale This issue has been marked stale label Mar 22, 2023
@dkokron
Copy link
Author

dkokron commented Apr 12, 2023

The Intel 2023.1 ifx compiler resolves the issue with fiopenmp mentioned above. However, mapl-2.22.0 stills fails to compile under 2023.1 because of a new ICE on MAPL_TripolarGridFactory.F90

      #0 0x0000000001f63112
      #1 0x0000000001fc5727
      #2 0x0000000001fc56f6
      #3 0x0000000001f31ef9
      #4 0x0000000001f2fee6
      #5 0x0000000001f0090f
      #6 0x0000000001f93949
      #7 0x0000000001f98a61
      #8 0x0000000001f95dfc
      #9 0x0000000001f96fb7
     #10 0x00000000020168d0
     #11 0x0000000002014417
     #12 0x0000000002014a04
     #13 0x0000000002016ebe
     #14 0x0000000002014417
     #15 0x0000000002014a04
     #16 0x0000000002011ec2
     #17 0x0000000002014417
     #18 0x000000000201151a
     #19 0x0000000002014417
     #20 0x0000000001eb59e5
     #21 0x0000000001eb539c
     #22 0x00000000020797c5
     #23 0x0000151350907d90
     #24 0x0000151350907e40 __libc_start_main + 128
     #25 0x0000000001cf1729

/home/dkokron/Projects/NCEP/UFS/hpc-stack/pkg/mapl-2.22.0/base/MAPL_TripolarGridFactory.F90(750): error #5623: Internal compiler error: internal abort Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error.
subroutine fill_north(array, rc)
I haven't been able to test with mapl-2.37.0 because of it's dependency on fArgParse which isn't ifx aware.

@tclune
Copy link
Collaborator

tclune commented Apr 12, 2023

I'll try to at least get an IFX compiler options file into fArgParse (and rest of GFE) asap. But won't have any time to pursue compiler issues beyond that in the near term.

@tclune
Copy link
Collaborator

tclune commented Oct 25, 2023

I finally have an environment where I can test this. I think I have a workaround, which I'll let @mathomp4 test more fully. And will also work on a bug report to intel.

@dkokron
Copy link
Author

dkokron commented Oct 25, 2023 via email

tclune added a commit that referenced this issue Oct 26, 2023
…m-intel-compiler' into feature/tclune/#1890-port-to-llvm-intel-compiler
@tclune
Copy link
Collaborator

tclune commented Oct 27, 2023

My statement was a bit premature. My changes allow the code to compile but we are seeing a number of failing unit tests. We're trying to prove whether these are due to the compiler or to MPI. Some that fail on discover run on my laptop which suggests that a newer MPI may solve some of the issues.

mathomp4 added a commit that referenced this issue Oct 27, 2023
…lvm-intel-compiler

Fix to allow Intel Fortran 2021.10 to compile
@mathomp4 mathomp4 reopened this Oct 31, 2023
@mathomp4
Copy link
Member

mathomp4 commented Oct 31, 2023

This got accidentally closed. We have ifort 2021.10 support now, but we are looking at ifx support. We are getting closer!

We have ifx 2023.2.1 now on SCU17 so this should allow us to look at this

@mathomp4
Copy link
Member

Closing in favor of #2642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌛ Long Term Long term issues
Projects
None yet
Development

No branches or pull requests

3 participants