forked from abinit/abinit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.MacOSX
214 lines (151 loc) · 7.08 KB
/
README.MacOSX
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
===============================================================================
= This file describes how to install ABINIT on Mac OS X =
= - Using Homebrew package manager =
= - Using MacPorts package manager =
= - Compiling by yourself =
===============================================================================
This manpage is available as ~abinit_src_dir/README.MacOSX
===============================================================================
= 1- USING HOMEBREW (http://brew.sh) =
===============================================================================
Tested with mac OS X v10.9 (Mavericks), v10.10 (Yosemite), 10.11 (El Capitan).
A Homebrew official formula for ABINIT is available (authors: D. Davydov + M. Torrent).
----- Prerequesites -----
* Homebrew installed (see: http://brew.sh/#install)
* Notes:
- Homebrew needs Xcode and "Xcode command line tools" to be installed; just type:
xcode-select --install
----- Installing ABINIT -----
* Just type:
brew install homebrew/science/abinit
* ABINIT should install smoothly... with its dependencies.
----- Comments -----
* At the first installation, this can take time, because of the
required compilation of some dependencies (netcdf, fftw ...).
* LibXC, ETSF_IO and netCDF fallbacks (plugins) are used by default.
FoX, Wannier90 and BigDFT are not available in Homebrew.
AtomPAW can be installed as a separate package (formula).
* The following options are available for ABINIT formula:
--with-testsuite
Run full test suite (time consuming)
--without-check
Skip build-time tests (not recommended)
--without-etsf_io
Build without etsf_io support
--without-netcdf
Build without netcdf support
--without-fftw
Build without fftw support
--without-gsl
Build without gsl support
--without-scalapack
Build without scalapack support
===============================================================================
= 2- USING MACPORTS (http://www.macports.org) =
===============================================================================
Available from ABINIT v7.4.3
Tested with mac OS X v10.8 (Mountain Lion), v10.9 (Mavericks), v10.10 (Yosemite)
v10.11 (El Capitan)
----- Prerequesites -----
* MacPorts installed (see: https://www.macports.org/install.php)
* Some basic ports already installed:
gcc (last version) with Fortran variant (Fortran compiler),
mpich or openmpi (MPI)
* Before starting, it is preferable to update MacPorts system:
sudo port selfupdate
sudo port upgrade outdated
* Notes:
- It is recommended to completely reinstall MacPorts after a MacOS upgrade.
- MacPorts needs Xcode and "Xcode command line tools" to be installed; just type:
xcode-select --install
----- 1- Using official ABINIT port -----
* There are available ports in the MacPorts system for some ABINIT versions.
They have been originally created by ABINIT developers.
But they are not necessarily maintained for all ABINIT versions.
* Try first to install official ABINIT port:
sudo port install abinit
* If the lastest ABINIT is successfully installed, it's OK for you.
If not, follow the procedure 2- below.
----- 2- Using ABINIT port from ftp.abinit.org -----
>>> 2.a- Preparing your MacPorts installation <<<<
* You need to create a local repository designed to receive local ports.
Let's name it LOCAL_REPOSITORY in the following. This might be:
LOCAL_REPOSITORY=/Users/my_login/ports or /opt/local/localports
Replace LOCAL_REPOSITORY by the correct string in the following...
* Edit the file /opt/local/etc/macports/sources.conf (with administrator privileges)
and add these two lines at the end:
file://LOCAL_REPOSITORY
rsync://rsync.macports.org/release/ports [default]
* Create the directory: LOCAL_REPOSITORY/science/abinit
>>> 2.b- Installing ABINIT <<<<
* Download the "portfile" corresponding to your ABINIT version
and copy it in the LOCAL_REPOSITORY/science/abinit directory.
The portfile for ABINIT vX.Y.Z is available at:
http://ftp.abinit.org/MacPorts/X.Y.Z/Portfile.tar.gz
* Untar the file in the local repository:
cd LOCAL_REPOSITORY/science/abinit
tar -xvzf Portfile.tar.gz
* Update your local repository index:
cd LOCAL_REPOSITORY
sudo portindex
* Install ABINIT port:
sudo port install abinit @X.Y.Z
----- ABINIT port variants -----
* By default, ABINIT is installed with the following plugins/fallbacks:
libXC, ETSF_IO, Wannier90
* Linking ABINIT to FFTW3 library:
sudo port install abinit @X.Y.Z +fftw3
* Linking ABINIT to parallel Linear Algebra ScaLapack:
sudo port install abinit @X.Y.Z +scalapack
* Installing a multi-threaded (openMP) version of ABINIT:
sudo port install abinit @X.Y.Z +threads
* Installing atompaw PAW atomic dataset generator:
sudo port install abinit @X.Y.Z +atompaw
or sudo port install atompaw
* It is possible to mix all previous variants:
sudo port install abinit @X.Y.Z +fftw3+threads+scalapack+atompaw
* Other options available by typing:
port info abinit
===============================================================================
= 3- COMPILING ABINIT BY YOURSELF under MacOSX =
===============================================================================
----- Prerequesites -----
* Mac OSX
* Xcode installed with "Xcode command line tools"; just type:
xcode-select --install
* A Fortran compiler installed.
Possible options:
- gfortran binary from: http://hpc.sourceforge.net
- gfortran binary from: https://gcc.gnu.org/wiki/GFortranBinaries#MacOS
- gfortran installed via a package manager (MacPorts, Homebrew, Fink)
- Intel Fortran compiler
- ...
* A MPI library installed (If you want to benefit from parallelism; recommended).
Possible options:
- mpich from http://www.mpich.org, or via a package manager
- openmpi from http://www.open-mpi.org, or via a package manager
- ...
* A Linear Algebra library installed.
By default the 'accelerate' Framework is installed on MacOSX
and ABINIT build system should find it.
But you might want to install a parallel library: scalapack, atlas, mkl, ...
----- Installing ABINIT -----
* Create a working directory:
cd abinit_src_dir
mkdir build && cd build
* Configure:
Sequential ABINIT:
../configure FC=gfortran CC=clang FCFLAGS_EXTRA="-ffree-line-length-none"
Parallel ABINIT (only with MPI installed):
../configure FC=mpif90 CC=mpicc FCFLAGS_EXTRA="-ffree-line-length-none" \
--enable-mpi --enable-mpi-io
* Compile:
make mj4
* Install (optional):
make install
----- Comments -----
* To benefit from the "fallbacks" (libXC, netCDF, ...), consult the configure
script help : ../configure --help
The --with-dft-flavor and --with-trio-flavor have to be adjusted.
===============================================================================
Author: M. Torrent, April 2015, rev. Feb. 2016