Dear VASP team,
I'm not sure if this is a bug per se or a necessary consequence of adding the OpenMP off-loading for AMD/Intel GPUs. However, I have noticed a performance regression in using OpenACC+OMP. I first noticed it in going from version 6.5.1 to version 6.6.0, but I didn't get a chance to run more thorough tests until I was compiling version 6.6.1 over the past week.
In all cases, compilation was done using the same library modules and basic makefile.include. This was based on the makefile.include.nvhpc_omp_acc provided in the arch directory. I have included a list of what the cluster I use has installed for related modules loaded. Hardware wise, the nodes being used are dual socket AMD EPYC 7713 Processors (128 total cores) with 512 GB memory and 4x A100 SXM GPUs with 81920 MB memory. The compiler toolchain was Nvidia SDK 23.7 with Cuda 11.8 selected due to drivers.
As an example, I am running an HSEsol calculation on a 4x4x4 supercell of the silicon conventional cell with the gamma point flavor. I have seen similar changes in other systems as well though.
The first comparison is the baseline 6.5.1 run with no omp compared to the 6.5.1 run with omp. In this case, combining OpenACC+OMP provides a speed up of ~10% per electronic loop.
Compiling 6.6.1 the same way with OpenACC+OMP and using the same jobscript yields similar timings to the baseline 6.5.1 run.
After this, I tried checking other environmental variables. First adding to the jobscript:
OPENBLAS_NUM_THREADS = $SLURM_CPUS_PER_TASK
GOTO_NUM_THREADS = $SLURM_CPUS_PER_TASK
And eventually also adding:
SCALAPACK_NUM_THREADS = $SLURM_CPUS_PER_TASK
FFTW_NUM_THREADS = $SLURM_CPUS_PER_TASK
MPI_PARAM_MAX_THREADS = $SLURM_CPUS_PER_TASK
However, all of these gave similar timings as the original baseline 6.5.1 run and the above 6.6.1 run.
Next, I tested changing the bindings on the mpiexec line to:
--bind-to core --map-by slot:PE=32
and this also ran at the baseline speed.
I did try a version where I compiled without explicit OpenMP linking in the makefile.include (removed -D_OPENMP precompiler flag, -mp flags, and -lfftw_omp) to test if the OpenBLAS threads could be activated separately and saw no performance gain return.
Lastly, I tried seeing if I could get the Nvidia compilers to do the threading by adding:
-stdpar=multicore
to the FFLAGS variable. However, this failed the final linking step in creating an executable due to conflicts (nvlink error: Multiple definition of 'kernel1_779_gpu' in 'rmm-diis_lr.o', first defined in 'hamil_lr.o').
As I said, I don't know if this is really a bug or a necessity due to code refactoring for the OpenMP offloading version, but the small (10% here, closer to 15% in some other systems) performance boost with OpenACC+OMP has come in handy for certain work flows involving many ionic steps.
I've attached files that include the loaded modules environment, the makefile.include used, the basic VASP input files, and the jobscript/OUTCAR for the 6.5.1 no OpenMP baseline, the 6.5.1 OpenMP run, and the 6.6.1 OpenMP run.
Thank you for your help,
Andy

