Installation

Asap is released under the GNU Lesser Public License version 3. See the file LICENSE which accompanies the downloaded files. For more information, see our License page.

Simple installation

In the vast majority of cases, you can simply install Asap using pip. You will need to have numpy installed (including header files, sometimes that package is called numpy-dev). You need a C++ compiler installed (probably g++). If you want to run Asap in parallel, you should also have openmpi (or another MPI implementation) installed. In most scientific Linux environments, these prerequisites are already fulfilled.

You can install Asap with the command

pip install --upgrade --user ase asap3

Note that we pass the --user option to cause installation into $HOME/.local instead of into the global Python distribution. We explicitly tell pip to upgrade if an older installation is present. And we explicitly tells it to install ASE at the same time, as pip does not resolve dependencies for these packages.

If you use Python 3.X you may have to replace pip with pip3.

Optimized installation

Building with the Intel Compiler for optimal performance

Compiling with the Intel Compiler (icc/icpc) gives more than a factor two in performance compared to using the GNU Compilers (gcc/g++), used per default when installing with pip. If you have the Intel Compiler available, you can use it like this:

  1. Download the source code from PyPI
  2. Unpack it, and go to the source folder:

    tar xfz asap3-3.10.1.tar.gz
    cd asap3-3.10.1
  3. Compile and install with the Intel compiler:

    python setup.py install --user --with-intel

NB: The Intel compilers are a commercial product, but it is available for free for students for personal use.

Building with the Intel Math Kernel Library for good performance

If you have access to the Intel Math Kernel Library (MKL), but not the Intel compilers, you can build with GCC and MKL. This does not give quite as good performance as the Intel compilers, and only for potentials explicitly supporting MKL (right now that is only EMT).

Please make sure that MKL is installed, and that the required environment variables are set (in particular $MKLROOT). That is usually done by sourcing intel/bin/compilervars.sh)

Download and install as above, then install with:

python setup.py install --user --with-mkl

NOTE: Do not use both the Intel compiler and the MKL, that will actually give worse performance than just using the Intel compiler. This is because the Intel compiler automatically uses the Short Vector Math Library (SVML), whereas compiling with --with-mkl inserts explicit calls to MKL's Vector Math Library (VML). The VML API forces extra memory access that can be avoided with SVML.

NB: The Intel MKL is a closed-source product, but licenses are available free of charge.

Manual installation from source

If you want to tweak the installation, if you need the developer version, or if the simple installation does not work for some reason you can install manually´.

Download Asap

  • The latest stable version of Asap is version 3.10.8 (released 6. December 2017). This version requires ASE 3.13 or newer.

    It is available from gitlab.com (click on the small download icon on the right side, and chose a format).

... or get the developer version from GitLab

It is also possible to get the latest developer version of Asap from GitLab:

$ git clone https://gitlab.com/asap/asap.git

Then proceed to compile it using the Installation instructions, in particular the section regarding In-place installation for Git users.

If you want to browse the source code (including changes), it is most convenient to use the GitLab source browser

OpenKIM support

The following instructions do not enable OpenKIM support in Asap. I strongly recommend testing that you can compile and install without OpenKIM support before adding one more variable to the equation. Once you are ready to enable OpenKIM, please read Installing Asap with OpenKIM support.

Quick installing guide

  1. If you have not already done so, you should install the the Atomic Simulation Environment.
  2. Unpack the tarball and rename the resulting folder to something sensible:

    tar xvf asap-ASAP_VERSION_3_10_0-a78278070c997b302c8117d8174c8914d5f3d273.tar.gz
    mv asap-ASAP_VERSION_3_10_0-a78278070c997b302c8117d8174c8914d5f3d273 asap-3.10.0
    cd asap-3.10.0
  3. Build with the standard command for building Python packages:

    python setup.py build

If you wish to use Python 3, you may have to replace python with python3.

You now have to put $HOME/asap-3.10.0/build/scripts-2.7 on your PATH and $HOME/asap-3.10.0/build/lib.linux-x86_64-2.7 on your PYTHONPATH (the exact folder names will depend both on the Python distribution you use).

Special installation instructions

Installation using the Intel compiler and/or installation on clusters

If you want to install Asap with the Intel C++ compiler (for better performance), you can install Asap using GNU make. The Intel compiler is automatically detected and used if available.

To install the serial version:

make depend
make serial
make install

To install both the serial and parallel version:

make depend
make all
make install-parallel

For more information, please read the ASAP detailed installation instructions.

If you have compilation problems or problems selecting the right compiler, please see the ASAP detailed installation instructions.

In-place installation for Git users

If you got Asap by cloning the GitLab repository, and always want to use the newest version, you probably want to compile it in-place.

IMPORTANT: If you use the developer version of Asap from GitLab, you should also use the developer version of ASE from GitLab.

For Niflheim users:

In your .bashrc file, load the required modules (Intel compiler, OpenMPI and a modern NumPY):

module load intel-compilers
module load openmpi
module load NUMPY

Remember to re-read .bashrc or log out and in again after editing that file.

Run the Niflheim compilation script to compile for all three computer types:

./compile-niflheim.sh

To use Asap compiled in this way, you need to put it on your PATH and your PYTHONPATH. Assuming that Asap is placed in $HOME/asap, these variables should be set to:

# Set Asap variables for Niflheim users
export PATH=$HOME/asap/${FYS_PLATFORM}:$PATH
export PYTHONPATH=$HOME/asap/Python:$HOME/asap/${FYS_PLATFORM}:$PYTHONPATH

(the curly braces are necessary around the FYS_PLATFORM variable name as it is followed by a colon.)

For everybody else:

Compile Asap with:

make depend
make serial

if you only want the serial version, or:

make depend
make all

if you also need the parallel version. After updating from gitlab, you only need to re-run make depend if make serial (or make all) fails with an instruction to do so.

To use Asap compiled in this way, you need to put it on your PATH and your PYTHONPATH. Assuming that Asap is placed in $HOME/asap, these variables should be set to:

export PATH=$HOME/asap/XXX:$PATH
export PYTHONPATH=$HOME/asap/Python:$HOME/asap/XXX:$PYTHONPATH

where XXX is the output of the command uname -m.

Asap: Installation (last edited 2017-12-06 12:20:17 by JakobSchiøtz)