Skip to content

Commit

Permalink
⬆️ UPDATE: Siesta MaX-1.1 (#12)
Browse files Browse the repository at this point in the history
The updated role builds and deploys version 'MaX-1.1' of Siesta (with support for pseudopotentials in PSML format, and for Lua scripting, among other improvements).

- It installs the siesta executable, as well as several post-processing utilities, in `/usr/local/bin`. 
- Requisite domain-specific libraries (libpsml, xmlf90, libgridxc, flook) are in `/usr/local/lib`, and their module files in `/usr/local/include`.
- It uses `ldconf` to add to the shared-library search path.
- It installs files for several pseudopotential families in `/usr/local/share/siesta/psml-files`.
- For the interface with the AiiDA role, it defines the `siesta_executables` variable.
  • Loading branch information
albgar authored Dec 4, 2020
1 parent 9d86466 commit 1c2e130
Show file tree
Hide file tree
Showing 22 changed files with 972 additions and 451 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ warn_list: # or 'skip_list' to silence them completely
- '208' # File permissions unset or incorrect
- '305' # Use shell only when shell functionality is required
- '503' # Tasks that run when changed should likely be handlers

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

strategy:
matrix:
distro: [ubuntu1604, ubuntu1804]
distro: [ubuntu1604, ubuntu1804, ubuntu2004]
fail-fast: false

runs-on: ubuntu-latest
Expand Down
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,56 @@

# Ansible Role: marvel-nccr.siesta

An Ansible role that installs [Siesta](https://launchpad.net/siesta) on Ubuntu.
An Ansible role that installs [Siesta](https://gitlab.com/siesta-project/siesta) on Ubuntu.

It can install any MaX-1.X version. These are 'preview' versions with
important features (PSML, etc), not yet merged into the master
version.

PSML support is important to access databases and prepare
pseudopotentials for all elements, as needed by the aiida-siesta
package, which supports PSML since the 1.1.0 version. Fuller support
for protocols, also heavily dependent on the PSML feature, appeared in
the 1.1.1 version. Older versions of aiida-siesta can also work with
this version of Siesta, although they will not be able to access all
the features.

Note that support for the ELSI library (the other major feature of the
rel-MaX-1 branch) is not compiled in for deployments in the QuantumMobile,
as it is mostly a performance feature.

With minor changes detailed in the defaults/main.yml file, this role can also
compile the 4.1-rc2 version of Siesta, in the beta branch.

Future versions along the rel-MaX-1 and rel-4.1 branches could in
principle be built, as long as they can still use the same libraries,
and as long as they have a proper tag in the Gitlab repository.


## Installation

`ansible-galaxy install marvel-nccr.siesta`

## Role Variables

See `defaults/main.yml`
See `defaults/main.yml`.

In particular, `siesta_version` can be set to the desired tag. By default,
it is set to `MaX-1.2.0`.

This role uses the marvel-nccr.libxc role to install versions of libxc
in those systems where libxc package support is sub-standard. The required
libxc version can be set through the variable `siesta_libxc_version`, which
is `4.3.4` by default.

## Example Playbook

```yaml
- hosts: servers
roles:
- role: marvel-nccr.siesta
vars:
siesta_version: "MaX-1.2.0" # tag in GitLab
```
## Development and testing
Expand Down
220 changes: 150 additions & 70 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
siesta_version: "v4.1-rc2"
siesta_minor_version: "v4.1"
#
# These variables control the optional features.
#
siesta_enable_mpi: "1"
siesta_enable_netcdf: "1"
siesta_enable_ncdf: "1"
siesta_enable_flook: "1"

#
run_tests: true
#--------------------------
#
# We install by default the MaX-1.X series of versions. These have
# important features (PSML pseudopotentials, etc), not yet merged into the
# master version.
# PSML support is important to access databases of pseudopotentials for all elements.
#
# Note that support for the ELSI library is not compiled in
# in this deployment for the QuantumMobile, as it is mostly a performance
# feature.
#
# Any version in GitLab with a tag of the form MaX.1* can be used here.
#
siesta_version: "MaX-1.2.0"
#------------------------------------------------------------------------------------
#
# Still, it is possible to install the "rel-4.1" version of Siesta
# by setting
#
#### siesta_version: "v4.1-rc2"
#
# **AND** removing "unfold" from the list of 'siesta_utils' futher below
#------------------------------------------------------------------------------------


siesta_src: siesta-{{ siesta_version }}
siesta_src_archive: "{{ siesta_src }}.tar.gz"
siesta_code_folder: "/tmp"
Expand All @@ -8,118 +41,165 @@ siesta_data_folder: "{{ siesta_prefix }}/share/siesta"
siesta_url: "https://gitlab.com/siesta-project/siesta/-/archive/{{ siesta_version }}/{{ siesta_src_archive }}"
siesta_topdir: "{{ siesta_code_folder }}/siesta-{{ siesta_version }}"

siesta_enable_netcdf: "1"
siesta_enable_ncdf: "1"
siesta_xmlf90_root: ""
siesta_psml_root: ""
siesta_gridxc_root: ""
siesta_libxc_root: ""
siesta_xmlf90_version: "1.5.5"
siesta_xmlf90_src: xmlf90-{{ siesta_xmlf90_version }}
siesta_xmlf90_src_archive: "{{ siesta_xmlf90_src }}.tar.gz"
siesta_xmlf90_code_folder: "/tmp"
siesta_xmlf90_prefix: "/usr/local"
siesta_xmlf90_url: "https://gitlab.com/siesta-project/libraries/xmlf90/-/archive/{{ siesta_xmlf90_version }}/{{ siesta_xmlf90_src_archive }}"
siesta_xmlf90_topdir: "{{ siesta_xmlf90_code_folder }}/xmlf90-{{ siesta_xmlf90_version }}"

siesta_libpsml_version: "1.1.10"
siesta_libpsml_src: libpsml-{{ siesta_libpsml_version }}
siesta_libpsml_src_archive: "{{ siesta_libpsml_src }}.tar.gz"
siesta_libpsml_code_folder: "/tmp"
siesta_libpsml_prefix: "/usr/local"
siesta_libpsml_url: "https://gitlab.com/siesta-project/libraries/libpsml/-/archive/{{ siesta_libpsml_version }}/{{ siesta_libpsml_src_archive }}"
siesta_libpsml_topdir: "{{ siesta_libpsml_code_folder }}/libpsml-{{ siesta_libpsml_version }}"

# The libxc version (to be used through libgridxc). The (Quantum
# Mobile) libxc role has the installation path hardwired now, and it
# installs by default the 4.3.4 version. Since it suits us, we set
# this version here, to save on building time if the libxc role was
# invoked earlier (see the full logic in tasks/libxc.yml, including
# how we simply install a system package if the distribution is modern enough)

siesta_libxc_version: "4.3.4"
siesta_libxc_root: "/usr/local/libxc-{{ siesta_libxc_version }}"

siesta_libgridxc_version: "0.9.6"
siesta_libgridxc_src: libgridxc-{{ siesta_libgridxc_version }}
siesta_libgridxc_src_archive: "{{ siesta_libgridxc_src }}.tar.gz"
siesta_libgridxc_code_folder: "/tmp"
siesta_libgridxc_prefix: "/usr/local"
siesta_libgridxc_url: "https://gitlab.com/siesta-project/libraries/libgridxc/-/archive/{{ siesta_libgridxc_version }}/{{ siesta_libgridxc_src_archive }}"
siesta_libgridxc_topdir: "{{ siesta_libgridxc_code_folder }}/libgridxc-{{ siesta_libgridxc_version }}"

siesta_flook_version: "0.8.1"
siesta_flook_src: flook-{{ siesta_flook_version }}
siesta_flook_src_archive: "{{ siesta_flook_src }}.tar.gz"
siesta_flook_code_folder: "/tmp"
siesta_flook_prefix: "/usr/local"
siesta_flook_url: "https://github.com/ElectronicStructureLibrary/flook/archive/v0.8.1.tar.gz"
siesta_flook_topdir: "{{ siesta_flook_code_folder }}/flook-{{ siesta_flook_version }}"

siesta_xmlf90_root: "{{ siesta_xmlf90_prefix }}"
siesta_psml_root: "{{ siesta_libpsml_prefix }}"
siesta_gridxc_root: "{{ siesta_libgridxc_prefix }}"
siesta_flook_root: "{{ siesta_flook_prefix }}"
siesta_fftw_root: "/usr/lib"

#----------
siesta_netcdf_incflags: "-I/usr/include"
siesta_netcdf_libs: "-lnetcdff -lnetcdf"
siesta_blacs_libs: "-lblacsF77init-openmpi -lblacsCinit-openmpi -lblacs-openmpi"
siesta_fftw_incflags: "-I/usr/include"
siesta_fftw_libs: "-lfftw3f -lfftw3"
siesta_scalapack_libs: "-lscalapack-openmpi {{ siesta_blacs_libs }}"
siesta_lapack_libs: "-llapack -lblas"

#
# This variable will be picked up by the Aiida role
#
siesta_executables:
- name: siesta
folder: "{{ siesta_prefix }}"
folder: "{{ siesta_prefix }}/bin"
plugin: siesta.siesta
#
# After a recent upgrade, this program is not compatible with the STM plugin :-(
# The version shipped with siesta-4.0.X is still appropriate
# - name: plstm
# folder: "{{ siesta_prefix }}/Util/STM/simple-stm/plstm"
# plugin: siesta.stm

# Utilities in Util/
- name: plstm
folder: "{{ siesta_prefix }}/bin"
plugin: siesta.stm

#--------------------------------------------------

# Siesta utilities, installed together with the main Siesta executable

siesta_utils:
- name: plstm
dir: Util/STM/simple-stm
description: >-
Post-processor for LDOS or RHO data for STM imaging
- name: stm
dir: Util/STM/ol-stm/Src
description: >-
Generator of LDOS data (with opt wf projection) for STM imaging
- name: unfold
dir: Util/Unfolding/Src
description: >-
Unfolding utility
- name: denchar
dir: Util/Denchar/Src
description: >-
Charge density and wave-function plotting
- name: g2c_ng
dir: Util/Grid
description: >-
Converter from native grid to Cube format
- name: macroave
dir: Util/Macroave/Src
description: >-
Macroscopic averages processor
- name: mprop
dir: Util/COOP
description: >-
COOP/COHP processor
- name: fat
dir: Util/COOP
description: >-
Fat-bands processor
- name: gnubands
dir: Util/Bands
description: >-
Band-structure plotting
- name: eigfat2plot
dir: Util/Bands
description: >-
Fat-bands plotting
- name: readwfx
dir: Util/WFS
description: >-
Read contents of WFSX files
- name: vibra
dir: Util/Vibra/Src
description: >-
Computes phonon frequencies
- name: fcbuild
dir: Util/Vibra/Src
description: >-
Pre-processor for force-constant calculation
- name: tbtrans
dir: Util/TS/TBtrans
description: >-
Transport post-processor
siesta_pps:
# - name: nc-sr-pbe-stringent-0.4
# folder: nc-sr-pbe-stringent-0.4
# file: nc-sr-04_pbe_stringent_psml.tgz
# url: http://departments.icmab.es/leem/SIESTA_MATERIAL/tmp_PseudoDojo/
# home_page: http://www.pseudo-dojo.org/
# description: >-
# Norm-conserving scalar-relativistic pseudopotentials v0.4 for the PBE
# functional (NC SR ONCVPSP v0.4) from pseudo-dojo.org.
# Accuracy "stringent", format PSML.
# - name: nc-sr-pbe-standard-0.4
# folder: nc-sr-pbe-standard-0.4
# file: nc-sr-04_pbe_standard_psml.tgz
# url: http://departments.icmab.es/leem/SIESTA_MATERIAL/tmp_PseudoDojo/
# home_page: http://www.pseudo-dojo.org/
# description: >-
# Norm-conserving scalar-relativistic pseudopotentials v0.4 for the PBE
# functional (NC SR ONCVPSP v0.4) from pseudo-dojo.org.
# Accuracy "standard", format PSML.
- name: nc-sr-pbe-standard-0.4
file: nc-sr-04_pbe_standard-psf.tgz
url: https://icmab.es/leem/SIESTA_MATERIAL/tmp_PseudoDojo
home_page: http://www.pseudo-dojo.org/
description: >-
Norm-conserving scalar-relativistic pseudopotentials v0.4 for the PBE
functional (NC SR ONCVPSP v0.4) from pseudo-dojo.org.
Accuracy "standard", format PSF.
# - name: nc-fr-pbe-stringent-0.4
# folder: nc-fr-pbe-stringent-0.4
# file: nc-fr-04_pbe_stringent_psml.tgz
# url: http://departments.icmab.es/leem/SIESTA_MATERIAL/tmp_PseudoDojo/
# home_page: http://www.pseudo-dojo.org/
# description: >-
# Norm-conserving fully-relativistic pseudopotentials v0.4 for the PBE
# functional (NC FR ONCVPSP v0.4) from pseudo-dojo.org.
# Accuracy "stringent", format PSML.
# - name: nc-fr-pbe-standard-0.4
# folder: nc-fr-pbe-standard-0.4
# file: nc-fr-04_pbe_standard_psml.tgz
# url: http://departments.icmab.es/leem/SIESTA_MATERIAL/tmp_PseudoDojo/
# home_page: http://www.pseudo-dojo.org/
# description: >-
# Norm-conserving fully-relativistic pseudopotentials v0.4 for the PBE
# functional (NC FR ONCVPSP v0.4) FRom pseudo-dojo.org.
# Accuracy "standard", format PSML.
- name: nc-fr-pbe-standard-0.4
file: nc-fr-04_pbe_standard-psf.tgz
url: https://icmab.es/leem/SIESTA_MATERIAL/tmp_PseudoDojo
home_page: http://www.pseudo-dojo.org/
description: >-
Norm-conserving fully-relativistic pseudopotentials v0.4 for the PBE
functional (NC FR ONCVPSP v0.4) FRom pseudo-dojo.org.
Accuracy "standard", format PSF.
#
# Pseudopotential packages -------------------------
#

siesta_psml_pps_version: "qm"
siesta_psml_pps_src: psml-files-{{ siesta_psml_pps_version }}
siesta_psml_pps_src_archive: "{{ siesta_psml_pps_src }}.tar.gz"
siesta_psml_pps_code_folder: "/tmp"
siesta_psml_pps_url: "https://gitlab.com/garalb/psml-files/-/archive/{{ siesta_psml_pps_version }}/{{ siesta_psml_pps_src_archive }}"

#
# Tests. Just a few
#
siesta_tests:
- h2o
- mno_ldau

siesta_lua_tests:
- lua_h2o
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ galaxy_info:
versions:
- xenial
- bionic
- focal
galaxy_tags:
- ubuntu
- application
Expand Down
18 changes: 15 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependency:
name: galaxy
# requirements_file: molecule/default/requirements.yml
requirements_file: molecule/default/requirements.yml
driver:
name: docker
platforms:
Expand All @@ -16,7 +16,19 @@ platforms:
LANG: "en_US.UTF-8"
provisioner:
name: ansible
# log: true # for debugging
playbooks:
converge: converge.yml
# Remove Ansible no_log settings for debugging
# log: true
config_options:
defaults:
# nicer stdout printing
stdout_callback: yaml
bin_ansible_callbacks: true
# add timing to tasks
callback_whitelist: profile_tasks
inventory:
hosts:
all:
vars:
ansible_python_interpreter: /usr/bin/python3
run_tests: true
2 changes: 2 additions & 0 deletions molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- role: marvel-nccr.libxc
version: v0.1.0
Loading

0 comments on commit 1c2e130

Please sign in to comment.