Skip to content

Commit

Permalink
👌 IMPROVE: Update psuedo URL locations
Browse files Browse the repository at this point in the history
Also add retries to downloads
  • Loading branch information
chrisjsewell committed Nov 27, 2020
1 parent 0d88706 commit c61a231
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Ansible Role: marvel-nccr.quantum_espresso

An Ansible role that installs [Quantum ESPRESSO](http://www.quantum-espresso.org) on Ubuntu.
An Ansible role that installs [Quantum ESPRESSO](http://www.quantum-espresso.org) on Ubuntu (tested against 16.04, 18.04 amd 20.04).

## Installation

Expand Down
9 changes: 3 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,20 @@ quantum_espresso_pps:
- name: sssp-pbe-efficiency-1.1
file: SSSP_efficiency_pseudos.tar.gz
folder: sssp-pbe-efficiency-1.1
url: https://legacy-archive.materialscloud.org/file/2018.0001/v3
home_page: https://materialscloud.org/sssp/
url: https://archive.materialscloud.org/record/file?file_id=8a94cb23-2c11-422f-9290-22392dbc355b&record_id=22&filename=SSSP_efficiency_pseudos.tar.gz
description: >-
Standard Solid State Pseudopotentials (efficiency)
for the PBE functional
- name: sssp-pbe-precision-1.1
file: SSSP_precision_pseudos.tar.gz
folder: sssp-pbe-precision-1.1
url: https://legacy-archive.materialscloud.org/file/2018.0001/v3
home_page: https://materialscloud.org/sssp/
url: https://archive.materialscloud.org/record/file?record_id=22&file_id=4f68604c-a95c-468e-9b5e-6ff7bc2bc543&filename=SSSP_precision_pseudos.tar.gz
description: >-
Standard Solid State Pseudopotentials (precision)
for the PBE functional
- name: sg15-oncv-1.1
file: sg15_oncv_upf_2015-10-07.tar.gz
url: http://www.quantum-simulation.org/potentials/sg15_oncv
folder: sg15-oncv-1.1
home_page: http://www.quantum-simulation.org/potentials/sg15_oncv/
url: http://www.quantum-simulation.org/potentials/sg15_oncv/sg15_oncv_upf_2015-10-07.tar.gz
description: >-
SG15 Optimized Norm-Conserving Vanderbilt (ONCV) pseudopotentials
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@

- name: Add pseudopotentials
include_tasks: pps.yml
vars:
pp: "{{ item }}"
with_items: "{{ quantum_espresso_pps }}"
loop: "{{ quantum_espresso_pps }}"
loop_control:
loop_var: pp

- name: Remove code folder
file:
Expand Down
9 changes: 6 additions & 3 deletions tasks/pps.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# download and extract pseudopotentials
- name: download "{{ pp.file }}"
get_url:
url: "{{ pp.url }}/{{ pp.file }}"
url: "{{ pp.url }}"
dest: "{{ quantum_espresso_code_folder }}/{{ pp.file }}"
mode: "u+r"
register: pp_download
register: qe_pp_download
until: not qe_pp_download.failed
retries: 3
delay: 10

- name: "Create {{ pp.folder }}/"
become: true
Expand All @@ -15,7 +18,7 @@
- name: "Unpack {{ pp.file }}"
become: true
unarchive:
src: "{{ pp_download.dest }}"
src: "{{ qe_pp_download.dest }}"
dest: "{{ quantum_espresso_data_folder }}/{{ pp.folder }}"
remote_src: true
register: pp_extract

0 comments on commit c61a231

Please sign in to comment.