Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

assume

Tells the compiler to make certain assumptions.

Syntax

Linux:

-assume keyword[, keyword...]

macOS:

-assume keyword[, keyword...]

Windows:

/assume:keyword[, keyword...]

Arguments

keyword

Specifies the assumptions to be made. Possible values are:

none

Disables all assume options.

[no]bscc

Determines whether the backslash character is treated as a C-style control character syntax in character literals.

[no]buffered_io

Determines whether data is immediately read from or written to disk or accumulated in a buffer. For variable length, unformatted files, determines whether data is buffered on input or read directly from disk to user variables.

[no]buffered_stdout

Determines whether data is immediately written to the standard output device or accumulated in a buffer.

[no]byterecl

Determines whether units for the OPEN statement RECL specifier (record length) value in unformatted files are in bytes or longwords (four-byte units).

[no]cc_omp

Determines whether conditional compilation as defined by the OpenMP Fortran API is enabled or disabled.

[no]contiguous_assumed_shape

Determines whether contiguity is assumed for assumed-shape dummy arguments.

[no]contiguous_pointer

Determines whether contiguity is assumed for pointers.

[no]dummy_aliases

Determines whether the compiler assumes that dummy arguments to procedures share memory locations with other dummy arguments or with COMMON variables that are assigned.

[no]failed_images

Determines whether the runtime system checks for failed images on a team of images when executing image control statements without a STAT= specifier, or when executing a call to MOVE_ALLOC or a collective or atomic subroutine that does not specify a STAT argument.

[no]fpe_summary

Determines whether a floating-point exceptions summary is displayed when a STOP or ERROR STOP statement is encountered.

[no]ieee_compares

Determines whether floating-point comparison operations are performed as IEEE signaling operations.

[no]ieee_fpe_flags

Determines whether the floating-point exception and status flags are saved on routine entry and restored on routine exit.

[no]minus0

Determines whether the compiler uses Fortran 2003 or Fortran 90/77 standard semantics in the SIGN intrinsic when treating -0.0 and +0.0 as 0.0, and how it writes the value on formatted output.

[no]nan_compares

Determines whether code for floating-point comparison operations involving NaNs is generated, or if the compiler can generate a faster code sequence because it assumes no NaNs will be encountered.

[no]old_boz

Determines whether the binary, octal, and hexadecimal constant arguments in intrinsic functions INT, REAL, DBLE, and CMPLX are treated as signed integer constants.

[no]old_e0g0_format

Determines whether Fortran 2018 rules are used to format floating-point numbers that have G0.0 or E0 or ES0 format edit descriptors.

[no]old_inquire_recl

Determines the value of the RECL= specifier on an INQUIRE statement for an unconnected unit or a unit connected for stream access.

Prior to Fortran 2018, this behavior was undefined (ifort used the value 0 for an unconnected file). Fortran 2018 specifies that the scalar-int-variable in the RECL= specifier becomes defined with -1 if the file is unconnected, and -2 if the file is connected for stream access.

[no]old_ldout_format

Determines the output of integer and real values in list-directed and namelist-directed output.

[no]old_ldout_zero

Determines the format of a floating-point zero produced by list-directed output. old_ldout_zero uses exponential format; noold_ldout_zero uses fractional format.

[no]old_logical_assign

Determines the behavior in assignment statements of logical values assigned to numeric variables and numeric values assigned to logical variables.

[no]old_logical_ldio

Determines whether NAMELIST and list-directed input accept logical values for numeric IO-list items and numeric values for logical IO-list items.

[no]old_maxminloc

Determines the results of intrinsics MAXLOC and MINLOC when given an empty array as an argument or every element of the mask is false.

[no]old_unit_star

Determines whether unit * is treated the same as units 5 and 6, or is distinct.

[no]old_xor

Determines whether .XOR. is defined by the compiler as an intrinsic operator.

[no]protect_allocates

Determines whether memory allocation requests using the ALLOCATE statement are protected with critical sections to avoid random timing problems in a multi-threaded environment.

[no]protect_constants

Determines whether a constant actual argument or a copy of it is passed to a called routine.

[no]protect_parens

Determines whether the optimizer honors parentheses in REAL and COMPLEX expression evaluations by not reassociating operations.

