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

Using /stand:f18 with ISO_FORTRAN_ENV

Norman_K_
New Contributor I
2,019 Views

Dear all,

This may be a minor error, or it may be something a standards committee has not told us?

I hope the following program and comments are self explanatory.

program test_standf18
use, intrinsic :: iso_fortran_env
implicit none
print *, compiler_options()
print *, compiler_version()
end program test_standf18

! Windows 10
! Microsoft Visual Studio Community 2019 Version 16.7.3
!
! Compile and run "out of the box"
!Compiling with Intel(R) Visual Fortran Compiler 19.1.2.254 [Intel(R) 64]...
!test_standf18 - 0 error(s), 0 warning(s)
! program output:
! /nologo /debug:full /Od /warn:interfaces /module:x64\Debug\ /object:x64\Debug\
! /Fdx64\Debug\vc160.pdb /traceback /check:bounds /check:stack /libs:dll /threads
!  /dbglibs /c /Qlocation,link,C:\Program Files (x86)\Microsoft Visual Studio\201
! 9\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64 /Qm64
! Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(
! R) 64, Version 19.1.2.254 Build 20200623

! Note that VS reports compiler options as follows
!/nologo /debug:full /Od /warn:interfaces /module:"x64\Debug\\" /object:"x64\Debug\\" 
!/Fd"x64\Debug\vc160.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c
!
! OK, now add /stand:f18 to the compiler options:
!Compiling with Intel(R) Visual Fortran Compiler 19.1.2.254 [Intel(R) 64]...
!test_standf18.f90
!C:\...\test_standf18.f90(4): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_OPTIONS]
!C:\...\test_standf18.f90(5): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_VERSION]
!
! The output:
! /nologo /debug:full /Od /stand:f18 /warn:interfaces /module:x64\Debug\ /object:
! x64\Debug\ /Fdx64\Debug\vc160.pdb /traceback /check:bounds /check:stack /libs:d
! ll /threads /dbglibs /c /Qlocation,link,C:\Program Files (x86)\Microsoft Visual
!  Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64 /Qm64
! Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(
! R) 64, Version 19.1.2.254 Build 20200623

 

Why does adding compiler option /stand:f18 cause a warning to be issued in regard to both "compiler_options()" and "compiler_version()"

BW & stay safe

Norman

0 Kudos
1 Solution
Barbara_P_Intel
Moderator
1,724 Views

This unwarranted warning message using /stand:f8 (or in my case, -stand f18) is fixed in the Fortran compiler that was released last week, 2021.2.0.

$ ifort --version
ifort (IFORT) 2021.2.0 20210228
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.

$ ifort -stand f18 F2018.f90
$

Please give it a try.

View solution in original post

0 Kudos
13 Replies
andrew_4619
Honored Contributor II
2,014 Views

Probably because f2018 is only partially implemented at this point in time. That is not unusually f2003 took about 10 years! Things are getting better but mainly I think the standards guys are being more cautious/realistic. 

https://software.intel.com/content/www/us/en/develop/articles/intel-fortran-compiler-support-for-fortran-language-standards.html

0 Kudos
Steve_Lionel
Honored Contributor III
1,996 Views

I have seen many similar issues over the years. When a new standards checking option is provided, the compiler developers need to review all the checks to make sure they are still relevant. I don't recall how this bit is coded in the Intel compiler, but in the end it's just a minor compiler bug - please report it.

0 Kudos
FortranFan
Honored Contributor II
1,995 Views
.. Why does adding compiler option /stand:f18 cause a warning to be issued in regard to both "compiler_options()" and "compiler_version()" ..

A compiler bug?

That is what I think.  And I had filed a bug report when compiler 19.0 was released last year, Fall 2019.  It's still outstanding.

My take is Intel Fortran team introduced this bug when they tried to implement the Fortran 2018 feature that calls for, "A processor is required to report use of a .. nonstandard procedure from a standard intrinsic module."  They ended up marking the standard-specified procedures from the standard intrinsic module as nonstandard as well

 

0 Kudos
andrew_4619
Honored Contributor II
1,975 Views

So are we saying that f2018 is fully implemented now?

0 Kudos
FortranFan
Honored Contributor II
1,976 Views

As you would know, Intel Fortran team has long been implementing Fortran 2018 features: enhanced interoperability with C was among the first severl years ago.

