After the code has been compiled, an executable called L-Galaxies will be created. To run the code simply execute the file
in the command line giving it an input.par file (see Input files below) as a runtime argument:
./L-Galaxies ./input/input_Henriques2015_MR_W1_PLANCK.par
With this input file, as downloaded from the online repository, you will be running exactly the Henriques2015 version of L-Galaxies.
The variables FirstFile and LastFile, in the input file, define the first and last dark matter merger tree files in which
the galaxy formation model will be run. These correspond to sub-volumes of the dark matter simulation. As default, only file 5 is
computed (a subvolume roughly representative of the full simulation) but you have files 0-9 in the download package (the full
Millennium simulation ocrresponds to files 0-511).
(later, to run the code in parallel, you might want to us thee bash scripts available in ./AuxCode/Run/, e.g. cosma.bash.)
Check list for errors while reading the inputs:
The first task done by the galaxy formation model is to read the inputs. If some inputs are missing or the specified paths are incorrect, you
will get an error. Here is a check list on what to look for:
- Parameter file not found: If at run time you write the wrong name for the input file after "./L-Galaxies" you will
get the following error: "Parameter file ./input/input_Henriques15_MR_W1_PLANC.par not found". Followed
by a line for each parameter supposed to be read from the input file saying that it is missing.
- Zlist:: If the file with the list of dark matter redshifts is incorrectly specified you will get
the following error:"code termination on task=0, function read_zlist(), file
code/init.c, line 180: can't read output list in file './input/zlists/zlist_planck_MR1.txt'"
- Output redshifts::If the file with the list of output redshifts is incorrectly specified you will get the following
error: "code termination on task=0, function read_output_snaps(), file code/init.c, line 323: file `./input/desired_output_redshifts1.txt' not found"
- Inconsistent NOUT:: If the value of OPT += -DNOUT=28 specified in My_Makefile_options is larger than the number of outputs defined
in FileWithOutputRedshifts, you will get the following error: "code termination on task=0, function read_output_snaps(),
file code/init.c, line 332: I/O error in file './input/desired_output_redshifts.txt"
- SpecPhot folder::If the file with the containing the spectro and photometric tables is incorrectly specified specified you will get the following
error: "code termination on task=0, function setup_LumTables_precomputed(), file code/model_spectro_photometric.c, line 61: file
`./SpecPhotTables1//PhotTables/M05_Chabrier_Metallicity_list.dat' not found."
- SpecPhotProperties:: If you specify the wrong PhotPrefix or SpecPhotIMF, or you combine them wrongly with the
My_Makefile_options (M05, BC03 or CB07) you will get the following error:"code termination on task=0, function
setup_LumTables_precomputed(), file code/model_spectro_photometric.c, line 103: file
`./SpecPhotTables//PhotTables/PLANCK_M0_Chabrier_Phot_Table_MR_MagU_m0.0010.dat' not found."
- SimulationDir::If you specify SimulationDir incorrectly, you will get the following error: "code termination
on task=0, function load_all_auxdata(), file code/update_type_two.c, line 206: Can't open file `./MergerTrees/MR1//treedata/treeaux_063.5'"
Input files for different models:
After you are familiar with running the Henriques2015 version of L-Galaxies you can try other versions by using a
pre-defined selection of input files and MAKEFILE options. A number of input files for different models are available in
/input/, with the following naming convection:
input_"ModelName_Simulation"_"OriginalCosmology"_"TargetCosmology".par
-
./input/input_Henriques15_MR_W1_PLANCK.par: input file for the Henriques2015a model for the Millennium Simulation.
-
./input/input_Henriques15_MRII_W1_PLANCK.par: input file for the Henriques2015a model for the MillenniumII Simulation
(requires OPT += -DMRII in My_Makefile_options).
Inputs for previous versions of the model:
- ./input/LegacyModels_inputs/input_Henriques13_MR_W1_W7.par: input file for
the Henriques2013 model for the Millennium Simulation (requires OPT += -DHENRIQUES13 in My_Makefile_options).
- ./input/LegacyModels_inputs/input_Henriques13_MRII_W1_W7.par: input file for the Henriques2015a model for
the MillenniumII Simulation (requires OPT += -DHENRIQUES13 and OPT += -DMRII in My_Makefile_options).
- ./input/LegacyModels_inputs/input_Guo13_MR_W1_W7.par: input file for the Guo2013 model for the
Millennium Simulation (requires OPT += -DGuo13 in My_Makefile_options).
- ./input/LegacyModels_inputs/input_Guo13_MRII_W1_W7.par: input file for the Guo2013 model for the
MillenniumII Simulation (requires OPT += -DGuo13 and OPT += -DMRII in My_Makefile_options).
- ./input/LegacyModels_inputs/input_Guo11_MR_W1_W1.par: input file for the Guo2011 model for the
Millennium Simulation (requires OPT += -DGuo11 in My_Makefile_options).
- ./input/LegacyModels_inputs/input_Guo11_MRII_W1_W1.par: input file for the Guo2011 model for the
MillenniumII Simulation (requires OPT += -DGuo11 and OPT += -DMRII in My_Makefile_options).
A range of files without a model name are available for new model development: ./input/input_MR_W1_PLANCK.par and
./input/input_MRII_W1_PLANCK.par (PLANCK year1 cosmology), ./input/input_MR_W1_W7.par and ./input/input_MRII_W1_W7.par
(WMAP7 cosmology), ./input/input_MR_W1_W1.par and ./input/input_MRII_W1_W1.par (WMAP1 cosmology).
Running different models will likely change the output structure. Always make sure you are trying to read the correct
LGalaxies_struct in your plotting routines. If the new models have different cosmologies you will also need to adjust the
Volume and Hubble_h used in plots.