Page 1 of 1

Compilation Error when OpenMP is enabled

Posted: Mon Dec 30, 2024 11:10 am
by LimJiaYang

Dear VASP community

I am compiling vasp.6.4.2 using Intel OneAPI v2025.0. Attached is the used makefile.include.

fock_glb.F(239): error #6683: A kind type parameter must be a compile-time constant. [OMP_LOCK_KIND]
!$ INTEGER(KIND=OMP_LOCK_KIND), POINTER :: OMP_LCK1(:),OMP_LCK2(:)
------------------^

Your kind assistance is much appreciated.


Re: Compilation Error when OpenMP is enabled

Posted: Wed Jan 08, 2025 9:57 am
by andreas.singraber

Hello!

I had a look at your makefile.include and I found some contradicting settings regarding the use of OpenMP. On the one hand you have the -qopenmp flag set in the FC variable which is needed for compiling with OpenMP support. But on the other hand you have not set -D_OPENMP in the CPP_OPTIONS and specified -qmkl=sequential in FCL which both points at not using OpenMP. This mixture leads to the error you encountered during compilation.

Please decide whether you intend to use OpenMP parallelization and then set the flags accordingly. To see the difference it is best to compare the files arch/makefile.include.intel and arch/makefile.include.intel_omp.

All the best,
Andreas Singraber