[no]realloc_lhs

Determines whether the compiler uses the current Fortran Standard rules or the old Fortran 2003 rules when interpreting assignment statements.

[no]recursion

Determines whether procedures are compiled for recursion by default.

[no]source_include

Determines whether the compiler searches for USE modules and INCLUDE files in the default directory or in the directory where the source file is located.

[no]std_intent_in

Determines whether the compiler assumes that dummy arguments with the INTENT(IN) attribute in a called procedure are not modified across a call, in accordance with the Fortran standard.

[no]std_minus0_rounding

Determines whether to display a negative value that is not zero but rounds to zero on output with a leading minus sign.

[no]std_mod_proc_name

Determines whether the names of module procedures are allowed to conflict with user external symbol names.

[no]std_value

Determines whether the VALUE attribute has the effect as if the actual argument is assigned to a temporary, and the temporary is then passed to the called procedure so that subsequent changes to the value of the dummy argument do not affect the actual argument, in accordance with the Fortran standard.

[no]underscore

Determines whether the compiler appends an underscore character to external user-defined names.

[no]2underscores
(Linux and macOS)

Determines whether the compiler appends two underscore characters to external user-defined names.

[no]writeable-strings

Determines whether character constants go into non-read-only memory.

Default

nobscc

The backslash character is treated as a normal character in character literals.

nobuffered_io

Data in the internal buffer is immediately read from or written (flushed) to disk (OPEN specifier BUFFERED='NO'). Data read from variable length, unformatted files is read directly from disk to a user's variables.

If you set the FORT_BUFFERED environment variable to true, the default is assume buffered_io.

nobuffered_stdout

Data is not buffered for the standard output device but instead is written immediately to the device.

nobyterecl

Units for OPEN statement RECL values with unformatted files are in four-byte (longword) units.

nocc_omp

Conditional compilation as defined by the OpenMP Fortran API is disabled unless option [q or Q]openmp is specified.

If compiler option [q or Q]openmp is specified, the default is assume cc_omp.

nocontiguous_assumed_shape

Contiguity is not assumed for assumed-shape dummy arguments.

nocontiguous_pointer

Contiguity is not assumed for pointers.

nodummy_aliases

Dummy arguments to procedures do not share memory locations with other dummy arguments or with variables shared through use association, host association, or common block use.

nofailed_images

When an image executes an image control statement without a STAT= specifier, or when executing a MOVE_ALLOC or collective or atomic subroutine without a STAT argument, the runtime system does not explicitly check for failed images on the current team.

nofpe_summary

Suppresses a summary of floating-point exceptions from being displayed when a STOP or ERROR STOP statement is encountered.

noieee_compares

Floating-point comparison operations are not performed using IEEE signaling compares.

noieee_fpe_flags

The flags are not saved on routine entry and they are not restored on routine exit.

nominus0

The compiler uses Fortran 90/77 standard semantics in the SIGN intrinsic to treat -0.0 and +0.0 as 0.0, and writes a value of 0.0 with no sign on formatted output.

nan_compares

Code is generated for floating-point compares to check for NaNs and give the same results as are performed when assume ieee_compares is specified, except a compare to a signaling NaN behaves as if it was a quiet NaN.

noold_boz

The binary, octal, and hexadecimal constant arguments in intrinsic functions INT, REAL, DBLE, and CMPLX are treated as bit strings that represent a value of the data type of the intrinsic, that is, the bits are not converted.

old_e0g0_format

Formats output for the G0.0, E0 and ES0 edit descriptors as it did prior to conforming to the Fortran 2018 standard. G0.0 does not use the minimal width needed for a real value.

This setting causes the runtime to always remove the exponent letter E from the output for real values produced with the E0 and ES0 format edit descriptors.

old_inquire_recl

The scalar-int-variable in a RECL= specifier of an INQUIRE statement for an unconnected unit becomes defined with the value 0; if the unit is connected for stream access, the value is undefined.

old_ldout_format

For list-directed and namelist-directed output, integers are written with a fixed width that is dependent on the integer kind, and zero real values are written using the E format.

old_ldout_zero

For list-directed output of a floating-point zero, exponential format is used instead of fractional output.

noold_logical_assign

