GPAW 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 GPAW 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 GPAW, you will need the following software:

  • Fortran compiler (gfortran)
  • C compiler (gcc)
  • C++ compiler (g++)
  • MPI
  • LAPACK
  • BLAS
  • HDF5 > 1.8.0
  • Python
  • NumPy > 1.3.0
  • Matplotlib
  • Python-GTK
  • LibPNG
  • Libxc > 2.0.1
  • SciPy > 0.7.0

Package Installation

Ubuntu 12.04 and 14.04 (GPAW 0.9.0.8965 and Python-ASE 3.7.1)

  1. Edit the APT sources file and get the security key:

    sudo bash -c 'echo "deb http://download.opensuse.org/repositories/home:/dtufys/xUbuntu_12.04 /" > /etc/apt/sources.list.d/home_dtufys.sources.list'
    wget http://download.opensuse.org/repositories/home:/dtufys/xUbuntu_12.04/Release.key && sudo apt-key add Release.key && rm Release.key 
  2. Update the repository cache and install Python-ASE, Matplotlib and GPAW

    sudo apt-get update
    sudo apt-get install python-ase python-matplotlib gpaw
  3. Test Python-ASE

    mkdir /tmp/testase.$$; cd /tmp/testase.*
    python -c "from ase.test import test; test(verbosity=2, display=True)" 2>&1 | tee testase.log
  4. Run GPAW

    gpaw <input_file>

Compile Installation

Ubuntu 12.04

  1. Install Libxc

    wget http://launchpadlibrarian.net/161692443/libxc-dev_2.0.2-1ubuntu1_amd64.deb
    wget http://launchpadlibrarian.net/161692442/libxc1_2.0.2-1ubuntu1_amd64.deb
    sudo dpkg -i libxc*_amd64.deb
  2. Install the additional required packages:

    sudo apt-get install gfortran g++ python-all python-all-dev python-dev python-numpy python-matplotlib python-gtk2 libpng3 libpng12-dev liblapack-dev libblas-dev libmpich2-dev libhdf5-dev python-scipy libxml2-utils 
  3. Download the latest version of the Python-ASE source and unpack into a new directory.

    mkdir ${HOME}/software
    mkdir ${HOME}/software/python-ase
    cd ${HOME}/software/python-ase
    wget https://wiki.fysik.dtu.dk/ase-files/python-ase-3.8.1.3440.tar.gz
    tar -xvz python-ase-3.8.1.3440.tar.gz
  4. Compile Python-ASE.

    # add note to place in .bashrc
    export PATH=${PATH}:$HOME/.local/bin 

    python setup.py install --user
  5. Test Python-ASE.

    mkdir /tmp/testase.$$; cd /tmp/testase.*
    python -c "from ase.test import test; test(verbosity=2, display=True)" 2>&1 | tee testase.log
  6. Download the latest version of the GPAW source and GPAW setups and unpack into new directories.

    cd ${HOME}/software
    wget https://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-0.9.11271.tar.gz
    tar -xvzf gpaw-setups-0.9.11271.tar.gz

    mkdir ${HOME}/software/gpaw
    cd ${HOME}/software/gpaw
    wget https://wiki.fysik.dtu.dk/gpaw-files/gpaw-0.10.0.11364.tar.gz
    tar -xvz gpaw-0.10.0.11364.tar.gz
  7. Compile and Install GPAW.

    export PYTHONPATH=${HOME}/.local/lib/python/
    export GPAW_SETUP_PATH=${HOME}/software/gpaw-setups-0.9.11271
    python setup.py install --user  2>&1 | tee install.log
  8. Test GPAW.

    gpaw-python `which gpaw-test` -j 4 2>&1 | tee test.log

Ubuntu 14.04

  1. Install the additional required packages:

    sudo apt-get install gfortran g++ python-all python-all-dev python-dev python-numpy python-matplotlib python-gtk2 libpng3 libpng12-dev liblapack-dev libblas-dev libmpich2-dev libhdf5-dev python-scipy libxml2-utils libxc-dev
  2. Download the latest version of the Python-ASE source and unpack into a new directory.

    mkdir ${HOME}/software
    mkdir ${HOME}/software/python-ase
    cd ${HOME}/software/python-ase
    wget https://wiki.fysik.dtu.dk/ase-files/python-ase-3.8.1.3440.tar.gz
    tar -xvz python-ase-3.8.1.3440.tar.gz
  3. Compile Python-ASE.

    # add note to place in .bashrc
    export PATH=${PATH}:$HOME/.local/bin 

    python setup.py install --user
  4. Test Python-ASE.

    mkdir /tmp/testase.$$; cd /tmp/testase.*
    python -c "from ase.test import test; test(verbosity=2, display=True)" 2>&1 | tee testase.log
  5. Download the latest version of the GPAW source and GPAW setups and unpack into new directories.

    cd ${HOME}/software
    wget https://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-0.9.11271.tar.gz
    tar -xvzf gpaw-setups-0.9.11271.tar.gz

    mkdir ${HOME}/software/gpaw
    cd ${HOME}/software/gpaw
    wget https://wiki.fysik.dtu.dk/gpaw-files/gpaw-0.10.0.11364.tar.gz
    tar -xvz gpaw-0.10.0.11364.tar.gz
  6. Compile and Install GPAW.

    export PYTHONPATH=${HOME}/.local/lib/python/
    export GPAW_SETUP_PATH=${HOME}/software/gpaw-setups-0.9.11271
    python setup.py install --user  2>&1 | tee install.log
  7. Test GPAW.

    gpaw-python `which gpaw-test` -j 4 2>&1 | tee test.log

 

 

Test gw_static.py fails on Ubuntu 12.04. The developers are being contacted about this issue.

excited_state.py fails on Ubuntu 12.04 with mpirun. The developers are being contacted about this issue.

Related articles

Installation notes (Ubuntu) - https://wiki.fysik.dtu.dk/gpaw/install/platforms_and_architectures.html

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