the aiida lab ecosystem...jupyterhub (multi-user server for jupyter notebooks) jupyter notebooks...

30
aiida.net The AiiDA Lab Ecosystem Building an Open Simulation Platform Leopold Talirz, EPFL

Upload: others

Post on 08-Jul-2020

20 views

Category:

Documents


0 download

TRANSCRIPT

aiida.net

The AiiDA Lab Ecosystem Building an Open Simulation Platform

Leopold Talirz, EPFL

Outline

2

Open Simulation Platform (OSP)

What defines an OSP?

✦ Integrates modelling codes into workflows

✦ Supports all stages of a workflow: pre-processing, calculations, post-processing

✦ Independent of any one modelling code / application

✦ Common metadata standards based on ontology

✦ Common tools implementing those standards

3OSP definition based on email by G. Goldbeck, Sep 6th 2018

MODA / EMMO compliant

Managing high-throughput calculations with automatic tracking of data provenance

4

www.aiida.net

Challenge 1 − High Throughput

20 years (1997)↓

4 hours (2017)

5

www.top500.org/statistics/perfdevel

Top 500 Supercomputer Performance

My MacBook 1 material (1997)↓

50k materials (2017)

OR

Challenge 1: Manage calculations on 50k materials

Challenge 2 − Reproducibility

6

IS THERE A REPRODUCIBILITY CRISIS?

Nature 533, 452–454 (2016)

No excuses in computational science

We can and must be fully reproducible

Challenge 2: Make open data easier

7

AiiDA architecture

1. The core: AiiDA python API

8

AiiDA architecture

AiiDA architecture

2. User interface: python scripts, verdi command line tool, verdi shell

9

AiiDA architecture

3.AiiDA daemon: manage interaction with remote computers without user intervention

10

Calculation state

TOSUBMIT

WITHSCHEDULER

RETRIEVED

PARSED

FINISHED

AiiDA architecture

4. AiiDA Object-Relational Mapper (ORM): stores data, codes and calculations in local database

tracks full data provenance for reproducibility 11

Handing over to the daemon ✦

Inputs stored in the DB ✦

Define (only) necessary inputs Interface designed by plugin ✦

Switch computers in one linesupports different schedulers, version of codes, … ✦

code = Code.get_from_string('pw-6.3@daint-mr25') calc = code.new_calc()

calc.set_max_wallclock_seconds(600) calc.set_resources({"num_machines": 2})

Structure = DataFactory('structure') structure = Structure(ase = read('TiO2.cif'))

Parameter = DataFactory('parameter') parameters = Parameter({ 'CONTROL': { 'calculation': 'scf', 'restart_mode': 'from_scratch', }, 'SYSTEM': { 'ecutwfc': 40., }})

Kpoints = DataFactory('array.kpoints') kpoints = Kpoints(kpoints_mesh = [4,4,4])

calc.use_structure(structure) calc.use_parameters(parameters) calc.use_kpoints(kpoints) calc.use_pseudos_from_family('SSSP_efficiency_v1.0') calc.store_all()

calc.submit()

AiiDA: Calculation example

From calculations to workflows ✦ phonon dispersion

Main-WorkflowStructure

Relaxation

Dynamical matrices

Interatomic force constants

Phonon dispersion

Sub

-wor

kflow

sSi

ngle

cal

cula

tions

Relaxation #1

Relaxation #2

Relaxation #n

Structure cell converged

Restart management

Restart (wall-time exceeded, …)

PW vc-relax

PW vc-relax

PW vc-relax

several failure cases handled automatically

Initialize PH

PH on q-grid

Collect phonons

Parallelization

PH on q1

PH on q2

PH on qn

N. Mounet et al.

Workflows = Encapsulation

14

params = {'input': {'kpoints_density': 0.2, 'convergence': 'tight'}, 'structure': structure, 'pseudo_family': pseudo_family, 'machinename': 'mycluster', 'pw_input':{'volume_conv_threshold': 5e-2}, 'pw_parameters': { 'SYSTEM': {'ecutwfc': 30.}, 'ELECTRONS': {'conv_thr': 1.e-10}} 'ph_input':{ 'distance_kpoints_in_dispersion': 0.005, 'diagonalization': 'cg'} }future = submit(PhBandsWorkflow, **params)

From minimal inputs ...

KpointsData (216283)(372 kpts)

MatdynCalculation (216285) FINISHED

kpoints

BandsData (216385)'Phonon bands'

output_phonon_bands

FolderData (216383)

