UCL / FabNESO

Neptune Exploratory Software plug-in for FabSim3
http://github-pages.ucl.ac.uk/FabNESO/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

FabNESO

pre-commit Tests status Linting status Documentation status Licence Documentation

Neptune Exploratory SOftware (NESO) plugin for FabSim3, facilitating execution of NESO simulations on both local and remote high performance computing systems via a unified interface.

This project is developed in collaboration with the Centre for Advanced Research Computing, University College London.

About

Project team

Research software engineering contact

Centre for Advanced Research Computing, University College London (arc.collaborations@ucl.ac.uk)

Getting started

Prerequisites

You will need FabSim3 to be installed on the machine you will use to dispatch simulation runs from.

NESO must be installed on the destination machine that will run the simulation.

Installation

The plugin can be installed locally with FabSim3 by running:

fabsim localhost install_plugin:FabNESO

Before the code can be run, a file machines_FabNESO_user.yml must be created in the plugin's directory ($FABSIM3_HOME/plugins/FabNESO/) containing the paths to the built NESO binaries on each system that will be used for running. An example file machines_FabNESO_user_example.yml is provided to use as a template.

Running tasks locally

NESO runs by calling the desired solver with a conditions and mesh XML files that define the parameters of the simulation and geometry of the simulation domain respectively. Examples of these configuration files are provided in the directories config_files/two_stream/ (intended for use with NESO's Electrostatic2D3V solver) and config_files/2Din3D-hw/ (for use with the H3LAPD solver).

Running a single simulation

The FabNESO neso task runs a single simulation on the machine of your choosing. To run NESO locally using the Electrostatic2D3V solver with the two_stream example, run the following command:

fabsim localhost neso:two_stream

The first positional argument after neso: specifies the directory within config_files that holds the conditions and mesh files to be used.

Additional arguments that can be given the to the neso task include:

A full list of the arguments that can be passed to the task is available in the package documentation.

The neso task also supports passing additional keyword arguments to override the value of parameters in the conditions file. For example to run the two_stream example with the Electrostatic2D3V solver, with the num_particles_total parameter overridden to be 10000 run

fabsim localhost neso:two_stream,num_particles_total=10000

To run the H3LAPD solver with the 2Din3D-hw example configuration, for example, the following command should be run:

fabsim localhost neso:2Din3D-hw,solver=H3LAPD

To retrieve the results of a job, run the command:

fabsim localhost fetch_results

Running an ensemble of simulations

FabNESO also provides tasks for running ensembles of NESO simulations - the links to the package documentation for the tasks below give details of the arguments that can be passed.

Calibrating a model using PyVBMC

FabNESO also provides a task neso_vbmc for calibrating (inferring the posterior distribution on) the parameters of a NESO model given data corresponding to observations of the model output and a distribution over the parameters corresponding to our prior beliefs. This uses the PyVBMC package which provides an implementation of variational Bayesian Monte Carlo (Acerbi, 2018), an approximate inference method designed for fitting computationally expensive models with a limited budget of model evaluations.

Running tasks on a remote system

To run FabNESO on a remote machine, the previous instructions for running locally can be followed with localhost replaced with the remote system of choice. Running a single NESO simulation on ARCHER2, for example, can be carried out with the command:

fabsim archer2 neso:two_stream

A list of possible remote destinations for FabSIM is provided using the command:

fabsim -l machines

Note that NESO must be installed on the remote machine, and that the bin/ directory of said NESO installation must be added to the plugin's machines_FabNESO_user.yml file for each remote system.

Further information on running FabSIM can be found in the FabSIM documentation.

Contributing

If you are interested in contributing to FabNESO please see our separate contributors guide.

Acknowledgements

This work was funded by a grant from the ExCALIBUR programme.