ARCHER logo ARCHER banner

The ARCHER Service is now closed and has been superseded by ARCHER2.

  • ARCHER homepage
  • About ARCHER
    • About ARCHER
    • News & Events
    • Calendar
    • Blog Articles
    • Hardware
    • Software
    • Service Policies
    • Service Reports
    • Partners
    • People
    • Media Gallery
  • Get Access
    • Getting Access
    • TA Form and Notes
    • kAU Calculator
    • Cost of Access
  • User Support
    • User Support
    • Helpdesk
    • Frequently Asked Questions
    • ARCHER App
  • Documentation
    • User Guides & Documentation
    • Essential Skills
    • Quick Start Guide
    • ARCHER User Guide
    • ARCHER Best Practice Guide
    • Scientific Software Packages
    • UK Research Data Facility Guide
    • Knights Landing Guide
    • Data Management Guide
    • SAFE User Guide
    • ARCHER Troubleshooting Guide
    • ARCHER White Papers
    • Screencast Videos
  • Service Status
    • Detailed Service Status
    • Maintenance
  • Training
    • Upcoming Courses
    • Online Training
    • Driving Test
    • Course Registration
    • Course Descriptions
    • Virtual Tutorials and Webinars
    • Locations
    • Training personnel
    • Past Course Materials Repository
    • Feedback
  • Community
    • ARCHER Community
    • ARCHER Benchmarks
    • ARCHER KNL Performance Reports
    • Cray CoE for ARCHER
    • Embedded CSE
    • ARCHER Champions
    • ARCHER Scientific Consortia
    • HPC Scientific Advisory Committee
    • ARCHER for Early Career Researchers
  • Industry
    • Information for Industry
  • Outreach
    • Outreach (on EPCC Website)

You are here:

  • ARCHER

Can't list the navigation items at the moment. Please try again later.

  • ARCHER Community
  • ARCHER Benchmarks
  • ARCHER KNL Performance Reports
  • Cray CoE for ARCHER
  • Embedded CSE
  • ARCHER Champions
  • ARCHER Scientific Consortia
  • HPC Scientific Advisory Committee
  • ARCHER for Early Career Researchers

Contact Us

support@archer.ac.uk

Twitter Feed

Tweets by @ARCHER_HPC

ISO 9001 Certified

ISO 27001 Certified

CVODE support for FEniCS

eCSE09-004

Key Personnel

PI/Co-I: Dr. Chris Richardson - University of Cambridge, Prof. Hans Fangohr - University of Southampton, Dr. Garth Wells - University of Cambridge

Technical: Chris Hadjigeorgiou - University of Cambridge

Relevant Documents

eCSE Technical Report: CVODE support for FEniCS

Project summary

FEniCS (https://fenicsproject.org) is a widely used platform for solving partial differential equations (PDEs). PDEs describe physical laws, such as how heat travels, or magnetisation varies in a magnetic specimen.

FEniCS is based on the finite element method (FEM). However, support for time-dependent equations in FEniCS has been quite limited. It required the user/developer to implement their own scheme of advancing in time, rather than exploiting a library for a wide range of well tested schemes. In this project, we have extended FEniCS to support the SUNDIALS CVODE . SUNDIALS CVODE provides methods for solving systems of ordinary differential equations, which when coupled to FEniCS provides a wide range of methods for solving time-dependent partial differential equations. Time-stepping schemes for time-dependent equations is essential to model many physical problems, and the development in this project will allow the many researchers use FEniCS to use the more sophisticated time-stepping schemes provided by SUNDIALS CVODE.

Key Features

A scientific driver for this project was the solution of time-dependent micromagnetics equations with FEniCS in parallel. We have provided a Python interface from FEniCS to CVODE and it is now possible to solve time-dependent micromagnetics equations in parallel using FEniCS and CVODE. The user only needs to provide an initial vector and callbacks for computing time derivatives and their Jacobians. The vector is then handled internally, and can be advanced in time by a simple function call. The implemented pattern mirrors that in the CVODE documentation, and is easy to follow.

Computational micromagnetics has become a key tool in research and development in academia and industry. Modelling of magnetic storage media and read-write systems is widely used in the magnetic data storage industry and has significant economic impact. In academia, micromagnetic modelling is also used to advance magnetoelectronics and the emerging skyrmionics; the former having the potential to revolutionise electronic circuits by replacing electric charge of electrons as the carrier of information with spin (magnetisation is closely coupled to the spin), the latter opening up paths towards high capacity data storage using topological field excitations.

In addition to these material and device-based engineering applications of computational micromagnetism, the models are actively used in geophysics (rock magnetism) and increasingly in magnetic sensing and medicine.

Achievement of objectives

The purpose of this project was to interface the SUNDIALS CVODE package from Lawrence Livermore National Laboratory (LLNL) to the open-source FEniCS Project libraries, with particular application to micromagnetics applications.

  1. Implementation

    • SUNDIALS/CVODE has been integrated as part of FEniCS build system as an optional dependency.
    • A functioning C++ interface in FEniCS to CVODE has been developed.
    • Python wrappers for the FEniCS C++ CVODE interface implemented.
    • All new code passes new unit tests in C++ and Python.
  • Validation and Performance of Scientific Code success criteria

    • Validation of implementation for correctness, using reference results.
    • Demonstrate weak scaling for a diffusion type problem. Shown on CSD3 up to 256 cores.
    • Demonstrate micromagnetic prototype (with exchange interaction, and anisotropy or applied field).
    • Develop a non-trivial time-dependent FEniCS example and demonstrate provision of Jacobian. An example showing the use of the Jacobian is included in the tutorial documentation.
  • Dissemination and sustainability success criteria

    • All code published on bitbucket.org as part of FEniCS development.
    • All tests working with FEniCS online continuous integration tools.
    • New code developments in 2018.1.0 FEniCS release (14th June 2018).
    • Micromagnetics prototype code with new time integration functionality publicly developed with Southampton group (Hans Fangohr).
    • New feature documentation integrated with FEniCS documentation.
    • Group discussion at FEniCS 2018 meeting in Oxford.
    • Presentation at Cambridge Computation Seminar Day.
  • Training success criteria

    Provide web based training at Cambridge and Southampton. Due to the small size of the micromagnetics community, and the partial relocation of the Southampton team to Germany, communication and training has taken place on #slack in a team called “fenics-cvode”. This has been successful, as it allows asynchronous communication, and continuous contact between the FEniCS developers and users.

  • Summary of the software

    FEniCS is an open source tool for solving differential equations using finite element analysis. It is freely available at https://fenicsproject.org. Packages exist for Ubuntu Linux, and it has been installed on CSD3 in Cambridge and ARCHER. SUNDIALS is a library from LLNL, which is also freely available to download. It is installed as part of Cray-TPSL on ARCHER. When configuring FEniCS, we can set the environment variable SUNDIALS_DIR to point to the installation of SUNDIALS on the system, and the FEniCS CVODE interface will then be available. The latest release of FEniCS (2018.1.0) now includes the code from this project, and can therefore use SUNDIALS.

    A module is available on ARCHER in /work/ecse0904/shared/FEniCS/module but it is anticipated that FEniCS with SUNDIALS will become generally available when the 2018.1.0 release is built by ARCHER CSE.

    Copyright © Design and Content 2013-2019 EPCC. All rights reserved.

    EPSRC NERC EPCC