xref: /honee/README.md (revision f5cc0569e7b38534a757e3c48e936eee76816c4b)
14c95b225SJames Wright# HONEE
2ea10196cSJeremy L Thompson
330300449SJames Wright[![GitLab-CI](https://gitlab.com/phypid/honee/badges/main/pipeline.svg?key_text=GitLab-CI)](https://gitlab.com/phypid/honee/badges/main/pipeline.svg?key_text=GitLab-CI)
430300449SJames Wright[![BSD-2-Clause](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
5a67b82d9SJames Wright[![Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-orange.svg)](https://opensource.org/license/Apache-2-0)
650112c34SJeremy L Thompson[![Documentation](https://img.shields.io/badge/Documentation-latest-blue.svg)](https://honee.phypid.org)
730300449SJames Wright[![Code Coverage](https://gitlab.com/phypid/honee/badges/main/coverage.svg)](https://gitlab.com/phypid/honee/-/commits/main)
830300449SJames Wright
9965d9f74SJames Wright<!-- abstract -->
104c95b225SJames WrightHONEE (High-Order Navier-stokes Equation Evaluator, pronounced "honey") is a fluids mechanics library based on [libCEED](https://libceed.org) and [PETSc](https://petsc.org) with support for efficient high-order elements and CUDA, ROCm, and Intel GPUs.
11ea10196cSJeremy L Thompson
1230300449SJames WrightHONEE uses continuous-Galerkin stabilized finite element methods, namely SUPG, with a focus on scale-resolving simulations.
1330300449SJames WrightEffort is made to maintain flexibility in state variable choice, boundary conditions, time integration scheme (both implicit and explicit), and other solver choices.
144c95b225SJames WrightHigh-order finite elements are implemented in an analytic matrix-free fashion to maximize performance on GPU hardware, while matrix assembly may also be used if desired.
15ea10196cSJeremy L Thompson
1630300449SJames Wright# Getting Started
1730300449SJames Wright<!-- getting-started -->
18ea10196cSJeremy L Thompson
1930300449SJames Wright## Download and Install
20acad7547SJames Wright
2130300449SJames WrightA local build and installation provides greater control over build options and optimization.
2230300449SJames WrightHONEE is open-source and can be downloaded from [the HONEE repository on GitLab](https://gitlab.com/phypid/honee).
23ea10196cSJeremy L Thompson
2430300449SJames Wright```console
2530300449SJames Wright$ git clone https://gitlab.com/phypid/honee
26575f8106SLeila Ghaffari```
27ea10196cSJeremy L Thompson
2830300449SJames Wright### Prerequisites
29acad7547SJames Wright
3030300449SJames WrightHONEE is based upon libCEED and PETSc.
3130300449SJames Wright
3230300449SJames Wright#### libCEED
3330300449SJames Wright
3430300449SJames WrightHONEE requires libCEED's `main` development branch, which can be [cloned from Github](https://github.com/CEED/libCEED).
3530300449SJames Wright
3630300449SJames Wright```console
3730300449SJames Wright$ git clone https://github.com/CEED/libCEED
386a8e3be5SJames Wright$ make -j8 -C libCEED
39acad7547SJames Wright```
40acad7547SJames Wright
4130300449SJames WrightThe above will be enough for most simple CPU installations; see the [libCEED documentation](https://libceed.org/en/latest/gettingstarted/#) for details on using GPUs, tuning, and more complicated environments.
4230300449SJames Wright
4330300449SJames Wright#### PETSc
4430300449SJames Wright
4530300449SJames WrightHONEE requires PETSc's `main` development branch, which can be [cloned from GitLab](https://gitlab.com/petsc/petsc).
4630300449SJames Wright
4730300449SJames Wright```console
4830300449SJames Wright$ git clone https://gitlab.com/petsc/petsc
4930300449SJames Wright```
5030300449SJames Wright
5130300449SJames WrightFollow the [PETSc documentation](https://petsc.org/main/install/) to configure and build PETSc.
5230300449SJames WrightIt is recommended that you install with [CGNS library](https://cgns.github.io/) support using `--download-hdf5 --download-cgns`.
5330300449SJames Wright
5430300449SJames Wright### Building
5530300449SJames Wright
5630300449SJames WrightThe environment variables `CEED_DIR`, `PETSC_DIR`, and `PETSC_ARCH` must be set to build HONEE.
5730300449SJames Wright
5830300449SJames WrightAssuming you have cloned the HONEE repository as above, build using:
5930300449SJames Wright
6030300449SJames Wright```console
614c95b225SJames Wright$ export CEED_DIR=[path to libCEED] PETSC_DIR=[path to PETSc] PETSC_ARCH=[PETSc arch]
6230300449SJames Wright$ make -j8
6330300449SJames Wright```
6430300449SJames Wright
6530300449SJames WrightTo run a sample problem, run:
6630300449SJames Wright
6730300449SJames Wright```console
6882a28dbfSJeff-Hadley$ build/navierstokes -options_file examples/gaussianwave.yaml
6930300449SJames Wright```
7030300449SJames Wright
7130300449SJames WrightTo test the installation, use
7230300449SJames Wright
7330300449SJames Wright```console
7430300449SJames Wright$ make test -j8
7530300449SJames Wright```
76836c9e00SJames Wright
77*f5cc0569SJames Wright### Demo Build
78*f5cc0569SJames Wright
79*f5cc0569SJames WrightHere we walk through a complete, step-by-step demonstration of building and installing HONEE and its dependencies.
80*f5cc0569SJames WrightThis will be aimed at the minimal-viable install; better performance may be gained from different configurations, compiler flags, etc.
81*f5cc0569SJames WrightAs such, it will only target a CPU installation of HONEE.
82*f5cc0569SJames Wright
83*f5cc0569SJames WrightGenerally, we assume that the system you're installing on has a pre-existing installation of MPI loaded into the environment.
84*f5cc0569SJames WrightIf this is not true, you can add a `--download-mpich` flag to PETSc's configuration command to have PETSc build and install MPICH.
85*f5cc0569SJames Wright
86*f5cc0569SJames Wright```console
87*f5cc0569SJames Wright$ export CC=mpicc CXX=mpicxx # PETSc and libCEED will use these environment variables to select compiler
88*f5cc0569SJames Wright$ mkdir honee_build_dir
89*f5cc0569SJames Wright$ cd honee_build_dir
90*f5cc0569SJames Wright$ ## Build PETSc
91*f5cc0569SJames Wright$ git clone https://gitlab.com/petsc/petsc
92*f5cc0569SJames Wright$ cd petsc
93*f5cc0569SJames Wright$ export PETSC_DIR=$PWD PETSC_ARCH=arch-linux-c-opt
94*f5cc0569SJames Wright$ ./configure \
95*f5cc0569SJames Wright  --with-fc=0 \
96*f5cc0569SJames Wright  --download-f2cblaslapack \
97*f5cc0569SJames Wright  --download-hdf5 \
98*f5cc0569SJames Wright  --download-cgns \
99*f5cc0569SJames Wright  --with-debugging=0 \
100*f5cc0569SJames Wright  COPTFLAGS='-O3 -g -march=native' \
101*f5cc0569SJames Wright  CXXOPTFLAGS='-O3 -g -march=native'
102*f5cc0569SJames Wright$ make -j
103*f5cc0569SJames Wright$ ## Build libCEED
104*f5cc0569SJames Wright$ cd ..
105*f5cc0569SJames Wright$ git clone https://github.com/CEED/libCEED
106*f5cc0569SJames Wright$ cd libCEED
107*f5cc0569SJames Wright$ make -j
108*f5cc0569SJames Wright$ ## Build HONEE
109*f5cc0569SJames Wright$ cd ..
110*f5cc0569SJames Wright$ git clone https://gitlab.com/phypid/honee
111*f5cc0569SJames Wright$ cd honee
112*f5cc0569SJames Wright$ make -j
113*f5cc0569SJames Wright```
114*f5cc0569SJames Wright
115836c9e00SJames Wright<!-- citing -->
116a67b82d9SJames Wright
117a67b82d9SJames Wright## License
118a67b82d9SJames Wright
119a67b82d9SJames WrightHONEE is licensed under either of
120a67b82d9SJames Wright
121a67b82d9SJames Wright * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)
122a67b82d9SJames Wright * BSD-2-Clause license ([LICENSE-BSD](LICENSE-BSD) or https://opensource.org/licenses/BSD-2-Clause)
123a67b82d9SJames Wright
124a67b82d9SJames Wrightat your option.
125