FEniCS

Software name: 
FEniCS
Policy 

FEniCS is available to all users at HPC2N.

General 

FEniCS is free software for automated solution of differential equations.

If you use FEniCS in your research, the developers would be grateful if you would cite the relevant publications. FEniCS is organized as a collection of components, so to give proper credit to the developers of FEniCS, please cite the indicated references for each relevant component.

More about citing FEniCS here.

Description 

The FEniCS Project is is a collaborative project for the development of innovative concepts and tools for automated scientific computing, with a particular focus on automated solution of differential equations by finite element methods.

The methodology and software developed as part of the FEniCS Project are documented in a number of research articles and a book. You can also learn more about FEniCS from these presentations.

Availability 

On HPC2N we have FEniCS available on Abisko.

Usage at HPC2N 

To use the fenics module, add it to your environment:

module add fenics

The recommended usage for FEniCS is as a batch job.

During a job run, FEniCS uses a directory for some cache files, which will be placed in

/pfs/nobackup/$HOME/.cache/instant/

After a failed run, it is often a good idea to clean the directory, which can be done with

instant-clean

NOTE: Parallel XML mesh output is no longer supported by fenics. It was removed very recently. Use HDF5 format instead.

Example, batch script:

Since parallelism does not work yet, ask for only one core.
 

#!/bin/bash
# Change to your actual SNIC project number
#SBATCH -A SNICXXX-YY-ZZ
# Asking for 1 core
#SBATCH -n 1
# Change to the amount of time you expect your job to use 
#SBATCH -t 00:30:00
#SBATCH --error=fenics_%J.err
#SBATCH --output=fenics_%J.out

module add fenics/1.5.0 

srun python <file.py>

Submit with

sbatch <jobscript>

Interactive Use

It is also possible to run FEniCS interactively, instead of as a batch job. If you need to use graphics/the plotting functionality, it is important that you log in with ssh -X username@host to set the display correctly.

NOTE that it will complain about not being able to use/initialize infiniband, since that is not available on the login node. It will instead use other, slower means of communication.

Load the module

module load fenics/1.5.0

and run your program

python <file.py>
Additional info 

More documentation is available on the FEniCS Project page.

Updated: 2019-10-09, 14:42