Error on Local Machine - not a GNU Fortran module file

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
Federico
Newbie
Newbie
Posts: 4
Joined: Tue May 28, 2024 3:12 pm

Error on Local Machine - not a GNU Fortran module file

#1 Post by Federico » Fri Oct 31, 2025 4:36 pm

I wanted to test vasp on my new laptop.
I saw similar errors in other thread but it seems mine is different. https://www.vasp.at/forum/search.php?keywords=qdmodule
I followed the basic guide on: https://www.vasp.at/wiki/index.php/Pers ... stallation - "Building VASP 6.5.0 on Ubuntu 24.04"

Only difference is that I am using the latest version of ubuntu (unfortunately due to HW constraint this is the only distro I managed to run, I failed with both Arch and other Debian based).

Code: Select all

$ uname -a 
Linux Omen 6.14.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 11 10:06:31 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 25.04 - Linux 6.14.0-35-generic - bash 5.2.37
$ gfortran --version
GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The packaged installed through `apt` are the following:

Code: Select all

dpkg -l | grep libopenblas-dev ;  dpkg -l | grep libopenmpi ;  dpkg -l | grep  libscalapack;   dpkg -l | grep   libfftw3 ; dpkg -l | grep  libhdf5 ;  dpkg -l | grep   g++ ; dpkg -l | grep  gfort # and make added manualy
ii  libopenblas-dev:amd64                                 0.3.29+ds-3                                amd64        Optimized BLAS (linear algebra) library (dev, meta)
ii  libopenmpi-dev:amd64                                  5.0.7-1                                    amd64        high performance message passing library -- header files
ii  libopenmpi40:amd64                                    5.0.7-1                                    amd64        high performance message passing library -- shared library
ii  libscalapack-openmpi-dev:amd64                        2.2.2-1ubuntu1                             amd64        Scalable Linear Algebra Package - Dev files for OpenMPI
ii  libscalapack-openmpi2.2:amd64                         2.2.2-1ubuntu1                             amd64        Scalable Linear Algebra Package - Shared libs for OpenMPI
ii  libfftw3-bin                                          3.3.10-2fakesync1build1                    amd64        Library for computing Fast Fourier Transforms - Tools
ii  libfftw3-dev:amd64                                    3.3.10-2fakesync1build1                    amd64        Library for computing Fast Fourier Transforms - development
ii  libfftw3-double3:amd64                                3.3.10-2fakesync1build1                    amd64        Library for computing Fast Fourier Transforms - Double precision
ii  libfftw3-long3:amd64                                  3.3.10-2fakesync1build1                    amd64        Library for computing Fast Fourier Transforms - Long precision
ii  libfftw3-quad3:amd64                                  3.3.10-2fakesync1build1                    amd64        Library for computing Fast Fourier Transforms - Quad precision
ii  libfftw3-single3:amd64                                3.3.10-2fakesync1build1                    amd64        Library for computing Fast Fourier Transforms - Single precision
ii  libhdf5-310:amd64                                     1.14.5+repack-3                            amd64        HDF5 C runtime files - serial version
ii  libhdf5-hl-310:amd64                                  1.14.5+repack-3                            amd64        HDF5 High Level runtime files - serial version
ii  libhdf5-openmpi-310:amd64                             1.14.5+repack-3                            amd64        HDF5 - C runtime files - OpenMPI version
ii  libhdf5-openmpi-cpp-310:amd64                         1.14.5+repack-3                            amd64        HDF5 - C++ runtime files - OpenMPI version - unsupported
ii  libhdf5-openmpi-dev                                   1.14.5+repack-3                            amd64        HDF5 - development files - OpenMPI version
ii  libhdf5-openmpi-fortran-310:amd64                     1.14.5+repack-3                            amd64        HDF5 Fortran runtime files - OpenMPI version
ii  libhdf5-openmpi-hl-310:amd64                          1.14.5+repack-3                            amd64        HDF5 High Level runtime files - OpenMPI version
ii  libhdf5-openmpi-hl-cpp-310:amd64                      1.14.5+repack-3                            amd64        HDF5 High Level C++ runtime files - OpenMPI version - unsupported
ii  libhdf5-openmpi-hl-fortran-310:amd64                  1.14.5+repack-3                            amd64        HDF5 High Level Fortran runtime files - OpenMPI version
ii  g++                                                   4:14.2.0-1ubuntu1                          amd64        GNU C++ compiler
ii  g++-14                                                14.2.0-19ubuntu2                           amd64        GNU C++ compiler
ii  g++-14-x86-64-linux-gnu                               14.2.0-19ubuntu2                           amd64        GNU C++ compiler for x86_64-linux-gnu architecture
ii  g++-x86-64-linux-gnu                                  4:14.2.0-1ubuntu1                          amd64        GNU C++ compiler for the amd64 architecture
ii  gfortran                                              4:14.2.0-1ubuntu1                          amd64        GNU Fortran 95 compiler
ii  gfortran-14                                           14.2.0-19ubuntu2                           amd64        GNU Fortran compiler
ii  gfortran-14-x86-64-linux-gnu                          14.2.0-19ubuntu2                           amd64        GNU Fortran compiler for the x86_64-linux-gnu architecture
ii  gfortran-x86-64-linux-gnu                             4:14.2.0-1ubuntu1                          amd64        GNU Fortran 95 compiler for the amd64 architecture
ii  libgfortran-14-dev:amd64                              14.2.0-19ubuntu2                           amd64        Runtime library for GNU Fortran applications (development files)
ii  libgfortran5:amd64                                    15-20250404-0ubuntu1                       amd64        Runtime library for GNU Fortran applications
ii  make                                                  4.4.1-1                                    amd64        utility for directing compilation