retrieved

RemoteData (216320)

remote_folder

ParameterData (216384)

output_parameters

Code (209961)'matdyn-5.1.2-module'

code

ForceconstantsData (216273)

parent_calc_folder

ParameterData (216284)

parameters

ParameterData (216282)

settings

Q2rCalculation (215983) FINISHED

force_constants

FolderData (215981)

parent_calc_folder

Code (209960)'q2r-5.1.2-module'

code

ParameterData (215982)

parameters

InlineCalculation (215980)recollect_qpoints_inline()

retrieved

FolderData (215920)

retrieved_6

FolderData (215976)

retrieved_7

FolderData (215978)

retrieved_4

FolderData (215797)

retrieved_5

FolderData (215848)

retrieved_2

FolderData (215924)

retrieved_3

FolderData (215831)

retrieved_0

FolderData (215912)

retrieved_1

FolderData (215895)

retrieved_8

FolderData (215829)

retrieved_9

FolderData (215252)

initial_folder

InlineCalculation (215309)distribute_qpoints_inline()

retrieved

PhCalculation (215430) FINISHED

retrieved

PhCalculation (215433) FINISHED

retrieved

PhCalculation (215526) FINISHED

retrieved

PhCalculation (215427) FINISHED

retrieved

PhCalculation (215520) FINISHED

retrieved

PhCalculation (215523) FINISHED

retrieved

PhCalculation (215517) FINISHED

retrieved

PhCalculation (215514) FINISHED

retrieved

PhCalculation (215436) FINISHED

retrieved

PhCalculation (215529) FINISHED

retrieved

PhCalculation (215224) FINISHED

retrieved

ParameterData (215428)

settings

RemoteData (214841)

parent_calc_folder parent_calc_folderparent_calc_folder parent_calc_folder parent_calc_folder parent_calc_folder parent_calc_folder parent_calc_folder parent_calc_folder parent_calc_folder

parent_calc_folder

Code (209959)'ph-5.1.2-module'

code codecode code code code code code code code

code

ParameterData (215429)

parameters

KpointsData (215312)(1 kpts)

qpoints

ParameterData (215431)

settings

ParameterData (215432)

parameters

KpointsData (215313)(1 kpts)

qpoints

ParameterData (215524)

settings

ParameterData (215525)

parameters

KpointsData (215310)(1 kpts)

qpoints

KpointsData (215311)(1 kpts)

qpoints

ParameterData (215426)

parameters

ParameterData (215425)

settings

ParameterData (215518)

settings

ParameterData (215519)

parameters

KpointsData (215316)(1 kpts)

qpoints

ParameterData (215521)

settings

ParameterData (215522)

parameters

KpointsData (215317)(1 kpts)

qpoints

ParameterData (215516)

parameters

ParameterData (215515)

settings

KpointsData (215314)(1 kpts)

qpoints

ParameterData (215512)

settings

ParameterData (215513)

parameters

KpointsData (215315)(1 kpts)

qpoints

KpointsData (215318)(1 kpts)

qpoints

ParameterData (215435)

parameters

ParameterData (215434)

settings

ParameterData (215527)

settings

ParameterData (215528)

parameters

KpointsData (215319)(1 kpts)

qpoints

ParameterData (215223)

parameters

ParameterData (215222)

settings

KpointsData (214808)4x4x4 (+0.0,0.0,0.0)

qpoints

PwCalculation (214830)scf FINISHED

remote_folder

qpoint_6 qpoint_7qpoint_4 qpoint_5 qpoint_2 qpoint_3 qpoint_0 qpoint_1 qpoint_8 qpoint_9

Code (139993)'pw-5.1.2-module'

code

UpfData (1658)

pseudo_O

UpfData (1660)

pseudo_Ti

ParameterData (214828)

parameters

ParameterData (214829)

settings

KpointsData (214807)6x6x6 (+0.0,0.0,0.0)

kpoints

UpfData (1905)

pseudo_Ba

StructureData (214814)BaO3Ti

structure

structure

... to complex workflows

AiiDA provenance graph for 1 run of the phonon workflow

User base

15

User Skills Goals Solution

Computational Scientist

Knows Unix, bash, python

• run high-throughput calculations

• write complex workflows • develop AiiDA plugins

AiiDA on the work

station

Experimental Scientist

Doesn’t know Unix, bash, python

• run pre-defined workflows • analyze results

AiiDA Labin the cloud

Student (tutorial/lecture)

some familiarity with

