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

ID 767251
Date 3/22/2024
Public

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

Document Table of Contents

coarray, Qcoarray

Enables the coarray feature.

Syntax

Linux:

-coarray[=keyword]

Windows:

/Qcoarray[:keyword]

Arguments

keyword

Specifies the memory system where the coarrays will be implemented. Possible values are:

shared

Indicates that multiple images will be created. This is the default.

single

Indicates a configuration where the image does not contain self-replication code. This results in an executable with a single running image.

This configuration can be useful for debugging purposes, even though there are no inter-image interactions.

Default

OFF

Coarrays are not enabled unless you specify this option.

Description

This option enables the coarray features first introduced in the Fortran 2008 Standard. It enables any coarray syntax in your program. If this option is not specified, coarray syntax is rejected.

It also tells the driver to link against appropriate libraries, and to create the appropriate executables.

Keywords can be specified multiple times; however, if keyword single is specified anywhere on the command line, it takes precedence.

You can specify option [Q]coarray-num-images to specify the default number of images that can be used to run a coarray executable. If you do not specify that option, you get the number of execution units on the current system.

You can specify the [Q]coarray-config-file option to specify the name of a Message Passing Interface (MPI) configuration file.

Options [Q]coarray-num-images and [Q]coarray-config-file are valid for all keyword values.

NOTE:

Coarrays are only supported on 64-bit architectures.

IDE Equivalent

Visual Studio: Language > Enable Coarrays

Alternate Options

None

Examples

The following command runs a coarray program using n images:

/Qcoarray /Qcoarray-num-images:n          ! Windows systems 
-coarray -coarray-num-images=n            ! Linux systems

The following command runs a coarray program using the MPI configuration file specified by filename:

/Qcoarray /Qcoarray-config-file:filename        ! Windows systems
-coarray -coarray-config-file=filename          ! Linux systems

The following command illustrates precedence:

Linux* systems:

-coarray=single –coarray=shared               ! single takes precedence; single always takes precedence

Windows* systems:

/Qcoarray:single /Qcoarray:shared             ! single takes precedence; single always takes precedence