4 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 namelist 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.