Compilation Error when OpenMP is enabled

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
LimJiaYang
Newbie
Newbie
Posts: 1
Joined: Tue Sep 17, 2024 8:29 am

Compilation Error when OpenMP is enabled

#1 Post by LimJiaYang » Mon Dec 30, 2024 11:10 am

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.

You do not have the required permissions to view the files attached to this post.

andreas.singraber
Global Moderator
Global Moderator
Posts: 246
Joined: Mon Apr 26, 2021 7:40 am

Re: Compilation Error when OpenMP is enabled

#2 Post by andreas.singraber » Wed Jan 08, 2025 9:57 am

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


Post Reply