Skip Navigation
Search

Vectorization Flags

To enable vectorization it is important to set specific flags for the compiler. There are also flags for causing the compiler to generate messages on what it did vectorize. Here the most important flags are given.

 

Cray

Arm

GNU

Fujitsu

Nvidia

  Flags
   Pre-23 CPE
CPE 23 and later:
(not applicable for Fortran)
default default  Traditional mode Clang mode
-Nclang
default
Optimization -O3 -O3
-O3 or -Ofast -O3 or -Ofast -Kfast -O3  -fast (check documentation)
Vectorization -h vector3 Automatic (if -O3 or -O2 flag is set) -mcpu=a64fx -armpl -mcpu=a64fx -KSVE -march=armv8.2-a+sve -tp=native (on a64fx node)
Vectorization report -h msgs -Rpass=loop-vectorize -Rpass=loop-vectorize -fopt-info-vec

-Koptmsg=2
-Nlst=t
(creates a *.lst file with optimization information)

-Minfo=vect
Report on missed optimization -h negmsgs -Rpass-analysis=loop-vectorize -Rpass-analysis=loop-vectorize -fopt-info-vec-missed    -Mneginfo
OpenMP -h omp -fopenmp -fopenmp -fopenmp -Kopenmp

-mp

-acc for OpenACC

Debugging -G 2 -ggdb
-ggdb -ggdb -g -g or -gopt (see documentation) 
Large memory -h pic -mcmodel=large -mcmodel=large -mcmodel=large -mcmodel=large -mcmodel=large 
Module CPE/version CPE/23.02(or newer)
arm-modules/version gcc/version

fujitsu/
compiler/version

nvidia/nvhpc-nompi/version 
  Compiler names
C cc
armclang gcc fcc nvc 
C++ CC
armclang++ g++ FCC nvc++ 
Fortran ftn
armflang gfortran frt nvfortran