FIRST STEPS WITH ENZO -...

34
FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido University, November 18, 2014

Transcript of FIRST STEPS WITH ENZO -...

Page 1: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

FIRST STEPS WITH ENZOBritton Smith

Enzo User Workshop Hokkaido University, November 18, 2014

Page 2: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

GOALS

I. Download

II. Understand the source

III. Compile

IV. Run simple problems

Page 3: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

Install yt from yt-project.org

Page 4: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

Install yt from yt-project.org

This will give us mercurial and hdf5.

Page 5: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

DEPENDENCIES

• hdf5 (Hierarchical Data Format) - version 1.8.x

• mpi (Message Passing Interface)

• Mercurial - version control system

Page 6: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

DEPENDENCIES

• hdf5 (Hierarchical Data Format) - version 1.8.x

• mpi (Message Passing Interface)

• Mercurial - version control system

Get from yt.

Page 7: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

DEPENDENCIES

• hdf5 (Hierarchical Data Format) - version 1.8.x

• mpi (Message Passing Interface)

• Mercurial - version control systemDownload and install OpenMPI (open-mpi.org)1. ./configure2. make3. make install

Page 8: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

Go to enzo-project.org

Page 9: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

GETTING ENZO

hg clone https://bitbucket.org/enzo/enzo-dev

Development version

Page 10: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

• 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

VERSION CONTROLWITH MERCURIAL

Page 11: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

GETTING ENZOWITH MERCURIAL

hg clone https://bitbucket.org/enzo/enzo-dev

hg pull <source>

hg update

Check out a copy of Enzo (clone the repository):

Update your repository with the latest changes:

hg commit

hg push <destination>

Add your new changes:

pulls changes into the local repositoryupdates the working copy with the latest changes

adds changes to the local repositorypushes changes to another repository

creates a directory on your computer called “enzo-dev”

Page 12: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?

Page 13: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?Documentation in

doc/manual/

Page 14: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?Documentation in

doc/manual/

Page 15: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?

First do: “pip install sphinx”Build the documentation.

Page 16: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?

First do: “pip install sphinx”Build the documentation.

Page 17: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?The documentationis now built just like

on the internet.

Page 18: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?Cooling tables in

input/

Page 19: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?Simulation parameter files in

run/

Explore further!

Page 20: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

WHAT’S INSIDE?Enzo source in

src/enzo/

Page 21: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

COMPILING1. run configure script

This will prepare the environment.

Page 22: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

COMPILING1. run configure script2. go into src/enzo

Page 23: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

for Macs, useMake.mach.darwin

COMPILING1. run configure script2. go into src/enzo3. find your make file

Page 24: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

for Macs, useMake.mach.darwin

COMPILING1. run configure script2. go into src/enzo3. find your make file

Make.mach.conival on Conival

Page 25: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

COMPILING4. Edit LOCAL_PACKAGES

to point to your yt installation.

Page 26: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

COMPILING

5. Type “make machine-<your machine>”

Page 27: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

COMPILE OPTIONS• Enzo has many additional compile options.

• Type: to see the current settings.

• Type: for a description of each parameter.

• Example: to compile with basic optimizations. Recommended!

• Enzo must be recompiled after options are changed.

make show-config

make help-config

make opt-high

Page 28: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

COMPILING6. compile!

Page 29: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

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

home directory.

• Compiler settings can be saved with:

• Reload custom settings with:

• Settings files saved in ~/.enzo/Make.settings.<keyword>

make save-config-<keyword>

make load-config-<keyword>

Page 30: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

RUNNING A SIMULATION

• Simulations are configured with a parameter file.

• Run a new simulation:

• Restart a simulation:

• Many sample parameter files in enzo-dev/run

mpirun -np <#> ./enzo.exe -d <parameter_file>

mpirun -np <#> ./enzo.exe -d -r <dataset>

Page 31: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

RUN A SIMULATION

Page 32: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

RUN A SIMULATION

Choose units for the scale of your simulation.

Page 33: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

RUN A SIMULATION

Run it!

Page 34: FIRST STEPS WITH ENZO - 北海道大学astro3.sci.hokudai.ac.jp/.../Enzo_First_Steps_11_18_2014.pdf · 2014. 11. 18. · FIRST STEPS WITH ENZO Britton Smith Enzo User Workshop Hokkaido

PROGRESS METER

pipe output to estd.out