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

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

MehdiChinoune
新貢獻者 I
7,372 檢視

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
標籤 (1)
1 解決方案
MehdiChinoune
新貢獻者 I
5,998 檢視
16 回應
Arjen_Markus
榮譽貢獻者 II
7,331 檢視

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.

MehdiChinoune
新貢獻者 I
7,318 檢視

I know, I am just reporting the issue.

Khalik_K_Intel
7,303 檢視

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
7,281 檢視

Thank you for the provided information.


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


Regards,

Khalik.


MehdiChinoune
新貢獻者 I
7,266 檢視

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!

Khalik_K_Intel
7,194 檢視

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.


MehdiChinoune
新貢獻者 I
7,179 檢視

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.

Khalik_K_Intel
7,146 檢視

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.


MehdiChinoune
新貢獻者 I
6,886 檢視

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.

 

Khalik_K_Intel
6,875 檢視

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
新貢獻者 I
6,489 檢視
Still fails with 2022.1.0
James_T_Intel
主席
6,453 檢視

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


FortranFan
榮譽貢獻者 III
6,373 檢視

@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. 

 

James_T_Intel
主席
6,365 檢視

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.


MehdiChinoune
新貢獻者 I
5,999 檢視

Fixed in 2022.2.0

回覆