forked from wannier-developers/wannier90
-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.install
234 lines (186 loc) · 8.06 KB
/
README.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
=========
WANNIER90
=========
The Maximally-Localised Generalised Wannier Functions Code
INSTALLATION
------------
Requirements: A Fortran 95 compiler (most f90 compilers are really f95)
LAPACK and BLAS libraries
(Optional) MPI libraries for parallel execution of the
postw90.x executable
Configuration:
The system dependent parameters (e.g. compiler name) are contained in a file
called 'make.inc'. Sample files may be found in the ./config/ directory.
Choose one that is nearest to your setup and copy it to make.inc. You may
need to edit it, for example to give the correct library path for your
machine.
On a linux system with the intel compiler build Wannier90 by typing
cp ./config/make.inc.ifort ./make.inc
make
IMPORTANT NOTE: a GNU version of the make utility is needed to compile
Wannier90.
To know if your make version is GNU, type
make -v
If you have a GNU make utility, the first line of the output should
read somethink like
GNU Make 3.81
Refer to your local system administrator for further information.
See at the end of this file for some preprocessor flags that may be used
to change some behavior of the code.
Options to make include:
make wannier build the wannier90.x executable
make post build the postw90.x executable
make default (default) build wannier90.x and postw90.x
make lib build the wannier90 library
make w90chk2chk build the w90chk2chk.x utility (see 'Utility' section of
the user guide)
make w90vdw build the van der Waals code
make w90pov build the ray-tracing code
make install install the built binaries
make tests run test cases
make doc build the documentation
make dist make a tar-ball of the distribution
make dist-lite make a tar-ball of the src and tests only
make clean remove object files etc
make veryclean remove all non-distribution file
'make -j NN' will allow compilation using NN multiple threads.
On a multicore CPU this will build the executables in a shorter time.
'make install' supports DESTDIR and PREFIX variables.
Executables will be installed into $(DESTDIR)$(PREFIX)/bin directory,
libraries will be installed into $(DESTDIR)$(PREFIX)/lib directory.
The default DESTDIR is empty, and the default PREFIX is /usr.
In order to compile the postw90.x executable in its parallel version, you have
to specify
COMMS=mpi
inside the make.inc file (some of the example files already contain this line)
and moreover define the parallel compiler using the MPIF90 flag, for instance:
MPIF90=mpiifort
Compiler: If your operating system came with a Fortran compiler or you have a
commercial compiler (such as ifort) this should give the best performance.
Libraries: For Wannier90 to perform well a well optimised BLAS library should
be used. Many commercial operating systems and compilers provide well optimised
BLAS libraries.
ATLAS is one of the fastest implementations
http://math-atlas.sourceforge.net/
ACML AMD provides optimised BLAS for AMD processors
http://developer.amd.com/acml.aspx
LAPACK can be obtained from the netlib website. It also includes a
non-optimised BLAS.
http://www.netlib.org/lapack/
Parallel builds
---------------
wannier90.x and postw90.x both support parallel execution using MPI. wannier90
is paralellised over k-points: gamma-only mode is not currently parallelised.
There are three common ways for using MPI with fortran:
1. "use mpi_f08" uses a complete fortran08 interface with custom types, this
allows detailed checking of arguments in MPI function calls
2. "use mpi" uses a fortran90 style interface, limited checking
3. "include 'mpif.h'" uses a legacy interface, no checking at all
Methods 1 and 2 require module files built by the same version of compiler that
is to be used to compile wannier90.
The specific interface to be used must be chosen by setting COMMS in make.inc
to one of "mpi08", "mpi90" or "mpih" (plain "mpi" is the same as "mpi90").
Particularly when wannier90 is to be used in library mode, the MPI interface
specified by COMMS must be the same as that used in the calling code; otherwise
using the fortran08 is recommended.
Linux x86,x86-64
----------------
1- make.inc.ifort
Compiler: Intel (ifc,ifort,iforte)
Libraries: Intel mkl
(ATLAS BLAS is faster for AMD processors)
2- make.inc.pathscale
Compiler: Pathscale (pathf90)
Libraries: acml
3- make.inc.nag
Compiler: NAG (f95)
Libraries: ATLAS + LAPACK (maybe acml)
[note in our experience the NAG compiler does not produce well optimised code]
4- make.inc.sun
Compiler: Sun-studio f90
Libraries: sunperf (ATLAS is faster)
avaible as a free beta for Linux
Generic: Most architectures
---------------------------
1- make.inc.g95
Compiler: g95
Libraries: ATLAS + LAPACK
2- make.inc.gfort
Compiler: gfortran
Libraries: ATLAS + LAPACK
(the official gcc f90 compiler - often faster than g95)
Alpha/HP/Compaq/DEC Tru64 UNIX
------------------------------
1- make.inc.alpha
Compiler: f90
Libraries: cxml
Sun / Solaris (sparc or x86)
----------------------------
1- make.inc.sun
Compiler: f95
Libraries: sunperf
Mac OS X
--------
1- make.inc.macosx
Compiler: gfortran
Libraries: Accelerate library
(check comments in the make.inc.macosx file!)
IBM PowerPC/power series. Linux or AIX
--------------------------------------
1- make.inc.xlf
Compiler: xlf95
Libraries: ESSL + LAPACK
Note: ESSL does not provide a complete lapack installation.
If your machine does not have a full LAPACK install,
download the netlib LAPACK. You might want to use
the essl wrappers from
http://www.netlib.org/lapack/essl/
Windows
-------
There are many commercial Fortran compilers for windows.
We haven't included make.inc files for these as we don't
have access to them. Wannier90 should compile just fine.
I use cygwin (http://www.cygwin.com/) which provides a bash shell.
1- make.inc.g95
Compiler: g95 (within cygwin)
Libraries: LAPACK and ATLAS (cygwin comes with a lapack and blas library,
but I think they have been compiled with g77. I had problems making
a working executable. I suggest building your own)
2- make.inc.pgf90
Compiler: Portland Group (pgf90)
Libaries: pg supplied lapack and blas
PREPROCESSOR FLAGS
------------------
To add a preprocessor flag, add it to the FCOPTS and LDOPTS variables in the
make.inc file.
For instance, if the flag is called EXIT_FLAG, you can simply append
-DEXIT_FLAG
(note that -D is prepended to the name of the flag)
to the FCOPTS variable and LDOPTS variable, separating it with a space from
what is already defined. Example:
FCOPTS=-O2 -DEXIT_FLAG
LDOPTS=-O2 -DEXIT_FLAG
Alternatively, after the definition of the FCOPTS and LDOPTS variables,
at the end of the make.inc file, you can add the lines
FCOPTS+=-DEXIT_FLAG
LDOPTS+=-DEXIT_FLAG
Flags
-----
* EXIT_FLAG
If defined (and if your compiler supports it), returns an exit status =/= 0
when the code exits due to an error (while it returns 0 on correct
completion).
By default, when this flag is not present, the value of the exit code is
not sensible.
* CODATA2006
Use physical constants from 2006 version of CODATA tables
(http://physics.nist.gov/cuu/Constants/index.html)
(Note that this is the default choice if nothing is specified)
* CODATA2010
Use physical constants from 2010 version of CODATA tables
(http://physics.nist.gov/cuu/Constants/index.html)
* USE_WANNIER90_V1_BOHR
Use the value of the bohr radius (expressed in angstrom) that
was adopted in versions 1.x of the Wannier90 code, instead of
the values taken from the CODATA database.
(This is intended for backward compatibility only)