12#include "compiler-command-line-args.h"
13#include "gadgetconfig.h"
25#include "../cooling_sfr/cooling.h"
26#include "../data/allvars.h"
27#include "../data/dtypes.h"
28#include "../data/mymalloc.h"
29#include "../data/simparticles.h"
30#include "../fmm/fmm.h"
31#include "../fof/fof.h"
32#include "../gitversion/version.h"
33#include "../gravity/ewald.h"
34#include "../gravtree/gravtree.h"
35#include "../io/hdf5_util.h"
37#include "../io/parameters.h"
38#include "../lightcone/lightcone.h"
39#include "../logs/logs.h"
40#include "../logs/timer.h"
41#include "../main/main.h"
42#include "../main/simulation.h"
43#include "../mergertree/mergertree.h"
44#include "../mpi_utils/mpi_utils.h"
45#include "../mpi_utils/shared_mem_handler.h"
46#include "../ngbtree/ngbtree.h"
48#include "../system/system.h"
49#include "../time_integration/driftfac.h"
50#include "../time_integration/timestep.h"
61 "\n ___ __ ____ ___ ____ ____ __\n / __) /__\\ ( _ \\ / __)( ___)(_ _)___ /. |\n"
62 "( (_-. /(__)\\ )(_) )( (_-. )__) )( (___)(_ _)\n \\___/(__)(__)(____/ \\___/(____) (__) (_)\n\n");
66 mpi_printf(
"Code was compiled with the following compiler and flags:\n%s\n\n\n", compiler_flags);
68 mpi_printf(
"Code was compiled with the following settings:\n");
77#ifdef EXPLICIT_VECTORIZATION
106 "You compiled with explicit vectorization in terms of AVX instructions, but this CPU does not support AVX or higher.\n\n");
115 mpi_printf(
"BEGRUN: Size of neighbour tree node %4d [bytes]\n", (
int)
sizeof(
ngbnode));
150#ifdef HOST_MEMORY_REPORTING
167 mpi_printf(
"\nWe stop because of an error in the parameterfile.\n\n");
181#ifdef ENABLE_HEALTHTEST
192#ifdef LIGHTCONE_PARTICLES
193 LightCone.lightcone_init_geometry(
All.LightConeDefinitionFile);
197 H5Eset_auto(H5E_DEFAULT, NULL, NULL);
217 CoolSfr.init_clouds();
220#if((!defined(PMGRID) || (defined(PMGRID) && defined(TREEPM_NOTIMESPLIT))) && defined(SELFGRAVITY) && defined(PERIODIC)) || \
227#ifdef DEBUG_SYMTENSORS
236 PM.pm_init_periodic(&
Sp);
237#ifdef PLACEHIGHRESREGION
238 PM.pm_init_nonperiodic(&
Sp);
241 PM.pm_init_nonperiodic(&
Sp);
289#ifdef LIGHTCONE_PARTICLES
290 if(LightCone.lightcone_init_times())
293#ifdef LIGHTCONE_MASSMAPS
294 LightCone.lightcone_init_massmaps();
295 if(LightCone.lightcone_massmap_report_boundaries())
298 double linklength = 0;
302 linklength = FoF.fof_get_comoving_linking_length();
305 LightCone.lightcone_init_intposconverter(linklength);
325#if defined(FORCETEST) && defined(FORCETEST_TESTFORCELAW)
326 gravity_forcetest_testforcelaw();
359 "You have supplied All.Hubble=%g/All.HubbleParam=%g. For this choice, we would expect All.Hubble=%g. We better stop\n",
367 "You have supplied All.Hubble=%g/All.HubbleParam=%g. For this choice, we would expect All.Hubble somewhere in the "
368 "ballpark of %g. We better stop\n",
385 CoolSfr.set_units_sfr();
397 mpi_printf(
"endrun called, calling MPI_Finalize()\nbye!\n\n");
411 H5Eset_auto(H5E_DEFAULT, NULL, NULL);
global_data_all_processes All
void init_drift_table(void)
void ewald_init(void)
This function initializes tables with the correction force and the correction potential due to the pe...
void open_logfiles(void)
Open files for logging.
void log_debug_md5(const char *msg)
void check_maxmemsize_setting(int maxmemsize)
void mymalloc_init(int maxmemsize, enum restart_options restartflag)
Initialize memory manager.
void write_used_parameters(const char *dirname, const char *fname)
int read_parameter_file(const char *fname)
This function parses the parameter file.
void mpi_printf(const char *fmt,...)
domain< simparticles > Domain
void begrun1(const char *parameterFile)
This function performs the initial set-up of the simulation.
void set_units(void)
Computes conversion factors between internal code units and the cgs-system.
void begrun2(void)
This function does late setup, after the IC file has been loaded but before run() is called.
void endrun(void)
This function aborts the simulations.
TimeBinData TimeBinsGravity
TimeBinData TimeBinsHydro
#define MAXLEN_PATH_EXTRA
void my_create_HDF5_special_integer_types(void)
void my_create_HDF5_halfprec_handler(void)
void output_compile_time_options(void)
int instrset_detect(void)
void my_mpi_types_init(void)
expr pow(half base, half exp)
void timebins_init(const char *name, int *MaxPart)
double UnitTime_in_Megayears
double UnitVelocity_in_cm_per_s
enum restart_options RestartFlag
void read_outputlist(char *fname)
This function reads a table with a list of desired output times.
double UnitPressure_in_cgs
void register_parameters(void)
double UnitDensity_in_cgs
int ComovingIntegrationOn
char OutputListFilename[MAXLEN_PATH]
double UnitCoolingRate_in_cgs
char OutputDir[MAXLEN_PATH]
integertime Ti_nextoutput
void some_parameter_checks(void)
double GravityConstantInternal
void set_cosmo_factors_for_current_time(void)
double TimeLastRestartFile
size_t get_data_size(void)
char * get_data_ptr(void)
void symtensor_test(void)
void init_rng(int thistask)
void enable_core_dumps_and_fpu_exceptions(void)