Structure optimization on Bismuth terribly slow
Moderator: bguster
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Structure optimization on Bismuth terribly slow
Hello out there!
I'm trying to learn how to run abinit and tried the tutorials 1-4.
I figured, since there was a structure optimization for Silicon, that it would also be possible to perform this for Bismuth, which I have special interest in. However, after changing t34.in for my needs (acell and rprime mainly, I also use 83bi_halfso.psphgh pseudopotential) I discovered a terribly slow convergence in ngkpt, where, up to 8 8 8, there is no sign of convergence.
Is there any way of speeding this up?
thank you in advance,
Patrick
I'm trying to learn how to run abinit and tried the tutorials 1-4.
I figured, since there was a structure optimization for Silicon, that it would also be possible to perform this for Bismuth, which I have special interest in. However, after changing t34.in for my needs (acell and rprime mainly, I also use 83bi_halfso.psphgh pseudopotential) I discovered a terribly slow convergence in ngkpt, where, up to 8 8 8, there is no sign of convergence.
Is there any way of speeding this up?
thank you in advance,
Patrick
Re: Structure optimization on Bismuth terribly slow
What ecut are you using? did you do a convergence check on ecut first, before nkpt?
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
I am currently on ecut 8.0 (didn't change it in the t34.in file) - and didn't perform a check first.
Is there a conventional order to do the convergence checks?
Is there a conventional order to do the convergence checks?
Re: Structure optimization on Bismuth terribly slow
Usually it's easiest to do the following:
1) use kptrlen to set a reasonable kpt grid, via:
kptopt 1
kptrlen 40
now do a convergence check on ecut. For your pseudo on Bi I'm betting you'll need at least 25 if not higher (possibly a lot higher).
2) Given the converged ecut value, now increase the kpt grid to check for convergence. Depending on the property, this might be a modest increase or very dense.
1) use kptrlen to set a reasonable kpt grid, via:
kptopt 1
kptrlen 40
now do a convergence check on ecut. For your pseudo on Bi I'm betting you'll need at least 25 if not higher (possibly a lot higher).
2) Given the converged ecut value, now increase the kpt grid to check for convergence. Depending on the property, this might be a modest increase or very dense.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
ok, I now tried to raise ecut to 25 and tried to run the code at first without a convergence study - since I had to raise the SCF cycles to 40 - it also took some time.
Now I have an entirely different Problem:
I think ~3.8 is ridiculously high, so I'd like to post the imput file I'm running, perhaps someone could tell me my errors (I'm a beginner at this, so I guess there are plenty). As I already mentioned, I used the tutorial-file t34.in as a base and tried to change the properties to Bismuth.
Thank you in advance
Now I have an entirely different Problem:
Code: Select all
chkdilatmx: ERROR -
The new primitive vectors rprimd (an evolving quantity)
are too large with respect to the old rprimd and the accompanying dilatmx :
this large change of unit cell parameters is not allowed by the present value of dilatmx.
You need at least dilatmx= 3.859956E+00
Action : increase the input variable dilatmx.
I think ~3.8 is ridiculously high, so I'd like to post the imput file I'm running, perhaps someone could tell me my errors (I'm a beginner at this, so I guess there are plenty). As I already mentioned, I used the tutorial-file t34.in as a base and tried to change the properties to Bismuth.
Code: Select all
#Optimization of the lattice parameters
optcell 1
ionmov 3
ntime 10
dilatmx 2
ecutsm 0.5
#Definition of the k-point grids
kptopt 1 # Option for the automatic generation of k points, taking
# into account the symmetry
kptrlen 40
nshiftk 4
shiftk 0.5 0.5 0.5 # These shifts will be the same for all grids
0.5 0.0 0.0
0.0 0.5 0.0
0.0 0.0 0.5
chksymbreak 0
ngkpt 2 2 2
getwfk -1 # This is to speed up the calculation, by restarting
# from previous wavefunctions, transferred from the old
# to the new k-points.
#Definition of the unit cell
acell 7.98 7.98 19.92 # This is equivalent to 10.18 10.18 10.18
rprim -0.50 -0.87 0.00 # FCC primitive vectors (to be scaled by acell)
1.00 0.00 0.00
0.00 0.00 1.00
#Definition of the atom types
ntypat 1 # There is only one type of atom
znucl 83 # The keyword "znucl" refers to the atomic number of the
# possible type(s) of atom. The pseudopotential(s)
# mentioned in the "files" file must correspond
# to the type(s) of atom. Here, the only type is Silicon.
#Definition of the atoms
natom 2 # There are two atoms
typat 1 1 # They both are of type 1, that is, Silicon.
xred # This keyword indicate that the location of the atoms
# will follow, one triplet of number for each atom
0.0 0.0 0.00 # Triplet giving the REDUCED coordinate of atom 1.
0.0 0.0 0.53 # Triplet giving the REDUCED coordinate of atom 2.
#Definition of the planewave basis set
ecut 25.0
#Definition of the SCF procedure
nstep 40 # Maximal number of SCF cycles
toldfe 1.0d-6 # Will stop when, twice in a row, the difference
# between two consecutive evaluations of total energy
# differ by less than toldfe (in Hartree)
# This value is way too large for most realistic studies of materials
diemac 12.0 # Although this is not mandatory, it is worth to
# precondition the SCF cycle. The model dielectric
# function used as the standard preconditioner
# is described in the "dielng" input variable section.
# Here, we follow the prescription for bulk silicon.
Thank you in advance
-
- Posts: 138
- Joined: Sat Aug 15, 2009 12:45 am
Re: Structure optimization on Bismuth terribly slow
Hello,
What is the structure of Bi you want ? Because the unit cell seems huge to contain just two atoms. I would advice you to check your acell, rprim and the structure you get from abinit (you will find at the beginning the space group obtained).
Moreover, you should set either kptrlen or ngkpt, not both.
David
What is the structure of Bi you want ? Because the unit cell seems huge to contain just two atoms. I would advice you to check your acell, rprim and the structure you get from abinit (you will find at the beginning the space group obtained).
Moreover, you should set either kptrlen or ngkpt, not both.
David
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
I'm trying to use the hexagonal structure,
unit cell should be
a1 = (-0.5 a, -sqrt(3)*a/2 , 0)
a2 = (a, 0, 0)
a3 = (0, 0, c)
with a = 4.5332 A and c = 11.7967 A (A = Angström)
(Ph. Hofmann: The surfaces of Bismuth: Structural and electronic properties, Prograss in Surface Science 81 (2006), p196)
unit cell should be
a1 = (-0.5 a, -sqrt(3)*a/2 , 0)
a2 = (a, 0, 0)
a3 = (0, 0, c)
with a = 4.5332 A and c = 11.7967 A (A = Angström)
(Ph. Hofmann: The surfaces of Bismuth: Structural and electronic properties, Prograss in Surface Science 81 (2006), p196)
Re: Structure optimization on Bismuth terribly slow
Hi,
You do have a a number of problems in your input file--I think the main one is that you are trying to solve the problem in a hexagonal cell (the conventional cell for this structure) but you should be using the rhombohedral primitive cell. That's the one that has two atoms in it, the conventional hexagonal cell has 6. Your rprim input is not right for the hexagonal cell either, as it doesn't have enough digits (you should use 9). You may have disabled this check in your input but that also means you are forcing abinit to use a much lower symmetry group than the problem allows, leading to much longer calculations. Next, your kpt mesh is appropriate for FCC but not for this problem.
Please take a look at the attached input file, I made it based on the Bi rhombohedral structure and ran it with the 83bi.5.hgh pseudopotential I downloaded from the abinit site, the optimization took about 60 seconds on my i7 machine and led to a reduction in cell lengths of about 2%, quite normal for LDA.
Hope this helps,
Joe
[attachment=0]opt.in[/attachment]
You do have a a number of problems in your input file--I think the main one is that you are trying to solve the problem in a hexagonal cell (the conventional cell for this structure) but you should be using the rhombohedral primitive cell. That's the one that has two atoms in it, the conventional hexagonal cell has 6. Your rprim input is not right for the hexagonal cell either, as it doesn't have enough digits (you should use 9). You may have disabled this check in your input but that also means you are forcing abinit to use a much lower symmetry group than the problem allows, leading to much longer calculations. Next, your kpt mesh is appropriate for FCC but not for this problem.
Please take a look at the attached input file, I made it based on the Bi rhombohedral structure and ran it with the 83bi.5.hgh pseudopotential I downloaded from the abinit site, the optimization took about 60 seconds on my i7 machine and led to a reduction in cell lengths of about 2%, quite normal for LDA.
Hope this helps,
Joe
[attachment=0]opt.in[/attachment]
- Attachments
-
opt.in
- Input file for rhombohedral Bi optimization
- (453 Bytes) Downloaded 514 times
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Re: Structure optimization on Bismuth terribly slow
Oh, I also wanted to point out several other problems:
Bi is a metal so you should be using a metallic band occupation scheme, not the default--I used occopt 7. Also, as a metal the default value of diemac is appropriate (helps with convergence) so you can delete that variable from your input.
Bi is a metal so you should be using a metallic band occupation scheme, not the default--I used occopt 7. Also, as a metal the default value of diemac is appropriate (helps with convergence) so you can delete that variable from your input.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
Thank you very much for your Help!
Your input file took my Computer here about 22 Minutes, but everything went fine
I have to admit I'm having a hard time understanding what kpt really does - mainly because of some confusion concerning shiftk - me and some of my colleagues just can't find out how the given vectors (in the tutorial) correlate in any way with the used lattice.
Moreover, I'd like to ask you how you decided to take kptrlen = 50.
The rest is now quite self-explanatory (with rigurous usage of the help-files
)
thank you very much again
Your input file took my Computer here about 22 Minutes, but everything went fine

I have to admit I'm having a hard time understanding what kpt really does - mainly because of some confusion concerning shiftk - me and some of my colleagues just can't find out how the given vectors (in the tutorial) correlate in any way with the used lattice.
Moreover, I'd like to ask you how you decided to take kptrlen = 50.
The rest is now quite self-explanatory (with rigurous usage of the help-files

thank you very much again
Re: Structure optimization on Bismuth terribly slow
Wow, 22 minutes? What kind of computer are you running on, and how much memory does it have?
what kptrlatt + shiftk do is implement a grid of k-points, using (I'm pretty sure) the Monkhorst-Pack scheme. shiftk makes the grid avoid the G point and the cell edges, that's why different shiftk sets are appropriate for different cell geometries. The different kptopt values also impose more or less symmetry on the resulting grid. For example if you use kptopt 1, all spatial symmetries + time reversal are used to reduce the total number of k points and use a weighted subset instead; kptopt 3 uses all k points; kptopt 4 uses space symmetries only, and kptopt 2 uses time reversal only. For ground state problems kptopt 1 is good, for problems with fields and other perturbations you have to use the other choices.
kptrlen 50 comes a lot from experience; what happens is that kptrlatt defines a super-lattice in real space, LARGER than kptrlen, and the kpt grid is the reciprocal of the superlattice. So, the larger the kptrlen, the finer the k point grid. For small unit cells most ground state properties are pretty well converged at kptrlen 50 (because this length is large compared to the cell dimensions, more precisely, is large compared to the length scale over which the electronic properties are varying significantly); the exceptions might be things like stress and the shape of the Fermi surface in the case of metals (I work mostly on insulators so I'm biased that way). If you choose kptrlen way less than 50 the calculations are fast but you can get tripped up by the coarse mesh, and way larger than 50 the calculations take a long time. But without question, once your input file and pseuopotential choices are giving reasonable results, you have to do a kpt convergence check.
what kptrlatt + shiftk do is implement a grid of k-points, using (I'm pretty sure) the Monkhorst-Pack scheme. shiftk makes the grid avoid the G point and the cell edges, that's why different shiftk sets are appropriate for different cell geometries. The different kptopt values also impose more or less symmetry on the resulting grid. For example if you use kptopt 1, all spatial symmetries + time reversal are used to reduce the total number of k points and use a weighted subset instead; kptopt 3 uses all k points; kptopt 4 uses space symmetries only, and kptopt 2 uses time reversal only. For ground state problems kptopt 1 is good, for problems with fields and other perturbations you have to use the other choices.
kptrlen 50 comes a lot from experience; what happens is that kptrlatt defines a super-lattice in real space, LARGER than kptrlen, and the kpt grid is the reciprocal of the superlattice. So, the larger the kptrlen, the finer the k point grid. For small unit cells most ground state properties are pretty well converged at kptrlen 50 (because this length is large compared to the cell dimensions, more precisely, is large compared to the length scale over which the electronic properties are varying significantly); the exceptions might be things like stress and the shape of the Fermi surface in the case of metals (I work mostly on insulators so I'm biased that way). If you choose kptrlen way less than 50 the calculations are fast but you can get tripped up by the coarse mesh, and way larger than 50 the calculations take a long time. But without question, once your input file and pseuopotential choices are giving reasonable results, you have to do a kpt convergence check.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
I'm currently using an Intel Pentium 4 with 3.00 GHz and 3GB RAM - running a Debian Sid "Aptosid" Distribution (But I guess that is of no importance at all
)
I also thought that was quite long - Don't know why ...
Thank you for the explanation - I think I'm understanding more and more about that

I also thought that was quite long - Don't know why ...
Thank you for the explanation - I think I'm understanding more and more about that

Re: Structure optimization on Bismuth terribly slow
Sounds like your hardware is reasonable. How did you compile abinit? (that is, what compiler, what lapack/blas, what optimizations?) If you can, try to use Intel Fortran 11.1 on your computer, together with their MKL math libraries; using optimization -O2 or -O3 you will typically find best performance--
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
Hello!
I've been using the version I found in my package repositories (aptosid) - I now deinstalled it and will try to compile it on my own.
Unfortunately, I don't have fortran 11 avileable - I'm using gfortran-4.4
I'll try to run your file as soon as I'm done installing - information will follow
I've been using the version I found in my package repositories (aptosid) - I now deinstalled it and will try to compile it on my own.
Unfortunately, I don't have fortran 11 avileable - I'm using gfortran-4.4
I'll try to run your file as soon as I'm done installing - information will follow

Re: Structure optimization on Bismuth terribly slow
With gfortran and the usual lapack/blas distribution I usually get to within about 80-90% of intel speed on intel chips. I think the biggest issue is use of intel MKL versus the generic blas/lapack.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
-
- Posts: 8
- Joined: Wed Jan 19, 2011 9:21 am
Re: Structure optimization on Bismuth terribly slow
okay, I now tried to increase kptrlen to reach convergence in the distance of the unit cell atoms
however, I am currently at kptrlen 115 and It still doesn't seem to converge. There are a few plateaus, but it always starts to jump again.
This occurs both at the so and the no-so case.
What would you recommend?
should I just go on increasing or should I jump to far highter values before?
thanks for your help,
however, I am currently at kptrlen 115 and It still doesn't seem to converge. There are a few plateaus, but it always starts to jump again.
This occurs both at the so and the no-so case.
What would you recommend?
should I just go on increasing or should I jump to far highter values before?
thanks for your help,
Re: Structure optimization on Bismuth terribly slow
What ecut are you using and how did you check its convergence? Also, remind me again when pseudo you are using? For Bi, if it contains only 5 valence electrons (6s and 6p) I would guess the problem is that you need to include the 5d electrons also, I always need to do that in both Bi and Pb.
Josef W. Zwanziger
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com
Professor, Department of Chemistry
Canada Research Chair in NMR Studies of Materials
Dalhousie University
Halifax, NS B3H 4J3 Canada
jzwanzig@gmail.com