In the assignment statement L = N, where L is a logical variable and N is a numeric value, N is converted to integer if necessary, and L is assigned the value .FALSE. if the integer value is 0, and .TRUE. if the integer value is -1 or 1 according to the setting of the compiler option fpscomp logicals.

In the assignment statement N = L, where N is a variable of numeric type and L is a logical value, if L is .FALSE., N is assigned the value 0, converted, if necessary, to the type of N. If L is .TRUE., N is assigned the value 1 or -1, converted, if necessary, to the type of N, according to the setting of the compiler option fpscomp logicals.

The compiler option fpscomp logicals specifies that non-zero values are treated as true and zero values are treated as false. The literal constant .TRUE. has an integer value of 1 and the literal constant .FALSE. has an integer value of 0.

The default is fpscomp nologicals, which specifies that odd integer values (low bit one) are treated as true and even integer values (low bit zero) are treated as false. The literal constant .TRUE. has an integer value of -1 and the literal constant .FALSE. has an integer value of 0.

noold_logical_ldio

Tells the compiler that NAMELIST and list-directed input cannot accept logical values (T, F, etc.) for numeric (integer, real, and complex) IO-list items or numeric values for logical IO-list items. If this option is specified and a logical value is given for a numeric item or a numeric value is given for a logical item in NAMELIST and list-directed input, a runtime error will be produced.

old_maxminloc

MAXLOC and MINLOC return 1 when given an empty array as an argument or every element of the mask is false.

old_unit_star

The READs or WRITEs to UNIT=* go to stdin or stdout, respectively, even if UNIT=5 or 6 has been connected to another file.

old_xor

Intrinsic operator .XOR. is defined by the compiler.

noprotect_allocates

Memory allocation requests using the ALLOCATE statement are not protected with critical sections and may encounter random timing problems in a multi-threaded environment.

protect_constants

A constant actual argument is passed to a called routine. Any attempt to modify it results in an error.

noprotect_parens

The optimizer reorders REAL and COMPLEX expressions without regard for parentheses by reassociating operations if it produces faster executing code.

realloc_lhs

Tells the compiler that when the left-hand side of an assignment is an allocatable object, it should be reallocated to the shape of the right-hand side of the assignment before the assignment occurs. This is the current Fortran Standard definition. This feature may cause extra overhead at runtime. The option standard-realloc-lhs has the same effect as assume realloc_lhs.

norecursion

Tells the compiler that all procedures are not compiled for recursion, unless declared with the RECURSIVE keyword. Fortran 2018 specifies the default mode of compilation is recursion; previous standards specified no recursion. This default will change in a future release.

source_include

The compiler searches for USE modules and INCLUDE files in the directory where the source file is located.

std_intent_in

The compiler assumes that dummy arguments with the INTENT(IN) attribute in a called procedure are not modified across a call, in accordance with the Fortran standard.

std_minus0_rounding

A negative value that is not zero but rounds to zero on output is displayed with a leading minus sign. For example, the value -0.00000001 in F5.1 format will be displayed as -0.0 rather than as 0.0.

nostd_mod_proc_name

The compiler allows the names of module procedures to conflict with user external symbol names.

std_value

The compiler assumes that the VALUE attribute has the effect as if the actual argument is assigned to a temporary, and the temporary is then passed to the called procedure so that subsequent changes to the value of the dummy argument do not affect the actual argument, in accordance with the Fortran standard.

Windows: nounderscore
Linux and macOS: underscore

On Windows* systems, the compiler does not append an underscore character to external user-defined names. On Linux* and macOS systems, the compiler appends an underscore character to external user-defined names.

no2underscores
(Linux and macOS)

The compiler does not append two underscore characters to external user-defined names that contain an embedded underscore.

nowriteable-strings

The compiler puts character constants into read-only memory.

Description

This option specifies assumptions to be made by the compiler.

Option

Description

assume none

Disables all the assume options.

assume bscc

Tells the compiler to treat the backslash character (\) as a C-style control (escape) character syntax in character literals. The "bscc" keyword means "BackSlashControlCharacters."

assume buffered_io

Tells the compiler to accumulate records in a buffer. This sets the default for opening sequential files to BUFFERED='YES', which also occurs if the FORT_BUFFERED runtime environment variable is specified.

When this option is specified, the internal buffer is filled, possibly by many record input statements (READ) or output statements (WRITE), before it is read from disk, or written to disk, by the Fortran runtime system. If a file is opened for direct access, I/O buffering is ignored.

Using buffered reads and writes usually makes disk I/O more efficient by handling larger blocks of data on disk less often. However, if you request buffered writes, records not yet written to disk may be lost in the event of a system failure.

The OPEN statement BUFFERED specifier applies to a specific logical unit. In contrast, the assume [no]buffered_io option and the FORT_BUFFERED environment variable apply to all Fortran units.

assume buffered_stdout

Tells the Fortran runtime system to accumulate data for the standard output device in a buffer. When the buffer is full or the user executes a FLUSH on OUTPUT_UNIT in intrinsic module ISO_FORTRAN_ENV, the data is displayed on the standard output unit.

Using buffered writes may be a more efficient in time and space but use assume nobuffered_stdout if you want data displayed immediately on the standard output device, like for an input prompt.

assume [no]buffered_stdout does not affect and is not affected by assume [no]buffered_io.

After compiling with this option, the default blocksize for stdout is 8 KB.

assume byterecl

Specifies that the units for the OPEN statement RECL specifier (record length) value are in bytes for unformatted data files, not longwords (four-byte units). For formatted files, the RECL value is always in bytes.

If a file is open for unformatted data and assume byterecl is specified, INQUIRE returns RECL in bytes; otherwise, it returns RECL in longwords. An INQUIRE returns RECL in bytes if the unit is not open.

assume cc_omp

Enables conditional compilation as defined by the OpenMP Fortran API. That is, when "!$space" appears in free-form source or "c$spaces" appears in column 1 of fixed-form source, the rest of the line is accepted as a Fortran line.

assume contiguous_assumed_shape

Tells the compiler to assume contiguity for assumed-shape dummy arguments. This may aid in optimization. However, if you are mistaken about the contiguity of your data, it could result in runtime failures.

assume contiguous_pointer

Tells the compiler to assume contiguity for pointers. This may aid in optimization. However, if you are mistaken about the contiguity of your data, it could result in runtime failures.

assume dummy_aliases

Tells the compiler that dummy (formal) arguments to procedures share memory locations with other dummy arguments (aliases) or with variables shared through use association, host association, or common block use.

Specify the option when you compile the called subprogram. The program semantics involved with dummy aliasing do not strictly obey Standard Fortran and they slow performance, so you get better runtime performance if you do not use this option.

However, if a program depends on dummy aliasing and you do not specify this option, the runtime behavior of the program will be unpredictable. In such programs, the results will depend on the exact optimizations that are performed. In some cases, normal results will occur, but in other cases, results will differ because the values used in computations involving the offending aliases will differ.

assume failed_images

Tells the runtime system to check for failed images on the current team when executing an image control statement that does not have a STAT= specifier, or when a MOVE_ALLOC or collective or atomic subroutine without a STAT argument is executed.

A failed image check is made each time an image control statement that has a STAT= specifier is executed, and when a call to MOVE_ALLOC or a collective or atomic subroutine with a STAT argument is executed.

assume fpe_summary

Causes a summary of floating-point exceptions that occurred during program execution to be displayed when a STOP or ERROR STOP statement is encountered. Counts will be shown for each exception. This is the behavior specified by the Fortran 2003 standard.

Note that if there is no STOP or ERROR STOP statement, no summary is displayed.

assume ieee_compares

Tells the compiler to generate IEEE signaling comparison operations for the binary floating-point comparison operators.

assume ieee_fpe_flags

Tells the compiler to save floating-point exception and status flags on routine entry and restore them on routine exit.

This option can slow runtime performance because it provides extra code to save and restore the floating-point exception and status flags (and the rounding mode) on entry to and exit from every routine compiled with the option.

This option can be used to get the full Fortran Standard behavior of intrinsic modules IEEE EXCEPTIONS, IEEE ARITHMETIC, and IEEE FEATURES, which require that if a flag is signaling on routine entry, the processor will set it to quiet on entry and restore it to signaling on return. If a flag signals while the routine is executing, it will not be set to quiet on routine exit.

