environ-developers / Environ

A fortran package and library for continuum embedding calculations in materials and molecules
http://www.quantum-environ.org
GNU General Public License v2.0
16 stars 5 forks source link

Environ 3.0 with QE 7.3.1 .mod Instalation Error #8

Open AhmedYousriSobhi opened 1 month ago

AhmedYousriSobhi commented 1 month ago

Got this error during building Environ v3.0 with quantum espresso v7.3.1

I cloned the repo from the master branch, but got same results as 3.0.tar.gz

Using NVHPC 23.1, CUDA 11.8

NVFORTRAN-F-0004-Unable to open MODULE file env_fft_types.mod (/installation/path/Modules/environ_base_module.f90: 29)
NVFORTRAN/x86-64 Linux 23.1-0: compilation aborted
make[2]: *** [Modules/CMakeFiles/qe_modules.dir/build.make:309: Modules/CMakeFiles/qe_modules.dir/environ_base_module.f90.o] Error 2
eric-read commented 1 week ago

Did you specify -DENVIRON_ROOT when running cmake in quantum espresso?

AhmedYousriSobhi commented 1 week ago

Hello @eric-read, thank you for your reply.

Yes, I did specify -DENVIRON_ROOT while configuring CMake for quantum espresso, and still the same error happened.

Do you have any solution/recommendation to fix/know what caused such issue?

Thank you in advance.

eric-read commented 6 days ago

Did you use the same exact fortran compiler and compiler version for both quantum espresso and Environ? Did you install Environ inside the QE directory? Please send your make.inc file inside Environ.

AhmedYousriSobhi commented 4 days ago

Hello @eric-read, thank you again for your reply. Yes, I did use the exact fortran compiler and compiler version for both QE and Environ, and also installed Environ inside the QE directory, and still the issue is not solved.

I have attached the make.inc file that was inside Environ directory.

