Octopus on Ubuntu

Last modified by Xwiki VePa on 2024/02/07 07:36

This guide will help the user understand how to compile, install, and use Octopus on their own Ubuntu workstation. If you are using another platform, please refer to the appropriate documentation or contact Benjamin Alldritt for assistance.

Step-by-step guide

To compile Octopus, you will need the following software:

  • FORTRAN compiler (gfortran)
  • C compiler (gcc)
  • C++ compiler (g++)
  • MPI
  • LAPACK
  • BLAS
  • FFTW
  • GSL
  • NetCDF
  • ETSF-IO
  • Libxc
  • Sparskit

 

Ubuntu 12.04 (64 bit)

  1. Install the required packages:

    sudo apt-get install gfortran g++ libfftw3-dev libblas-dev liblapack-dev libmpich2-dev libgsl0-dev libnetcdf-dev libetsf-io-dev libsparskit-dev
  2. Download the latest version of the Octopus source code and unpack into a new directory.

    mkdir ${HOME}/software
    mkdir ${HOME}/software/octopus
    cd ${HOME}/software/octopus
    wget octopus-4.1.2.tar.gz http://www.tddft.org/programs/octopus/download/4.1.2/octopus-4.1.2.tar.gz
    tar -xvzf octopus-4.1.2.tar.gz
  3. Download the latest version of the Libxc source code and unpack into a new directory.

    mkdir ${HOME}/software/libxc
    cd ${HOME}/software/libxc
    wget libxc-2.0.3.tar.gz http://www.tddft.org/programs/octopus/download/libxc/libxc-2.0.3.tar.gz
    tar -xvzf libxc-2.0.3.tar.gz
    cd libxc-2.0.3
  4. Configure, build, and install Libxc.

    ./configure --prefix=${HOME}/software/libxc
    make 
    make install 
  5. Compile, test, and run Octopus.

    cd ${HOME}/software/octopus/octopus-4.1.2
    ./configure --prefix=${HOME}/software/octopus --enable-mpi --enable-openmp --with-libxc-prefix=${HOME}/software/libxc --with-libxc-include=${HOME}/software/libxc/include
    make
    make install

Ubuntu 14.04 (64 bit)

  1. Install the required packages:

    sudo apt-get install gfortran g++ libfftw3-dev libblas-dev liblapack-dev libmpich2-dev libgsl0-dev libsparskit-dev libxc-dev
  2. Download the latest version of the Octopus source code and unpack into a new directory.

    mkdir ${HOME}/software
    mkdir ${HOME}/software/octopus
    cd ${HOME}/software/octopus
    wget octopus-4.1.2.tar.gz http://www.tddft.org/programs/octopus/download/4.1.2/octopus-4.1.2.tar.gz
    tar -xvzf octopus-4.1.2.tar.gz
    cd ${HOME}/software/octopus/octopus-4.1.2 
  3. Remove preprocessor flag that prevents compiling (fixed in SVN version of Octopus)

    find ./ -type f -exec sed -i 's/-C -ansi/-ansi/g' {} \;
  4. Fix print statement that prevents compiling (fixed in SVN version of Octopus)

    find ./external_libs/metis-4.0/util.c -type f -exec sed -i 's/stdout, out2/stdout, "%s", out2/g' {} \;
  5. Compile, test, and run Octopus.

    ./configure --prefix=${HOME}/software/octopus --enable-mpi --enable-openmp
    make
    make install

 

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Unknown macro: contentbylabel. Click on this message for details.