The makefile is copied from the link mentioned above.

From the output I get the following errors:

Code: Select all

ml_ff_constant.F:9:11:

    9 |       USE ML_FF_PREC
      |           1
Fatal Error: File ‘ml_ff_prec.mod’ opened at (1) is not a GNU Fortran module file
compilation terminated.
ml_ff_string.F:5:9:

    5 |     use ML_FF_PREC, only: q,qi8
      |         1
Fatal Error: File ‘ml_ff_prec.mod’ opened at (1) is not a GNU Fortran module file
compilation terminated.
make[2]: *** [makefile:171: ml_ff_constant.o] Error 1
make[2]: *** Waiting for unfinished jobs....
ml_ff_mpi_help.F:9:13:

    9 |         USE ML_FF_CONSTANT
      |             1
Fatal Error: File ‘ml_ff_constant.mod’ opened at (1) is not a GNU Fortran module file
compilation terminated.
make[2]: *** [makefile:171: ml_ff_string.o] Error 1
base.F:314:11:

  314 |       USE qdmodule
      |           1
Fatal Error: Cannot open module file ‘qdmodule.mod’ for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [makefile:171: ml_ff_mpi_help.o] Error 1
make[2]: *** Waiting for unfinished jobs....
ml_ff_constant.F:9:11:

    9 |       USE ML_FF_PREC
      |           1
Fatal Error: File ‘ml_ff_prec.mod’ opened at (1) is not a GNU Fortran module file
compilation terminated.
ml_ff_string.F:5:9:

    5 |     use ML_FF_PREC, only: q,qi8
      |         1
Fatal Error: File ‘ml_ff_prec.mod’ opened at (1) is not a GNU Fortran module file
compilation terminated.
make[2]: *** [makefile:171: base.o] Error 1
make[2]: Leaving directory '/home/fex/Soft/VASP/Vasp_src/build/ncl'
make[2]: *** [makefile:171: ml_ff_constant.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [makefile:171: ml_ff_string.o] Error 1
base.F:314:11:

  314 |       USE qdmodule
      |           1
Fatal Error: Cannot open module file ‘qdmodule.mod’ for reading at (1): No such file or directory
compilation terminated.
cp: cannot stat 'vasp': No such file or directory
base.F:314:11:

  314 |       USE qdmodule
      |           1
Fatal Error: Cannot open module file ‘qdmodule.mod’ for reading at (1): No such file or directory

The full compiling output is the following: https://pastebin.com/5WXfZtna


marie-therese.huebsch
Sr. Member
Sr. Member
Posts: 285
Joined: Tue Jan 19, 2021 12:01 am

Re: Error on Local Machine - not a GNU Fortran module file

#2 Post by marie-therese.huebsch » Mon Nov 03, 2025 10:10 am

Thank you for the details. I will look into it. Could you please attach the makefile.include used as a file?


Federico
Newbie
Newbie
Posts: 4
Joined: Tue May 28, 2024 3:12 pm

Re: Error on Local Machine - not a GNU Fortran module file

#3 Post by Federico » Mon Nov 03, 2025 12:01 pm

This is the makefile.include created copying the template and replacing the lines following the guide.
I tried to fiddle it around, but I retested it this morning and the same error presents.

Code: Select all

# Default precompiler options
CPP_OPTIONS = -DHOST=\"LinuxGNU\" \
              -DMPI -DMPI_BLOCK=8000 -Duse_collective \
              -DscaLAPACK \
              -DCACHE_SIZE=4000 \
              -Davoidalloc \
              -Dvasp6 \
              -Duse_bse_te \
              -Dtbdyn \
              -Dfock_dblbuf \
              -D_OPENMP

CPP         = gcc -E -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)

FC          = mpif90 -fopenmp
FCL         = mpif90 -fopenmp

FREE        = -ffree-form -ffree-line-length-none

FFLAGS      = -w -ffpe-summary=none

