Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29487 Discussions

Best Practices for Optimizing Fortran Code with Intel Compiler on Modern CPUs

Hedda11
Beginner
230 Views

Hi all — I’ve been using the Intel Fortran Compiler for a few projects and want to get better performance out of my scientific code on newer Intel CPUs. What optimization flags, compiler settings, or profiling tools are you using to squeeze out extra performance? Any tips on auto-vectorization or cache-friendly coding patterns would be really helpful!

Thanks in advance!

0 Kudos
2 Replies
PGC
Novice
185 Views

Attached is a program that compares calculating Pi using Serial, Parallel OpenMP, and Parallel Do Concurrent. The best approach I have found so far is to use these settings:

Optimization: /O3
Intel Processor-Specific Optimization: /QxCORE-AVX2
Add Processor-Optimized Code Path: /QaxCORE-AVX512)
Maximize AVX512 usage if it is available: /Qopt-zmm-usage:high
Enable OpenMP: /fpp /Qopenmp

I find results will vary depending on the compiler and the cpu.

I too am interested in what others are doing to make their code faster.

 

PGC_0-1771107743893.png

 

0 Kudos
Reply