DO CONCURRENT: compiler flags to enable parallelization

I summarized some do concurrent related information in this thread and thought it is worth reposting here:

Multi-threaded do concurrent (CPU)

Compiler Parallel flag Information Number of threads Underlying implementation
gfortran -ftree-parallelize-loops=n -fopt-info-loop using the parallel flag OpenMP/pthreads
nvfortran -stdpar=multicore -Minfo=stdpar,accel ACC_NUM_CORES OpenACC
ifort (deprecated) -parallel -qopt-report -qopt-report-phase=par OMP_NUM_THREADS, -par-num-threads=n OpenMP
ifx -qopenmp -qopt-report OMP_NUM_THREADS OpenMP
CCE ftn (Cray/HPE) -h thread_do_concurrent ? ? ?
AMD flang -fopenmp ? OMP_NUM_THREADS OpenMP

The OpenMP environment variables can also be used to control processor affinity. This is also the case for nvfortran, which responds to OMP_PROC_BIND and OMP_PLACES, because OpenACC doesn’t have variables for thread-to-core binding.

Resources

PS: I’ve made this a Wiki post, so feel free to add missing information.

6 Likes