Unix, bash, python

• learn how to use AiiDA • learn how to use ab-initio

codes • take setup home

Quantum Mobile on the laptop

16

OSP powered by AiiDA & Jupyter

AiiDA Lab Architecture

17

Open source technologies

● JupyterHub (multi-user server for Jupyter notebooks)

● Jupyter notebooks(interactive python,+ appmode)

● Docker (isolated environment for every user)

● Openstack (cloud computing platform)

Nature 563, 145-146 (2018)"Why Jupyter is data scientists' computational notebook of choice"

AiiDA Lab demo - login

18

AiiDA Lab demo - appmode

19

AiiDA Lab demo - phonon submit

20

AiiDA Lab demo - phonon results

21

!22

nanotech@surfaces - Compare bands

github.com/cpignedoli/mc-empa-surfaces

!23

nanotech@surfaces - Browse SPM

github.com/cpignedoli/mc-empa-surfaces

AiiDA OSP Checklist

☑ Integrates modelling codes into workflows

☑ Supports all stages of a workflow: pre-processing, calculations, post-processing

☑ Independent of any one modelling code / application

☐ Common metadata standards based on ontology

☑ Common tools implementing those standards

24OSP definition based on email by G. Goldbeck, Sep 6th 2018

Yes (“AiiDA workflow ontology”)but not yet MODA/EMMO compliant

AiiDA − Development

25

• developed since 2012 (39 contributors)

• Free and open source (MIT License)

AiiDA plugins

ase, castep, codtools, cp2k, crystal17,fleur, gollum, kkr, lammps, nwchem, phonopy, quantumespresso, raspa,

siesta, vasp, wannier90, yambo, zeo++, and more ...

• developed since 2017

• Free and open source (MIT License)

Funding

26

• SNSF MARVEL Phase II (2018-2022, EPFL Lead House)Specific funding for the Open Science Platform

• H2020 MarketPlace (2018-22, EPFL co-PI)Funding dedicated to providing materials simulation services and data

• H2020 Intersect (2019-21, EU; CNR lead PI, EPFL and ICN2 co-PI)Funding dedicated to providing automated modelling of complex devices, based on a AiiDA infrastructure

• Private collaboration of EPFL with a major European company (2019-21)on AiiDA-powered materials discovery for Li-ion batteries

• H2020 MaX II (2018-2021)Funding dedicated to for AiiDA-based workflows and modelling solutions

Conclusions

• AiiDA provides code-agnostic workflow management using a flexible plugin system

• AiiDA lab = OSP powered by AiiDA & Jupyter

27

Contact [email protected]

• Open EPFL AiiDA lab instance to wider user base

• Deploy of AiiDA lab elsewhere (universities, companies,…)

• Figure out integration into MarketPlace

• Alignment & incorporation of ontology-based metadata

Outlook

Materials Cloud: Behind the curtains

DevelopersTh

e M

ater

ials

Clo

ud

A

nd

AiiD

A te

ams

GiovanniPizzi

(EPFL)

BorisKozinsky (BOSCH)

MartinUhrin (EPFL)

SpyrosZoupanos

(EPFL)

NicolaMarzari (EPFL)

Snehal P.Kumbhar

(EPFL)

LeonidKahle (EPFL)

Sebastiaan P. Huber

(EPFL)

Marco Borelli (EPFL)

Elsa Passaro (EPFL)

Thomas Schulthess

(ETHZ,CSCS)

Leopold Talirz (EPFL)

Joost VandeVondele (ETHZ,CSCS)

Aliaksandr Yakutovich

(EPFL)

Contributors for the 23+ plugins: Quantum ESPRESSO, Wannier90, CP2K, FLEUR, YAMBO, SIESTA, VASP, …

Contributors to aiida_core and former AiiDA team members — Valentin Bersier, Jocelyn Boullier, Jens Broeder, Andrea Cepellotti, Fernando Gargiulo, Dominik Gresch, Rico Häuselmann, Eric Hontz, Christoph Koch, Espen Flage-

Larsen, Andrius Merkys, Nicolas Mounet, Tiziano Müller, Riccardo Sabatini, Ole Schütt, Phillippe Schwaller

The CSCS support teams

Funded by multiple efforts, leveraging MARVEL:H2020 MaX, H2020 MarketPlace, H2020 NFFA, Innosuisse/CTI

BerendSmit

(EPFL)

Caspar W Andersen

(EPFL)

AiiDA graph ontology

30

github.com/aiidateam/aiida-ontology