Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
E77790.pdf
Скачиваний:
2
Добавлен:
16.05.2024
Размер:
1.29 Mб
Скачать

3.4 Options Reference

The compilers use fpp(1) to preprocess .F, .F95, or .F03 source files. This preprocessor is appropriate for Fortran. Previous versions used the standard C preprocessor cpp. To select cpp, specify -xpp=cpp.

3.4.168 –xprefetch[=a[,a]]

Enable prefetch instructions on those architectures that support prefetch.

See “2.3.1.7 The PREFETCH Directives” on page 34 for a description of the Fortran PREFETCH directives.

a must be one of the following:

auto

Enable automatic generation of prefetch instructions

no%auto

Disable automatic generation of prefetch instructions

explicit

Enable explicit prefetch macros

no%explicit

Disable explicit prefetch macros

latx:factor

(SPARC) Adjust the compiler’s assumed prefetch-to-load and prefetch-

 

to-store latencies by the specified factor. The factor must be a positive

 

floating-point or integer number.

 

If you are running computationally intensive codes on large

 

SPARC multiprocessors, you might find it advantageous to use -

 

xprefetch=latx:factor. This option instructs the code generator to

 

adjust the default latency time between a prefetch and its associated load

 

or store by the specified factor.

 

The prefetch latency is the hardware delay between the execution of a

 

prefetch instruction and the time the data being prefetched is available

 

in the cache. The compiler assumes a prefetch latency value when

 

determining how far apart to place a prefetch instruction and the load or

 

store instruction that uses the prefetched data.

Note - The assumed latency between a prefetch and a load may not be the same as the assumed latency between a prefetch and a store.

The compiler tunes the prefetch mechanism for optimal performance across a wide range of machines and applications. This tuning may not always be optimal. For memory-intensive applications, especially

148 Oracle Developer Studio 12.6: Fortran User's Guide • July 2017

3.4 Options Reference

applications intended to run on large multiprocessors, you may be able to obtain better performance by increasing the prefetch latency values. To increase the values, use a factor that is greater than 1. A value between .5 and 2.0 will most likely provide the maximum performance.

For applications with datasets that reside entirely within the external cache, you may be able to obtain better performance by decreasing the prefetch latency values. To decrease the values, use a factor that is less than 1.

To use the -xprefetch=latx:factor option, start with a factor value near 1.0 and run performance tests against the application. Then increase or decrease the factor, as appropriate, and run the performance tests again. Continue adjusting the factor and running the performance tests until you achieve optimum performance. When you increase or decrease the factor in small steps, you will see no performance difference for a few steps, then a sudden difference, then it will level off again.

yes

-xprefetch=yes is the same as

-xprefetch=auto,explicit

no

-xprefetch=no is the same as

-xprefetch=no%auto,no%explicit

With -xprefetch, -xprefetch=auto, and -xprefetch=yes, the compiler is free to insert prefetch instructions into the code it generates. This may result in a performance improvement on architectures that support prefetch.

3.4.168.1 Defaults:

If -xprefetch is not specified, -xprefetch=auto,explicit is assumed.

If only -xprefetch is specified, -xprefetch=auto,explicit is assumed.

If automatic prefetching is enabled, such as with -xprefetch or -xprefetch=yes, but a latency factor is not specified, then -xprefetch=latx:1.0 is assumed.

3.4.168.2 Interactions:

With -xprefetch=explicit, the compiler will recognize the directives:

-!$PRAGMA

SUN_PREFETCH_READ_ONCE (name)

Chapter 3 • Fortran Compiler Options

149

Соседние файлы в предмете Информационные и сетевые технологии