Options fpe and fpe-all can be used to set the initial state for which floating-point exceptions will signal.

assume minus0

Tells the compiler to use Fortran 95 standard semantics for the treatment of the IEEE* floating value -0.0 in the SIGN intrinsic, which distinguishes the difference between -0.0 and +0.0, and to write a value of -0.0 with a negative sign on formatted output.

assume nancompares

Tells the compiler to generate code for floating-point exceptions using an ieee_compare comparison code sequence such that compares to a NaN get correct answers. Signaling NaNs behave like quiet NaNs. Specifiying nonan_compares tells the compiler that floating-point compares will not involve NaN operands, which allows a faster code sequence to be generated, but will give undefined behavior if an operand in a floating-point comparison is a NaN.

assume old_boz

Tells the compiler that the binary, octal, and hexadecimal constant arguments in intrinsic functions INT, REAL, DBLE, and CMPLX should be treated as signed integer constants.

assume noold_e0g0_format

Tells the compiler to use Fortran 2018 standard format for real numbers that are output using the G0.0, E0, and ES0 edit descriptors.

assume noold_inquire_recl

Tells the compiler to use Fortran 2018 semantics for RECL= on an INQUIRE statement. If the unit is unconnected, the scalar-int-variable of the RECL= specifier becomes defined with the value -1; if the unit is connected for stream access, it becomes defined with the value -2.

assume noold_ldout_format

Tells the compiler to use Fortran 2003 standard semantics for output of integer and real values in list-directed and namelist-directed output.

Integers are written using an I0 format with a leading blank for spacing.

Real and complex values are written using and E or F format with a leading blank for spacing. The format used depends on the magnitude of the value. Values that are zero are written using an F format.

assume noold_ldout_zero

For list-directed output of a floating-point zero, fractional format is used instead of exponential output.

Early versions of the Fortran standard specified exponential format should be used for list-directed output of a floating-point zero value. Newer versions of the standard specify that fractional format should be used.

assume old_logical_assign

In the assignment statement L = N, where L is a logical variable and N is a numeric value, N is converted to integer if necessary, and L is assigned the bit value of the integer value without conversion.

In the assignment statement N = L, where N is a variable of numeric type and L is a logical value, N is assigned the bit value of the value of L without conversion.

assume old_logical_ldio

Logical values are allowed for numeric items and numeric values are allowed for logical items.

assume noold_maxminloc

Tells the compiler that MAXLOC and MINLOC should return 0 when given an empty array as an argument or every element of the mask is false. Compared to the default setting (old_maxminloc), this behavior may slow performance because of the extra code needed to check for an empty array argument or for an all-false mask.

assume noold_unit_star

Tells the compiler that READs or WRITEs to UNIT=* go to the file to which UNIT=5 or 6 is connected.

assume noold_xor

Prevents the compiler from defining .XOR. as an intrinsic operator. This lets you use .XOR. as a user-defined operator. This is a Fortran 2003 feature.

assume protect_allocates

Memory allocation requests using the ALLOCATE statement are protected with critical sections to avoid random timing problems in a multi-threaded environment in some distributions and configurations.

assume noprotect_constants

Tells the compiler to pass a copy of a constant actual argument. This copy can be modified by the called routine, even though the Fortran standard prohibits such modification. The calling routine does not see any modification to the constant.

assume protect_parens

Tells the optimizer to honor parentheses in REAL and COMPLEX expression evaluations by not reassociating operations. For example, (A+B)+C would not be evaluated as A+(B+C).

If assume noprotect_parens is specified, (A+B)+C would be treated the same as A+B+C and could be evaluated as A+(B+C) if it produced faster executing code.

Such reassociation could produce different results depending on the sizes and precision of the arguments.

For example, in (A+B)+C, if B and C had opposite signs and were very large in magnitude compared to A, A+B could result in the value as B; adding C would result in 0.0. With reassociation, B+C would be 0.0; adding A would result in a non-zero value.

assume norealloc_lhs

The compiler uses the old Fortran 2003 rules when interpreting assignment statements. The left-hand side is assumed to be allocated with the correct shape to hold the right-hand side. If it is not, incorrect behavior will occur. The option nostandard-realloc-lhs has the same effect as assume norealloc_lhs.

