Note: These instructions should work for setting up AiiDA v1.6.4 on x86 LC production systems (like flash, quartz, etc.). You may also be interested in instructions for v1.6.4 setup on maya6 and older versions of setup instructions for v1.5.2 and v1.3

Note: The machine from which the AiiDA daemon runs (where the user works while submitting calculations) is often distinct from the machine where the calculations managed by AiiDA will actually run. For example, you may choose to set up AiiDA on flash in order to run quantum espresso jobs on quartz.

For more info, see the full AiiDA docs.

Getting started with AiiDAπŸ”—

Grabbing your credentialsπŸ”—

First, log in to flash. From there (and most other CZ machines), you'll find the credentials necessary to configure AiiDA in workspace in the directory /usr/workspace/<lcusername>/.lciaas/cz-<lcusername>. You should see subdirectories for rabbit-mq and postgresql, each with a *.info file. (These credential files exist after you've requested AiiDA resources from LC's Workflow Enablement Group.)

Note that for groups, credentials will be stored in /usr/workspace/<lcgroupname>/.lciaas/cz-<lcgroupname>.

Cloning and basic AiiDA SetupπŸ”—

To set up AiiDA on flash, we'll first clone the repo, check out the desired version (here v1.6.4), create a virtual environment, update pip, and install AiiDA.

To clone the repo, run

janeh@flash21:/usr/workspace/janeh/August2021$ git clone https://github.com/aiidateam/aiida-core.git
Cloning into 'aiida-core'...

remote: Enumerating objects: 106640, done.
remote: Counting objects: 100% (2486/2486), done.
remote: Compressing objects: 100% (1092/1092), done.
remote: Total 106640 (delta 1432), reused 2197 (delta 1242), pack-reused 104154
Receiving objects: 100% (106640/106640), 69.72 MiB | 33.83 MiB/s, done.
Resolving deltas: 100% (80748/80748), done.
Updating files: 100% (1227/1227), done.

Enter the newly created directory aiida-core and create a branch on version 1.6.4 (You can see other versions with git tag.):

janeh@flash21:/usr/workspace/janeh/August2021$ cd aiida-core/
janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ git checkout v1.6.4 -b v1.6.4
Switched to a new branch 'v1.6.4'

Create a virtual environment (here named "aiidavenv"):

janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ python3 -m venv aiidavenv

and then activate that environment:

janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ source aiidavenv/bin/activate
(aiidavenv) janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ 

Every time you want to work with AiiDA, you'll have to activate your AiiDA virtual environment. Notice that activating your environment adds the name of your environment before the command prompt. It also changes the default binaries for python and pip to be those found in your virtual environment. For example, when you run which pip, you should see <path to where you first ran "git clone" above>/aiida-core/aiidavenv/bin/pip.

Next, upgrade pip:

