FIRST STEPS WITH ENZO
Britton Smith

Enzo User Workshop

Hokkaido University, November 18, 2014

GOALS
I. Download
II. Understand the source
III. Compile
IV. Run simple problems

Install yt from yt-project.org

Install yt from yt-project.org

This will give us
mercurial and hdf5.

DEPENDENCIES• hdf5 (Hierarchical Data Format) - version 1.8.x• mpi (Message Passing Interface)• Mercurial - version control system

DEPENDENCIES
Get from yt.
• hdf5 (Hierarchical Data Format) - version 1.8.x• mpi (Message Passing Interface)• Mercurial - version control system

DEPENDENCIES• hdf5 (Hierarchical Data Format) - version 1.8.x• mpi (Message Passing Interface)

Downloadinstall OpenMPI• Mercurial - version
control andsystem(open-mpi.org)
1. ./configure
2. make
3. make installGo to enzo-project.org

GETTING ENZO

Development
versionhg clone https://bitbucket.org/enzo/enzo-dev

VERSION CONTROLWITH MERCURIAL• Distributed version control• no need for a central repository• changes can be pushed from any repository to any repository• merging changes from multiple branches is easy (at least easier)• Mercurial tutorial: http://hginit.com

GETTING ENZO
WITH MERCURIAL

Check out a copy of Enzo (clone the repository):
hg clone https://bitbucket.org/enzo/enzo-dev
creates a directory on your computer called “enzo-dev”

Update your repository with the latest changes:
hg pull <source>

pulls changes into the local repository

hg update

updates the working copy with the latest changes

Add your new changes:
hg commit
hg push <destination>

adds changes to the local repository
pushes changes to another repository

WHAT’S INSIDE?

WHAT’S INSIDE?
Documentation in
doc/manual/WHAT’S INSIDE?
Documentation in
doc/manual/WHAT’S INSIDE?
Build the documentation.
First do: “pip install sphinx”

WHAT’S INSIDE?
Build the documentation.
First do: “pip install sphinx”

WHAT’S INSIDE?
The documentation
is now built just likeon the internet.

WHAT’S INSIDE?
Cooling tables in
input/

WHAT’S INSIDE?
Simulation parameter files inrun/

Explore further!

WHAT’S INSIDE?
Enzo source in
src/enzo/

COMPILING
1. run configure script
This will prepare the environment.

COMPILING
1. run configure script
2. go into src/enzo

COMPILING
1. run configure script
2. go into src/enzo
3. find your make filefor Macs, use
Make.mach.darwin

COMPILING
1. run configure script
2. go into src/enzo
3. find your make file
Make.mach.conival

on Conival

for Macs, use
Make.mach.darwin

COMPILING
4. Edit LOCAL_PACKAGES
to point to your yt installation.

COMPILING
5. Type “make machine-<your machine>”COMPILE OPTIONS• Enzo has many additional compile options.
• Type: makeshow-config to see the current settings.

• Type: makehelp-config for a description of eachparameter.

• Example:

make opt-high to compile with basic

optimizations. Recommended!

• Enzo must be recompiled after options are changed.

COMPILING
6. compile!

EXTRA TIPS
• Custom make files can be stored the .enzo directory in yourhome directory.

• Compiler settings can be saved with:make save-config-<keyword>• Reload custom settings with:make load-config-<keyword>• Settings files saved in ~/.enzo/Make.settings.<keyword>

RUNNING A SIMULATION• Simulations are configured with a parameter file.
• Run a new simulation:

mpirun -np <#> ./enzo.exe -d <parameter_file>• Restart a simulation:

mpirun -np <#> ./enzo.exe -d -r <dataset>• Many sample parameter files in enzo-dev/run

RUN A SIMULATIONRUN A SIMULATION
Choose units for the
scale of your simulation.

RUN A SIMULATION

Run it!

PROGRESS METER
pipe output to estd.out