first steps with enzo -...
TRANSCRIPT
![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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/1.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/10.jpg)
• 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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/12.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/13.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/14.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/15.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/16.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/17.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/18.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/19.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/20.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/21.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/22.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/23.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/24.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/25.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/26.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/27.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/28.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/29.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/30.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/31.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/32.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/33.jpg)
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](https://reader036.vdocuments.net/reader036/viewer/2022071516/613927b3a4cdb41a985b8643/html5/thumbnails/34.jpg)
PROGRESS METER
pipe output to estd.out