Building Nalu-Wind Manually

Although we recommend installing Nalu-Wind with Spack, if you prefer not to build using Spack, below are instructions which describe the process of building Nalu-Wind by hand. These instructions are an approximation, due to the many differences that can exist across machines.

Linux and OSX

The instructions for Linux and OSX are mostly the same, except on each OS you may be able to use a package manager to install some dependencies for you. Using Homebrew on OSX is one option listed below. Compilers and MPI are expected to be already installed. If they are not, please follow the OpenMPI build instructions. Currently we are recommending OpenMPI v1.10.7 or MPICH 3.3 and GCC v7.3.0. Start by creating a ${NALU_ROOT_DIR} to work in.


If using OSX, you can install many dependencies using Homebrew. Install Homebrew on your local machine and reference the list below for some packages Homebrew can install for you. This allows you to skip the steps describing the build process for each of these applications. You will need to find the location of the applications in which Homebrew has installed them, to use when building Trilinos and Nalu-Wind.

brew install openmpi
brew install cmake
brew install libxml2
brew install boost
brew tap homebrew/science
brew install superlu43

CMake v3.12.4

CMake is provided here.


cd ${NALU_ROOT_DIR}/packages
tar xf cmake-3.12.4.tar.gz


cd ${NALU_ROOT_DIR}/packages/cmake-3.12.4
./configure --prefix=${NALU_ROOT_DIR}/install/cmake
make install

SuperLU v4.3

SuperLU is provided here.


cd ${NALU_ROOT_DIR}/packages
tar xf superlu_4.3.tar.gz


cd ${NALU_ROOT_DIR}/packages/SuperLU_4.3
cp MAKE_INC/make.linux

To find out what the correct platform extension PLAT is:

uname -m

Edit as shown below (diffs shown from baseline).

PLAT          = _x86_64
SuperLUroot   = /your_path/install/SuperLU_4.3 i.e., ${NALU_ROOT_DIR}/install/SuperLU_4.3
BLASLIB       = -L/usr/lib64 -lblas
CC            = mpicc
FORTRAN       = mpif77

On some platforms, the ${NALU_ROOT_DIR} may be mangled. In such cases, you may need to use the entire path to install/SuperLU_4.3.

Next, make some new directories:

mkdir ${NALU_ROOT_DIR}/install/SuperLU_4.3
mkdir ${NALU_ROOT_DIR}/install/SuperLU_4.3/lib
mkdir ${NALU_ROOT_DIR}/install/SuperLU_4.3/include
cd ${NALU_ROOT_DIR}/packages/SuperLU_4.3
cp SRC/*.h ${NALU_ROOT_DIR}/install/SuperLU_4.3/include

Libxml2 v2.9.8

Libxml2 is found here.


cd ${NALU_ROOT_DIR}/packages
tar -xvf libxml2-2.9.8.tar.gz


cd ${NALU_ROOT_DIR}/packages/libxml2-2.9.8
CC=mpicc CXX=mpicxx ./configure -without-python --prefix=${NALU_ROOT_DIR}/install/libxml2
make install

Boost v1.68.0

Boost is found here.


cd ${NALU_ROOT_DIR}/packages
tar -zxvf boost_1_68_0.tar.gz


cd ${NALU_ROOT_DIR}/packages/boost_1_68_0
./ --prefix=${NALU_ROOT_DIR}/install/boost --with-libraries=signals,regex,filesystem,system,mpi,serialization,thread,program_options,exception

Next, edit project-config.jam and add a ‘using mpi’, e.g,

using mpi: /path/to/mpi/openmpi/bin/mpicc

./b2 -j 4 2>&1 | tee boost_build_one
./b2 -j 4 install 2>&1 | tee boost_build_intall

YAML-CPP 0.6.2

YAML is provided here. Versions of Nalu before v1.1.0 used earlier versions of YAML-CPP. For brevity only the latest build instructions are discussed and the history of the Nalu-Wind git repo can be used to find older installation instructions if required.


cd ${NALU_ROOT_DIR}/packages
git clone
cd yaml-cpp && git checkout yaml-cpp-0.6.2


cd ${NALU_ROOT_DIR}/packages/yaml-cpp
mkdir build
cd build
make install

Zlib v1.2.11

Zlib is provided here.


cd ${NALU_ROOT_DIR}/packages
tar -zxvf zlib-1.2.11.tar.gz


cd ${NALU_ROOT_DIR}/packages/zlib-1.2.11
CC=gcc CXX=g++ CFLAGS=-O3 CXXFLAGS=-O3 ./configure --prefix=${NALU_ROOT_DIR}/install/zlib
make install

HDF5 v1.10.4

HDF5 1.10.4 is provided here.


cd ${NALU_ROOT_DIR}/packages
tar -zxvf hdf5-1.10.4.tar.gz


cd ${NALU_ROOT_DIR}/packages/hdf5-1.10.4
./configure CC=mpicc FC=mpif90 CXX=mpicxx CXXFLAGS="-fPIC -O3" CFLAGS="-fPIC -O3" FCFLAGS="-fPIC -O3" --enable-parallel --with-zlib=${NALU_ROOT_DIR}/install/zlib --prefix=${NALU_ROOT_DIR}/install/hdf5
make install
make check

NetCDF v4.6.1 and Parallel NetCDF v1.8.0

In order to support all aspects of Nalu-Wind’s parallel models, this combination of products is required.

Parallel NetCDF v1.8.0

Parallel NetCDF is provided on the Argon Trac Page.


cd ${NALU_ROOT_DIR}/packages
tar -zxvf parallel-netcdf-1.8.0.tar.gz


cd parallel-netcdf-1.8.0
./configure --prefix=${NALU_ROOT_DIR}/install/parallel-netcdf CC=mpicc FC=mpif90 CXX=mpicxx CFLAGS=-O3 CXXFLAGS=-O3 --disable-fortran
make install

NetCDF v4.6.1

NetCDF is provided here.


cd ${NALU_ROOT_DIR}/packages
tar -zxvf netcdf-4.6.1.tar.gz


cd netcdf-4.6.1
./configure --prefix=${NALU_ROOT_DIR}/install/netcdf CC=mpicc FC=mpif90 CXX=mpicxx CFLAGS="-I${NALU_ROOT_DIR}/install/parallel-netcdf/include -O3" LDFLAGS=-L${NALU_ROOT_DIR}/install/parallel-netcdf/lib --enable-pnetcdf --enable-parallel-tests --enable-netcdf-4 --disable-shared --disable-fsync --disable-cdmremote --disable-dap --disable-doxygen --disable-v2
make -j 4
make check
make install


Trilinos is managed by the Trilinos project and can be found on Github.


cd ${NALU_ROOT_DIR}/packages
git clone
cd ${NALU_ROOT_DIR}/packages/Trilinos
mkdir build
cd build

Now create a do-config-trilinos script with the following recommended options:


# The base directory where mpi is located.
# From here you should be able to find include/mpi.h bin/mpicxx, bin/mpiexec, etc.

# Note: Don't forget to set your LD_LIBRARY_PATH to $mpi_base_dir/lib
#       You may also need to add to LD_LIBRARY_PATH the lib directory for the compiler
#       used to create the mpi executables.

# TPLS needed by trilinos, possibly provided by HomeBrew on a Mac


# Cleanup old cache before we configure
# Note:  This does not remove files produced by make.  Use "make clean" for this.
find . -name "CMakeFiles" -exec rm -rf {} \;
rm -f CMakeCache.txt

cmake \


Place into the build directory, the do-config-trilinos script created from the recommended Trilinos configuration listed above.

do-config-trilinos will be used to run cmake to build trilinos correctly for Nalu-Wind.

Make sure all other paths to netcdf, hdf5, etc., are correct.

make install


Nalu-Wind can use HYPRE solvers and preconditioners, especially for Pressure Poisson solves. However, this dependency is optional and is not enabled by default. Users wishing to use HYPRE solver and preconditioner combination must compile HYPRE library and link to it when building Nalu-Wind.

# 1. Clone hypre sources
cd hypre/src

# 2. Configure HYPRE package and pass installation directory
./configure --prefix=${NALU_ROOT_DIR}/install/hypre --without-superlu --without-openmp --enable-bigint

# 3. Compile and install
make && make install


  1. Make sure that --enable-bigint option is turned on if you intend to run linear systems with \(> 2\) billion rows. Otherwise, nalu executable will throw an error at runtime for large problems.

  2. Users must pass -DENABLE_HYPRE option to CMake during Nalu-Wind configuration phase. Optionally, the variable -DHYPRE_DIR` can be used to pass the path of HYPRE install location to CMake.

ParaView Catalyst

Optionally enable ParaView Catalyst for in-situ visualization with Nalu-Wind. These instructions can be skipped if you do not require in-situ visualization with Nalu-Wind. The first thing you will need to do is build Paraview yourself using their SuperBuild instructions.

Build Nalu-Wind ParaView Catalyst Adapter

Next you will need to build the Catalyst adapter for Trilinos to hook into Paraview. The adapter is located in the Trilinos repo at Trilinos/packages/seacas/libraries/ioss/src/visualization/ParaViewCatalystIossAdapter. To install:

cd Trilinos/packages/seacas/libraries/ioss/src/visualization/ParaViewCatalystIossAdapter
cmake -DParaView_DIR:PATH=/path/to/paraview/lib/cmake/paraview_version -DCMAKE_INSTALL_PREFIX:PATH=${NALU_ROOT_DIR}/install
make install


Nalu-Wind is provided here. The master branch of Nalu-Wind typically matches with the master branch or develop branch of Trilinos. If it is necessary to build an older version of Nalu-Wind, refer to the history of the Nalu git repo for instructions on doing so.


git clone


Create a nalu-wind/build directory and execute something similar to following commands. The general commands for configuring and building Nalu-Wind are listed below. We show a script which uses modules which populate the <PACKAGE>_ROOT_DIR locations for the NREL Eagle machine, but it will need to be modified with the specific TPL locations you have used.

#!/bin/bash -l

# Instructions:
# Make a directory in the Nalu-Wind directory for building,
# Copy this script to that directory and edit the
# options below to your own needs and run it.

FLAGS="-O2 -march=native -mtune=native"
OVERSUBSCRIBE_FLAGS="--use-hwthread-cpus --oversubscribe"
set -e


# Clean before cmake configure
set +e
rm -rf CMakeFiles
rm -f CMakeCache.txt
set -e

# Extra TPLs that can be included in the cmake configure:

(set -x; cmake \

(set -x; nice make -j 16)

This process will create naluX within the nalu-wind/build location.