I tried to compile Quantum ESPRESSO using the Intel compilers and the MKL libraries. But it went sideways with an error as follows,

Compiling Error

What I did was as follows,

  1. Started with a fresh Ubuntu distro in windows 10 wsl
  2. Download and install the Intel oneAPI Base and HCP toolkits
  3. source the setvars.sh script by Intel to set the environment variables
  4. Extract the Quantum ESPRESSO source code
  5. Custom configure QE by executing the configure file (./configure MPIF90=mpiifort CC=mpiicc F90=ifort F77=mpiifort -enable-parallel)
  6. Edit the make.inc by setting the "BLAS_LIBS=", "LAPACK_LIBS=", "SCALAPACK_LIBS=", and "FFT_LIBS=" to "-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_blacs_intelmpi_lp64 -lpthread -lm -ldl" as given by Intel link line advisor.
  7. Edit the make.inc by setting the "MPI_LIBS=" to "-L/opt/intel/oneapi/mpi/2021.7.1/lib -lmpi"
  8. Compiling QE by make pw

I can't figure out the problem here and would appreciate the view from an expert on the matter.

Thank you, Best Regards.


  • 3
    $\begingroup$ Can you please post the full output in a text format (use pastebin or something similar)? From what I can see, the compiler is expecting a module file named "m_common_io.mod" which should have been compiled before. But it is not present, so the build fails. Either there is an issue with the build system setting include paths, or in the order of compile or the module compilation failed. $\endgroup$
    – S R Maiti
    Nov 20, 2022 at 18:54
  • 1
    $\begingroup$ Thank for your comment Maiti. You're right, compiler fails to open the m_common_io.mod due to the lack of m4 utility. After installing m4, compilation went smoothly. $\endgroup$
    – WhiteLeo9
    Nov 22, 2022 at 11:01

1 Answer 1


To compile QE v.7.1 it requires m4 utility [1]. After installing m4, it went smoothly.

[1] - https://gitlab.com/QEF/q-e/-/wikis/home



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .