How to build ABINIT

Introduction

This document describes how to build ABINIT using the autotools-based build framework.

If you find something out-of-date or incorrect, please send a message to Yann Pouillon.

Build requirements

Before you try to build ABINIT, please make sure that you have installed the correct tools, and they are correctly setup too.

Unix/Linux

Hardware

Build Tools

Optional Software

The following software are used only by developers. If you have no idea what their purposes are, then don't worry. You don't need them to build ABINIT.

Windows

Mac OS X

ABINIT builds for Mac OS X are Mach-O builds, built with gcc and Makefiles. Doing builds on Mac OS X is therefore very similar to doing Unix builds. You should be comfortable with the Terminal app (in /Applications/Utilities). To install the software requirements, you will need to have admin privileges on the machine.

Hardware

Build tools

Earlier versions of Mac OS are not supported.

Get the source

The source package of ABINIT is usually available through the ABINIT website, http://www.abinit.org/. Developers are strongly advised to use Bazaar instead, as it will accelerate a lot the integration of their contributions. For more details on Bazaar, please consult the ABINIT website (http://www.abinit.org/bzr/) and Bazaar's website (http://bazaar-vcs.org/).

Configure build options

Running configure and make with the default options will not give you a fully optimized build. In order to take full benefit from your machine, you should use a config file. Please read these directions carefully before building ABINIT.

Using a per-user config file

Though it is possible to manually call "configure" with command-line options, there is a better and more permanent way to tune the build parameters. This is typically done by placing a config file in your home directory: ~/.abinit/build/.ac .

This file is actually a Bourne shell-script which will be executed by configure to set-up or override its default values. Since it is named after the host it is stored on, you will be able to build ABINIT on several machines sharing the same home directory.

You will find a self-documented tunable configuration for ABINIT in ~abinit/doc/build/config-template.ac .

Building with an OBJDIR

It is highly recommended that you use a separate object directory (OBJDIR) when building ABINIT. This means that the source code and object files are not intermingled, and that you can build ABINIT for multiple architectures from the same source tree.

To build ABINIT using an OBJDIR, just create it, go inside and run configure from there, e.g.:

mkdir tmp-builddir ; cd tmp-builddir ; ../configure ; make

Other options

There are many other options recognized by the configure script. Some of them are special-purpose options intended for embedders or other users, and should not be used to build the full suite. The full list can be obtained by running ./configure --help.

Advice: if you can't figure out what a configure option does, don't use it!

Build & install

Building ABINIT is done by following the now traditional configure - make - make install trilogy. To be more precise:

A make check may be performed after make, at your option.