| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
| 2 |
|
| 3 |
<!--Converted with LaTeX2HTML 2019.2 (Released June 5, 2019) --> |
| 4 |
<HTML lang="EN"> |
| 5 |
<HEAD> |
| 6 |
<TITLE>2.7 Running tests and examples</TITLE> |
| 7 |
<META NAME="description" CONTENT="2.7 Running tests and examples"> |
| 8 |
<META NAME="keywords" CONTENT="user_guide"> |
| 9 |
<META NAME="resource-type" CONTENT="document"> |
| 10 |
<META NAME="distribution" CONTENT="global"> |
| 11 |
|
| 12 |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> |
| 13 |
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> |
| 14 |
<META NAME="Generator" CONTENT="LaTeX2HTML v2019.2"> |
| 15 |
|
| 16 |
<LINK REL="STYLESHEET" HREF="user_guide.css"> |
| 17 |
|
| 18 |
<LINK REL="next" HREF="node15.html"> |
| 19 |
<LINK REL="previous" HREF="node13.html"> |
| 20 |
<LINK REL="next" HREF="node15.html"> |
| 21 |
</HEAD> |
| 22 |
|
| 23 |
<BODY > |
| 24 |
<!--Navigation Panel--> |
| 25 |
<A |
| 26 |
HREF="node15.html"> |
| 27 |
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> |
| 28 |
<A |
| 29 |
HREF="node7.html"> |
| 30 |
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> |
| 31 |
<A |
| 32 |
HREF="node13.html"> |
| 33 |
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> |
| 34 |
<A ID="tex2html188" |
| 35 |
HREF="node1.html"> |
| 36 |
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> |
| 37 |
<BR> |
| 38 |
<B> Next:</B> <A |
| 39 |
HREF="node15.html">2.8 Installation tricks and</A> |
| 40 |
<B> Up:</B> <A |
| 41 |
HREF="node7.html">2 Installation</A> |
| 42 |
<B> Previous:</B> <A |
| 43 |
HREF="node13.html">2.6 Compilation</A> |
| 44 |
<B> <A ID="tex2html189" |
| 45 |
HREF="node1.html">Contents</A></B> |
| 46 |
<BR> |
| 47 |
<BR> |
| 48 |
<!--End of Navigation Panel--> |
| 49 |
<!--Table of Child-Links--> |
| 50 |
<A ID="CHILD_LINKS"><STRONG>Subsections</STRONG></A> |
| 51 |
|
| 52 |
<UL> |
| 53 |
<LI><A ID="tex2html190" |
| 54 |
HREF="node14.html#SECTION00037100000000000000">2.7.1 Test-suite</A> |
| 55 |
<LI><A ID="tex2html191" |
| 56 |
HREF="node14.html#SECTION00037200000000000000">2.7.2 Examples</A> |
| 57 |
</UL> |
| 58 |
<!--End of Table of Child-Links--> |
| 59 |
<HR> |
| 60 |
|
| 61 |
<H2><A ID="SECTION00037000000000000000"></A> |
| 62 |
<A ID="SubSec:Examples"></A> |
| 63 |
<BR> |
| 64 |
2.7 Running tests and examples |
| 65 |
</H2> |
| 66 |
|
| 67 |
<P> |
| 68 |
As a final check that compilation was successful, you may want to run some or |
| 69 |
all of the tests and examples. |
| 70 |
Notice that most tests and examples are devised to be run serially |
| 71 |
or on a small number of processors; do not use tests and examples |
| 72 |
to benchmark parallelism, do not try to run on too many processors. |
| 73 |
|
| 74 |
<P> |
| 75 |
|
| 76 |
<H3><A ID="SECTION00037100000000000000"> |
| 77 |
2.7.1 Test-suite</A> |
| 78 |
</H3> |
| 79 |
Automated tests give a "pass/fail" answer. All tests run quickly |
| 80 |
(less than a minute at most), but they are not meant to be realistic, |
| 81 |
just to test a specific case. Many features are tested but only for |
| 82 |
the following codes: <TT>pw.x</TT>, <TT>cp.x</TT>, <TT>ph.x</TT>, <TT>epw.x</TT>. |
| 83 |
Instructions for the impatient: |
| 84 |
<PRE> |
| 85 |
cd test-suite |
| 86 |
make run-tests |
| 87 |
</PRE> |
| 88 |
Instructions for all others: go to the <TT>test-suite/</TT> directory, |
| 89 |
read the <TT>README</TT> file, or at least, type <TT>make</TT>. You may need |
| 90 |
to edit the <TT>run-XX.sh</TT> shells, defining variables |
| 91 |
<TT>PARA_PREFIX</TT> and <TT>PARA_POSTFIX</TT> (see below for their |
| 92 |
meaning). |
| 93 |
|
| 94 |
<P> |
| 95 |
|
| 96 |
<H3><A ID="SECTION00037200000000000000"> |
| 97 |
2.7.2 Examples</A> |
| 98 |
</H3> |
| 99 |
There are many examples and reference data for almost every piece of Q<SMALL>UANTUM </SMALL>ESPRESSO, |
| 100 |
but you have to manually inspect the results. |
| 101 |
|
| 102 |
<P> |
| 103 |
In order to use examples, you should edit file <TT>environment_variables</TT>, |
| 104 |
setting the following variables as needed. |
| 105 |
<BLOCKQUOTE> |
| 106 |
BIN_DIR: directory where executables reside |
| 107 |
<BR> |
| 108 |
PSEUDO_DIR: directory where pseudopotential files reside |
| 109 |
<BR> |
| 110 |
TMP_DIR: directory to be used as temporary storage area |
| 111 |
|
| 112 |
</BLOCKQUOTE> |
| 113 |
The default values of BIN_DIR and PSEUDO_DIR should be fine, |
| 114 |
unless you have installed things in nonstandard places. TMP_DIR |
| 115 |
must be a directory where you have read and write access to, with |
| 116 |
enough available space to host the temporary files produced by the |
| 117 |
example runs, and possibly offering high I/O performance (i.e., don't |
| 118 |
use an NFS-mounted directory). NOTA BENE: do not use a |
| 119 |
directory containing other data: the examples will clean it! |
| 120 |
|
| 121 |
<P> |
| 122 |
If you have compiled the parallel version of Q<SMALL>UANTUM </SMALL>ESPRESSO (this |
| 123 |
is the default if parallel libraries are detected), you will usually |
| 124 |
have to specify a launcher program (such as <TT>mpirun</TT> or |
| 125 |
<TT>mpiexec</TT>) and the number of processors: see Sec.<A HREF="node17.html#Sec:para">3</A> for |
| 126 |
details. In order to do that, edit again the <TT>environment_variables</TT> |
| 127 |
file and set the <TT>PARA_PREFIX</TT> and <TT>PARA_POSTFIX</TT> variables |
| 128 |
as needed. Parallel executables will be run by a command like this: |
| 129 |
<PRE> |
| 130 |
$PARA_PREFIX pw.x $PARA_POSTFIX -i file.in > file.out |
| 131 |
</PRE> |
| 132 |
For example, if the command line is like this (as for an IBM SP): |
| 133 |
<PRE> |
| 134 |
poe pw.x -procs 4 -i file.in > file.out |
| 135 |
</PRE> |
| 136 |
you should set <TT>PARA_PREFIX="poe"</TT>, <TT>PARA_POSTFIX="-procs 4"</TT>. |
| 137 |
Furthermore, if your machine does not support interactive use, you |
| 138 |
must run the commands specified above through the batch queuing |
| 139 |
system installed on that machine. Ask your system administrator for |
| 140 |
instructions. For execution using OpenMP on N threads, |
| 141 |
use <TT>PARA_PREFIX="env OMP_NUM_THREADS=N ... "</TT>. |
| 142 |
|
| 143 |
<P> |
| 144 |
To run an example, go to the corresponding directory (e.g. |
| 145 |
<TT>PW/examples/example01</TT>) and execute: |
| 146 |
<PRE> |
| 147 |
./run_example |
| 148 |
</PRE> |
| 149 |
This will create a subdirectory <TT>results/</TT>, containing the input and |
| 150 |
output files generated by the calculation. Some examples take only a |
| 151 |
few seconds to run, while others may require up to several minutes. |
| 152 |
|
| 153 |
<P> |
| 154 |
In each example's directory, the <TT>reference/</TT> subdirectory contains |
| 155 |
verified output files, that you can check your results against. They |
| 156 |
were generated on a Linux PC using the Intel compiler. On different |
| 157 |
architectures the precise numbers could be slightly different, in |
| 158 |
particular if different FFT dimensions are automatically selected. For |
| 159 |
this reason, a plain diff of your results against the reference data |
| 160 |
doesn't work, or at least, it requires human inspection of the results. |
| 161 |
|
| 162 |
<P> |
| 163 |
The example scripts stop if an error is detected. You should look <EM>inside</EM> |
| 164 |
the last written output file to understand why. |
| 165 |
|
| 166 |
<P> |
| 167 |
<HR> |
| 168 |
<!--Navigation Panel--> |
| 169 |
<A |
| 170 |
HREF="node15.html"> |
| 171 |
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A> |
| 172 |
<A |
| 173 |
HREF="node7.html"> |
| 174 |
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A> |
| 175 |
<A |
| 176 |
HREF="node13.html"> |
| 177 |
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A> |
| 178 |
<A ID="tex2html188" |
| 179 |
HREF="node1.html"> |
| 180 |
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A> |
| 181 |
<BR> |
| 182 |
<B> Next:</B> <A |
| 183 |
HREF="node15.html">2.8 Installation tricks and</A> |
| 184 |
<B> Up:</B> <A |
| 185 |
HREF="node7.html">2 Installation</A> |
| 186 |
<B> Previous:</B> <A |
| 187 |
HREF="node13.html">2.6 Compilation</A> |
| 188 |
<B> <A ID="tex2html189" |
| 189 |
HREF="node1.html">Contents</A></B> |
| 190 |
<!--End of Navigation Panel--> |
| 191 |
|
| 192 |
</BODY> |
| 193 |
</HTML> |