BSE Wavefunction calculation crashes with OpenACC FATAL ERROR (PRESENT clause w1(:) missing on device) in vasp.6.6.0 GPU

Problems running VASP: crashes, internal errors, "wrong" results.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
andrialusada_rosa1
Newbie
Newbie
Posts: 2
Joined: Thu Jan 28, 2021 1:30 pm

BSE Wavefunction calculation crashes with OpenACC FATAL ERROR (PRESENT clause w1(:) missing on device) in vasp.6.6.0 GPU

#1 Post by andrialusada_rosa1 » Thu May 28, 2026 4:55 pm

VASP Version and Build Environment:

- VASP Version: 6.6.0 (Released 06Mar2026, built Apr 11 2026)
- Execution Mode: Complex, Parallel with OpenACC GPU acceleration enabled (vasp_ncl)
- Compiler/Toolchain: NVIDIA HPC SDK (NVFORTRAN compiler with OpenACC)
- Hardware Setup: 1 Node, 4 MPI ranks, 24 threads/rank, 4x NVIDIA H100 Tesla GPUs (Compute Capability 9.0)

Description of the Bug:

When performing a Bethe-Salpeter Equation (BSE) calculation (ALGO = BSE) to compute and plot the excitonic wavefunctions/charge densities in the real space via NBSEEIG and BSEHOLE (or BSEELECTRON), the GPU execution crashes immediately after the matrix diagonalization step. The Hamiltonian setup, distribution, and diagonalization via ZHEEVX run successfully on the GPU. However, as soon as the code reaches the subroutine responsible for gathering and transforming the excitonic wavefunctions to write the CHG.XX files, an OpenACC runtime error is triggered. The host-to-device data status check fails because the array/vector w1(:) has not been mapped or present-validated on the device memory. The fatal error occurs in wave_high.f90 inside the subroutine w1_gather_ksel_nofft (around line 3827).

My guess is that an OpenACC directive (likely #pragma acc parallel loop present(w1) or similar !$acc directive) specifies that the array w1 should already reside in the device memory. However, during the post-processing phase of the BSE states where the wavefunctions are collected from the various K-points without Fast Fourier Transform (FFT) processing, the data migration (!$acc update device or !$acc enter data copyin) was missing or bypassed on the CPU host side before calling this device kernel.

ps: Standard calculations for the dielectric function, BSE fatbands, and so on, work correctly and produce accurate results.

GW@HSE06 + BSE files attached.

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

andrialusada_rosa1
Newbie
Newbie
Posts: 2
Joined: Thu Jan 28, 2021 1:30 pm

Re: BSE Wavefunction calculation crashes with OpenACC FATAL ERROR (PRESENT clause w1(:) missing on device) in vasp.6.6.0

#2 Post by andrialusada_rosa1 » Fri May 29, 2026 5:35 pm

I forgot to mention that the error output is in the ‘vasp_out’ file.


alexey.tal
Global Moderator
Global Moderator
Posts: 512
Joined: Mon Sep 13, 2021 12:45 pm

Re: BSE Wavefunction calculation crashes with OpenACC FATAL ERROR (PRESENT clause w1(:) missing on device) in vasp.6.6.0

#3 Post by alexey.tal » Tue Jun 16, 2026 8:37 am

Dear Andrialusada_Rosa1,

Thank you for the detailed report. Indeed, it is a bug. In principle, the routine that plots the exciton wavefunction has not yet been ported to the GPU and should run on the CPU only. However, due to a bug introduced in VASP 6.6.0, execution is still passed to the GPU, hence the error. We will fix this in an upcoming release.

Thank you again for reporting this issue.


Post Reply