Page 1 of 1

Issue compiling OpenACC + OpenMP

Posted: Mon Aug 12, 2024 2:48 am
by aohara
I am currently trying to compile VASP 6.4.3 with both OpenACC GPU and OpenMP support. I have already successfully built the OpenACC version using nvhpc 22.7 containing cuda 11.7 via nvompi. The cluster has both FFTW and ScaLAPACK modules built.

The version with only OpenACC compiles fine and I've able to test and use it.

When trying to compile the OpenACC + OpenMP, I followed the makefile.include.nvhpc_omp_acc to update my working makefile to include the CPP flag -D_OPENMP flag, and the -mp flag to CC, FC, and FCL lines as well as -lfftw3_omp to the LLIBS line for FFTW.

However, when compiling, I get the following error when it gets to chi_base.f90:
NVFORTRAN-S-1062-Support procedure called within a compute region - __kmpc_threadprivate_cached (chi_base.f90: 6767)
0 inform, 0 warnings, 1 severes, 0 fatal for empty_xi_orbital
NVFORTRAN-S-1062-Support procedure called within a compute region - __kmpc_threadprivate_cached (chi_base.f90: 6840)
0 inform, 0 warnings, 1 severes, 0 fatal for filled_xi_orbital

Is there any advice available from the community or VASP group as to what I might need to do to fix this? Thank you for your help.

Re: Issue compiling OpenACC + OpenMP

Posted: Mon Aug 12, 2024 6:21 am
by manuel_engel1
Hi,

Thanks for reaching out. Could you please attach the makefile.include and the full compiler log so that I can have a look at it?

Re: Issue compiling OpenACC + OpenMP

Posted: Mon Aug 12, 2024 9:00 pm
by aohara
Manuel,

Certainly. I've attached 3 files. The list of loaded modules (which I know can be different on different machines and may not reveal the full environment, but if something obvious looks missing I thought it might help) as well as the makefile.include I'm using for OpenACC + OpenMP and the full compiler log.
Let me know if there is any other additional information that I can provide that may be of help.

Thanks again.

Re: Issue compiling OpenACC + OpenMP

Posted: Tue Aug 13, 2024 12:58 pm
by manuel_engel1
Thanks for sharing the files. I quickly tested compilation with the bundled VASP 6.4.3 makefile.include.nvhpc_omp_acc and with the makefile.include you have provided. Both succeeded on my end with our internal toolchain (nvhpc-sdk/22.11 with cuda 11.8 ). The compiler and preprocessor invocations look identical to yours, so there is no obvious fault with the configuration or environment.

Did you start the compilation that failed in a clean VASP directory? Build artifacts from previous compilation can sometimes cause some trouble. To completely clean/reset the build directory, run

Code: Select all

make veryclean
Do you have access to more recent compiler versions that you could test? The error you encounter hints at a conflict between OpenACC and OpenMP that the compiler cannot deal with. It might have been patched in more recent versions.

Re: Issue compiling OpenACC + OpenMP

Posted: Thu Aug 15, 2024 3:05 pm
by aohara
Thank you for checking. I did do it from a clean VASP directory. My guess is that it is likely a compiler issue as you suggest. I currently don't have access to a newer stack on these machines, but I plan to send an inquiry to the system administrators about their upgrade plans.