Skip to content

Nektar++

Nektar++ is a tensor product based finite element package designed to allow one to construct efficient classical low polynomial order h-type solvers (where h is the size of the finite element) as well as higher p-order piecewise polynomial order solvers.

The Nektar++ framework comes with a number of solvers and also allows one to construct a variety of new solvers. Users can therefore use Nektar++ just to run simulations, or to extend and/or develop new functionality.

Using Nektar++ on ARCHER2

Nektar++ is released under an MIT license and is available to all users on the ARCHER2 full system.

Where can I get help?

Specific issues with Nektar++ itself might be submitted to the issue tracker at the Nektar++ gitlab repository (see link above). More general questions might also be directed to the Nektar-users mailing list. Issues specific to the use or behaviour of Nektar++ on ARCHER2 should be sent to the Service Desk.

Running parallel Nektar++ jobs

Below is the submission script for running the Taylor-Green Vortex, one of the Nektar++ tutorials, see https://doc.nektar.info/tutorials/latest/incns/taylor-green-vortex/incns-taylor-green-vortex.html#incns-taylor-green-vortexch4.html .

You first need to download the archive linked on the tutorial page.

cd /path/to/work/dir
wget https://doc.nektar.info/tutorials/latest/incns/taylor-green-vortex/incns-taylor-green-vortex.tar.gz
tar -xvzf incns-taylor-green-vortex.tar.gz
#!/bin/bash
#SBATCH --job-name=nektar
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
#SBATCH --cpus-per-task=1
#SBATCH --time=02:00:00

# Replace [budget code] below with your project code (e.g. t01)
#SBATCH --account=[budget code] 
#SBATCH --partition=standard
#SBATCH --qos=standard

module load nektar

export OMP_NUM_THREADS=1

# Ensure the cpus-per-task option is propagated to srun commands
export SRUN_CPUS_PER_TASK=$SLURM_CPUS_PER_TASK

NEK_INPUT_PATH=/path/to/work/dir/incns-taylor-green-vortex/completed/solver64

srun --distribution=block:cyclic --hint=nomultithread \
    ${NEK_DIR}/bin/IncNavierStokesSolver \
        ${NEK_INPUT_PATH}/TGV64_mesh.xml \
        ${NEK_INPUT_PATH}/TGV64_conditions.xml

Compiling Nektar++

Instructions for building Nektar++ on ARCHER2 may be found in the GitHub repository of build instructions:

More information

The Nektar++ team have themselves also provided detailed instructions on the build process, updated following the mid-2023 system update, on the Nektar++ website:

This page also provides instructions on how to run jobs using your local installation.