Next: 2.8 Installation tricks and Up: 2 Installation Previous: 2.6 Compilation Contents
Subsections

- 2.7.1 Test-suite
- 2.7.2 Examples

##
2.7 Running tests and examples

As a final check that compilation was successful, you may want to run some or all of the tests and examples. Notice that most tests and examples are devised to be run serially or on a small number of processors; do not use tests and examples to benchmark parallelism, do not try to run on too many processors.

### 2.7.1 Test-suite

Automated tests give a "pass/fail" answer. All tests run quickly (less than a minute at most), but they are not meant to be realistic, just to test a specific case. Many features are tested but only for the following codes: `pw.x`, `cp.x`, `ph.x`, `epw.x`. Instructions for the impatient:

        cd test-suite
        make run-tests

Instructions for all others: go to the `test-suite/` directory, read the `README` file, or at least, type `make`. You may need to edit the `run-XX.sh` shells, defining variables `PARA_PREFIX` and `PARA_POSTFIX` (see below for their meaning).

### 2.7.2 Examples

There are many examples and reference data for almost every piece of QUANTUM ESPRESSO, but you have to manually inspect the results.

In order to use examples, you should edit file `environment_variables`, setting the following variables as needed.

> BIN_DIR: directory where executables reside
> PSEUDO_DIR: directory where pseudopotential files reside
> TMP_DIR: directory to be used as temporary storage area

The default values of BIN_DIR and PSEUDO_DIR should be fine, unless you have installed things in nonstandard places. TMP_DIR must be a directory where you have read and write access to, with enough available space to host the temporary files produced by the example runs, and possibly offering high I/O performance (i.e., don't use an NFS-mounted directory). NOTA BENE: do not use a directory containing other data: the examples will clean it!

If you have compiled the parallel version of QUANTUM ESPRESSO (this is the default if parallel libraries are detected), you will usually have to specify a launcher program (such as `mpirun` or `mpiexec`) and the number of processors: see Sec.3 for details. In order to do that, edit again the `environment_variables` file and set the `PARA_PREFIX` and `PARA_POSTFIX` variables as needed. Parallel executables will be run by a command like this:

          $PARA_PREFIX pw.x $PARA_POSTFIX -i file.in > file.out

For example, if the command line is like this (as for an IBM SP):

          poe pw.x -procs 4 -i file.in > file.out

you should set `PARA_PREFIX="poe"`, `PARA_POSTFIX="-procs 4"`. Furthermore, if your machine does not support interactive use, you must run the commands specified above through the batch queuing system installed on that machine. Ask your system administrator for instructions. For execution using OpenMP on N threads, use `PARA_PREFIX="env OMP_NUM_THREADS=N ... "`.

To run an example, go to the corresponding directory (e.g. `PW/examples/example01`) and execute:

          ./run_example

This will create a subdirectory `results/`, containing the input and output files generated by the calculation. Some examples take only a few seconds to run, while others may require up to several minutes.

In each example's directory, the `reference/` subdirectory contains verified output files, that you can check your results against. They were generated on a Linux PC using the Intel compiler. On different architectures the precise numbers could be slightly different, in particular if different FFT dimensions are automatically selected. For this reason, a plain diff of your results against the reference data doesn't work, or at least, it requires human inspection of the results.

The example scripts stop if an error is detected. You should look inside the last written output file to understand why.

Next: 2.8 Installation tricks and Up: 2 Installation Previous: 2.6 Compilation Contents