make.inc ```bash # make.inc. Generated from make.inc.in by configure. # compilation rules .SUFFIXES : .SUFFIXES : .o .c .f90 .h .fh # most fortran compilers can directly preprocess c-like directives: use # $(MPIF90) $(F90FLAGS) -c $< # if explicit preprocessing by the C preprocessor is needed, use: # $(CPP) $(CPPFLAGS) $< -o $*.F90 # $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o # remember the tabulator in the first column !!! .f90.o: $(MPIF90) $(F90FLAGS) -c $< .c.o: $(CC) $(CFLAGS) -c $< .h.fh: $(CPP) $(CPPFLAGS) $< -o $*.fh # Top Environ directory, useful for locating libraries # The following syntax should always point to TOPDIR: TOPDIR = $(dir $(abspath $(filter %make.inc,$(MAKEFILE_LIST)))) # if it doesn't work, uncomment the following line (edit if needed): # TOPDIR = /path-to-directory/quantumespresso/7.3.1/qe-7.3.1/Environ-3.0 # QE root directory QEDIR = /path-to-directory/quantumespresso/7.3.1/qe-7.3.1 # DFLAGS = precompilation options (possible arguments to -D and -U) # used by the C compiler and preprocessor # See include/defs.h.README for a list of options and their meaning # With the exception of IBM xlf, FDFLAGS = $(DFLAGS) # For IBM xlf, FDFLAGS is the same as DFLAGS with separating commas # MANUAL_DFLAGS = additional precompilation option(s), if desired # BEWARE: it does not work for IBM xlf! Manually edit FDFLAGS MANUAL_DFLAGS = DFLAGS = -D__PGI -D__FFTW3 -D__MPI FDFLAGS = $(DFLAGS) $(MANUAL_DFLAGS) # IFLAGS = how to locate directories with *.h or *.f90 file to be included # typically -I$(TOPDIR)/include -I/some/other/directory/ # the latter contains .e.g. files needed by FFT libraries IFLAGS = -I/path-to-directory/quantumespresso/7.3.1/qe-7.3.1/fftw-3.3.10/executables/include # MOD_FLAG = flag used by f90 compiler to locate modules MOD_FLAG = -I # BASEMOD_FLAGS points to directories containing basic modules, # while BASEMODS points to the corresponding module libraries # Each Makefile can add directories to MODFLAGS and libraries to ENVMODS BASEMOD_FLAGS= $(MOD_FLAG)$(TOPDIR)/UtilXlib $(MOD_FLAG)$(TOPDIR)/FFTXlib $(MOD_FLAG)$(TOPDIR)/src # Compilers: fortran-90, fortran-77, C # If a parallel compilation is desired, MPIF90 should be a fortran-90 # compiler that produces executables for parallel execution using MPI # (such as for instance mpif90, mpf90, mpxlf90,...); # otherwise, an ordinary fortran-90 compiler (f90, g95, xlf90, ifort,...) # If you have a parallel machine but no suitable candidate for MPIF90, # try to specify the directory containing "mpif.h" in IFLAGS # and to specify the location of MPI libraries in MPI_LIBS MPIF90 = mpif90 F90 = nvfortran CC = nvc # CUDA Toolkit path CUDA_PATH= # GPU architecture (Kepler: 35, Pascal: 60, Volta: 70 ) GPU_ARCH= # CUDA runtime (Pascal: 8.0, Volta: 9.0) CUDA_RUNTIME= # CUDA F90 Flags CUDA_F90FLAGS= # CUDA C Flags CUDA_CFLAGS= # C preprocessor and preprocessing flags - for explicit preprocessing, # if needed (see the compilation rules above) # preprocessing flags must include DFLAGS and IFLAGS CPP = cpp CPPFLAGS = -P -traditional -Uvector $(DFLAGS) $(IFLAGS) # compiler flags: C, F90 # C flags must include DFLAGS and IFLAGS # F90 flags must include MODFLAGS, IFLAGS, and FDFLAGS with appropriate syntax CFLAGS = -O3 $(DFLAGS) $(IFLAGS) $(CUDA_CFLAGS) F90FLAGS = -fast -Mcache_align -Mpreprocess -Mlarge_arrays -mp $(FDFLAGS) $(CUDA_F90FLAGS) $(IFLAGS) $(MODFLAGS) # add flags to silence warnings coming from cannibalized libraries ifeq ($(F90),ifort) F90FLAGS += -diag-disable 5462 -diag-disable 6843 else ifeq ($(F90),gfortran) F90FLAGS += -w endif # compiler flags with and without optimization for fortran-77 # the latter is NEEDED to properly compile dlamch.f, used by lapack FFLAGS = -fast -mp FFLAGS_NOOPT = -O0 # compiler flag needed by some compilers when the main program is not fortran # Currently used for Yambo FFLAGS_NOMAIN = -Mnomain # Linker, linker-specific flags (if any) # Typically LD coincides with F90 or MPIF90, LD_LIBS is empty LD = nvfortran LDFLAGS = -mp LD_LIBS = # External Libraries (if any) : blas, lapack, fft, MPI BLAS_LIBS = /path-to-directory/nvidia_sdk_nvhpc/23.1/rl9_binary/Linux_x86_64/23.1//compilers/lib/libblas_lp64.so LAPACK_LIBS = /path-to-directory/nvidia_sdk_nvhpc/23.1/rl9_binary/Linux_x86_64/23.1//compilers/lib/liblapack_lp64.so SCALAPACK_LIBS = FFT_LIBS = /path-to-directory/nvidia_sdk_nvhpc/23.1/rl9_binary/Linux_x86_64/23.1//math_libs/11.8/lib64 # HDF5 HDF5_LIBS = # For parallel execution, the correct path to MPI libraries must # be specified in MPI_LIBS (except for IBM if you use mpxlf) MPI_LIBS = # IBM-specific: MASS libraries, if available and if -D__MASS is defined in FDFLAGS MASS_LIBS = # CUDA libraries CUDA_LIBS= CUDA_EXTLIBS = # ar command and flags - for most architectures: AR = ar, ARFLAGS = ruv AR = ar ARFLAGS = ruv # ranlib command. If ranlib is not needed (it isn't in most cases) use # RANLIB = echo RANLIB = ranlib # all libraries - do not modify FLIB_TARGETS = all ENVLIBS = $(CUDA_LIBS) $(SCALAPACK_LIBS) $(LAPACK_LIBS) $(FFT_LIBS) $(BLAS_LIBS) \ $(MPI_LIBS) $(MASS_LIBS) $(LD_LIBS) # wget or curl - useful to download from network WGET = wget -O # Install directory - "make install" copies *.x executables there PREFIX = /path-to-directory/quantumespresso/7.3.1/qe-7.3.1/Environ-3.0/executables ```

Thank you for your support in advance !

eric-read commented 3 days ago

There are issues with installation when Environ is installed inside of the Quantum Espresso directory so install Environ outside of QE. Also install the latest commit for Environ if you want to use Environ with QE 7.3+