You copied the Doc URL to your clipboard.

armflang for ifort Developers

The reference versions used in this guide are:

  • Intel Fortran Compiler 17.0.1

  • Arm Fortran Compiler 19.1

Invoking the compiler

The following table gives the equivalent Intel and Arm Compiler commands to invoke the Fortran compiler for preprocessing, compilation, assembly and linking.

Invoking the compiler

Intel

Arm

ifort <options> <filename>

armflang <options> <filename>

The following table gives the equivalent Intel and Arm Compiler commands to access compiler details and documentation.

Accessing version information and documentation

Intel

Arm

Version details

ifort --version

armflang --version

Help and documentation

ifort --help

man ifort

armflang --help

man armflang

Commonly used flags

The following table summarizes some of the compiler options most commonly used with the Intel Fortran compiler and gives the equivalent options to use with the Arm Fortran Compiler:

Intel and Arm Compiler equivalent options

Intel

Arm

Description

-c

-c

Run only preprocess, compile and assemble steps.

-o filename

-o filename

Write to output filename.

-g

-g

Generate source level debug information.

-warn all

-warn none

-Wall

-w

Enable all warnings.

Suppress all warnings.

-fpp

-nofpp

-cpp

-nocpp

Preprocess Fortran source files.

Do not preprocess Fortran source files.

Note

By default, source files with the extensions, .F, .F90, .F95, .F03 and .F08 are preprocessed. -cpp forces the compiler to use the processor for all source files.

-qopenmp

-fopenmp

Enable OpenMP.

See OpenMP support for Arm Fortran Compiler.

-module path

-module path

Specifies a directory to place and search for module files.

-On

-On

Level of optimization to use, where n=0,1,2,3.

See Optimization with the Arm Fortran Compiler.

-standard-realloc-lhs

-nostandard-realloc-lhs

-frealloc-lhs

-fno-realloc-lhs

-frealloc-lhs uses Fortran 2003 standard semantics for assignments to allocatables. An allocatable object on the left-hand side of an assignment is (re)allocated to match the dimensions of the right-hand side.

-fno-realloc-lhs uses pre-Fortran 2003 standard semantics for assignments to allocatables. The left-hand side of an allocatable assignment is assumed to be allocated with the correct dimensions. Incorrect behavior can occur if the left-hand side is not allocated with the correct dimensions.

Note

  • Default behavior in armflang versions 19.0+ supports the Fortran 2003 standard feature: (re)allocation on assignment. By default, earlier versions of armflang do not support this feature.

-convert big-endian -convert little-endian -convert native

-fconvert=big-endian

-fconvert=little-endian

-fconvert=native

-fconvert=swap

Swap the byte ordering for unformatted file access of numeric data to big endian from little endian, or the other way round.

armflang also provides options to set the byte order explicitly to big endian, little endian, or native.

Note

Default behavior is native.

-Dmacro=value

-Dmacro=value

Set macro to value.

-Ldirectory

-Ldirectory

Add directory to the include search path.

-llib

-llib

Search for the library lib when linking.

-real-size 64

-r8

-r8

Set the default KIND for real and complex declarations, constants, functions, and intrinsics to 64bit (such as real (KIND=8)).

Unspecified real kinds are evaluated as KIND=8.

-integer-size 64

-i8

-i8

Set the default kind for INTEGER and LOGICAL to 64bit (KIND=8).

-fpic

-fPIC

-fpic

-fPIC

Generate position independent code.

For more information on the use of -fpic and -fPIC on AArch64, see Note about building Position Independent Code PIC on AArch64.

Optimization compiler options

The following table summarizes some of the most commonly used compiler options provided by the Intel and Arm Fortran Compiler:

Commonly used optimization options

Description

Syntax

Notes

Basic optimization switches

-On

Optimization level where n=0,1,2,3. There is no direct correlation between the optimizations employed at each level between the two compilers.

At n=0, the compiler performs little or no optimization.

At n=3, the compiler performs aggressive optimization.

At n=2 and n=3, debug information might not be satisfactory because the mapping of object code to source code is not always clear and the compiler can perform optimizations that cannot be described in the debug information.

Aggressive optimization

-Ofast

Enables all -O3 optimizations from level 3 and performs aggressive optimization, which can violate strict language compliance.

With armflang, this is equivalent to:

  • Setting: -O3 -Menable-no-infs

    -Menable-no-nans

    -Menable-unsafe-fp-math

    -fno-signed-zeros -freciprocal-math

    -fno-trapping-math -ffp-contract=fast

    -ffast-math -ffinite-math-only

    -fstack-arrays

  • Unsetting: -fmath-errno

Fused floating-point operations

-ffp-contract=fast/off

Instructs armflang to perform fused floating-point operations, such as fused multiply adds.

  • fast = always on (default for -O1 and above)

  • off = never

Reduced floating-point precision

-ffast-math

-funsafe-math-optimizations

Allows aggressive, lossy, floating-point optimizations.

Allows reciprocal optimizations and does not honor trapping or signed zero.

Finite maths

-finite-maths-only

Enable optimizations that ignore the possibility of NaNs and Infs.

Handling backslash characters

The default behavior in armflang is for backlash () to be treated as a special character; this is not the case for ifort.

To make armflang match ifort's behavior, use -fno-backslash.

To make ifort match armflang's behavior use -assume bscc.

Was this page helpful? Yes No