Difference between revisions of "FDSI Summer Program/HONEE"
(Created page with "''Information for tutorial in HONEE, to be updated as needed.'' '''HONEE''', or the '''High-Order Navier-stokes Equation Evaluator''', is a CFD program that combines libCEED...") |
|||
| Line 3: | Line 3: | ||
'''HONEE''', or the '''High-Order Navier-stokes Equation Evaluator''', is a CFD program that combines libCEED and PETSc. | '''HONEE''', or the '''High-Order Navier-stokes Equation Evaluator''', is a CFD program that combines libCEED and PETSc. | ||
| + | == Building HONEE for Cisco nodes == | ||
| + | First, start a job on the Cisco nodes. All the below commands should be run within a terminal on a Cisco node. | ||
| + | |||
| + | === Setup Envionment === | ||
| + | source /projects/tools/Spackv0.23/share/spack/setup-env.sh | ||
| + | spack load gcc@12.3 | ||
| + | module load openmpi | ||
| + | |||
| + | === Create new directory === | ||
| + | mkdir honee_build | ||
| + | cd honee_build | ||
| + | |||
| + | === Build PETSc=== | ||
| + | Ordinarily, I'd only recommend doing a <code>git clone</code>, e.g. <code>git clone https://gitlab.com/petsc/petsc.git</code>. | ||
| + | However, the <code>/nobackup/</code> server is quite slow and this process takes around 20 minutes (normally about a minute on my laptop), so downloading and extracting a tarball may be quicker. | ||
| + | I may cover that later, but for now I'll just cover it via <code>git clone</code>. | ||
| + | |||
| + | git clone https://gitlab.com/petsc/petsc.git | ||
| + | cd petsc | ||
| + | cp /nobackup/uncompressed/jrwrigh/HONEE_Setup/petsc/reconfigure.py | ||
| + | ./reconfigure.py | ||
| + | make | ||
| + | export PETSC_DIR=$(pwd) PETSC_ARCH=arch-32 | ||
| + | cd .. | ||
| + | |||
| + | |||
| + | The <code>reconfigure.py</code> file has the following: | ||
| + | #!/bin/python3 | ||
| + | if __name__ == '__main__': | ||
| + | import sys | ||
| + | import os | ||
| + | sys.path.insert(0, os.path.abspath('config')) | ||
| + | import configure | ||
| + | configure_options = [ | ||
| + | '--with-64-bit-indices=0', | ||
| + | '--download-hdf5', | ||
| + | '--download-cgns', | ||
| + | '--download-ctetgen=1', | ||
| + | '--download-parmetis=1', | ||
| + | '--download-metis=1', | ||
| + | '--download-ptscotch=1', | ||
| + | '--with-debugging=0', | ||
| + | '--with-fortran-bindings=0', | ||
| + | '--with-fc=0', | ||
| + | 'PETSC_ARCH=arch-32', | ||
| + | 'COPTFLAGS=-g -O3', | ||
| + | 'CXXOPTFLAGS=-g -O3', | ||
| + | ] | ||
| + | configure.petsc_configure(configure_options) | ||
| + | |||
| + | === Building HONEE === | ||
| + | Ensure that <code>PETSC_DIR</code> and <code>PETSC_ARCH</code> are set to the desired PETSc installation. | ||
| + | |||
| + | git clone https://github.com/CEED/libCEED.git | ||
| + | make build/fluids-navierstokes -j | ||
| + | |||
| + | The executable <code>build/fluids-navierstokes</code> is then built and ready for running. | ||
== Changing HONEE Inputs == | == Changing HONEE Inputs == | ||
Revision as of 07:45, 3 June 2024
Information for tutorial in HONEE, to be updated as needed.
HONEE, or the High-Order Navier-stokes Equation Evaluator, is a CFD program that combines libCEED and PETSc.
Contents
Building HONEE for Cisco nodes
First, start a job on the Cisco nodes. All the below commands should be run within a terminal on a Cisco node.
Setup Envionment
source /projects/tools/Spackv0.23/share/spack/setup-env.sh spack load gcc@12.3 module load openmpi
Create new directory
mkdir honee_build cd honee_build
Build PETSc
Ordinarily, I'd only recommend doing a git clone, e.g. git clone https://gitlab.com/petsc/petsc.git.
However, the /nobackup/ server is quite slow and this process takes around 20 minutes (normally about a minute on my laptop), so downloading and extracting a tarball may be quicker.
I may cover that later, but for now I'll just cover it via git clone.
git clone https://gitlab.com/petsc/petsc.git cd petsc cp /nobackup/uncompressed/jrwrigh/HONEE_Setup/petsc/reconfigure.py ./reconfigure.py make export PETSC_DIR=$(pwd) PETSC_ARCH=arch-32 cd ..
The reconfigure.py file has the following:
#!/bin/python3
if __name__ == '__main__':
import sys
import os
sys.path.insert(0, os.path.abspath('config'))
import configure
configure_options = [
'--with-64-bit-indices=0',
'--download-hdf5',
'--download-cgns',
'--download-ctetgen=1',
'--download-parmetis=1',
'--download-metis=1',
'--download-ptscotch=1',
'--with-debugging=0',
'--with-fortran-bindings=0',
'--with-fc=0',
'PETSC_ARCH=arch-32',
'COPTFLAGS=-g -O3',
'CXXOPTFLAGS=-g -O3',
]
configure.petsc_configure(configure_options)
Building HONEE
Ensure that PETSC_DIR and PETSC_ARCH are set to the desired PETSc installation.
git clone https://github.com/CEED/libCEED.git make build/fluids-navierstokes -j
The executable build/fluids-navierstokes is then built and ready for running.
Changing HONEE Inputs
HONEE uses PETSc's input argument system for handling inputs. They can be provided either via command-line flags or inside a YAML file. So
./build/fluids-navierstokes -ts_dt 1e-3
is equivalent to
./build/fluids-navierstokes -options_file test.yaml
if test.yaml has this in it:
ts_dt: 1e-3
Note also that PETSc allows for hierarchical flags as well within a YAML file. So instead of writing
ts_dt: 1e-3 ts_type: alpha ts_max_time: 2.3
You can write:
ts: dt: 1e-3 type: alpha max_time: 2.3