Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28381 Discussions

optional/present not supported by Intel Fortran OneAPI Compiler (ifx)

MehdiChinoune
New Contributor I
3,103 Views

Hi,

  I tried to build my code using the new Intel Fortran OneAPI Compiler (Beta), Unfortunately It doesn't support a basic Fortran95 feature of optional/present arguments

error #5533: Feature found on this line is not yet supported in ifx 
    if( present(exchange) ) then
Labels (1)
1 Solution
MehdiChinoune
New Contributor I
1,729 Views

Fixed in 2022.2.0

View solution in original post

0 Kudos
16 Replies
Arjen_Markus
Honored Contributor I
3,062 Views

Clearly, ifx is not ready for routine use, but it is after all a beta version of a new compiler, so it is very likely to have more such limitations.

0 Kudos
MehdiChinoune
New Contributor I
3,049 Views

I know, I am just reporting the issue.

0 Kudos
Khalik_K_Intel
Moderator
3,034 Views

Hello,

Thank you for contacting Intel Support.


Both OPTIONAL attribute and PRESENT intrinsic function are supported in ifx.

Intel has them mentioned in Intel® Fortran Compiler Classic and Intel® Fortran Compiler (Beta) Developer Guide and Reference.


OPTIONAL page: https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/language-reference/a-to-z-reference/o-to-p/optional.html#optional

PRESENT page: https://www.intel.com/content/www/us/en/develop/documentation/fortran-compiler-oneapi-dev-guide-and-reference/top/language-reference/a-to-z-reference/o-to-p/present.html#present


Both these pages contains simple examples on how to use them. I have tried those examples with latest released ifx (2021.4.0) and examples compile and run successfully.


Could you please provide your source code and the compilation command, so we are able to assist you?

Could you please also mention the compiler version you are using and OS information?


Regards,

Khalik.


Khalik_K_Intel
Moderator
3,012 Views

Thank you for the provided information.


We will investigate the issue and will get back to you.


Regards,

Khalik.


0 Kudos
MehdiChinoune
New Contributor I
2,997 Views

I don't know what have changed since last time, but it compiles now!

 

I am just getting some linking errors.

 

Edit: Found it, It was  -standard-semantics compile flag!

0 Kudos
Khalik_K_Intel
Moderator
2,925 Views

Hello,


The error here is that compiler aborts when PRESENT intrinsic procedure is invoked and -standard-semantics option is specified.

This issue has already been reported to Intel Fortran development team and the development team is looking into fixing this issue in a future release.

I have provided information on your case to them.


In the meantime, I hope one of the workarounds is suitable for you:

  • Compile with ifx, but without standard-semantics flag
  • Compile with ifort

If you do not have any further questions on this, then I am going to close this thread.


Regards,

Khalik.


0 Kudos
MehdiChinoune
New Contributor I
2,910 Views

Thanks,

  If you could also report that even after removing `-standard-semantics` from compilation flags, It fails to link the libarary!

Feel free the close the thread.

0 Kudos
Khalik_K_Intel
Moderator
2,877 Views

Hello,


Thank you for the update.

I have tried the full project without standard-semantics option and I see the following linker error when ifx is used:


ld: libtdcs_e_2e.so: version node not found for symbol conhyp_m@conhyp_m._

ld: failed to set dynamic section sizes: bad value


I assume that you are experiencing the same behavior. You should not (as I believe) see any other errors.

This looks like a bug in ifx, which has not been reported before, so I created the ticket to our Fortran development team.


Thanks a lot for your inputs!


Regards,

Khalik.


0 Kudos
MehdiChinoune
New Contributor I
2,617 Views

still fails to compile with 2022.0

/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x1362f1a]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x102d09d]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x1084382]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x1084356]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0xfc17c7]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0xfd07ff]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0xfd06e7]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x1086124]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x108a186]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10659a1]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x106667d]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cd2d4]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cfae2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10d01b2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10d243c]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cfae2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10d01b2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cd9a2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cfae2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cd05a]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x10cfae2]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0xf9d436]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0xf9cb71]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0x1116541]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f32fe2fa0b3]
/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/xfortcom[0xde27a9]

/home/runner/work/tdcs-e-2e/tdcs-e-2e/src/input.F90(18): error #5533: Feature found on this line is not yet supported in ifx 
    if( present(exchange) ) then
--------^
compilation aborted for /home/runner/work/tdcs-e-2e/tdcs-e-2e/src/input.F90 (code 3)

and still fails to link when removing "-standard-semantics"

[ 80%] Linking Fortran shared library libtdcs_e_2e.so
ld: libtdcs_e_2e.so: version node not found for symbol conhyp_m@conhyp_m._
ld: failed to set dynamic section sizes: bad value

in the latest release notes  they claimed 

  • Intel® Fortran Compiler, based on LLVM technology, is now fully production-ready for CPUs and GPUs.

 

0 Kudos
Khalik_K_Intel
Moderator
2,606 Views

Hello,

 

Both issues which we have found in scope of current thread are being targeted by Intel Fortran Development teams.

However, the fix is not ready yet and thus not available in released Intel® Fortran Compiler 2022.

 

We are sorry for any inconvenience caused and will do our best to include both fixes in the upcoming releases.

 

Regards,

Khalik.

 

MehdiChinoune
New Contributor I
2,220 Views
Still fails with 2022.1.0
0 Kudos
James_T_Intel
Moderator
2,184 Views

Correct, the associated fixes have not yet been implemented at this time.


0 Kudos
FortranFan
Honored Contributor II
2,104 Views

@James_T_Intel , @Khalik_K_Intel ,

 

c.f. https://www.intel.com/content/www/us/en/developer/articles/technical/fortran-language-and-openmp-features-in-ifx.html

You will note the above page states, "Fortran 95 is fully implemented, as are previous Fortran standards."

You will know the PRESENT intrinsic was added to the language standard with Fortran 90 revision and it was supported for ages with the foundational DEC Fortran compiler.

Overall it is mind-boggling that something as basic as the PRESENT intrinsic is unsupported by the IFX compiler.  How is that even possible, how did IFX pass the tests relative to Fortran 90 standard?  Will it possible for you to get the Fortran team to comment on this?

Is it possible for someone at Intel to do an audit and see what else from Fortran 90, 95 standards is not supported by IFX yet?

And update the above page with the corrected information so that the users can receive accurate guidance. 

 

0 Kudos
James_T_Intel
Moderator
2,096 Views

The issue is not that PRESENT is unsupported. It is implemented and supported. There is a bug in the implementation, and the Fortran development team has it in their bug list to fix.


0 Kudos
MehdiChinoune
New Contributor I
1,730 Views

Fixed in 2022.2.0

0 Kudos
Reply