assume recursion

Tells the compiler to compile procedures that are declared without the RECURSIVE or NON_RECURSIVE keyword as recursive procedures. In Fortran 2018, these procedures are compiled for recursion by default; in previous standards they were compiled as non-recursive procedures. The current default behavior is non-recursive. This will change in a future release.

assume nosource_include

Tells the compiler to search the default directory for module files specified by a USE statement or source files specified by an INCLUDE statement. This option affects fpp preprocessor behavior and the USE statement.

assume nostd_intent_in

Tells the compiler to assume that dummy arguments with the INTENT(IN) attribute in a called procedure may be modified across a call. This is not in accordance with the Fortran standard.

If you specify option standard_semantics, it sets option assume std_intent_in.

assume nostd_minus0_rounding

Tells the compiler to use pre-Fortran 2008 standard semantics for the treatment of IEEE* floating values that are negative, non-zero, and when rounded for display are zero. The value should be printed without a leading minus sign.

For example, the floating value -0.00000001 when rounded in F5.1 format will be displayed as 0.0. Use assume std_minus0_rounding to use Fortran 2008 standard semantics to display this value as -0.0 when rounded in F5.1 format.

assume [no]std_minus0_rounding does not affect and is not affected by assume [no]minus0. The former controls printing of a minus sign for non-zero numbers while the latter controls printing of actual signed zero values.

assume std_mod_proc_name

Tells the compiler to revise the names of module procedures so they do not conflict with user external symbol names. For example, procedure proc in module m would be named m_MP_proc. The Fortran 2003 Standard requires that module procedure names not conflict with other external symbols.

By default, procedure proc in module m would be named m_mp_proc, which could conflict with a user-defined external name m_mp_proc.

assume nostd_value

Tells the compiler to use pre-Fortran 2003 standard semantics for the VALUE attribute so that the value of the actual argument is passed to the called procedure, not the address of the actual argument nor the address of a copy of the actual argument.

assume underscore

Tells the compiler to append an underscore character to external user-defined names: the main program name, named common blocks, BLOCK DATA blocks, global data names in MODULEs, and names implicitly or explicitly declared EXTERNAL. The name of a blank (unnamed) common block remains _BLNK__, and Fortran intrinsic names are not affected.

assume 2underscores
(Linux and macOS)

Tells the compiler to append two underscore characters to external user-defined names that contain an embedded underscore: the main program name, named common blocks, BLOCK DATA blocks, global data names in MODULEs, and names implicitly or explicitly declared EXTERNAL. The name of a blank (unnamed) common block remains _BLNK__, and Fortran intrinsic names are not affected.

This option does not affect external names that do not contain an embedded underscore. By default, the compiler only appends one underscore to those names. For example, if you specify assume 2underscores for external names my_program and myprogram, my_program becomes my_program__, but myprogram becomes myprogram_.

assume writeable-strings

Tells the compiler to put character constants into non-read-only memory.

IDE Equivalent

Visual Studio: Code Generation > Enable Recursive Routines (/assume:[no]recursion)

Compatibility > Treat Backslash as Normal Character in Strings (/assume:[no]bscc)

Data > Assume Dummy Arguments Share Memory Locations (/assume:dummy_aliases)

Data > Constant Actual Arguments Can Be Changed (/assume:noprotect_constants)

Data > Use Bytes as RECL=Unit for Unformatted Files (/assume:byterecl)

External Procedures > Append Underscore to External Names (/assume:underscore)

Floating Point > Enable IEEE Minus Zero Support (/assume:minus0)

Optimization > I/O Buffering (/assume:buffered_io)

Preprocessor > Default Include and Use Path (/assume:nosource_include)

Preprocessor > OpenMP Conditional Compilation (/assume:nocc_omp)

Alternate Options

assume nobscc

Linux and macOS: -nbs

Windows: /nbs

assume dummy_aliases

Linux and macOS: -common-args

Windows: /Qcommon-args

assume protect_parens

Linux and macOS: -fprotect-parens

Windows: /Qprotect-parens

assume realloc_lhs

Linux and macOS: -standard-realloc-lhs

Windows: /standard-realloc-lhs

assume recursion

Linux and macOS: -recursive

Windows: /recursive

See Also