wxmwy / ShengBTE

This is a GPU optimized version of ShengBTE.
GNU General Public License v3.0
11 stars 5 forks source link
cuda gpu shengbte

1.Src-gpu is a GPU optimized version of ShengBTE.

We ported the three phonon process to the GPU.

2.Src-knl is a version for KNL(or other CPU with a big num cores).

We have carried out vectorization optimization and multithreading optimization, which can get a good running speed with a small number of processes. A smaller number of processes means ShengBTE no longer requires a lot of memory.

ShengBTE: a solver for the Boltzmann transport equation for phonons

Authors:

How to download, compile and use ShengBTE

Development of ShengBTE is hosted at Bitbucket. The latest version can be downloaded using the "download" link at https://bitbucket.org/sousaw/shengbte. Alternatively, it is possible to clone its GIT repository from the command line with

git clone git@bitbucket.org/sousaw/shengbte.git ShengBTE

or from one of the many graphical frontends available.

To compile the code it is enough to run make in the Src subdirectory of the distribution, but a suitable arch.make must be present in that directory. An example is provided as arch.make.example. As a minimum, $MPIFC must contain a valid command to compile Fortran 90 code with MPI directives, while the combination of $LDFLAGS and $LIBS must contain any linker flags required in order to link against an implementation of LAPACK and against Atsushi Togo's spglib. ShengBTE uses some Fortran 2003 extensions, most notably its new syntax for array initialization, and a recent Fortran compiler is required that supports them; gfortran 4.8.2 and ifort 12.0.0 are known to work.

After compilation succeeds, a ShengBTE binary will be created in the root directory of the distribution. This executable takes no command-line options and accepts no input from the terminal. It can be invoked simply as

./ShengBTE

for serial mode, but most often it will be run using a command like

mpirun -n 32 ./ShengBTE 2>BTE.err >BTE.out

often as part of a script to be submitted to a batch system.

Input files

Exactly three files are required for a ShengBTE run: CONTROL, one of FORCE_CONSTANTS_2ND or espresso.ifc2, and FORCE_CONSTANTS_3RD. Their contents are detailed below; for a complete example, the reader is referred to the Test-VASP and Test-QE subdirectories of the distribution.

The CONTROL file

The contents of this file describe the system to be studied and specify a set of parameters and flags controlling execution. Its format is merely a sequence of four Fortran namelists, with a reasonably flexible syntax that should become apparent after looking at the example Test-*/CONTROL for zincblence InAs and GaAs. Some parameters and flags are mandatory, whereas others are optional and take a default value when unspecified.

The FORCE_CONSTANTS_2ND file

This file contains the second derivatives of the system's energy with respect to the Cartesian coordinates of the nuclei, i.e. the interatomic force constant matrix. Its format is precisely that chosen in Phonopy for the FORCE_CONSTANTS file, so that the result of a Phonopy calculation can be used directly. The first line of the file declares the total number of atoms in the supercell, npairs, which must be equal to scell(1) x scell(2) x scell(3) x natoms, and is followed by npairs blocks of four lines each. The first line of each of those blocks contains two integers with the 1-based indices of the atoms forming the pair; the remaining three lines contain the 3 x 3 matrix of second-order interatomic force constants linking those two atoms, in eV/Å2.

The espresso.ifc2 file

The information contained in this file is equivalent to that in FORCE_CONSTANTS_2ND, but the format is different. For details, consult the Quantum ESPRESSO documentation. Please note that although this file's header contains information about lattice vectors, atomic positions, Born effective charges and so forth, it is ignored by ShengBTE. It is the user's responsibility to ensure that espresso.ifc2 and CONTROL are compatible.

The FORCE_CONSTANTS_3RD file

Similarly, this file contains the third-order interatomic force constant matrix, but uses a sparse description to save space. All constants are implicitily refered to a central unit cell i taken as the origin of coordinates. The first line again contains a single integer, nb, which is followed by nb blocks with the following structure:

The following is an example of one such block:


  1
  0.000  0.000  0.000
  0.000  0.000  0.000
  1 1 1
  1 1 1    0.0000000000E+00
  1 1 2    0.0000000000E+00
  1 1 3    0.0000000000E+00
  1 2 1    0.0000000000E+00
  1 2 2    0.0000000000E+00
  1 2 3    0.2346653425E+02
  1 3 1    0.0000000000E+00
  1 3 2    0.2346653425E+02
  1 3 3    0.0000000000E+00
  2 1 1    0.0000000000E+00
  2 1 2    0.0000000000E+00
  2 1 3    0.2346653425E+02
  2 2 1    0.0000000000E+00
  2 2 2    0.0000000000E+00
  2 2 3    0.0000000000E+00
  2 3 1    0.2346653425E+02
  2 3 2    0.0000000000E+00
  2 3 3    0.0000000000E+00
  3 1 1    0.0000000000E+00
  3 1 2    0.2346653425E+02
  3 1 3    0.0000000000E+00
  3 2 1    0.2346653425E+02
  3 2 2    0.0000000000E+00
  3 2 3    0.0000000000E+00
  3 3 1    0.0000000000E+00
  3 3 2    0.0000000000E+00
  3 3 3    0.0000000000E+00

Output files

Many files including temperature-dependent directories are created during a successful run of ShengBTE. They contain not only the thermal conductivity and related quantities, but also a set of intermediate results that may be useful to diagnose problems. For some quantites, values only for the q points in the irreducible wedge are output, values for the rest can be recovered by looking into the equivilent points in the irreducible wedge. This section includes a brief description of their contents.

Under temperature-dependent directories: