Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-21313003-EABA-47C0-977A-69C1254FBD11
Visible to Intel only — GUID: GUID-21313003-EABA-47C0-977A-69C1254FBD11
COMPILER_VERSION
Module Intrinsic Inquiry Function: Returns a string containing the name and version number of the compiler used for compilation.
USE ISO_FORTRAN_ENV
result = COMPILER_VERSION( )
The result is a scalar of type default character of processor-defined length.
The return value contains the name and version number of the compiler used for compilation.
Consider the following file named t.f90:
use ISO_FORTRAN_ENV character (len = :), allocatable :: res res = compiler_version () print *, "len of res is: ", len (res) print *, "('<<', A, '>>')", res deallocate (res) close (1) end
The following is the output:
Linux
Lin$ ifort -o t.out -warn alignments -assume writeable-strings t.f90 Lin$ ./t.out len of res is: 202 <<Intel(R) Fortran Intel(R) architecture Compiler for applications running on Intel(R) architecture, Version version Built date-and-time by user on platform in directory>> Lin$
Windows
Win>ifort /exe:t /warn:alignments /assume:writeable-strings t.f90 Intel(R) Visual Fortran Compiler for applications running on architecture, Version version Built date-and-time by user on platform in directory Copyright (C) 1985-2016 Intel Corporation. All rights reserved. Microsoft (R) Incremental Linker Version version Copyright (C) Microsoft Corporation. All rights reserved. -out:t.exe -subsystem:console t.obj Win> t.exe len of res is: 184 <<Intel(R) Visual Fortran Compiler for applications running on architecture, Version version Built date-and-time by user on platform in directory>> Win>