Working Fortran-95 and C compilers are needed in order to compile QUANTUM ESPRESSO. Most ``Fortran-90'' compilers actually implement the Fortran-95 standard, but older versions may not be Fortran-95 compliant. Moreover, C and Fortran compilers must be in your PATH. If configure 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 configure.
If you get Compiler Internal Error' 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.
If you get error messages at the loading phase that look like file XYZ.o: unknown / not recognized/ invalid / wrong file type / file format / module version, one of the following things have happened:
If you get mysterious errors in the provided tests and examples: your compiler, or your mathematical libraries, or MPI libraries, or a combination thereof, is very likely buggy. Although the presence of subtle bugs in QUANTUM ESPRESSO that are not revealed during the testing phase can never be ruled out, it is very unlikely that this happens on the provided tests and examples.
Use ./configure ARCH=crayxt4 or else configurewill not recognize the Cray-specific software environment. Older Cray machines: T3D, T3E, X1, are no longer supported.
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 will not give you any advantage and you may run into trouble.
Currently the following compilers are supported by configure: Intel (ifort), Portland (pgf90), g95, gfortran, Pathscale (pathf95), Sun Studio (sunf95), AMD Open64 (openf95). The ordering approximately reflects the quality of support. Both Intel MKL and AMD acml mathematical libraries are supported. Some combinations of compilers and of libraries may however require manual editing of make.sys.
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).
If you get errors like IPO Error: unresolved : __svml_cos2 at the linking stage, your compiler is optimized to use the SSE version of sine, cosine etc. contained in the SVML library. Append -lsvml to the list of libraries in your make.sys file (info by Axel Kohlmeyer, oct.2007).
QUANTUM ESPRESSO does not work reliably, or not at all, with many old
versions (< 6.1
Version 2.99 of the Pathscale EKO compiler (web site
http://www.pathscale.com/)
works and is recognized by
configure, but the preprocessing command, pathcc -E,
causes a mysterious error in compilation of iotk and should be replaced by
gfortran v.4.1.2 and later are supported. Earlier gfortran versions used to produce nonfunctional phonon executables (segmentation faults and the like), but more recent versions should be fine.
If you experience problems in reading files produced by previous versions
of QUANTUM ESPRESSO: ``gfortran used 64-bit record markers to allow writing of records
larger than 2 GB. Before with 32-bit record markers only records <
``Using gfortran v.4.4 (after May 27, 2009) and 4.5 (after May 5, 2009) can
produce wrong results, unless the environment variable
GFORTRAN_UNBUFFERED_ALL=1 is set. Newer 4.4/4.5 versions
(later than April 2010) should be OK. See
g95 v.0.91 and later (http://www.g95.org) works flawlessy.
The executables it produces are however slower (let us say 20% or so)
that those produced by gfortran, which in turn are slower
(by another 20% or so) than those produced by ifort.
``The Sun Studio compiler, sunf95, is free (web site:
http://developers.sun.com/sunstudio/ and comes
with a set of algebra libraries that can be used in place of the slow
built-in libraries. It also supports openmp, which g95 does not. On the
other hand, it is a pain to compile mpi with it. Furthermore the most
recent version has a terrible bug that totally miscompiles the iotk
input/output library (you'll have to compile it with reduced optimization).''
(info by Lorenzo Paulatto, March 2010).
The AMD Open64 compiler suite, openf95 (web site:
http://developer.amd.com/cpu/open64/pages/default.aspx)
can be freely downloaded from the AMD site.
It is recognized by configure but little tested. It sort of works
but it fails to pass several tests.
(info by Paolo Giannozzi, March 2010).
The Intel compiler, ifort, is available for free for personal
usage (http://software.intel.com/) It seem to produce the faster executables,
at least on Intel CPUs, but not all versions work as expected.
ifort versions < 9.1
If configure doesn't find the compiler, or if you get
Error loading shared libraries 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.
The warning: feupdateenv is not implemented and will always fail,
showing up in recent versions, can be safely ignored.
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.
ifort v.11: Segmentation faults were reported for the combination
ifort 11.0.081, MKL 10.1.1.019, openMP 1.3.3. The problem disappeared
with ifort 11.1.056 and MKL 10.2.2.025 (Carlo Nervi, Oct. 2009).
ifort v.10: on 64-bit AMD CPUs, at least some versions of ifort 10.1
miscompile subroutine write_rho_xml in
Module/xml_io_base.f90 with -O2
optimization. Using -O1 instead solves the problem (info by Carlo
Cavazzoni, March 2008).
"The intel compiler version 10.1.008 miscompiles a lot of codes (I have proof
for CP2K and CPMD) and needs to be updated in any case" (info by Axel
Kohlmeter, May 2008).
ifort v.9: The latest (July 2006) 32-bit version of ifort 9.1
works flawlessy. Earlier versions yielded
Compiler Internal Error.
configure should recognize properly installed MKL libraries.
By default the non-threaded version of MKL is linked, unless option
configure -with-openmp is specified. In case of trouble,
refer to the following web page to find the correct way to link MKL:
MKL contains optimized FFT routines and a FFTW interface, to be separately
compiled. For 64-bit Intel Core2 processors, they are slightly faster than
FFTW (MKL v.10, FFTW v.3 fortran interface, reported by P. Giannozzi,
November 2008).
For parallel (MPI) execution on multiprocessor (SMP) machines, set the
environmental variable OMP_NUM_THREADS to 1 unless you know what you
are doing. See Sec.3 for more info on this
and on the difference between MPI and OpenMP parallelization.
Apart from such problems, QUANTUM ESPRESSO compiles and works on all non-buggy, properly
configured hardware and software combinations. You may have to
recompile MPI libraries: not all MPI installations contain support for
the fortran-90 compiler of your choice (or for any fortran-90 compiler
at all!). Useful step-by-step instructions for MPI comilation can be
found in the following post by Javier Antonio Montoya:
If QUANTUM 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 QUANTUM ESPRESSO does not read from standard input,
due to the configuration of MPI libraries: see Sec.3.2.
If you are dissatisfied with the performances in parallel execution,
see Sec.3 and in particular Sec.9.4.
See also the following post from Axel Kohlmeyer:
Newer Mac OS-X machines (10.4 and later) with Intel CPUs are supported
by configure,
with gcc4+g95, gfortran, and the Intel compiler ifort with MKL libraries.
Parallel compilation with OpenMPI also works.
"Uninstall darwin ports, fink and developer tools. The presence of all of
those at the same time generates many spooky events in the compilation
procedure. I installed just the developer tools from apple, the intel
fortran compiler and everything went on great" (Info by Riccardo Sabatini,
Nov. 2007)
An updated version of Developer Tools (XCode 2.4.1 or 2.5), that can be
downloaded from Apple, may be needed. Some tests fails with mysterious
errors, that disappear if
fortran BLAS are linked instead of system Atlas libraries. Use:
``I have performed some limited amount of tests, and everything seems to
be fine under macports supplied environment up to now. I have installed
using the following manner:''
SGI Mips machines (e.g. Origin) and HP-Compaq Alpha machines are
no longer supported since v.4.2.
2.7.4.2 Linux PCs with Pathscale compiler
/lib/cpp -P --traditional
The MVAPICH parallel environment with Pathscale compilers also works.
(info by Paolo Giannozzi, July 2008)
2.7.4.3 Linux PCs with gfortran
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43551."
(Info by Tobias Burnus, March 2010).
2.7.4.4 Linux PCs with g95
2.7.4.5 Linux PCs with Sun Studio compiler
2.7.4.6 Linux PCs with AMD Open64 suite
2.7.4.7 Linux PCs with Intel compiler (ifort)
2.7.4.8 Linux PCs with MKL libraries
On Intel CPUs it is very convenient to use Intel MKL libraries. They can be
also used for AMD CPU, selecting the appropriate machine-optimized
libraries, and also together with non-Intel compilers. Note however
that recent versions of MKL (10.2 and following) do not perform
well on AMD machines.
http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/.
2.7.4.9 Linux PCs with ACML libraries
For AMD CPUs, especially recent ones, you may find convenient to
link AMD acml libraries (can be freely downloaded from AMD web site).
configure should recognize properly installed acml libraries,
together with the compilers most frequently used on AMD systems:
pgf90, pathscale, openf95, sunf95.
PC clusters running some version of MPI are a very popular
computational platform nowadays. QUANTUM 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.
configure should automatically recognize a properly installed
parallel environment and prepare for parallel compilation.
Unfortunately this not always happens. In fact:
2.7.5 Linux PC clusters with MPI
http://www.democritos.it/pipermail/pw_forum/2008April/008818.htm.
http://www.democritos.it/pipermail/pw_forum/2008-April/008796.html
2.7.6 Intel Mac OS X
2.7.6.1 Intel Mac OS X with ifort
2.7.6.2 Intel Mac OS X 10.4 with g95 and gfortran
BLAS_LIBS_SWITCH = internal
BLAS_LIBS = /path/to/espresso/BLAS/blas.a -latlas
(Info by Paolo Giannozzi, jan.2008, updated April 2010)
2.7.6.3 Intel Mac OS X 10.6
port install gcc43
port install g95
(rename apple supplied mpi to something else)
(dowload and install openmpi )
./configure CC=gcc-mp-4.3 CPP=cpp-mp-4.3 CXX=g++-mp-4.3 F77=g95 FC=g95
(download and install QUANTUM ESPRESSO)
./configure CC=gcc-mp-4.3 CPP=cpp-mp-4.3 CXX=g++-mp-4.3 F77=g95 FC=g95
(Info by Osman Baris Malcioglu, May 2010)
2.7.7 SGI, Alpha
Next: 3 Parallelism
Up: 2 Installation
Previous: 2.6 Running examples
Contents
Paolo Giannozzi
2010-05-07