Before beginning to use Nek5000, it is recommended that the user have basic familiarity with Linux or another Unix-based OS. The instructions provided in the quickstart guide and the tutorials use basic bash commands and assume the user has this knowledge.

Directory structure

Here’s a brief description of each top-level directory:


contains the Nek5000 application sources.


contains scripts for running nek5000 and manipulating its output.


contains the sources for the pre- and post-processing tools which are stand-alone.


contains light-weight regression tests for verification.


consistent place for users to place their problem cases.


contains example problems. Note: NOT included in the master branch on the GitHub repo.


contains the user documentation. Note: NOT included in the master branch on the GitHub repo.


its purpose it to provide a consistent place for 3rd party code.

Case files


contains some hardwired runtime parameters to dimension static arrays.


contains runtime parameters.


contains mesh and boundary data.


contains partioning data.


contains user specific code to initialize solver, set source terms and boundary conditions or to manipulate solver internals.


contains probing points.


contains checkpoint data.


contains metadata for VisIt or ParaView.

foo.rea (legacy)

contains runtime parameters and mesh in ASCII. Replaced by .par and .re2 file.

foo.map (legacy)

contains partioning data in ASCII.

Note: The old legacy files (.rea & .map) are recommended for debugging purposes only.


Let’s walk through some useful batch scripts:

  • makenek <case> compiles your case
  • nek/nekb <case> runs a serial job in foreground or background
  • nekmpi/nekbmpi <case> <number of ranks> runs a parallel job
  • neknek <case1> <cas2> <ranks 1> <ranks 2> runs Nek5000 with two overlapping component grids
  • visnek <case> creates metadata file required by VisIt and ParaView.
  • mvn <old name> <new name> renames all case files
  • cpn <old name> <new name> copies all case files

Running your very first simulation

Hold your horses, this needs less than 5 min. Begin by downloading the latest release tarball from here. Then follow the instructions below

cd ~
tar -xvzf Nek5000_X.Y.tar.gz
export PATH=$HOME/Nek5000/bin:$PATH
cd ~/Nek5000/tools
./maketools genmap
cd ~/Nek5000/run
cp -r ../examples/eddy_uv .
cd eddy_uv
genmap                       # run partioner, on input type eddy_uv
makenek eddy_uv              # build case, edit script to change settings
nekbmpi eddy_uv 2            # run Nek5000 on 2 ranks in the background
tail logfile                 # view solver output
visnek eddy_uv               # produces the eddy_uv.nek5000 file

As the case runs, it will generate multiple eddy_uv0.fXXXXX files. These are the restart checkpoint and visualization data files. The metadata file, eddy_uv.nek5000, can be opened with either VisIt or ParaView, which will look for the data files in the same directory as the eddy_uv.nek5000 file.

Note that this will not work if you clone the master branch from GitHub, as the examples folder is NOT included. To obtain the examples using git, clone the Nek5000/NekExamples.git repository.


Nek5000 is mainly a solver. However, simple box type meshes can be generated with the genbox tool. For more complex meshes please consider using PRENEK and the meshing tools nekmerge and n2to3. We provide mesh converters like exo2nek and msh2nek which are quite handy if you want to use your favorite mesh generator.


Nek5000 output (.fld or 0.f%05d) files can be read by VisIt or ParaView. This requires using visnek to generate a metadata file. There is also an built-in X-Window based postprocessor called POSTNEK located in tools.