| 123 | | After compiling, you should create a directory to run the simulation in. This is because Enzo cosmology simulations create quite a few output files, so it's best to store them in their own directory. For the purposes of this example I'm going to assume that you have created a directory called {{{EnzoTestSim}}} in your home directory. You should then download these two files: [source:public/trunk/doc/userguide/cookbook/Example_Cosmology_Sim.inits Example_Cosmology_Sim.inits] and |
| 124 | | [source:public/trunk/doc/userguide/cookbook/Example_Cosmology_Sim.param? Example_Cosmology_Sim.param] which are the initial conditions parameter file and the simulation parameter file, respectively. |
| 125 | | |
| 126 | | Let's make a directory, and pull the parameter files directly from the web site: |
| 127 | | |
| 128 | | ''This exmample uses {{{wget}}}, an HTTP client. On DataStar, this is located at {{{/usr/local/apps/wget-1.8.1/bin/wget}}}. {{{wget}}} is included in most recent Linux distributions, and is available for OS X. Or you can download the [http://tinyurl.com/5h5btb inits parameters] and [http://tinyurl.com/6koky7 simulation parameters] from the website.'' |
| 129 | | |
| 130 | | {{{ |
| 131 | | #!sh |
| 132 | | ds100 $ cd /gpfs/ux455215/Cookbook/ |
| 133 | | ds100 $ mkdir ExampleCosmologySimulation |
| 134 | | ds100 $ cd ExampleCosmologySimulation/ |
| 135 | | ds100 $ wget -O Example_Cosmology_Sim.inits http://tinyurl.com/5h5btb |
| 136 | | ds100 $ wget -O Example_Cosmology_Sim.param http://tinyurl.com/6koky7 |
| 137 | | ds100 $ ls |
| 138 | | Example_Cosmology_Sim.inits Example_Cosmology_Sim.param |
| 139 | | ds100 $ |
| 140 | | }}} |
| | 123 | After compiling, you should create a directory to run the simulation in. This is because Enzo cosmology simulations create quite a few output files, so it's best to store them in their own directory. For the purposes of this example I'm going to assume that you have created a directory called {{{EnzoTestSim}}} in your home directory. You should then download a set of sample parameter files. The example set used for this tutorial are [http://lca.ucsd.edu/software/enzo/data/cookbook/ available here]. Download the files called {{{Example_Cosmology_Sim.inits}}} and {{{Example_Cosmology_Sim.param}}}, which are the inits and enzo parameter files, respectively. This tutorial assumes that you have downloaded these two files and put them on whatever computer you are using to perform your simulation. |
| 162 | | {{{inits}}} will produce some output to the screen to tell you what it is doing, and will write five files: {{{GridDensity}}}, {{{GridVelocities}}}, {{{ParticlePositions}}}, {{{ParticleVelocities}}} and {{{PowerSpectrum.out}}}. The first four files contain information on initial conditions for the baryon and dark matter componenets of the simulation, and are HDF 5 files. The last file is an ascii file which contains information on the power spectrum used to generate the initial conditions. |
| | 145 | {{{inits}}} will produce some output to the screen to tell you what it is doing, and will write five files: {{{GridDensity}}}, {{{GridVelocities}}}, {{{ParticlePositions}}}, {{{ParticleVelocities}}} and {{{PowerSpectrum.out}}}. The first four files contain information on initial conditions for the baryon and dark matter componenets of the simulation, and are HDF 5 files (formatted binary files). The last file is an ASCII file that contains information on the power spectrum used to generate the initial conditions. |
| 166 | | This simulation is quite small. The root grid is only 32 cells on a side and we allow a maximum of three levels of mesh refinement. Still, we will use the {{{ring}}} tool, since it is important for larger simulations of sizes typically used for doing science. |
| 167 | | |
| 168 | | The {{{ring}}} tool is part of the Enzo parallel IO (input-output) scheme. Examine the last section of the [Example_Cosmology_Sim.param parameter file] for this example simulation and you will see: |
| | 149 | This example simulation is very small (32^3^ root grid) so it is probably not worth using parallel IO. It is definitely important for larger simulations, though, so we show how to do it here. |
| | 150 | To turn the parallel IO on, these parameters are added into the Enzo parameter file: |
| 249 | | The simulation will now run. The {{{-d}}} flag ensures a great deal of output, so we redirect it into a log file called {{{output.log}}} for later examination. This particular simulation used to take approximately ten minutes to run on 4 processors on Titan. I have no idea how long it's going to take on my laptop. When the simulation is done, enzo will display the message {{{"Successful run, exiting."}}} |
| 250 | | |
| 251 | | Enzo is a complicated code, with a similarly complicated output format. See the Enzo User Guide page on [wiki:UserGuide/FileFormatSchema the Enzo output format] for more information on the data outputs. |
| | 230 | The simulation will now run. The {{{-d}}} flag ensures a great deal of output, so we redirect it into a log file called {{{output.log}}} for later examination. This particular simulation used to take approximately two minutes to run on 4 processors on Abe (the NCSA Linux cluster as of fall 2008). When the simulation is done, Enzo will display the message {{{"Successful run, exiting."}}} |
| | 231 | |
| | 232 | Enzo is a complicated code, with a similarly complicated output format. See the Enzo User Guide page on [wiki:UserGuide/EnzoOutputFormat the Enzo output format] for more information on the data outputs. |