Here's the list with 19.1 release: https://software.intel.com/content/www/us/en/develop/articles/intel-fortran-compiler-191-for-windows-release-notes-for-intel-parallel-studio-xe-2020.html#f18

You can look online for the prior major revision i.e., 19.0 - Intel doesn't make it easy to find things, do they!?  Plus the links keep changing.

Anyways, note the line in the Release Notes, "The compiler will now diagnose the use of nonstandard intrinsic procedures and modules as required by Fortran 2018" - as I mentioned earlier, my take is a bug with this implementation is what leads to the spurious warning listed by OP in the original post.

 

0 Kudos
Barbara_P_Intel
Moderator
1,969 Views

The Fortran compiler that is now in beta, completes our implementation of Fortran 2018.  Here are the Release Notes with the list of new F2018 features and instructions on how to download the beta compiler.

Please file a bug for anything amiss.

 

0 Kudos
Steve_Lionel
Honored Contributor III
1,960 Views

The beta compiler still shows this behavior:

D:\Projects>ifort /stand:f18 t.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 2021.1 Beta Build 20200602
Copyright (C) 1985-2020 Intel Corporation.  All rights reserved.

t.f90(4): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_OPTIONS]
print *, compiler_options()
---------^
t.f90(5): warning #7416: Fortran 2018 does not allow this intrinsic procedure.   [COMPILER_VERSION]
print *, compiler_version()
---------^

 

The instructions are to report bugs in this forum. So consider it duly reported!

0 Kudos
Barbara_P_Intel
Moderator
1,924 Views

I filed a bug, CMPLRIL0-33374.  I'll post more when there's a fix.

 

0 Kudos
magninv
Beginner
1,410 Views

Those warnings are still present in ifort and ifx with the -stand f08 option, although those functions are part of the Fortran 2008 standard:

$ ifx -stand f08 t.f90
t.f90(4): warning #7416: Fortran 2008 does not allow this intrinsic procedure.   [COMPILER_OPTIONS]
print *, compiler_options()
---------^
t.f90(5): warning #7416: Fortran 2008 does not allow this intrinsic procedure.   [COMPILER_VERSION]
print *, compiler_version()
---------^
$ ifort --version
ifort (IFORT) 2021.5.0 20211109
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.

$ ifx --version
ifx (IFORT) 2022.0.0 20211123
Copyright (C) 1985-2021 Intel Corporation. All rights reserved.

 The warnings disappear with the option -stand f18.

0 Kudos
Barbara_P_Intel
Moderator
1,321 Views

I just checked this with the Fortran compilers that are planned for release in April.  No warnings!  I don't have a clue what happened with that earlier release.

Stay tuned for the release that is part of oneAPI HPC Toolkit 2022.2.

Ron_Green
Moderator
1,321 Views

this gets fixed in the next update. Here's an advanced look using the IFX you will see in oneAPI 2022 Update 1, compiler 2022.1.0 

 

ifx -what -V -stand f08 t.f90

Intel(R) Fortran Compiler for applications running on Intel(R) 64, Version 2022.1.0 Build 20220317

Copyright (C) 1985-2022 Intel Corporation. All rights reserved.

 

 Intel(R) Fortran 22.0-1296

$ 

 

<post script> Spoke too soon.  Running the above, the return from compiler_version() says it's "... for IA-32" which it is most definitely NOT.  the IFX compiler is 64bit only.  CMPLRLIBS-33832 is the bug id so compiler_version() returns "... for Intel(R) 64"

andrew_4619
Honored Contributor II
1,906 Views

@ff thanks for the link. I had made a couple of searches previously and failed to find that link for f18 support. Things don't readily jump at you on the intel system and you often find broken links or out of date material. I think the constant changing of systems and locations make the google indexing task harder.

0 Kudos
Barbara_P_Intel
Moderator
1,725 Views

This unwarranted warning message using /stand:f8 (or in my case, -stand f18) is fixed in the Fortran compiler that was released last week, 2021.2.0.

$ ifort --version
ifort (IFORT) 2021.2.0 20210228
Copyright (C) 1985-2021 Intel Corporation.  All rights reserved.

$ ifort -stand f18 F2018.f90
$

Please give it a try.

0 Kudos
Reply