Compilation failure of elphon_base.o in the Fujitsu compiler and VASP.6.5.1

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
yutoml
Newbie
Newbie
Posts: 5
Joined: Sun Oct 20, 2024 3:00 pm

Compilation failure of elphon_base.o in the Fujitsu compiler and VASP.6.5.1

#1 Post by yutoml » Mon Oct 27, 2025 7:29 pm

Dear VASP developers and users,

I am encountering a compilation issue with VASP 6.5.1 on the Fugaku supercomputer (A64FX architecture, Fujitsu Fortran compiler).
While VASP 6.4.3 compiles successfully using the same build script (job_build.sh), VASP 6.5.1 fails during the compilation of elphon_base.o.

Below is the relevant part of the error log (VASP compile.42309247.out):

Code: Select all

  jwd1130i-s  "elphon_base.F", line 960, column 17: USE statement appears in invalid position.
  jwd2018i-s  "elphon_base.F", line 963: When IMPLICIT NONE is specified, 'kpoints_opt_mode' must be declared in a type declaration statement.

The compilation stops at elphon_base.o, and thus the final executable is not generated.
This error does not occur with VASP 6.4.3, which does not contain elphon_base.

Has anyone successfully compiled VASP 6.5.1 on Fugaku or using the Fujitsu Fortran compiler?
Any suggestions or experience reports would be greatly appreciated.

Environment:
System: Fugaku supercomputer (https://www.r-ccs.riken.jp/en/fugaku/about/)
Compiler: Fujitsu Compiler 4.12.1
FFTW and HDF5 are linked externally(using spack)

Attached are the job script and its output, as well as makefile.include, as files relevant to compilation.
"job_build.sh" is a job script submitted to Fugaku for compilation in the native environment.
"VASP compile.42309247.out" is the output of the job script.

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

ferenc_karsai
Global Moderator
Global Moderator
Posts: 581
Joined: Mon Nov 04, 2019 12:44 pm

Re: Compilation failure of elphon_base.o in the Fujitsu compiler and VASP.6.5.1

#2 Post by ferenc_karsai » Tue Oct 28, 2025 12:18 pm

Thank you for the report.

I will give this my colleagues who wrote that elphon_base.

I can't promise if we can come up with something that is tested because we do not have access to fujitsu compilers for development.


ferenc_karsai
Global Moderator
Global Moderator
Posts: 581
Joined: Mon Nov 04, 2019 12:44 pm

Re: Compilation failure of elphon_base.o in the Fujitsu compiler and VASP.6.5.1

#3 Post by ferenc_karsai » Wed Oct 29, 2025 8:55 am

I talked to my colleague and he said this is fixed in our current development branch and the fixed version will come with the next release.

If you want to fix it yourself here is the diff for the patch:

Code: Select all

diff --git a/src/elphon_base.F b/src/elphon_base.F
index a1a03f652..8000ee5b9 100644
--- a/src/elphon_base.F
+++ b/src/elphon_base.F
@@ -1042,6 +1042,7 @@ module elphon_base
         use string, only: str
         use fock_glb, only: lhfcalc
         use setexm, only: xc_info
+        use wave_interpolate, only: kpoints_opt_mode
         type(elph_settings), intent(inout) :: elphin
         type(xc_info),intent(in) :: xc
         type(in_struct) :: io
@@ -1098,12 +1099,9 @@ module elphon_base
         ! HOTFIX for elph_nbands = 2
         ! TODO: Fix properly (better meta tags?)
         if (elphin%nbands == -2) then
-            block
-                use wave_interpolate, only: kpoints_opt_mode
-                call vtutor%warning("ELPH_NBANDS=-2 requires exact diagonalization. " // &
-                    "Setting KPOINTS_OPT=2 internally.")
-                kpoints_opt_mode = 2
-            end block
+            call vtutor%warning("ELPH_NBANDS=-2 requires exact diagonalization. " // &
+                "Setting KPOINTS_OPT=2 internally.")
+            kpoints_opt_mode = 2
         endif
    end subroutine

yutoml
Newbie
Newbie
Posts: 5
Joined: Sun Oct 20, 2024 3:00 pm

Re: Compilation failure of elphon_base.o in the Fujitsu compiler and VASP.6.5.1

#4 Post by yutoml » Wed Oct 29, 2025 5:35 pm

Thank you very much for your help.
The compilation and test have completed successfully.
This issue has been resolved.


Locked