Minor fixes

This commit is contained in:
gmatteo 2020-09-23 15:03:09 +02:00
parent 0aaf6a871a
commit 6287a51be0
7 changed files with 67 additions and 69 deletions

View File

@ -45,7 +45,7 @@ Tested with __CentOS 8.2__
- [NetCDF](https://www.unidata.ucar.edu/software/netcdf): Network Common Data Form
- [libXC](https://tddft.org/programs/libxc/download/): Library of exchange-correlation functionals
6. __Optional supported librairies:__
6. __Optional libraries:__
- [FFTW3](http://www.fftw.org/): Library for computing the discrete Fourier transform, **recommended with GNU**
- [libxml2](http://xmlsoft.org/downloads.html): XML C parser, recommended for multibinit
@ -65,11 +65,11 @@ __a relatively simple parallel version of ABINIT__ are summarized below:
`sudo dnf install gcc-gfortran`
2. __Install MPI library__ (MPICH)
2. __Install the MPI library__ (MPICH)
`sudo dnf install mpich mpich-devel`
3. __Install linear algebra library__ (OpenBLAS)
3. __Install the linear algebra library__ (OpenBLAS)
`sudo dnf install openblas`
@ -85,7 +85,7 @@ __a relatively simple parallel version of ABINIT__ are summarized below:
`sudo dnf install fftw fftw-devel`
6. __Install python interpreter__
6. __Install the python interpreter__
`sudo dnf install python3`
@ -209,8 +209,8 @@ All the variables and flags supported by the script can be found by typing:
Some options are detected automatically by the script.
For example, with the option `--with-mpi="yes"`, ABINIT will try to use the parallel fortran compiler
found in $PATH (e.g. mpifort) and will try to detect the directories containing the associated libraries
and the header files required by MPI.
found in $PATH (e.g. mpifort) and will try to detect the directories containing the libraries
and the associated header files required by MPI.
When a lot of options are needed, it is advised to use a config file.
@ -360,7 +360,7 @@ sudo dnf install libxc libxc-devel
sudo dnf install python3
```
### Getting sources of ABINIT
### Getting the ABINIT tarball
```sh
wget https://www.abinit.org/sites/default/files/packages/abinit-9.0.4.tar.gz

View File

@ -440,7 +440,7 @@ eb ABINIT-9.1.0-foss-2019b.eb -Dr
In the previous example we used one of the official easyconfig files shipped with the EasyBuild package.
There are cases, however, in which we need to perform a customized build.
For example, we may want to compile the latest stable version of ABINIT recently released,
or use a different release, or maybe we just need to activate configuration options that are not present in the official file.
or use a different version, or maybe we just need to activate configuration options that are not present in the official file.
In this case, we can simply copy the original easyconfig file,
change it according to our needs and finally pass this customized file to the `eb` script.
@ -540,15 +540,3 @@ Changing `dependencies` and `configopts` requires some basic understanding of th
and of the logic used by EasyBuild to automate the compilation.
If you need a specialized `eb` file, feel free to contact the ABINIT developers on the forum or the EasyBuild
developers to ask for support.
<!--
Unfortunately, we cannot cover all the possible scenarios so we focus on the simplest case in which
we want to **extend** the recipe that is we just want to activate support for an optional library
without changing the other easyconfigs parameters.
Let's assume, for instance, that we want to build an Abinit version with Wannier90 support.
Expert users may want to activate support for optional features that require additional external libraries
e.g. wannier90, atompaw, etc.
In this case, one has to list the external library in the `dependencies` section, add the correct configuration
options to `configopts` and make sure that `eb` can find an easyconfig file that can be used to build the library.
-->

View File

@ -36,16 +36,16 @@ If, on the other hand, you are not interested in compiling all the components fr
you may want to consider the following alternatives:
* Compilation with external libraries provided by apt-based Linux distributions (e.g. **Ubuntu**).
More info available [here](INSTALL_Ubuntu).
More info available [here](../INSTALL_Ubuntu).
* Compilation with external libraries on **Fedora/RHEL/CentOS** Linux distributions.
More info available [here](INSTALL_CentOS).
More info available [here](../INSTALL_CentOS).
* Homebrew bottles or macports for **MacOsX**.
More info available [here](INSTALL_MacOS).
More info available [here](../INSTALL_MacOS).
* Automatic compilation and generation of modules on clusters with **EasyBuild**.
More info available [here](INSTALL_EasyBuild).
More info available [here](../INSTALL_EasyBuild).
* Compiling Abinit using the **internal fallbacks** and the *build-abinit-fallbacks.sh* script
automatically generated by *configure* if the mandatory dependencies are not found.

View File

@ -5,7 +5,7 @@ authors: GB, MG
# Phonon-limited mobility
This tutorial shows how to compute phonon-limited carrier mobilities in semiconductors within
the relaxation time approximation (RTA), taking the specific case of AsAs as an example.
the relaxation time approximation (RTA), taking the specific case of AlAs as an example.
It is assumed the user has already completed the two tutorials [RF1](rf1) and [RF2](rf2),
and that he/she is familiar with the calculation of ground state and response properties,
in particular phonons, Born effective charges and dielectric tensor.
@ -288,7 +288,6 @@ The file *\$ABI_TUTORESPFN/Input/teph4mob_4.in* is an example of such computatio
It consists of two parts: the first one (dataset 1) computes the GS wavefunctions,
and the second one (datasets 2-3) computes the dense WFK that will be used to evaluate the mobility.
We also compute a denser WFK file that will be used with the double-grid method explained later.
As we want to compute the mobility of electrons in the conduction band,
we need to include enough conduction bands in the computation of the WFK ([[nband]] = 8).
@ -307,8 +306,7 @@ abinit teph4mob_4.in > teph4mob_4.log 2> err &
## Calculation of the mobility
The computation of the mobility requires different convergence studies.
We will explain them and their need in the following.
Let us first explain the different parameters in a standard mobility computation.
Let us first explain the different parameters required for a standard mobility computation.
The file *\$ABI_TUTORESPFN/Input/teph4mob_5.in* is an example of such computation.
{% dialog tests/tutorespfn/Input/teph4mob_5.in %}
@ -323,12 +321,6 @@ getddb_filepath "teph4mob_2_DDB"
getdvdb_filepath "teph4mob_3_DVDB"
```
<!--
In this tutorial, the prefix of the external file is constructed from the name of the input file
that produced the file and the dataset index.
In real life, you may want to use more explicitative names such as 444_DDB etc.
-->
Now copy the input file in the *Work_eph4mob* directory, and run the code with:
```sh
@ -348,15 +340,16 @@ Let's discuss the meaning of the e-ph variables in more details:
The code aborts with an error if [[ngkpt]] is not the same as the one found in the
input WFK file. At present, multiple shifts ([[nshiftk]] > 1) are not supported.
* [[occopt]] 3 is required to correctly compute the
location of the Fermi level using the Fermi-Dirac occupation function as we are dealing with the
physical temperature and not a fictitious broadening for integration purposes.
* [[ddb_ngqpt]] defines the initial $\qq$-grid used for the DFPT computation (4×4×4 in this example)
* [[eph_ngqpt_fine]] defines the dense $\qq$-mesh where the scattering potentials are interpolated
and the e-ph matrix elements are computed.
* We work within the rigid band model and introduce a small electron-doping: [[eph_doping]] = -2.26e+16
that corresponds to [[eph_extrael]] 1e-6.
Now how to set [[occopt]] to 3 to correctly compute the
location of the Fermi level using the Fermi-Dirac occupation function as we are dealing with the
physical temperature and not a fictitious broadening for integration purposes.
!!! warning
@ -402,6 +395,7 @@ we suggest to use a very small number, for instance $10^{15}$ to $10^{18}$ elect
For the initial convergence studies, we suggest to start from a relatively small number
of temperatures **covering the range of interest**.
The T-mesh can be densified aftwerwards while keeping the same range once converged parameters are found.
Note also that transport properties at low temperatures are much more difficult to converge as the
derivative of the Fermi-Dirac distribution is strongly peaked around the Fermi level and hence
a very dense sampling is needed to convergence the BZ integrals.
@ -410,7 +404,7 @@ we suggest to use a very small number, for instance $10^{15}$ to $10^{18}$ elect
The [[sigma_erange]] variable defines the energy window, below the VBM and above the
CBM where the lifetimes will be computed.
Since the BTE contains a derivative of the Fermi-Dirac occupation function centered on the Fermi level,
Since the BTE contains the derivative of the Fermi-Dirac occupation function centered on the Fermi level,
it is possible to filter the $\kk$-points that will contribute to the mobility and compute
the lifetimes for these $\kk$-points only.
The value of the derivative, indeed, decreases rapidly
@ -425,8 +419,8 @@ Hopefully, in the next version this parameter will be automatically computed by
We can now examine the log file in detail.
After the standard output of the input variables, the code reports the different parameters
used for the treatment of the long-range part of the DFPT potentials:
the Born effective charges, the dielectric constant, and the quadrupolar tensor.
Make sure to have all of them in order to have an
the Born effective charges, the high-frequency dielectric constant and the dynamical quadrupole tensor.
Make sure to have all of them in order to obtain an
accurate interpolation of the scattering potentials, see discussion in [[cite:Brunin2020]].
!!! important
@ -524,10 +518,10 @@ Note that the transport driver is automatically executed after the EPH run.
You can also run the transport driver in standalone mode by setting [[eph_task]] 7,
provided you already have the lifetimes in an external SIGEPH.nc file that be specified via [[getsigeph_filepath]].
This task is relatively fast even in serial execution although some parts
(in particular the computation of DOS-like quantities) can benefit from MPI parallelism.
(in particular the computation of DOS-like quantities) can benefit from MPI.
Now that you know how to obtain the mobility in a semiconductor for given $\kk$- and $\qq$-meshes,
we can give more details about convergence studies and discuss additional tricks that can be exploited
Now that we know how to obtain the mobility in a semiconductor for given $\kk$- and $\qq$-meshes,
we can give more details about convergence studies and discuss additional tricks
to decrease significantly the computational cost.
### Convergence w.r.t. the energy range
@ -703,8 +697,9 @@ Just set [[eph_restart]] to 1 in the input file and rerun the job
!!! important
There is no harm in setting [[eph_restart]] to 1 from the begining but keep in mind that
the code will overwrite the SIGEPH.nc if the file is completed so we do not recommended
to use this option in MultiDataset mode.
the code will restart the calculation from scratch if all the $\kk$-points in the SIGEPH.nc have
been computed (a backup copy is kept).
So we do not recommended the use of this option in MultiDataset mode.
### Transport calculation from SIGEPH.nc
@ -743,24 +738,30 @@ and you want to boost the calculation.
### How to reduce the memory requirements
As mentioned above, the memory should scale with the number of MPI processors used for the $\qq$-point and
the perturbation distribution.
the perturbation communicators.
However, there might be tricky systems in which you start to experience memory shortage that
prevents you from running with several MPI processes.
prevents you from running with many MPI processes.
This problems should show up for very dense $\kk$/$\qq$ meshes.
As a rule of thumb, calculations with meshes denser than e.g 200x200x200 start to be very memory demanding
and become much slower because several algorithms and tables related to the BZ sampling will start to dominate.
As a rule of thumb, mobility calculations with meshes denser than e.g 200x200x200 start to be very memory demanding
and the execution will slow down because several algorithms and internal tables for the BZ sampling
and the tetrahedron method start to dominate.
The double grid technique helps mitigate this bottleneck.
In some cases, you may try to reduce slightly the value of [[sigma_erange]] to reduce the memory requirements.
The code allocates a relatively small buffer to store the Bloch states involved in transport but unfortunately
the $\kk$-points are not easy to distribute with MPI.
To reduce the size of this part, one may opt for an internal buffer in single precision.
This option is enabled by using `enable_gw_dpc="no"` at configure time (note that this is the default behaviour).
Note also that the EPH code allocates a relatively small buffer to store the Bloch states involved
in transport calculations but unfortunately the $\kk$-points are not easy to distribute with MPI.
Moreover the size of this array depends on the electronic dispersion:
systems with several relatively flat bands around the band edges require more memory.
To reduce the memory for the wavefunctions, the code uses internal buffers in single precision.
This option is enabled at configure time by using `enable_gw_dpc="no"` (this is the default behaviour).
If these tricks do not solve your problem, consider using OpenMP threads.
The code is not optimized for OpenMP but a few threads may be useful to avoid replicating memory at the MPI level.
As a rule of thumb, 2-4 OpenMP threads should be OK provided you link with threaded FFT and BLAS libraries.
Last but not least, do not use datasets: large arrays allocated for $\kk$-points and the size depends on [[ndtset]].
Never ever use multiple datasets for big EPH calculations. You have been warned!
Last but not least, **do not use datasets**: split the calculation into different input files
and optimize the number of MPI processes according to the dimension of the problem.
You have been warned!
### How to compute only the k-points close to the band edges

View File

@ -1093,11 +1093,19 @@ abifile.plot_qpsolution_skb(spin=0, kpoint=[0, 0, 0], band=4)
```
Alternatively, one can directly use `abiopen.py` to open the SIGEPH.nc file inside the iptyhon terminal
Execute:
```
abiopen.py teph4zpr_8o_DS1_SIGEPH.nc
```
to open the file in the ipython shell and then issue:
```ipython
%matplotlib
abifile.plot_qpsolution_skb(spin=0, kpoint=[0, 0, 0], band=4)
abifile.plot_qpsolution_skb(spin=0, kpoint=[0, 0, 0], band=5)
```
The advantage of the second approach is that you can interact with the python object in an interactive environment.

View File

@ -135,9 +135,9 @@ In this introduction, we focus on the parts that are common to the different sub
The use of the different sub-drivers is discussed in more detail in the specialized lessons:
<!--
* [Phonon-limited mobilities](eph4mob)
* [ZPR and T-dependent band structures](eph4zpr)
<!--
* [Isotropic superconductivity in metals](eph4isotc)
-->
@ -162,6 +162,8 @@ More specifically, in EPH the name of the DDB file is specified by
present due to numerical inaccuracies) is reasonable.
By the same token, make sure that no vibrational instabilty is present before
embarking on big EPH calculations.
If the spectrum present instabilities around $\Gamma$ due to a Fourier interpolation
done with coarse $\qq$-sampling, you may try to use [[rifcsph]].
### Variables for phonon DOS
@ -458,9 +460,9 @@ to the DFPT computation.
Since the EPH code does not need the first order change of the wavefunctions (1WF files)
we suggest to avoid the output of these files by using [[prtwf]] = -1 in the DFPT part
as these files are quite large and the overall space on disk scales as **nqpt × 3 × natom**.
When [[prtwf]] is set to -1, the DFPT code writes the 1WF only if the DFPT SCF cycle is not converged
When [[prtwf]] is set to -1, the DFPT code writes the 1WF file only if the DFPT SCF cycle is not converged
so that one can still restart from these wavefunctions if needed
(restarting a DFPT run from the 1WF file is more effective than restarting from the first order density).
(restarting a DFPT run from the first order wavefunctions is more effective than restarting from the first order density).
## Star-function interpolation of the KS eigenvalues
@ -582,7 +584,7 @@ abitk skw_compare IBZ_GSR.nc KPATH_GSR.nc
as only KS energies are needed for the SKW interpolation:
To compare the bands with AbiPy, use the *abicomp.py* script:
To compare the bands with AbiPy, use the |abicomp| script with the `ebands` command:
```sh
abicomp.py ebands abinitio_EBANDS.nc skw_EBANDS.nc -p combiplot
@ -591,8 +593,7 @@ abicomp.py ebands abinitio_EBANDS.nc skw_EBANDS.nc -p combiplot
If the fit is not satisfactory, you may want to try one of the following options (in order of importance):
1. Increase the ab-initio mesh in **IBZ_WFK**.
You may also want to shift the $\kk$-mesh to get closer to the band edge.
2. Increase the value of `lpratio`
2. Increase the value of *lpratio*
3. Play with *rcut* and *rsigma* to damp the oscillations in the interpolant
Note that it is sometimes difficult to get completely rid of spurious oscillations

View File

@ -4735,12 +4735,12 @@ subroutine symdm9(ddb, dynmat, gprim, indsym, mpert, natom, nqpt, nsym, rfmeth,&
index = idir1+ 3*((ipert1-1)+ddb%mpert*((idir2-1)+3*(ipert2-1)))
!if(ddb%flg(idir1,ipert1,idir2,ipert2,q1)/=1)then
if(ddb%flg(index,q1)/=1)then
write(msg, '(a,a,a,i0,a,a,a,4i0,a,a,a,a)' )&
'Information are missing in the DDB.',ch10,&
'In block',q1,' the following element is missing :',ch10,&
'idir1,ipert1,idir2,ipert2=',idir1,ipert1,idir2,ipert2,ch10,&
'Action: add the required information in the DDB,',ch10,&
'or modify your input file.'
write(msg, '(a,a,a,i0,a,a,a,4(i0,1x),a,a,a,a)' )&
'Elements are missing in the DDB.',ch10,&
'In block iq1: ',q1,' the following element is missing: ',ch10,&
'(idir1, ipert1, idir2, ipert2): ',idir1,ipert1,idir2,ipert2,ch10,&
'Action: add the required information in the DDB with mrgddb,',ch10,&
'and/or check that all irreducible perturbations have been computed.'
MSG_ERROR(msg)
end if
end do