:: home
:: team
Pwscf Pwscf Pwscf
PwscfHOME
Pwscf Pwscf
Pwscf Pwscf
Pwscf Pwscf
Pwscf
Menu Pwscf
Pwscf Pwscf

::

about PWscf
Pwscf Pwscf

::
Pwscf Pwscf

::

user's guide
Pwscf Pwscf

::

download PWscf
Pwscf Pwscf

::

tests and examples
Pwscf Pwscf

::

pseudopotentials
Pwscf Pwscf

::

scientific literature
Pwscf Pwscf
Pwscf

USER'S GUIDE 1.1> Installation
Pwscf
Pwscf
Pwscf


Pwscf Installation


Subsections

  Summary
Pwscf Pwscf


Uncompress and unpack the code in an empty directory of your choice that will become the root directory of the distribution. On Linux machines, you may use:

tar -xvzf pw.?.?.?.tgz.

On other Unix machines:

gzip -dc pw.?.?.?.tgz | tar -xvf -

From the root directory, give the command:

make your-system

where your-system is one among the following:

ibmsp: IBM SP parallel machines, IBM compiler
t3e: Cray T3E parallel machines, Cray compiler
origin: SGI Origin parallel machines, SGI compiler
ibm: IBM RS/6000 workstation, IBM compiler
alpha: Compaq alpha workstations, Compaq compiler
alphaMPI: Compaq alpha parallel machines, Compaq compiler
beowulf: Linux Beowulf (PC cluster), Portland compiler
beo_ifc: Linux Beowulf (PC cluster), Intel compiler
pc_abs: Linux PCs, Absoft compiler
pc_pgi: Linux PCs, Portland compiler
pc_ifc: Linux PCs, Intel compiler
fujitsu: Fujitsu vector machines, Fujitsu compiler.
This will copy the appropriate Makefile for your system into a file make.sys in the root directory. Edit this file and adapt it to your configuration. In most cases you will need to specify the name and location of libraries.

Then:

make pw produces main/pw.x (electronic and ionic optimization)
make ph produces main/ph.x (phonons)
make pp produces main/pp.x (postprocessing)
make d3 produces main/d3.x (third-order energy derivatives).

Please Note: if you change compilation or precompilation options after the first compilation, give command make clean and recompile everything (unless you now exactly which routines are affected by compilation or precompilation options and how to force their recompilation).

TOP

  Libraries
Pwscf Pwscf


PWscf requires as a strict minimum the linear algebra Blas/Lapack libraries. It is usually convenient to use optimized Blas/Lapack provided by vendor-specific mathematical libraries, such as:

essl for IBM
complib.sgimath for SGI Origin
scilib for Cray/T3e
cxml for Compaq Alphas.
Otherwise, it is a good idea to use optimized Atlas libraries instead of plain Blas/Lapack. If these are not installed or not satisfactory on your system, download the appropriate binaries from http://www.netlib.org/ or download and compile the sources (may take some time).

PWscf has a generic fortran routine for Fast Fourier-Transform (use -DCERNFFT in the preprocessing flags), but this is unsuitable for serious use. We can use either FFT's from vendor-specific mathematical libraries, or from the fftw library: http://www.fftw.org/.

In the default make.sys, we chose what we think is the better choice for all machines. If you want or need to try different possibiliies, you may need to specify or to change some preprocessing options in make.sys. In any case you need to specify the location of the libraries, unless the default values are ok.

TOP

  Machine-specific installation issues
Pwscf Pwscf


IBM SP machines

Try to add -DHAS_ZHEGVX to CPPFLAGS: the code should run somewhat faster. It is included in recent Lapack distributions. It should work for all machines, but the advantage is more evident for parallel machines.

Linux PC

Since there is no standard compiler for Linux, different compilers have different ideas about the right way to call external libraries. As a consequence you may have a mismatch between what your compiler thinks is the name of a library call, and how it is actually written in the library. Use command nm to determine the name of a library call, as in the following examples:

nm /usr/local/lib/libblas.a | grep T | grep -i daxpy

nm /usr/local/lib/liblapack.a | grep T | grep -i zhegv

nm /usr/local/lib/libfftw.a | grep T | grep -i fftw_f77

where the ''standard'' (so to speak) location and name of libraries is assumed. Most precompiled libraries have lowercase names with one or two underscores (_) appended. Knowing that

  • the Absoft compiler is case-sensitive (like C and unlike other Fortran compilers) and does not add an underscore to symbol names;
  • both Portland compiler (pgi) and Intel compiler (ifc) are case insensitive and add an underscore to symbol names;
you can select the appropriate precompilation options in make.sys. The present default values will work for Blas/Atlas/Lapack with lowercase names, one underscore added; for fftw with lowercase names, compiled using the same fortran compiler.

Note for Absoft compiler: If your libraries contain uppercase or mixed case names, you are out of luck. You must either recompile your own libraries, or change the #define's in include/machine.h.

Note for Portland compiler: If you compile fftw from sources, make sure that f77 executes pgf77 (by adding or changing a link in /usr/bin/f77 for instance) or otherwise the ''configure'' step will not recognize the presence of the Portland compiler.

Linux PCs with Intel compiler (ifc)

The I/O libraries used by the Intel compiler ifc are incompatible with those called by most precompiled Blas/Lapack libraries: you get error messages at linking stage. The problem does not exist if one uses the Intel Mathematical Kernel Library (MKL) (for Pentium 3 and higher Intel CPUs only: add -DMKL to CPPFLAGS).

If you do not have or cannot use MKL, you should use Atlas optimized Blas/Lapack libraries instead. To avoid the I/O incompatibility problem, recompile everything from scratch or (better) replace the Blas routine xerbla and Lapack routine dlamch (the only two containing I/O calls) with recompiled objects:

ifc -c xerbla.f
ifc -O0 -c dlamch.f (DO NOT REMOVE -O0)
and replace them into the library using (for instance):

ar rv /usr/local/lib/libatlas.a xerbla.o dlamch.o.

T3E

If symbols LPUTP, LGETV, LSETV are undefined, you need to load the ''benchlib'', if available on your system, or to remove -DT3D_BENCHLIB from precompilation flags (make clean, recompile), if not.

T3E machines may not have the fftw library installed. If you do not manage to compile fftw from sources, remove -DFFTW from precompilation flags (make clean, recompile). Routines from standard t3e libraries (somewhat slower than those of fftw) will be used instead.

TOP

  Available codes
Pwscf Pwscf


There are a few adjustable parameters in include/pwcom.inc. The present values will work for most cases. All other variables are dynamically allocated: you do not need to recompile your code for a different system.

The following codes can be compiled using make and will appear in subdirectory main/:

  • pw.x calculates electronic structure, structural optimization, molecular dynamics. Type make pw.
  • ph.x calculates phonon frequencies and displacement patterns, dielectric tensors, effective charges. Type make ph.
  • d3.x calculates anharmonic phonon lifetimes. Type make d3.

Moreover the following postprocessing codes are available in main/:

  • pp.x extracts data to be processed from the files produced by pw.x
  • projwfc.x calculates projections of wavefunction over atomic orbitals and performs Löwdin population analysis
  • chdens.x plots data produced by pp.x and produces a suitable input file for plotrho.x, which produces PostScript graphs
  • average.x calculates planar averages of potentials
  • voronoy.x divides the charge density into Voronoy polyhedra
  • dos.x calculates the Density of States (DOS).
To compile code NN.x, type make NN.

The command make without arguments will give a list of possible commands. Note that make pw must precede all other compilations.

Utility programs for pseudopotential format conversion are in subdirectory pslib/.

Finally, utility programs for phonon calculations are in subdirectory tools/:

  • dynmat.x calculates LO phonons at q=0 in insulator
  • q2r.x calculates Interatomic Force Constants ion real space from dynamical matrices produced by ph.x on a regular q-grid
  • matdyn.x produces phonon frequencies at a generic wave vector using the Interatomic Force Constants calculated by q2r.x
  • dos.x calculates vibrational DOS
  • fqha.x for quasi-harmonic calculations
To compile code NN.x, first cd tools, then type make NN.x.

TOP

 

Pwscf
Pwscf      powered by Incipit