OFLAG       = -O2
OFLAG_IN    = $(OFLAG)
DEBUG       = -O0

OBJECTS     = fftmpiw.o fftmpi_map.o fftw3d.o fft3dlib.o
OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
OBJECTS_O2 += fft3dlib.o

# For what used to be vasp.5.lib
CPP_LIB     = $(CPP)
FC_LIB      = $(FC)
CC_LIB      = gcc
CFLAGS_LIB  = -O
FFLAGS_LIB  = -O1
FREE_LIB    = $(FREE)

OBJECTS_LIB = linpack_double.o

# For the parser library
CXX_PARS    = g++
LLIBS       = -lstdc++

##
## Customize as of this point! Of course you may change the preceding
## part of this file as well if you like, but it should rarely be
## necessary ...
##

# When compiling on the target machine itself, change this to the
# relevant target when cross-compiling for another architecture
VASP_TARGET_CPU ?= -march=native
FFLAGS     += $(VASP_TARGET_CPU)

# For gcc-10 and higher (comment out for older versions)
FFLAGS     += -fallow-argument-mismatch

# BLAS and LAPACK (mandatory)
#OPENBLAS_ROOT ?= /path/to/your/openblas/installation
BLASPACK    = -lopenblas #-L$(OPENBLAS_ROOT)/lib -lopenblas

# scaLAPACK (mandatory)
#SCALAPACK_ROOT ?= /path/to/your/scalapack/installation
SCALAPACK   = -lscalapack-openmpi   #-L$(SCALAPACK_ROOT)/lib -lscalapack

LLIBS      += $(SCALAPACK) $(BLASPACK)

# FFTW (mandatory)
#FFTW_ROOT  ?= /path/to/your/fftw/installation
LLIBS      += -lfftw3 -lfftw3_omp  # -L$(FFTW_ROOT)/lib -lfftw3 -lfftw3_omp
INCS       += -I/usr/include #-I$(FFTW_ROOT)/include

# HDF5-support (optional but strongly recommended)
CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
LLIBS      += -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi/ -lhdf5_fortran
INCS       += -I/usr/include/hdf5/openmpi/


# HDF5-support (optional but strongly recommended)
#CPP_OPTIONS+= -DVASP_HDF5
#HDF5_ROOT  ?= /path/to/your/hdf5/installation
#LLIBS      += -L$(HDF5_ROOT)/lib -lhdf5_fortran
#INCS       += -I$(HDF5_ROOT)/include

# For the VASP-2-Wannier90 interface (optional)
#CPP_OPTIONS    += -DVASP2WANNIER90
#WANNIER90_ROOT ?= /path/to/your/wannier90/installation
#LLIBS          += -L$(WANNIER90_ROOT)/lib -lwannier

# For the fftlib library (recommended)
#CPP_OPTIONS+= -Dsysv
#FCL        += fftlib.o
#CXX_FFTLIB  = g++ -fopenmp -std=c++11 -DFFTLIB_THREADSAFE
#INCS_FFTLIB = -I./include -I$(FFTW_ROOT)/include
#LIBS       += fftlib
#LLIBS      += -ldl

For completeness:

Code: Select all

