1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2019.2 (Released June 5, 2019) -->
<HTML lang="EN">
<HEAD>
<TITLE>2.8 Installation tricks and problems</TITLE>
<META NAME="description" CONTENT="2.8 Installation tricks and problems">
<META NAME="keywords" CONTENT="user_guide">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
<META NAME="Generator" CONTENT="LaTeX2HTML v2019.2">
<LINK REL="STYLESHEET" HREF="user_guide.css">
<LINK REL="next" HREF="node16.html">
<LINK REL="previous" HREF="node14.html">
<LINK REL="next" HREF="node16.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A
HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="node7.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<A ID="tex2html192"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A
HREF="node16.html">2.9 Cray machines</A>
<B> Up:</B> <A
HREF="node7.html">2 Installation</A>
<B> Previous:</B> <A
HREF="node14.html">2.7 Running tests and</A>
<B> <A ID="tex2html193"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A ID="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A ID="tex2html194"
HREF="node15.html#SECTION00038100000000000000">2.8.1 All architectures</A>
<LI><A ID="tex2html195"
HREF="node15.html#SECTION00038200000000000000">2.8.2 Linux PC</A>
<UL>
<LI><A ID="tex2html196"
HREF="node15.html#SECTION00038210000000000000">2.8.2.1 Linux PCs with gfortran</A>
<LI><A ID="tex2html197"
HREF="node15.html#SECTION00038220000000000000">2.8.2.2 Linux PCs with Intel compiler (ifort)</A>
<LI><A ID="tex2html198"
HREF="node15.html#SECTION00038230000000000000">2.8.2.3 Linux PCs with MKL libraries</A>
<LI><A ID="tex2html199"
HREF="node15.html#SECTION00038240000000000000">2.8.2.4 Linux PCs with AMD processors</A>
</UL>
<BR>
<LI><A ID="tex2html200"
HREF="node15.html#SECTION00038300000000000000">2.8.3 Linux PC clusters with MPI</A>
<LI><A ID="tex2html201"
HREF="node15.html#SECTION00038400000000000000">2.8.4 Microsoft Windows</A>
<LI><A ID="tex2html202"
HREF="node15.html#SECTION00038500000000000000">2.8.5 Mac OS</A>
</UL>
<!--End of Table of Child-Links-->
<HR>
<H2><A ID="SECTION00038000000000000000">
2.8 Installation tricks and problems</A>
</H2>
<P>
<H3><A ID="SECTION00038100000000000000">
2.8.1 All architectures</A>
</H3>
<UL>
<LI>Working Fortran and C compilers, compliant with F2003 and C89 standards
(see Sec.<A HREF="node9.html#Sec:Installation">2.2</A>)
respectively, are needed in order to compile Q<SMALL>UANTUM </SMALL>ESPRESSO. Most recent Fortran
compilers will do the job.
<P>
C and Fortran compilers must be in your PATH.
If <TT>configure</TT> says that you have no working compiler, well,
you have no working compiler, at least not in your PATH, and
not among those recognized by <TT>configure</TT>.
</LI>
<LI>If you get <EM>Compiler Internal Error</EM> or similar messages: your
compiler version is buggy. Try to lower the optimization level, or to
remove optimization just for the routine that has problems. If it
doesn't work, or if you experience weird problems at run time, try to
install patches for your version of the compiler (most vendors release
at least a few patches for free), or to upgrade to a more recent
compiler version.
</LI>
<LI>If you get error messages at the loading phase that look like
<EM>file XYZ.o: unknown / not recognized/ invalid / wrong
file type / file format / module version</EM>,
one of the following things have happened:
<OL>
<LI>you have leftover object files from a compilation with another
compiler: run <TT>make clean</TT> and recompile.
</LI>
<LI><TT>make</TT> did not stop at the first compilation error (it may
happen in some software configurations). Remove the file *.o
that triggers the error message, recompile, look for a
compilation error.
</LI>
</OL>
If many symbols are missing in the loading phase: you did not specify the
location of all needed libraries (LAPACK, BLAS, FFTW, machine-specific
optimized libraries), in the needed order.
Note that Q<SMALL>UANTUM </SMALL>ESPRESSO is self-contained (with the exception of MPI libraries for
parallel compilation): if system libraries are missing, the problem is in
your compiler/library combination or in their usage, not in Q<SMALL>UANTUM </SMALL>ESPRESSO.
</LI>
<LI>If you get <EM>Segmentation fault</EM> or similar errors
in the provided tests and examples: your compiler, or
your mathematical libraries, or MPI libraries,
or a combination thereof, is buggy, or there is some
software incompatibility. Although one can never rule out
the presence of subtle bugs in Q<SMALL>UANTUM </SMALL>ESPRESSO that are not revealed during
the testing phase, it is very unlikely
that this happens on the provided tests and examples.
</LI>
<LI>If all test fails, look into the output and error files:
there is some dumb reason for failure.
</LI>
<LI>If most test pass but some fail, again: look into the output
and error files. A frequent source of trouble is complex function
<TT>zdotc</TT>. See the "Linux PCs with gfortran compilers" paragraph,
or replace <TT>zdotc</TT> with fortran intrinsic <TT>dot_product</TT>.
</LI>
</UL>
<P>
<H3><A ID="SECTION00038200000000000000">
2.8.2 Linux PC</A>
</H3>
<P>
Both AMD and Intel CPUs, 32-bit and 64-bit, are supported and work,
either in 32-bit emulation and in 64-bit mode. 64-bit executables
can address a much larger memory space than 32-bit executable, but
there is no gain in speed.
Beware: the default integer type for 64-bit machine is typically
32-bit long. You should be able to use 64-bit integers as well,
but it is not guaranteed to work and will not give
any advantage anyway.
<P>
Currently, <TT>configure</TT> supports Intel (ifort), NAG (nagfor), PGI (pgf90)
and gfortran compilers. Pathscale, Sun Studio, AMD Open64, are no
longer supported after v.6.2: g95, since v.6.1.
<P>
Both Intel MKL and AMD acml mathematical libraries are supported, the
former much better than the latter.
<P>
It is usually convenient to create semi-statically linked executables (with only
libc, libm, libpthread dynamically linked). If you want to produce a binary
that runs on different machines, compile it on the oldest machine you have
(i.e. the one with the oldest version of the operating system).
<P>
<H4><A ID="SECTION00038210000000000000">
2.8.2.1 Linux PCs with gfortran</A>
</H4>
<P>
Gfortran v.4.8.5, still often found on CentOS machines, no longer compiles
Q<SMALL>UANTUM </SMALL>ESPRESSO v.6.6 or later, due to a gfortran bug. You need at least gfortran v.4.9.X.
<P>
"There is a known incompatibility problem between different calling
convention for Fortran functions that return complex values [...]
If your code crashes during a call to <TT>zdotc</TT>,
recompile Q<SMALL>UANTUM </SMALL>ESPRESSO using the internal BLAS and LAPACK routines
(using <TT>configure</TT> options <TT>–with-internal-blas</TT> and
<TT>–with-internal-lapack</TT>)
to see if the problem disappears; or, add the <TT>-ff2c</TT> flag"
(info by Giovanni Pizzi, Jan. 2013).
<P>
If you want to use MKL libraries together with gfortran,
link <TT>-lmkl_gf_lp64</TT>, not <TT>-lmkl_intel_lp64</TT>
(and the like for other architectures).
<P>
<H4><A ID="SECTION00038220000000000000">
2.8.2.2 Linux PCs with Intel compiler (ifort)</A>
</H4>
<P>
IMPORTANT NOTE: ifort versions earlier than v.15 miscompile the new
XML code in QE v.6.4 and later. Please install this patch:
<BR><TT>https://gitlab.com/QEF/q-e/wikis/Support/Patch-for-old-Intel-compilers</TT>.
<P>
The Intel compiler ifort <TT>http://software.intel.com/</TT>
produces fast executables, at least on Intel CPUs, but not all versions
work as expected. In case of trouble, update your version
with the most recent patches. Since each major release of ifort
differs a lot from the previous one, compiled objects from different
releases may be incompatible and should not be mixed.
<P>
The Intel compiler is no longer free for personal usage, but it is still
for students and open-source contributors
(<TT>https://software.intel.com/en-us/qualify-for-free-software</TT>).
<P>
If <TT>configure</TT> doesn't find the compiler, or if you get
<EM>Error loading shared libraries</EM> at run time, you may have
forgotten to execute the script that
sets up the correct PATH and library path. Unless your system manager has
done this for you, you should execute the appropriate script – located in
the directory containing the compiler executable – in your
initialization files. Consult the documentation provided by Intel.
<P>
The warning: <EM>feupdateenv is not implemented and will always fail</EM>,
can be safely ignored. Warnings on ``bad preprocessing option'' when compiling
iotk and complains about ``recommended formats'' may also be ignored.
<P>
<H4><A ID="SECTION00038230000000000000">
2.8.2.3 Linux PCs with MKL libraries</A>
</H4>
On Intel CPUs it is very convenient to use Intel MKL libraries
(freely available at
<TT>https://software.intel.com/en-us/performance-libraries</TT>).
MKL libraries can be used also with non-Intel compilers.
They work also for AMD CPU, selecting the appropriate machine-optimized
libraries: see ``Linux PCs with AMD processors''.
<P>
<TT>configure</TT> properly detects only recent (v.12 or later) MKL libraries,
as long as the $MKLROOT environment variable is set in the current shell.
Normally this environment variable is set by sourcing the Intel MKL or Intel
Parallel Studio environment script.
By default the non-threaded version of MKL is linked, unless option
<TT>configure –with-openmp</TT> is specified. In case of trouble,
refer to the following web page to find the correct way to link MKL:
<BR><TT>http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/</TT>.
<P>
For parallel (MPI) execution on multiprocessor (SMP) machines, set the
environment variable OMP_NUM_THREADS to 1 unless you know what you
are doing. See Sec.<A HREF="node17.html#Sec:para">3</A> for more info on this
and on the difference between MPI and OpenMP parallelization.
<P>
If you get a mysterious "too many communicators" error and a
subsequent crash: there is a bug in Intel MPI and MKL 2016 update 3.
See this thread and the links quoted therein:
<code>http://www.mail-archive.com/pw_forum@pwscf.org/msg29684.html</code>.
<P>
<H4><A ID="SECTION00038240000000000000">
2.8.2.4 Linux PCs with AMD processors</A>
</H4>
For AMD CPUs you may find convenient to link AMD acml libraries
(can be freely downloaded from AMD web site).
<TT>configure</TT> should recognize properly installed acml libraries.
UPDATE (February 2020): ACML have been discontinued. There are new
libraries called AMD Optimizing CPU Libraries (AOCL), tuned for the
AMD EPYC processor family.
`` Recently I played around with some AMD EPYC cpus and the bad thing
is that I also saw some strange numbers when using libflame/aocl 2.1.
(...) Since version 2020 the MKL performs rather well when using AMD cpus,
however, if you want to get the best performance you have to additionally set:
<PRE>
export MKL_DEBUG_CPU_TYPE=5
</PRE>
which gives an additional 10-20% speedup with MKL 2020,
while for earlier versions the speedup is greater than 200%.
[...] Another note, there seem to be problems using FFTW interface
of MKL with AMD cpus. To get around this problem, one has to
additionally set
<PRE>
export MKL_CBWR=AUTO
</PRE>
`` (Info by Tobias Klöffel, Feb. 2020)
<P>
<H3><A ID="SECTION00038300000000000000"></A>
<A ID="SubSec:LinuxPCMPI"></A>
<BR>
2.8.3 Linux PC clusters with MPI
</H3>
PC clusters running some version of MPI are a very popular
computational platform nowadays. Q<SMALL>UANTUM </SMALL>ESPRESSO is known to work
with at least two of the major MPI implementations (MPICH, LAM-MPI),
plus with the newer MPICH2 and OpenMPI implementation.
<TT>configure</TT> should automatically recognize a properly installed
parallel environment and prepare for parallel compilation.
Unfortunately this not always happens. In fact:
<UL>
<LI><TT>configure</TT> tries to locate a parallel compiler in a logical
place with a logical name, but if it has a strange names or it is
located in a strange location, you will have to instruct <TT>configure</TT> to find it. Note that in many PC clusters (Beowulf), there is no
parallel Fortran compiler in default installations: you have to
configure an appropriate script, such as mpif90.
</LI>
<LI><TT>configure</TT> tries to locate libraries (both mathematical and
parallel libraries) in the usual places with usual names, but if
they have strange names or strange locations, you will have to
rename/move them, or to instruct <TT>configure</TT> to find them. If MPI
libraries are not found,
parallel compilation is disabled.
</LI>
<LI><TT>configure</TT> tests that the compiler and the libraries are
compatible (i.e. the compiler may link the libraries without
conflicts and without missing symbols). If they aren't and the
compilation fails, <TT>configure</TT> will revert to serial compilation.
</LI>
</UL>
<P>
Apart from such problems, Q<SMALL>UANTUM </SMALL>ESPRESSO compiles and works on all non-buggy, properly
configured hardware and software combinations. In some cases you may have to
recompile MPI libraries: not all MPI installations contain support for
the Fortran compiler of your choice (or for any Fortran compiler
at all!).
<P>
If Q<SMALL>UANTUM </SMALL>ESPRESSO does not work for some reason on a PC cluster,
try first if it works in serial execution. A frequent problem with parallel
execution is that Q<SMALL>UANTUM </SMALL>ESPRESSO does not read from standard input,
due to the configuration of MPI libraries: see Sec.<A HREF="node21.html#SubSec:badpara">3.4</A>.
If you are dissatisfied with the performances in parallel execution,
see Sec.<A HREF="node17.html#Sec:para">3</A> and in particular Sec.<A HREF="node21.html#SubSec:badpara">3.4</A>.
<P>
<H3><A ID="SECTION00038400000000000000"></A>
<A ID="SubSec:Windows"></A>
<BR>
2.8.4 Microsoft Windows
</H3>
Since February 2020 Q<SMALL>UANTUM </SMALL>ESPRESSO can be compiled on MS-Windows 10 using PGI 19.10
Community Edition (freely downloadable). <TT>configure</TT> works with the bash
script provided by PGI but the <TT>configure</TT> of FoX fails: use script
<TT>install/build_fox_with_pgi.sh</TT> to manually compile FoX.
<P>
Another option: use MinGW/MSYS. Download the installer from
<TT>https://osdn.net/projects/mingw/</TT>, install MinGW, MSYS, gcc and
gfortran. Start a shell window; run "./configure"; edit <TT>make.inc</TT>;
uncommenting the second definition of TOPDIR (the first one introduces a
final "/" that Windows doesn't like); run "make". Note that on some Windows
the code fails when checking that <TT>tmp_dir</TT> is writable, for unclear
reasons.
<P>
Another option is Cygwin, a UNIX environment which runs under Windows: see
<BR><TT>http://www.cygwin.com/</TT>.
<P>
Windows-10 users may also enable the Windows Subsystem for Linux (see here:
<BR><TT>https://docs.microsoft.com/en-us/windows/wsl/install-win10</TT>),
install a Linux distribution, compile Q<SMALL>UANTUM </SMALL>ESPRESSO as on Linux. It works very well.
<P>
As a final option, one can use Quantum Mobile:
<BR><TT>https://www.materialscloud.org/work/quantum-mobile</TT>.
<P>
<H3><A ID="SECTION00038500000000000000">
2.8.5 Mac OS</A>
</H3>
<P>
Mac OS-X machines with gfortran or with the Intel compiler ifort
and MKL libraries should work, but "your mileage may vary", depending
upon the specific software stack you are using. Parallel compilation
with OpenMPI should also work.
<P>
If you get an error like
<PRE>
clang: error: no input files
make[1]: *** [laxlib.fh] Error 1
make: *** [libla] Error 1i
</PRE>
redefine <TT>CPP</TT> as <TT>CPP=gcc -E</TT> in <TT>make.inc</TT>.
<P>
Gfortran information and binaries for Mac OS-X here:
<TT>http://hpc.sourceforge.net/</TT> and
<TT>https://wiki.helsinki.fi/display/HUGG/GNU+compiler+install+on+Mac+OS+X</TT>.
<P>
Mysterious crashes in <TT>zdotc</TT> are due to a known incompatibility of
complex functions with some optimized BLAS. See the "Linux PCs with gfortran"
paragraph.
<P>
<HR>
<!--Navigation Panel-->
<A
HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="node7.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<A ID="tex2html192"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A
HREF="node16.html">2.9 Cray machines</A>
<B> Up:</B> <A
HREF="node7.html">2 Installation</A>
<B> Previous:</B> <A
HREF="node14.html">2.7 Running tests and</A>
<B> <A ID="tex2html193"
HREF="node1.html">Contents</A></B>
<!--End of Navigation Panel-->
</BODY>
</HTML>
|