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

Support for Intel oneAPI compilers #249

Closed
awvwgk opened this issue Nov 22, 2020 · 14 comments · Fixed by #260
Closed

Support for Intel oneAPI compilers #249

awvwgk opened this issue Nov 22, 2020 · 14 comments · Fixed by #260

Comments

@awvwgk
Copy link
Member

awvwgk commented Nov 22, 2020

I just tried to setup a CI for the Intel oneAPI compilers for stdlib and noticed that src/tests/io/test_savetxt.f90 is triggering an ICE in ifort (see https://github.com/awvwgk/fortran-stdlib/runs/1439256395) and src/stdlib_ascii.f90 is triggering an ICE in the ifx compiler (see https://github.com/awvwgk/fortran-stdlib/runs/1439276984).

I have seen there are compile issues with PGI/NVHPC, NAG and flang already for stdlib. Does this mean stdlib currently only supports GCC?

@ivan-pi
Copy link
Member

ivan-pi commented Nov 22, 2020

The ifx error is not very informative:

/home/runner/work/fortran-stdlib/fortran-stdlib/src/stdlib_ascii.f90(73): catastrophic error: **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.

@ivan-pi
Copy link
Member

ivan-pi commented Nov 22, 2020

The NAG issues were partially related to CMake - #108 - however, I am not sure if it was resolved. Presumably, PGI will also have issues with submodules, error stop, and other F2018 features.

The short answer to your question is yes.

@awvwgk
Copy link
Member Author

awvwgk commented Nov 22, 2020

I've never seen an informative ICE so far. Unfortunately, I don't have a local Intel oneAPI installation on my machine (yet), so I wasn't able to pin it down to a more specific part in the implementation. At least with Intel Parallel Studio stdlib builds just fine, so this seems to be Intel oneAPI specific.

@jvdp1
Copy link
Member

jvdp1 commented Nov 22, 2020

Does this mean stdlib currently only supports GCC?

I always try to compile stdlib with gfortran (9.3.1) and Intel ifort (19.1.1), and until now, it was always fine. I got some issues with one of the first versions of ifort 2017, but it has been solved with an update of ifort.
@awvwgk Which version of ifort did you use?

I didn't test Intel oneAPI yet.

@awvwgk
Copy link
Member Author

awvwgk commented Nov 22, 2020

On my local machine, I use Intel Parallel Studio 2020, Update 2 (ifort 19.1.1.217 20200306), which seems to work just fine.

On the CI example it should be Intel oneAPI 2021.1 beta10, ifort 20.2.1.20200827, ifx 2019.0.0.20201005 (?).

@milancurcic
Copy link
Member

On my laptop (Ubuntu 20.04) I have ifort (IFORT) 2021.1 Beta 20200827 (from oneAPI) and it doesn't ICE until compiling the tests:

/home/milan/Work/fortran/stdlib/src/tests/io/test_savetxt.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** 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.

@milancurcic
Copy link
Member

nvfortran 20.9-0 doesn't implement real128 yet:

$ FC=nvfortran cmake .. -DCMAKE_MAXIMUM_RANK=4
-- The Fortran compiler identification is PGI 20.9.0
-- Check for working Fortran compiler: /opt/nvidia/hpc_sdk/Linux_x86_64/2020/compilers/bin/nvfortran
-- Check for working Fortran compiler: /opt/nvidia/hpc_sdk/Linux_x86_64/2020/compilers/bin/nvfortran  -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /opt/nvidia/hpc_sdk/Linux_x86_64/2020/compilers/bin/nvfortran supports Fortran 90
-- Checking whether /opt/nvidia/hpc_sdk/Linux_x86_64/2020/compilers/bin/nvfortran supports Fortran 90 -- yes
-- Performing Test f18errorstop
-- Performing Test f18errorstop - Success
-- Performing Test f03rank
-- Performing Test f03rank - Failed
-- Performing Test f03real128
-- Performing Test f03real128 - Failed
-- Configuring done
-- Generating done
-- Build files have been written to: /home/milan/Work/fortran/stdlib/build

@jvdp1
Copy link
Member

jvdp1 commented Dec 1, 2020

I just tried to setup a CI for the Intel oneAPI compilers for stdlib and noticed that src/tests/io/test_savetxt.f90 is triggering an ICE in ifort (see https://github.com/awvwgk/fortran-stdlib/runs/1439256395) and src/stdlib_ascii.f90 is triggering an ICE in the ifx compiler (see https://github.com/awvwgk/fortran-stdlib/runs/1439276984).

I have seen there are compile issues with PGI/NVHPC, NAG and flang already for stdlib. Does this mean stdlib currently only supports GCC?

@awvwgk Did you report the ICEs to Intel? I just installed it on my local computer, and got also ICEs.

@Romendakil
Copy link

Hm, where did you get the Beta version for Intel 2021? Normally, I get informed when there is a new version. That they are having problems with their new release is deeply disturbing. Can someone give me a link to a product page?

@milancurcic
Copy link
Member

@Romendakil FWIW I got it from here. I followed the install instructions for apt on Ubuntu and installed basekit and hpckit. Beta 2021.1 is what's inside.

@awvwgk
Copy link
Member Author

awvwgk commented Dec 1, 2020

Did you report the ICEs to Intel? I just installed it on my local computer, and got also ICEs.

Not yet, I finally got around to download the oneAPI compilers, but I still have to isolate the problem and create a minimal working example for a report.

Edit:

Tracked the first ICE in oneAPI ifort down and reported at https://community.intel.com/t5/Intel-oneAPI-Base-Toolkit/ICE-ifort-2021-1-Beta-20200827/m-p/1233189#M756

program mwe
   implicit none
   integer, parameter :: dp = selected_real_kind(15)

   real(dp) :: d(2, 3), e(2, 3)
   logical :: stat
   d = reshape([1, 2, 3, 4, 5, 6], [2, 3])
   e = reshape([1, 2, 3, 4, 5, 6], [2, 3])
   stat = all(abs(e-d) < epsilon(1.0_dp))

end program mwe

Will produce an ICE with -standard-semantics flag:

> ifort --version
ifort (IFORT) 2021.1 Beta 20200827
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

> ifort mwe.f90 -standard-semantics
mwe.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** 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.
compilation aborted for mwe.f90 (code 1)

@awvwgk
Copy link
Member Author

awvwgk commented Dec 3, 2020

Update: The ICE in ifort will be fixed in the release version of oneAPI, I will open a PR to add the CI once oneAPI is finally out of beta.

I didn't bother looking into the failure of ifx, since I didn't get a single project compiled with it so far, which makes it quite unusable in my opinion.

@jvdp1
Copy link
Member

jvdp1 commented Dec 3, 2020

Update: The ICE in ifort will be fixed in the release version of oneAPI, I will open a PR to add the CI once oneAPI is finally out of beta.

Great. Thanks @awvwgk for the update.

@awvwgk
Copy link
Member Author

awvwgk commented Dec 5, 2020

Looks like there has been another update of the oneAPI compilers, but I'm very happy I did not get any of those, as they are completely broken now: https://github.com/awvwgk/fortran-stdlib/runs/1503801636#step:8:109

-- Check for working Fortran compiler: /opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort  -- broken
CMake Error at /usr/local/share/cmake-3.16/Modules/CMakeTestFortranCompiler.cmake:45 (message):
  The Fortran compiler

    "/opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/runner/work/fortran-stdlib/fortran-stdlib/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make cmTC_946e7/fast && /usr/bin/make -f CMakeFiles/cmTC_946e7.dir/build.make CMakeFiles/cmTC_946e7.dir/build
    make[1]: Entering directory '/home/runner/work/fortran-stdlib/fortran-stdlib/build/CMakeFiles/CMakeTmp'
    Building Fortran object CMakeFiles/cmTC_946e7.dir/testFortranCompiler.f.o
    /opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort    -c /home/runner/work/fortran-stdlib/fortran-stdlib/build/CMakeFiles/CMakeTmp/testFortranCompiler.f -o CMakeFiles/cmTC_946e7.dir/testFortranCompiler.f.o
    Linking Fortran executable cmTC_946e7
    /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_946e7.dir/link.txt --verbose=1
    /opt/intel/oneapi/compiler/2021.1.1/linux/bin/intel64/ifort      CMakeFiles/cmTC_946e7.dir/testFortranCompiler.f.o  -o cmTC_946e7 
    ifort: error #10105: ld: core dumped
    ifort: warning #10102: unknown signal(1776847024)
    ifort: error #10106: Fatal error in ld, terminated by unknown
    CMakeFiles/cmTC_946e7.dir/build.make:86: recipe for target 'cmTC_946e7' failed
    make[1]: *** [cmTC_946e7] Error 1
    make[1]: Leaving directory '/home/runner/work/fortran-stdlib/fortran-stdlib/build/CMakeFiles/CMakeTmp'
    Makefile:121: recipe for target 'cmTC_946e7/fast' failed
    make: *** [cmTC_946e7/fast] Error 2

Edit:

Just found the the release notes here. Apparently this is supposed to be the production release now...

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

Successfully merging a pull request may close this issue.

5 participants