ls /usr/lib/x86_64-linux-gnu/hdf5/openmpi/
include  lib  libhdf5.a  libhdf5_cpp.a  libhdf5_cpp.so  libhdf5_fortran.a  libhdf5_fortran.so  libhdf5_hl.a  libhdf5_hl_cpp.a  libhdf5_hl_cpp.so  libhdf5hl_fortran.a  libhdf5hl_fortran.so  libhdf5_hl.so  libhdf5.settings  libhdf5.so
$ ls /usr/include/hdf5/openmpi 
H5AbstractDs.h  H5CommonFG.h    H5DataType.h    h5e.mod        H5f90i.h        H5FDlog.h     H5FDsplitter.h       H5Fpublic.h      h5i.mod         h5lib.mod       H5Mpublic.h      h5p.mod       h5s.mod         H5TSdevelop.h             H5Zdevelop.h
H5ACpublic.h    H5CompType.h    H5DcreatProp.h  H5EnumType.h   H5FaccProp.h    H5FDmirror.h  H5FDstdio.h          h5_gen.mod       H5IMpublic.h    H5Library.h     H5Object.h       H5Ppublic.h   H5Spublic.h     H5VarLenType.h            h5z.mod
h5a.mod         H5config_f.inc  h5d.mod         H5Epubgen.h    H5FcreatProp.h  H5FDmpi.h     H5FDsubfiling.h      h5global.mod     H5Include.h     h5l.mod         H5OcreatProp.h   H5PredType.h  H5StrType.h     H5version.h               H5Zpublic.h
H5api_adpt.h    H5CppDoc.h      h5do.mod        H5Epublic.h    H5FDcore.h      H5FDmpio.h    H5FDwindows.h        h5g.mod          H5IntType.h     H5Location.h    h5o.mod          H5PropList.h  h5tb_const.mod  H5VLconnector.h           hdf5.h
H5Apublic.h     H5Cpp.h         H5DOpublic.h    H5ESdevelop.h  H5FDdevelop.h   H5FDmulti.h   H5File.h             H5Gpublic.h      H5Ipublic.h     H5Lpublic.h     H5Opublic.h      H5PTpublic.h  h5tb.mod        H5VLconnector_passthru.h  hdf5_hl.h
H5ArrayType.h   H5Cpublic.h     H5Dpublic.h     h5es.mod       H5FDdirect.h    H5FDonion.h   H5FloatType.h        H5Group.h        H5LaccProp.h    h5lt_const.mod  H5overflow.h     H5pubconf.h   H5TBpublic.h    h5vl.mod                  hdf5.mod
H5AtomType.h    H5DaccProp.h    h5ds.mod        H5ESpublic.h   H5FDfamily.h    H5FDpublic.h  h5f.mod              H5IdComponent.h  H5LcreatProp.h  h5lt.mod        H5PacketTable.h  H5public.h    H5Tdevelop.h    H5VLnative.h
H5Attribute.h   H5DataSet.h     H5DSpublic.h    H5Exception.h  H5FDhdfs.h      H5FDros3.h    h5fortkit.mod        H5Idevelop.h     H5Ldevelop.h    H5LTpublic.h    H5PLextern.h     h5r.mod       h5t.mod         H5VLpassthru.h
H5Classes.h     H5DataSpace.h   H5DxferProp.h   H5f90i_gen.h   H5FDioc.h       H5FDsec2.h    h5fortran_types.mod  h5im.mod         H5LDpublic.h    H5MMpublic.h    H5PLpublic.h     H5Rpublic.h   H5Tpublic.h     H5VLpublic.h

marie-therese.huebsch
Sr. Member
Sr. Member
Posts: 285
Joined: Tue Jan 19, 2021 12:01 am

Re: Error on Local Machine - not a GNU Fortran module file

#4 Post by marie-therese.huebsch » Wed Nov 05, 2025 9:36 am

Just to make sure, did you run make veryclean and then compile from scratch?

And did you make sure that the toolchain is compiled using the same compiler (version) as you now try to compile VASP?


Federico
Newbie
Newbie
Posts: 4
Joined: Tue May 28, 2024 3:12 pm

Re: Error on Local Machine - not a GNU Fortran module file

#5 Post by Federico » Thu Nov 13, 2025 3:12 pm

Sorry for the slow reply.

1. I run veryclean and I managed to compile, but all the test failed. (I do have memory of running cleaning also in other instances, but maybe I probably made some error at that point).
Nonetheless even if compiled vasp failed at execution:

Code: Select all

VASP legacy At line 883 of file fock.F (unit = 8, file = 'OUTCAR') Fortran runtime error: Missing comma between descriptors 

2. I managed to fix it adding

Code: Select all

FC          = mpif90 -fopenmp -std=legacy
FCL         = mpif90 -fopenmp -std=legacy

to the makefile.include

I do not know if this is due to some issue with my configuration, or else, but the previous edit managed to get binary that passed all the test (so far I tested just the fast ones)


marie-therese.huebsch
Sr. Member
Sr. Member
Posts: 285
Joined: Tue Jan 19, 2021 12:01 am

Re: Error on Local Machine - not a GNU Fortran module file

#6 Post by marie-therese.huebsch » Fri Nov 14, 2025 8:05 am

Thank you for the update. Indeed we didn't have GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0 in our toolchains for regular testing for 6.5.0. Great job that you found the solution using

Code: Select all

FC          = mpif90 -fopenmp -std=legacy
FCL         = mpif90 -fopenmp -std=legacy

Does everything work for you now?

By the way, I discussed with my colleagues and for the next release these issues are fixed (up to gfortran 15). :)


Federico
Newbie
Newbie
Posts: 4
Joined: Tue May 28, 2024 3:12 pm

Re: Error on Local Machine - not a GNU Fortran module file

#7 Post by Federico » Fri Nov 14, 2025 11:39 am

marie-therese.huebsch wrote: Fri Nov 14, 2025 8:05 am

Thank you for the update. Indeed we didn't have ```GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0``` in our toolchains for regular testing for 6.5.0. Great job that you found the solution using
```
FC = mpif90 -fopenmp -std=legacy
FCL = mpif90 -fopenmp -std=legacy
```
Does everything work for you now?

By the way, I discussed with my colleagues and for the next release these issues are fixed (up to gfortran 15). :)

I completed the full test and all passed.
Hold your thanks for when I will compile it on the cluster and I'll crawl back asking help.

Until then, thank you very much.


Locked