(aiidavenv) janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/8a/d7/f505e91e2cdea53cfcf51f4ac478a8cd64fb0bc1042629cedde20d9a6a9b/pip-21.2.2-py3-none-any.whl (1.6MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1.6MB 2.6MB/s
Installing collected packages: pip
  Found existing installation: pip 18.1
    Uninstalling pip-18.1:
      Successfully uninstalled pip-18.1
Successfully installed pip-21.2.2

You're now ready to install aiida-core with pip install -e <path to aiida-core directory>:

(aiidavenv) janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ pip install -e .
Obtaining file:///usr/WS1/janeh/August2021/aiida-core

  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
(…)
Successfully installed Mako-1.1.4 MarkupSafe-2.0.1 aiida-core-1.6.4 aio-pika-6.8.0 aiormq-3.3.1 aldjemy-0.9.1 alembic-1.6.5 archive-path-0.2.1 async-generator-1.10 attrs-21.2.0 backcall-0.2.0 bcrypt-3.2.0 cffi-1.14.6 circus-0.17.1 click-7.1.2 click-completion-0.5.2 click-config-file-0.6.0 click-spinner-0.1.10 configobj-5.0.6 cryptography-3.4.7 decorator-5.0.9 deprecation-2.1.0 django-2.2.24 ete3-3.1.2 graphviz-0.17 idna-3.2 importlib-metadata-4.6.3 ipython-7.26.0 ipython-genutils-0.2.0 jedi-0.18.0 jinja2-2.11.3 jsonschema-3.2.0 kiwipy-0.7.4 matplotlib-inline-0.1.2 multidict-5.1.0 nest-asyncio-1.4.3 numpy-1.21.1 packaging-21.0 pamqp-2.3.0 paramiko-2.7.2 parso-0.8.2 pexpect-4.8.0 pgsu-0.2.0 pickleshare-0.7.5 plumpy-0.19.0 prompt-toolkit-3.0.19 psutil-5.8.0 psycopg2-binary-2.8.6 ptyprocess-0.7.0 pycparser-2.20 pygments-2.9.0 pynacl-1.4.0 pyparsing-2.4.7 pyrsistent-0.18.0 python-dateutil-2.8.2 python-editor-1.0.4 pytray-0.3.2 pytz-2019.3 pyyaml-5.1.2 pyzmq-22.1.0 reentry-1.3.2 shellingham-1.4.0 shortuuid-1.0.1 simplejson-3.17.3 six-1.16.0 sqlalchemy-1.3.24 sqlalchemy-utils-0.36.5 sqlparse-0.4.1 tabulate-0.8.9 tornado-6.1 tqdm-4.62.0 traitlets-5.0.5 typing-extensions-3.10.0.0 tzlocal-2.1 upf-to-json-0.9.3 wcwidth-0.2.5 wrapt-1.11.2 yarl-1.6.3 zipp-3.5.0

Creating a profileπŸ”—

You'll create your AiiDA profile using the credentials you found in /usr/workspace/<lcusername>/.lciaas/cz-<lcusername>. Note that postgresql is the database, relevant when you are queried about your database host, port, etc; rabbitmq is the broker, relevant when you are queried for a broker username, password, etc.

Now, run verdi setup --profile <your name> and provide the requested information as shown below.

(aiidavenv) janeh@flash21:~$ verdi setup --profile jane
Info: enter "?" for help
Info: enter "!" to ignore the default and set no value
Email Address (for sharing data): herriman1@llnl.gov
First name: Jane
Last name: Herriman
Institution: LLNL
Database engine (postgresql_psycopg2) [postgresql_psycopg2]:
Database backend (django, sqlalchemy) [django]:
Database host: postgresql-janeh.apps.czapps.llnl.gov
Database port [5432]: 32212
Database name: aiida
Database username: janeh
Database password: # Enter the password from `postgresql.info`
Broker protocol (amqp, amqps) [amqp]: amqps
Broker username [guest]: janeh
Broker password [guest]: # Enter the password from `rabbitmq.info`
Broker host [127.0.0.1]: rabbitmq-janeh.apps.czapps.llnl.gov
Broker port [5672]: 32200
Broker virtual host name []: aiida
Repository directory [/g/g0/janeh/.aiida/repository/jane]: /usr/workspace/janeh/August2021/aiida-core
Success: created new profile `jane`.
Info: migrating the database.
Success: database migration completed.

You can see the profile has been successfully created with verdi profile list:

(aiidavenv) janeh@flash21:~$ verdi profile list
Info: configuration folder: /g/g0/janeh/.aiida
* jane

To complete setting up the profile, edit the config file. Open it with your favorite text editor

vi ~/.aiida/config.json

And add broker_parameters after the broker_virtual_host field.

"broker_port": 32200,
"broker_virtual_host": "aiida",
"broker_parameters": {
    "no_verify_ssl": "1",
    "cafile": "/etc/pki/tls/cert.pem"
},

TestingπŸ”—

Now test some verdi commands to see if your AiiDA setup has been successful.

Try running verdi status

(aiidavenv) janeh@flash21:~$ verdi status
verdi βœ” config dir:  /g/g0/janeh/.aiida
 βœ” profile:     On profile jane
 βœ” repository:  /usr/workspace/janeh/August2021/aiida-core
 profile list βœ” postgres:    Connected as janeh@postgresql-janeh.apps.czapps.llnl.gov:32212
 βœ” rabbitmq:    Connected as amqps://janeh:<password>rabbitmq-janeh.apps.czapps.llnl.gov:32200/aiida?no_verify_ssl=1&cafile=%2Fetc%2Fpki%2Ftls%2Fcert.pem&heartbeat=600
 ⏺ daemon:      The daemon is not running

Notice that the verdi daemon is not running. You can start it (verdi daemon start 1) and change the output of verdi status as follows:

(aiidavenv) janeh@flash21:~$ verdi daemon start 1
Starting the daemon... RUNNING
(aiidavenv) janeh@flash21:/usr/workspace/janeh/August2021/aiida-core$ verdi status
 βœ” config dir:  /g/g0/janeh/.aiida
 βœ” profile:     On profile jane
 βœ” repository:  /usr/workspace/janeh/August2021/aiida-core
 βœ” postgres:    Connected as janeh@postgesql-janeh.apps.czapps.llnl.gov:32212
 βœ” rabbitmq:    Connected as amqps://janeh:<password>rabbitmq-janeh.apps.czapps.llnl.gov:32200/aiida?no_verify_ssl=1&cafile=%2Fetc%2Fpki%2Ftls%2Fcert.pem&heartbeat=600
 βœ” daemon:      Daemon is running as PID 19575 since 2021-08-03 14:59:13

You should also be able to open the verdi shell:

(aiidavenv) janeh@flash21:~$ verdi shell
Python 3.7.2 (default, Feb 26 2019, 08:59:10)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.26.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]:

