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

IFX and DO CONCURRENT

mstu
Beginner
540 Views

I can parallelize my fortran do concurrent code using '-fopenmp', but I am not able to do the same with the '-parallel' flag. Why could this be the case? When compiled with '-fopenmp' and setting OMP_NUM_THREADS=16, my code runs on 16 threads, but if I compile with '-parallel', it runs on a single thread. Is there a flag I maybe potentially missing?

Labels (1)
0 Kudos
8 Replies
Steve_Lionel
Honored Contributor III
483 Views

ifx does not support auto-parallel and the use of -parallel generates an "unknown option" error.

0 Kudos
mstu
Beginner
473 Views

The document indicates it should multithread DO CONCURRENT. parallel-qparallel . Is that incorrect?

0 Kudos
Steve_Lionel
Honored Contributor III
408 Views

Ah, sorry - you are right. Autoparallel is not supported, but parallelization of DO CONCURRENT is. However, this does not guarantee parallelization - you can ask for an optimization report to see whatr's blocking it.

0 Kudos
mstu
Beginner
380 Views

I compiled with `-qopt-report=1`, and it appears the DO CONCURRENT loops are vectorized, but when I run, everything runs on one core. I compile with:
`mpif90 -f90=ifx -c -O3 -xHost -parallel -fp-model precise -heap-arrays -qopt-report=1 -I/opt/psi/intel/extdeps/deps/hdf5/include -c hipft.f90 -o hipft.o`

`mpif90 -f90=ifx -O3 -xHost -parallel -fp-model precise -heap-arrays -qopt-report=1 -I/opt/psi/intel/extdeps/deps/hdf5/include hipft.o -L/opt/psi/intel/extdeps/deps/hdf5/lib -lhdf5_fortran -lhdf5hl_fortran -lhdf5 -lhdf5_hl -o hipft`

and then run with:

`mpirun -np 1 hipft hipft.in 1>hipft.log 2>hipft.err`

 

0 Kudos
Steve_Lionel
Honored Contributor III
348 Views

Vectorization is not multicore. The compiler may have decided that your DO CONCURRENT could be efficiently executed using vector instructions, which are a form of parallelization (data-parallel).

0 Kudos
mstu
Beginner
323 Views

Is there a command to tell it to do multicore instead of vector instructions, or is that not an option currently. 

 

0 Kudos
Steve_Lionel
Honored Contributor III
283 Views

Are you sure you want to do that? -no-vec (/Qvec-) will disable vectiorization. There may be reasons the compiler thinks multicore is either inefficient or may generate incorrect results.

0 Kudos
mstu
Beginner
247 Views

The code I am trying to parallelize if HipFT. The code is designed to run multicore. When `-fopenmp` is specified, the DO CONCURRENT loops are made multicore, but when `-parallel` is specified the DO CONCURRENT is not multicored. We wanted to test the performance difference between the two options, but it seems `-parallel` is not able to make the code multicore.

0 Kudos
Reply