User Tools

Site Tools


tips:howto_macosx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
tips:howto_macosx [2015/04/20 10:40] – [Installing ABINIT] Marc Torrenttips:howto_macosx [2015/04/20 10:45] – [Using Homebrew package manager] Marc Torrent
Line 1: Line 1:
 +====== How to install ABINIT on Mac OSX ======
 +
 +<HTML><br></HTML>
 +//This manpage is available as ~abinit_src_dir/README.MacOSX//
 +
 +\\ \\
 +<HTML><hr></HTML>
 +===== Using Homebrew package manager =====
 +<HTML><br></HTML>
 +
 +//A Homebrew formula for ABINIT has been released (authors: D. Davydov + M. Torrent).//
 +\\ \\
 +//Available from ABINIT v7.10.2\\
 +Tested with mac OS X v10.10 (Yosemite);\\
 +Should be OK for v10.8 (Mountain Lion), v10.9 (Mavericks).\\
 +Homebrew is available at [[http://brew.sh|brew.sh]]//
 +
 +==== Prerequesites ====
 +
 +  * Homebrew installed (see this [[http://brew.sh/#install|manual]])
 +
 +  * Notes:
 +    * Homebrew needs ''%%Xcode%%'' and ''%%Xcode command line tools%%'' to be installed;\\ just type: ''%%xcode-select --install%%''
 +
 +==== Installing ABINIT ====
 +
 +  * Just type:<code>
 +brew install homebrew/science/abinit</code>
 +
 +  * ABINIT should install smoothly... with its dependencies.
 +
 +==== Comments ====
 +
 +  * ''%%LibXC%%'', ''%%ETSF_IO%%'' and ''%%netCDF%%'' fallbacks (plugins) are used by default.\\ ''%%FoX%%'', ''%%Wannier90%%'', ''%%BigDFT%%'' and ''%%AtomPAW%%'' are not available in Homebrew.
 +
 +
 +  * 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
 +
 +
 +\\ \\
 +<HTML><hr></HTML>
 +===== Using MacPorts package manager =====
 +<HTML><br></HTML>
 +
 +//Available from ABINIT v7.4.3 \\
 +Tested with mac OS X v10.8 (Mountain Lion), v10.9 (Mavericks), v10.10 (Yosemite).\\
 +MacPorts is available at [[http://www.macports.org|macports.org]].//
 +
 +==== Prerequesites ====
 +
 +  * MacPorts installed (see this [[https://www.macports.org/install.php|manual]])
 +
 +  * Some basic ports already installed:
 +    * gcc with Fortran variant (Fortran compiler),
 +    * mpich or openmpi (MPI)
 +
 +  * Before starting, it is preferable to update MacPorts system: <code>
 +sudo port selfupdate
 +sudo port upgrade outdated</code>
 +
 +  * 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 it they are not necessarily maintained for all ABINIT versions.
 +
 +  * Try first to install official ABINIT port: <code>
 +sudo port install abinit</code>
 +
 +  * 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: <code>
 +LOCAL_REPOSITORY=/Users/my_login/ports</code> or <code>
 +LOCAL_REPOSITORY=/opt/local/localports</code> 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:<code>
 +file://LOCAL_REPOSITORY
 +rsync://rsync.macports.org/release/ports [default]</code>
 +
 +  * 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:\\ [[ftp://ftp.abinit.org/MacPorts|ftp://ftp.abinit.org/MacPorts]].
 +
 +  * Untar the file in the local repository:<code>
 +cd LOCAL_REPOSITORY/science/abinit
 +tar -xvzf Portfile.tar.gz</code>
 +
 +  * Update your local repository index:<code>
 +cd LOCAL_REPOSITORY
 +sudo portindex</code>
 +
 +  * Install ABINIT port:<code>
 +sudo port install abinit @X.Y.Z</code>
 +
 +==== ABINIT port variants ====
 +
 +  * By default, ABINIT is installed with the following plugins/fallbacks:\\ ''%%libXC%%'', ''%%ETSF_IO%%'', ''%%Wannier90%%''
 +
 +  * Linking ABINIT to ''%%FFTW3%%'' library:<code>
 +sudo port install abinit @X.Y.Z +fftw3</code>
 +
 +  * Installing a multi-threaded (''%%openMP%%'') version of ABINIT:<code>
 +sudo port install abinit @X.Y.Z +threads</code>
 +
 +  * Installing ''%%atompaw%%'' PAW atomic dataset generator:<code>
 +sudo port install abinit @X.Y.Z +atompaw</code>
 +
 +  * It is possible to mix all previous variants:<code>
 +sudo port install abinit @X.Y.Z +fftw3+threads+atompaw</code>
 +
 +  * Other options available by typing:<code>
 +port info abinit</code>
 +
 +
 +\\ \\
 +<HTML><hr></HTML>
 +===== Compiling ABINIT by yourself under Mac OSX =====
 +<HTML><br></HTML>
 +
 +
 +==== 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|HPC sourceForge]]
 +    * g''%%fortran%%'' binary from: [[https://gcc.gnu.org/wiki/GFortranBinaries#MacOS|gnu.org]]
 +    * ''%%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|website]], or via a package manager
 +    * ''%%openmpi%%'' from [[http://www.open-mpi.org|website]], or via a package manager
 +    * ...
 +
 +==== Installing ABINIT ====
 +
 +  * Create a working directory:<code>
 +cd abinit_src_dir
 +mkdir build && cd build</code>
 +
 +  * Configure:
 +    * Sequential ABINIT:<code>
 +../configure FC=gfortran CC=clang FCFLAGS_EXTRA="-ffree-line-length-none"</code>
 +    * Parallel ABINIT (only with MPI installed):<code>
 +../configure FC=mpif90 CC=mpicc FCFLAGS_EXTRA="-ffree-line-length-none" \
 +             --enable-mpi  --enable-mpi-io</code>
 +
 +  * Compile:<code>
 +make mj4</code>
 +
 +  * Install (optional):<code>
 +make install</code>
 +
 +==== Comments ====
 +  * To benefit from the "fallbacks" (''%%libXC%%'', ''%%netCDF%%'', ...), consult the configure script help:<code>
 +../configure --help</code> The ''%%--with-dft-flavor%%'' and ''%%--with-trio-flavor%%'' have to be adjusted.
 +
 +
 +\\ \\
 +\\ \\
 +<HTML><hr></HTML>
 +//Author: M. Torrent, April 2015//
  
tips/howto_macosx.txt · Last modified: 2016/01/31 18:54 by Marc Torrent