Page 1 of 1

Fatal Error: Cannot open module file

Posted: Mon Mar 20, 2023 3:30 am
by siwakorn_sukharom
I'm trying to instal VASP 5.4.4 which implemented VTST and VASPsol code on Cray EX system

I use gcc/11.2.0, cray-mpich/8.17, cray-libsci and cray-fftw for the installation. The detail is shown below

Code: Select all

Currently Loaded Modules:
  1) craype-x86-rome                         6) perftools-base/22.06.0  11) cray-dsmml/0.2.2
  2) libfabric/1.15.0.0                      7) cray-pmi/6.1.3          12) cray-mpich/8.1.17
  3) craype-network-ofi                      8) cray-openshmemx/11.5.5  13) cray-libsci/21.08.1.2
  4) xpmem/2.4.4-2.3_2.12__gff0e1d9.shasta   9) gcc/11.2.0              14) PrgEnv-gnu/8.3.3
  5) cray-fftw/3.3.10.1                     10) craype/2.7.16           15) CrayGNU/22.06
Here is my makefile.include

Code: Select all

# Precompiler options
CPP_OPTIONS= -DHOST=\"LinuxGNU\" \
             -DMPI -DMPI_BLOCK=8000 \
             -Duse_collective \
             -DscaLAPACK \
             -DCACHE_SIZE=4000 \
             -Davoidalloc \
             -Duse_bse_te \
             -Dtbdyn \
             -Duse_shmem \
             -Dsol_compat

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

FC         = ftn
FCL        = ftn

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

FFLAGS     = -fallow-argument-mismatch
OFLAG      = -O2
OFLAG_IN   = $(OFLAG)
DEBUG      = -O0

LIBDIR     =
BLAS       =
LAPACK     =
BLACS      =
SCALAPACK  =

LLIBS      = $(SCALAPACK) $(LAPACK) $(BLAS)

FFTW       ?= /opt/cray/pe/fftw/3.3.10.1/x86_rome
LLIBS      += -L$(FFTW)/lib -lfftw3
INCS       = -I$(FFTW)/include

OBJECTS    = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o \
#            /opt/cray/pe/fftw/3.3.10.1/x86_rome/lib/libfftw3.a

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     = cc
CFLAGS_LIB = -O
FFLAGS_LIB = -O1
FREE_LIB   = $(FREE)

OBJECTS_LIB= linpack_double.o getshmem.o

# For the parser library
CXX_PARS   = CC

LIBS       += parser
LLIBS      += -Lparser -lparser -lstdc++

# Normally no need to change this
SRCDIR     = ../../src
BINDIR     = ../../bin
The error that i got is

Code: Select all

ftn -ffree-form -ffree-line-length-none -fallow-argument-mismatch -O2 -I/opt/cray/pe/fftw/3.3.10.1/x86_rome/                  include  -c mpi_shmem.f90
ftn -ffree-form -ffree-line-length-none -fallow-argument-mismatch -O2 -I/opt/cray/pe/fftw/3.3.10.1/x86_rome/                  include  -c smart_allocate.f90
ftn -ffree-form -ffree-line-length-none -fallow-argument-mismatch -O2 -I/opt/cray/pe/fftw/3.3.10.1/x86_rome/                  include  -c xml.f90
profiling.f90:66:11:

   66 |       USE prec
      |           1
Fatal Error: Cannot open module file 'prec.mod' for reading at (1): No such file or directory
compilation terminated.
openmp.f90:91:11:

   91 |       USE base
      |           1
Fatal Error: Cannot open module file 'base.mod' for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [makefile:169: profiling.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [makefile:169: openmp.o] Error 1
mpi.f90:1819:11:

 1819 |       USE openmp, ONLY : omp_nthreads_alltoall
      |           1
Fatal Error: Cannot open module file 'openmp.mod' for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [makefile:169: mpi.o] Error 1
make[2]: Leaving directory '/lustrefs/disk/project/thaisc/siwakorn/VASP/TS-support/TS-671/vasp.5.4.4/build/s                  td'
cp: cannot stat 'vasp': No such file or directory
make[1]: *** [makefile:142: all] Error 1
make[1]: Leaving directory '/lustrefs/disk/project/thaisc/siwakorn/VASP/TS-support/TS-671/vasp.5.4.4/build/s                  td'
make: *** [makefile:10: std] Error 2
Any suggestion?

Re: Fatal Error: Cannot open module file

Posted: Mon Mar 20, 2023 8:31 am
by henrique_miranda
It looks like make is trying to compile Fortran source files which require modules that have not been compiled yet.
This should not happen since there is an order (src/.objects) in which the files must be built in the case of a serial compilation (make -j1)
If you are trying to do a parallel compilation (make -jN) then you first need to build a dependencies file that tells make which source files must be built first.

From your output, I cannot tell if you are trying a parallel build.
Can you try compiling with:
$ make veryclean
$ make -j1

If that does not work can you post the full output of the make including the actual make command you are using?

Re: Fatal Error: Cannot open module file

Posted: Tue Mar 21, 2023 10:34 am
by siwakorn_sukharom
Yes, i was using

Code: Select all

make DEPS=1 -j8 all
at the beginning (so vasp5 can't be compiled parallel directly?)
It can be compiled successfully now by using make -j1 instead.

Thank you for your help.

Re: Fatal Error: Cannot open module file

Posted: Wed Mar 22, 2023 1:53 pm
by henrique_miranda
vasp5.4.4 can be computed in parallel (make -jN) but first, you need to have makedepf90 available and modify the makefile to have

Code: Select all

$(VERSIONS):
    mkdir build/$@ ; \
    cp src/makefile src/.objects makefile.include build/$@ ; \
    $(MAKE) -C build/$@ VERSION=$@ dependencies -j1 ; \
    $(MAKE) -C build/$@ VERSION=$@ all
Since vasp6.2.0 you can compile in parallel by making (make DEPS=1 -jN) and makedepf90 is no longer required.