Fortran Language and OpenMP* Features Implemented in Intel ifx

Fortran Language and OpenMP* Features Implemented in Intel® Fortran Compiler
2021-12-06

Our latest compiler, the Intel® Fortran Compiler (ifx), available in the oneAPI HPC Toolkit 2022.1, is production-ready for CPUs and GPUs. ifx is based on the Intel® Fortran Compiler Classic (ifort) frontend and runtime libraries, but uses LLVM backend compiler technology.

This article describes the Fortran language and OpenMP* features that are implemented in ifx by release.

In this initial release ifx completely implements Fortran 77, Fortran90/95, Fortran 2003 (except parameterized derived types) and Fortran 2008 (except coarrays) language standards and OpenMP 4.5 and OpenMP 5.0/5.1 directives and offloading features. ifx is binary (.o/.obj) and module file (.mod) compatible. Binaries and libraries generated with ifort can be linked with binaries and libraries built with ifx. .mod files generated with one compiler can be used by the other (64-bit targets only). Both compilers use the the same runtime libraries. ifx may or may not match performance of ifort compiled applications. Performance and Fortran Standard language improvements will be coming in ifx with each update release throughout 2022.

In this release, the ifx version number is 2022.0.0.

3 Likes

This looks quite impressive, I’m might actually be looking forward to updating my oneAPI installation (except for the several GB download, again) and giving ifx a serious try. Maybe we can start testing it with stdlib and other projects, if CMake already knows about ifx.

2 Likes

I gave it a try and ifx replaces ifort without any problem in my case.

CMake knows about it, the ID is IntelLLVM. All the options I’m using for ifort work with ifx and it will complain about those that have no effect.

4 Likes

A quick test (on Windows) seems to show that ifx 2022.0.0 is able to compile stdlib, but is unable to compile the associated tests due to some unsupported feature in how the TestDrive framework is used:

test\test_moment.f90(1084): error #5533: Feature found on this line is not yet supported in ifx
        call run_testsuite(testsuites(is)%collect, error_unit, stat)
-------------^

This affects other projects using TestDrive. I’m not sure which unsupported feature is referred to here.

When trying to compile fpm, ifx similarly fails due to an unsupported feature in the M_CLI2 library:

build/dependencies/M_CLI2/src/M_CLI2.f90(2281): error #5533: Feature found on this line is not yet supported in ifx
            args=[character(len=imax) :: args,current_argument]
----------------------------------------------^

To add to the feeling that ifx is perhaps not quite ready, each error (on Windows) prints out a 45 line stacktrace without symbols:

Click to expand
#0 0x00007FF735BE8DB5 (0x000001ED4DAD67A0 0x0000000000000003 0x000001ED4DAD67A0 0x000001ED4DAD6CC0)
#1 0x00007FF735BE8D8A (0x000001ED4C9BDD60 0x00007FF7384A9A38 0x0000000000000000 0x0000000000000000)
#2 0x00007FF735B12314 (0x0000000000000000 0x800008E90000002E 0x000001ED49260778 0x00007FF735B4F476)
#3 0x00007FF735B19FCD (0x000077A58C32C728 0x0000000000000000 0x0000000000000002 0x000001ED4DABC9B0)
#4 0x00007FF735B19A1B (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
#5 0x00007FF735B315CC (0x0000000000000000 0x0000000000000000 0x0000000000000018 0x000000000000001E)
#6 0x00007FF735B31272 (0x0000000000000007 0x0000000000000025 0x0000000000000000 0x000001ED4DAD1E40)
#7 0x00007FF735C30538 (0x000001ED4DABC320 0x000001ED4DABC3B0 0x0000000000000000 0x000000AA4E78A120)
#8 0x00007FF735C306B8 (0x0000000000000000 0x800008E800000019 0x000077A58C32C528 0x0000000000000000)
#9 0x00007FF735AF2C51 (0x000001ED4920FD00 0x0000000000000040 0x800008E90000000C 0x00007FF735B0F2C5)
#10 0x00007FF735BC7C18 (0x0000000000000000 0x0000000000000000 0x000001ED4DAD1E40 0x0000000000000000)
#11 0x00007FF735BC83C8 (0x000001ED4DAB77A0 0x000001ED4DAB77A0 0x0000000000000140 0x000001ED4DAB7601)
#12 0x00007FF735BC732F (0x800008E800000011 0x000001ED47941FB0 0x000000AA4E78E890 0x0000000000000007)
#13 0x00007FF735AF6E95 (0x000000000000000F 0x0000000000000007 0x0000000000000000 0x00000000000000B8)
#14 0x00007FF735C2DEA6 (0x000000AA4E78ECD0 0x000000AA4E78ECE8 0x0000000000000000 0x0000000000000000)
#15 0x00007FF735C380AC (0x0000000000000000 0x000077A58C32B648 0x0000000000000007 0x000001ED4DA764D0)
#16 0x00007FF735C3868D (0x00000000000008DF 0x000077A58C32B6C8 0x000001ED4AFAF748 0x000077A58C32B708)
#17 0x00007FF735C355A4 (0x000000AA4E78EE50 0x000000AA4E78EE68 0x0000000000000000 0x0000000000000000)
#18 0x00007FF735C380AC (0x0000000000000000 0x000077A58C32B4C8 0x0000000000000007 0x000001ED4DA76160)
#19 0x00007FF735C3868D (0x00000000000008B6 0x000077A58C32B748 0x000000AA4E78EF68 0x000000AA4E78EF60)
#20 0x00007FF735C355A4 (0x000000AA4E78EFD0 0x000000AA4E78EFE8 0x0000000000000000 0x0000000000000000)
#21 0x00007FF735C380AC (0x0000000000000000 0x000077A58C32B548 0x0000000000000007 0x000001ED4D9F43D0)
#22 0x00007FF735C3868D (0x00000000000008A1 0x000077A58C32B5C8 0x000000AA4E78F0E8 0x000000AA4E78F0E0)
#23 0x00007FF735C355E2 (0x000000AA4E78F150 0x000000AA4E78F168 0x0000000000000000 0x0000000000000000)
#24 0x00007FF735C380AC (0x0000000000000000 0x000077A58C32ABC8 0x0000000000000007 0x000001ED4D9B9F60)
#25 0x00007FF735C3868D (0x000001ED45283E90 0x00007FF735B30620 0x000000AA4E78F268 0x000000AA4E78F260)
#26 0x00007FF735C355E2 (0x0000000000000000 0x0000000000000000 0x000001ED4D97B430 0x000001ED4D9692C0)
#27 0x00007FF735C380AC (0x000001ED4D9692C0 0x00007FF735B18EDD 0x000001ED4D969340 0x000001ED4D9692C0)
#28 0x00007FF735C3868D (0x000000AA4E78F3D8 0x000000AA4E78F3D0 0x0000000000000000 0x0000000000000000)
#29 0x00007FF735C37C8C (0x000001ED4C8FB558 0x000000000000000B 0x0000000000000877 0x000001ED4C8FB558)
#30 0x00007FF735C380AC (0x000000000000000C 0x0000000000000877 0x000001ED4552034C 0x000077A58C32AED8)
#31 0x00007FF735C3868D (0x000077A58C32AE18 0x0000000000000000 0x8000010400000000 0x00007FF735BE8E68)
#32 0x00007FF735C3AA18 (0x0000000046E80300 0x000001ED45790960 0x000001ED46E803D0 0x000001ED477A1C80)
#33 0x00007FF735C380AC (0x000001ED46E803D0 0x00007FF735C35B40 0x0000000000000000 0x8000007400000000)
#34 0x00007FF735C3868D (0x00007FF73894ABA8 0x00007FF735BFF426 0x000000AA4E78F6FF 0x00007FF73894AB01)
#35 0x00007FF735C35B70 (0x0000000000000000 0x0000000000000004 0x000001ED48A31E00 0x000000AA4E78F714)
#36 0x00007FF735C380AC (0x000000AA4E78F7B8 0x00007FF735BBFC7D 0x0000000000000001 0x0000000000000000)
#37 0x00007FF735C3522D (0x32494C435F4D0006 0x32494C435F4D0000 0x4F4D24454C494624 0x000001ED46BC0044)
#38 0x00007FF735C380AC (0x000001ED46BC04E0 0x0000000000000000 0x0000000000000000 0x00007FF735AEF5C2)
#39 0x00007FF735AEF19A (0x0000000000000001 0x00007FF73894B158 0x00007FF737BC4B30 0x0000000000000000)
#40 0x00007FF735AEE8E1 (0x00007FF700008002 0x000001ED4520AFD0 0x0000000000000024 0x00007FF700000002)
#41 0x00007FF735C82AE3 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
#42 0x00007FF737B85E70 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000)
#43 0x00007FFCB47C7034 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0x14 bytes(s)
#44 0x00007FFCB4D42651 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)
build/dependencies/M_CLI2/src/M_CLI2.f90(2281): error #5533: Feature found on this line is not yet supported in ifx
            args=[character(len=imax) :: args,current_argument]
----------------------------------------------^
2 Likes

I’ve encountered a similar issue that could be resolved by removing -standard-semantics. In my case present caused problems, see also https://community.intel.com/t5/Intel-Fortran-Compiler/optional-present-not-supported-by-Intel-Fortran-OneAPI-Compiler/m-p/1325035.

1 Like

I am still waiting for our IT department to install the newest version, haven’t tried out the 2022 yet. But with the 2021 version our code did not compile at all. Let’s see whether they made progress. I think there was even somewhere a ‘where’ which wasn’t implemented in ifx.

What are the main difference between ifx and ifort?
Like, what is the biggest advantage of ifx over ifort?

This is the Porting Guide for ifort Users to ifx.

ifx may or may not match performance of ifort compiled applications. Performance and Fortran Standard language improvements will be coming in ifx with each update release throughout 2022.