parallel execution


Effective usage of parallelism requires some basic understanding on how parallel machines work and how parallelism is implemented in Quantum ESPRESSO. If you have no experience and no clear ideas (or not idea at all), consider reading Sec.3 of the User Guide.

4.1 HOW DO I CHOOSE THE NUMBER OF PROCESSORS/HOW DO I SETUP MY PARALLEL CALCULATION?

Optimizing the parallel execution requires a basic understanding of the parallelism, how calculations are parallelized in Quantum ESPRESSO, and the specifics (size, k-points, etc.) of the system at hand. Please start by reading carefully Sec. 3 of the user guide, and compare your use case with some of the examples given in the documentation.

4.2 WHY IS MY PARALLEL JOB RUNNING IN SUCH A LOUSY WAY?

Very often people has unrealistic expectations on the scaling of electronic-structure calculations. You can achieve good scaling only with a judicious choice of the various parallelization levels and if you have appropriate communication hardware, and only for a restricted range of processors and for sufficiently large calculations. Very lousy scaling (e.g. much slower in parallel than in serial) may point instead to memory conflicts (not all parallelization leveles distribute memory!) or MPI-OpenMP conflicts caused by libraries (the most infamous case being MKL in the past).

4.3 WHY IS MY PARALLEL JOB STOPPING WITH AN _ERROR READING NAMELOST XXXX_?

See item 5.9 of this FAQ. If the problem seems to arise only for parallel execution, i.e. the same input is accepted when running on a single processor, see next item.

4.4 WHY IS MY PARALLEL JOB NOT READING THE SAME INPUT DATA THAT WORKS FOR SERIAL JOBS?

Use “mycode -inp input_file” instead of “mycode < input_file”. Some MPI libraries do not properly handle input redirection.

4.5 WHY IS MY PARALLEL JOB NOT RUNNING ON N PROCESSORS BUT JUST ON ONE?

First of all, verify the syntax of your MPI launcher (mpirun, mpiexec, or whatever you use). If correct, look at the header of the output file:

  • if it says serial compilation, your “parallel” code is not parallel and you are running N copies of it;
  • if it says parallel (…) compilation, but running on 1 procs, there is typically a mismatch between the MPI libraries you have used in the compilation and the MPI launcher you are actually using. This may happen on machines with different (e.g. MPICH and OpenMPI) parallel environments installed.