Set up and configure a computerπŸ”—

Set up computerπŸ”—

First, create a dedicated directory where aiida metadata will live. (You’ll tell AiiDA how to find this directory via the work_dir field in computer.yml, below.) You might run mkdir /usr/workspace/<your_username>/aiida-data:

mkdir /usr/workspace/janeh/aiida-data

Next, create a file computer.yml with the following content:

label: flashpdebug
hostname: "flash"
description: ""
transport: ssh
scheduler: "slurm"
work_dir: "/usr/workspace/janeh/aiida-data"
mpirun_command: "srun -n {tot_num_mpiprocs}"
mpiprocs_per_machine: "2"
prepend_text: |
  #SBATCH -p pdebug
append_text: " "
shebang: "#!/bin/bash"

Here, we are setting up flash as a computer that can run simulations configured using AiiDA on flash. Note that AiiDA can submit calculations to a machine other than the machine where AiiDA is running. If you wanted to run simulations on quartz while configuring those jobs via AiiDA on flash, you need to replace "flash" with "quartz" in both the label and hostname above. Changing the #SBATCH command under prepend text to #SBATCH -p pbatch would cause this computer to run jobs in the batch queue. (These options aside, to get the above example of computer.yml to work, you'll minimally need to update the work_dir to give the path to the directory you created for AiiDA data.)

To set up the computer described in the above yaml file, run verdi computer setup --config computer.yml:

(aiidavenv) janeh@flash21:~$ verdi computer setup --config computer.yml
Success: Computer<22> flashpdebug created
Info: Note: before the computer can be used, it has to be configured with the command:
Info:   verdi computer configure ssh flashpdebug

Alternatively, you can set up a computer manually by running verdi computer setup:

(aiidavenv) janeh@flash21:~$ verdi computer setup
Info: enter "?" for help
Info: enter "!" to ignore the default and set no value
Computer label: flashpdebug
Hostname: flash
Description []:
Transport plugin: ssh
Scheduler plugin: slurm
Shebang line (first line of each script, starting with #!) [#!/bin/bash]:
Work directory on the computer [/scratch/{username}/aiida/]: /usr/workspace/janeh/aiida-data
Mpirun command [mpirun -np {tot_num_mpiprocs}]: srun -n {tot_num_mpiprocs}
Default number of CPUs per machine: 2

If you're setting up a computer manually, a file will open after you enter the above. Feel free to save without adding anything! Here, I choose to add #SBATCH -p pdebug in the β€œprepend” section to so that jobs submitted to this computer will only use the debug queue:

#==========================================================================#
#= PREPEND_TEXT: if there is any bash commands that should be prepended to
#= the executable call in all submit scripts for this computer, type that
#= between the equal signs below and save the file.
#==========================================================================#

#SBATCH -p pdebug
#==========================================================================#
#= All lines that start with `#=` will be ignored.
#==========================================================================#

After closing this file, a second file will open, which I chose to leave blank and save:

#==========================================================================#
#= APPEND_TEXT: if there is any bash commands that should be appended to
#= the executable call in all submit scripts for this computer, type that
#= between the equal signs below and save the file.
#==========================================================================#


#==========================================================================#
#= All lines that start with `#=` will be ignored.
#==========================================================================#

You should then get a message of the form

Success: Computer<4> flashpdebug created
Info: Note: before the computer can be used, it has to be configured with the command:
Info:   verdi computer configure ssh flashdebug

Configure computerπŸ”—

Similarly, you can configure your computer with a script or manually at the command line. To do this via a script, create a file conf.yml for computer flashpdebug with the following form:

---
username: "janeh"
port: 622
look_for_keys: true
key_filename: "/g/g0/janeh/.ssh/id_rsa"
timeout: 60
allow_agent: true
proxy_command: ""
compress: true
gss_auth: false
gss_kex: false
gss_deleg_creds: false
gss_host: "flash"
load_system_host_keys: true
key_policy: "RejectPolicy"
use_login_shell: true
safe_interval: 10.0

but replace the field username with your LC username and key_filename with the path to your id_rsa file, both in quotation marks. If you'll be running calculations on a machine other than quartz, also update gss_host.

After updating, run verdi computer configure ssh flashdebug --config conf.yml:

(aiidavenv) janeh@flash21:~$ verdi computer configure ssh flashpdebug --config conf.yml
Info: Configuring computer flashpdebug for user herriman1@llnl.gov.
Success: flashpdebug successfully configured for herriman1@llnl.gov

Configuring the same computer manually at the command line would involve running verdi computer configure ssh flashdebug and then entering information as below (again using your own LC username and SSH key file):

(aiidavenv) janeh@flash21:~$ verdi computer configure ssh flashpdebug
Info: enter "?" for help
Info: enter "!" to ignore the default and set no value
User name [janeh]:
Port number [22]: 622
Look for keys [True]:
SSH key file []: /g/g0/janeh/.ssh/id_rsa
Connection timeout in s [60]:
Allow ssh agent [True]:
SSH proxy command []:
Compress file transfers [True]:
GSS auth [False]:
GSS kex [False]:
GSS deleg_creds [False]:
GSS host [flash]:
Load system host keys [True]:
Key policy (RejectPolicy, WarningPolicy, AutoAddPolicy) [RejectPolicy]:
Use login shell when executing command [True]:
Connection cooldown time (s) [30.0]: 10.0
Info: Configuring computer flashdebug for user herriman1@llnl.gov.
Success: flashdebug successfully configured for herriman1@llnl.gov

Test computerπŸ”—

To make sure this computer is running, execute verdi computer test flashpdebug and make sure all tests pass:

(aiidavenv) janeh@flash21:~$ verdi computer test flashpdebug
Info: Testing computer<flashpdebug> for user<herriman1@llnl.gov>...
* Opening connection... [OK]
* Checking for spurious output... [OK]
* Getting number of jobs from scheduler... [OK]: 12 jobs found in the queue
* Determining remote user name... [OK]: janeh
* Creating and deleting temporary file... [OK]
Success: all 5 tests succeeded

Configure quantum espressoπŸ”—

Install plug ins for quantum espressoπŸ”—

In order to use quantum espresso with AiiDA, you'll want to install the plugin for quantum espresso with pip install aiida-quantumespresso.

Before installing aiida-quantumespresso, running verdi plugin list aiida.calculations will show something like:

(aiidavenv) janeh@flash21:~$ verdi plugin list aiida.calculations
Registered entry points for aiida.calculations:
* arithmetic.add
* core.transfer
* templatereplacer

Info: Pass the entry point as an argument to display detailed information

Install via pip install aiida-quantumespresso:

(aiidavenv) janeh@flash21:~$ pip install aiida-quantumespresso
Collecting aiida-quantumespresso
  Downloading aiida_quantumespresso-3.4.2-py3-none-any.whl (354 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 354 kB 11.6 MB/s
(...)
Successfully installed PyCifRW-4.4.3 aiida-pseudo-0.6.3 aiida-quantumespresso-3.4.2 ase-3.22.0 charset-normalizer-2.0.4 cycler-0.10.0 elementpath-2.2.3 future-0.18.2 importlib-resources-5.2.2 kiwisolver-1.3.1 matplotlib-3.4.3 monty-2021.8.17 mpmath-1.2.1 networkx-2.6.2 palettable-3.3.0 pandas-1.3.2 pillow-8.3.1 pint-0.16.1 plotly-5.2.2 pymatgen-2022.0.11 pymysql-0.9.3 qe-tools-2.0.0rc2 requests-2.26.0 ruamel.yaml-0.17.13 ruamel.yaml.clib-0.2.6 scipy-1.7.1 seekpath-1.9.7 spglib-1.16.2 sympy-1.8 tenacity-8.0.1 uncertainties-3.1.6 urllib3-1.26.6 xmlschema-1.7.0 zipp-3.5.0

After installing aiida-quantumespresso, run reentry scan at the command line. verdi plugin list aiida.calculations should now show a long list of quantum espresso related plugins, including quantumespresso.pw:

(aiidavenv) janeh@flash21:~$ reentry scan
(aiidavenv) janeh@flash21:~$ verdi plugin list aiida.calculations
Registered entry points for aiida.calculations:
* arithmetic.add
* core.transfer
* quantumespresso.cp
* quantumespresso.create_kpoints_from_distance
* quantumespresso.dos
* quantumespresso.epw
* quantumespresso.matdyn
* quantumespresso.namelists
* quantumespresso.neb
* quantumespresso.ph
* quantumespresso.pp
* quantumespresso.projwfc
* quantumespresso.pw
* quantumespresso.pw2gw
* quantumespresso.pw2wannier90
* quantumespresso.pwimmigrant
* quantumespresso.q2r
* quantumespresso.seekpath_structure_analysis
* templatereplacer

Info: Pass the entry point as an argument to display detailed information

We'll use the quantumespresso.pw plugin in the next section.

Set up quantum espresso codeπŸ”—

To set up quantum espresso with a script, create file code.yml with the following content

label: pw
description: "quantum_espresso"
input_plugin: "quantumespresso.pw"
on_computer: true
remote_abs_path: β€œ/usr/workspace/janeh/pw.x"
computer: flashpdebug
prepend_text: |
  module purge
  module load mkl impi intel
append_text: ""

replacing the field remote_abs_path with the path to your pw.x executable. After running verdi code setup --config code.yml you should see something like:

(aiidavenv) janeh@flash21:~$ verdi code setup --config code.yml
Success: Code<690> pw@flashpdebug created

If you'd prefer manual configuration, you can simply run verdi code setup and then provide information for the following prompts, as below:

(aiidavenv) janeh@flash21:~$ verdi code setup
Info: enter "?" for help
Info: enter "!" to ignore the default and set no value
Label: pw
Description []:
Default calculation input plugin: quantumespresso.pw
Installed on target computer? [True]:
Computer: flashdebug
Remote absolute path: /usr/workspace/janeh/pw.x

After entering the above, a text file will open. Add the following module lines to the β€œprepend text” section:

#==========================================================================#
#= PREPEND_TEXT: if there is any bash commands that should be prepended to
#= the executable call in all submit scripts for this code, type that
#= between the equal signs below and save the file.
#==========================================================================#

module purge
module load intel mkl impi

#==========================================================================#
#= All lines that start with `#=` will be ignored.
#==========================================================================#

After saving and closing this file, another file will open, prompting you to append text. Leave this file blank and save and close it:

#==========================================================================#
#==========================================================================#
#= APPEND_TEXT: if there is any bash commands that should be appended to
#= the executable call in all submit scripts for this code, type that
#= between the equal signs below and save the file.
#==========================================================================#


#==========================================================================#
#= All lines that start with `#=` will be ignored.
#==========================================================================#

and then you’ll get a message like:

Success: Code<4> pw@flashpdebug created

Install pseudo potentialsπŸ”—

First install the plugin aiida-pseudo with pip install aiida-pseudo:

(aiidavenv) janeh@flash21:~$ pip install aiida-pseudo
Collecting aiida-pseudo
  Using cached aiida_pseudo-0.6.2-py3-none-any.whl (73 kB)
Requirement already satisfied: sqlalchemy<1.4 in ./aiidavenv/lib/python3.7/site-packages (from aiida-pseudo) (1.3.24)
Requirement already satisfied: click~=7.0 in ./aiidavenv/lib/python3.7/site-packages (from aiida-pseudo) (7.1.2)
Collecting requests~=2.20
  Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
     |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 62 kB 697 kB/s
(…)
Successfully installed aiida-pseudo-0.6.2 certifi-2021.5.30 charset-normalizer-2.0.4 pint-0.16.1 requests-2.26.0 urllib3-1.26.6

Once you have aiida-pseudo, you can use it to install pseudo potentials via aiida-pseudo install <pseudo potential family>. For example, you might run aiida-pseudo install sssp or aiida-pseudo install pseudo-dojo. Before installing a particular pseudo potential family, though, make sure that your environment searches for certificates in the right place by running export REQUESTS_CA_BUNDLE=/etc/pki/tls/cert.pem:

(aiidavenv) janeh@flash21:~$ export REQUESTS_CA_BUNDLE=/etc/pki/tls/cert.pem
(aiidavenv) janeh@flash21:~$ aiida-pseudo install pseudo-dojo
Info: downloading selected pseudopotentials archive...  [OK]
Info: downloading selected pseudopotentials metadata archive...  [OK]
Info: unpacking archive and parsing pseudos...  [OK]
Info: unpacking metadata archive and parsing metadata... [OK]
Success: installed `PseudoDojo/0.4/PBE/SR/standard/psp8` containing 72 pseudopotentials

You can then run aiida-pseudo list to see which pseudo potential families have been installed:

(aiidavenv) janeh@flash21:~$ aiida-pseudo list
Label                                Type string                Count
-----------------------------------  -------------------------  -------
PseudoDojo/0.4/PBE/SR/standard/psp8  pseudo.family.pseudo_dojo  72
SSSP/1.1/PBE/efficiency              pseudo.family.sssp         85

Run quantum espresso calculationπŸ”—

How to run a test jobπŸ”—

You should now be able to run a test calculation via

aiida-quantumespresso calculation launch pw -X pw@flashpdebug -F SSSP/1.1/PBE/efficiency

For a successful job, you should see output similar to the following:

(aiidavenv) janeh@flash21:~$ aiida-quantumespresso calculation launch pw -X pw@flashpdebug -F SSSP/1.1/PBE/efficiency
Running a PwCalculation...
PwCalculation<777> terminated with state: finished [0]

Output link               Node pk and type
------------------------------------------------------------
output_band               BandsData<780>
output_parameters         Dict<782>
output_trajectory         TrajectoryData<781>
remote_folder             RemoteData<778>
retrieved                 FolderData<779>

See also the docs on using the aiida-quantumespresso plugin.

If you run verdi process list -a, the most recently run calculation will show up at the bottom of the list, with its identifying β€œpk” number in the leftmost column:

(aiidavenv) janeh@flash21:~$ verdi process list -a
  PK  Created    Process label    Process State    Process status
----  ---------  ---------------  ---------------  ----------------
 777  13m ago    PwCalculation             ⏹ Finished [0]

You can then take that number and run verdi process show <pk> to learn more about the process.

(aiidavenv) janeh@flash21:~$ verdi process show 777
Property     Value
-----------  ------------------------------------
type         PwCalculation
state        Finished [0]
pk           777
uuid         6b35a154-5ec6-4830-a276-bf854d3ebd86
label
description
ctime        2021-08-24 20:58:14.221220+00:00
mtime        2021-08-24 20:59:09.340225+00:00
computer     [22] flashpdebug

Inputs      PK    Type
----------  ----  -------------
pseudos
    Si      660   UpfData
code        763   Code
kpoints     775   KpointsData
parameters  776   Dict
structure   90    StructureData

Outputs              PK  Type
-----------------  ----  --------------
output_band         780  BandsData
output_parameters   782  Dict
output_trajectory   781  TrajectoryData
remote_folder       778  RemoteData
retrieved           779  FolderData

Running a job from a scriptπŸ”—

The pk values obtained from verdi process show... can be used to write a launch.py script containing info such as 

from aiida.orm import load_node
from aiida.engine import submit

PwCalculation = CalculationFactory('quantumespresso.pw')

inputs = {
    'code': load_code('pw@flashpdebug'),
    'structure': load_node(90),
    'pseudos': {
        'Si': load_node(660),
    },
    'parameters': load_node(776),
    'kpoints': load_node(775),
    'metadata': {
        'options': {
            'resources': {
                'num_machines': 1,
            },
            'max_wallclock_seconds': 500,
            'withmpi': True
        }
    }
}

which can then be run via 

verdi run launch.py

You can again learn the pk of this number by running verdi process list -a. 

Troubleshooting a jobπŸ”—

Once you have the pk number of a job, you can learn more about the calculation and its outputs via 

verdi process show <pk>

verdi process report <pk>

verdi calcjob gotocomputer <pk>

The last option takes you to a directory where you’ll see the outputs from the job and the script actually submitted to slurm to run the desired calculations. You can also dig into the details of various inputs to the calculation via, for example, verdi data dict show <pk of theparametersDict> where the pk associated with parameters is learned from verdi process show <pk>.

If necessary, you can kill a process with verdi process kill <pk>.

TroubleshootingπŸ”—

QE version errorsπŸ”—

Error messages

Both the stdout and XML output files could not be read or parsed.

 

parser returned exit code<305>: Both the stdout and XML output files could not be read or parsed.

Potential fix You may be using a version of Quantum Espresso that isn't supported by AiiDA. For example, the messages below were generated using QE version 6.6 before it was supported. Changing to a different version of Quantum espresso may resolve these error messages.

More details

+-> WARNING at 2020-08-24 16:44:52.714821+00:00
 | key 'symmetries' is not present in raw output dictionary
+-> ERROR at 2020-08-24 16:44:52.770446+00:00
 | ERROR_OUTPUT_STDOUT_INCOMPLETE
+-> ERROR at 2020-08-24 16:44:52.774858+00:00
 | Both the stdout and XML output files could not be read or parsed.
+-> ERROR at 2020-08-24 16:44:52.777151+00:00
 | parser returned exit code<305>: Both the stdout and XML output files could not be read or parsed.

 

Daemon restart neededπŸ”—

Error messages

aiida.common.exceptions.MissingEntryPointError: Entry point 'quantumespresso.pw' not found in group 'aiida.parsers'. Try running `reentry scan` to update the entry point cache.

 

Potential fix Restart daemon  (assuming reentry scan does not fix the problem).

More details

Below is an example of full output from verdi process report <pk>

$ verdi process report 85
*** 85: None
*** (empty scheduler output file)
*** Scheduler errors:
The following modules were not unloaded:
  (Use "module --force purge" to unload all):

  1) intel/19.0.4   2) mvapich2/2.3   3) texlive/2016   4) StdEnv

Lmod is automatically replacing "mvapich2/2.3" with "impi/2019.8".


*** 1 LOG MESSAGES:
+-> REPORT at 2020-09-09 21:37:14.776260+00:00
| [85|PwCalculation|on_except]: Traceback (most recent call last):
|   File "/g/g12/keilbart/aiida_core/aiidavenv/lib/python3.6/site-packages/plumpy/process_states.py", line 220, in execute
|     result = self.run_fn(*self.args, **self.kwargs)
|   File "/g/g12/keilbart/aiida_core/aiida/engine/processes/calcjobs/calcjob.py", line 262, in parse
|     exit_code = execmanager.parse_results(self, retrieved_temporary_folder)
|   File "/g/g12/keilbart/aiida_core/aiida/engine/daemon/execmanager.py", line 412, in parse_results
|     parser_class = process.node.get_parser_class()
|   File "/g/g12/keilbart/aiida_core/aiida/orm/nodes/process/calculation/calcjob.py", line 489, in get_parser_class
|     return ParserFactory(parser_name)
|   File "/g/g12/keilbart/aiida_core/aiida/plugins/factories.py", line 158, in ParserFactory
|     entry_point = BaseFactory(entry_point_group, entry_point_name)
|   File "/g/g12/keilbart/aiida_core/aiida/plugins/factories.py", line 46, in BaseFactory
|     return load_entry_point(group, name)
|   File "/g/g12/keilbart/aiida_core/aiida/plugins/entry_point.py", line 202, in load_entry_point
|     entry_point = get_entry_point(group, name)
|   File "/g/g12/keilbart/aiida_core/aiida/plugins/entry_point.py", line 264, in get_entry_point
|     'the entry point cache.'.format(name, group)
| aiida.common.exceptions.MissingEntryPointError: Entry point 'quantumespresso.pw' not found in group 'aiida.parsers'. Try running `reentry scan` to update the entry point cache.

Setting up a code or computerπŸ”—

Error messages

psycopg2.OperationalError: SSL SYSCALL error: EOF detected

 

Potential fix Try adding the code or computer again. This error message appeared intermittently for me but would then go away on a new attempt, without changing what I was doing.

Jobs stuck in "Created" statea href="/services/cloud/workflow-tools/aiida#jobs-stuck-in-created-state" title="Permanent link">πŸ”—

Error messages This issue doesn't come with explicit error messages. Instead, you will see via verdi process list -a that your job is "Created" indefinitely:

(aiidavenv) janeh@flash21:~$ verdi process list
  PK  Created    Process label             Process State    Process status
----  ---------  ------------------------  ---------------  ----------------------------------
  93  54D ago    PwCalculation             ⏹ Created

In this case, verdi process report 93 will not show any error messages in the log. If you try verdi calcjob gotocomputer 93, however, you'll see this will not work:

 

(aiidavenv) janeh@flash21:~$ verdi calcjob gotocomputer 93
Critical: no remote work directory for this calcjob, maybe the daemon did not submit it yet

Potential fix It's possible that there is something wrong with your rabbitmq configuration. If running verdi status shows that you are connected to rabbitmq, try restarting the daemon and resubmitting your calculation.

If newly submitted jobs continue to enter and persist in "Created", there is probably another verdi process somewhere that is interfering with the verdi daemon you're trying to use to submit this calculation. Start by checking for stale verdi processes on your current login node by running ps -u <lc username>. This should show only two entries labeled verdi. If there are more, kill all verdi processes and then restart the daemon (or simply kill the stale processes, if you're able to distinguish them from the active verdi processes). You will also want to use ps -u <lc username> to identify (and subsequently kill) all stale verdi processes living on any system that connects to the rabbitmq instance you are using. For example, if you have only used one instance of rabbitmq and have run AiiDA on quartz and on flash, you will want to kill stale verdi processes on all quartz and flash login nodes. Reach out to the LC Hotline if you need help with this.

Jobs stuck in β€œWaiting for transport task: upload” stateπŸ”—

Error messages Running verdi process report <pk> gives a FileNotFound error of the form β€œFileNotFoundError: [Errno 2] No such file or directory: ''”.

Potential fix Try creating and subsequently using a new pseudopotential family by downloading and extracting the SSSP tarball as described above and adding the family with a new label. If this does not solve the issue, contact LC WEG via the hotline. We are still searching for a more elegant solution to this problem but have workarounds that should help.