Commit b52e6c84 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'master' into redist-sync

parents 55294df4 bc5a6188
......@@ -36,6 +36,7 @@ examples/*/*/*.rst
examples/*/*/*.hdf5
examples/*/*/*.csv
examples/*/*/*.dot
examples/*/*/cell_hierarchy.html
examples/*/*/energy.txt
examples/*/*/task_level.txt
examples/*/*/timesteps_*.txt
......
......@@ -23,6 +23,9 @@ SUBDIRS = src argparse examples doc tests tools
if HAVEEAGLECOOLING
SUBDIRS += examples/Cooling/CoolingRates
endif
if HAVELOGGER
SUBDIRS += logger
endif
# Non-standard files that should be part of the distribution.
EXTRA_DIST = INSTALL.swift .clang-format format.sh
......@@ -71,6 +71,8 @@ Parameters:
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
......
......@@ -122,6 +122,8 @@ Parameters:
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
......
......@@ -86,6 +86,7 @@ AC_ARG_ENABLE([logger],
if test "$with_logger" = "yes"; then
AC_DEFINE([WITH_LOGGER], 1, [logger enabled])
fi
AM_CONDITIONAL([HAVELOGGER],[test $with_logger = "yes"])
# Interprocedural optimization support. Needs special handling for linking and
# archiving as well as compilation with Intels, needs to be done before
......@@ -996,6 +997,41 @@ fi
AC_SUBST([TBBMALLOC_LIBS])
AM_CONDITIONAL([HAVETBBMALLOC],[test -n "$TBBMALLOC_LIBS"])
# Check for python.
have_python="no"
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=PATH],
[root directory where python is installed @<:@yes/no@:>@]
)],
[with_python="$withval"],
[with_python="no"]
)
if test "x$with_python" != "xno"; then
if test "$with_python" == ""; then
# use linux default python
with_python="/usr/"
fi
AM_PATH_PYTHON([3], [], [AC_MSG_ERROR(python not found)])
AC_ARG_VAR([PYTHON_INCS], [Include flags for python, bypassing python-config])
AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
AS_IF([test -z "$PYTHON_INCS"], [
AS_IF([test -z "$PYTHON_CONFIG"], [
AC_PATH_PROGS([PYTHON_CONFIG],
[python$PYTHON_VERSION-config python-config],
[no],
[`dirname $PYTHON`])
AS_IF([test "$PYTHON_CONFIG" = no], [AC_MSG_ERROR([cannot find python-config for $PYTHON.])])
])
AC_MSG_CHECKING([python include flags])
PYTHON_INCS=`$PYTHON_CONFIG --includes`
AC_MSG_RESULT([$PYTHON_INCS])
])
have_python="yes"
fi
AC_SUBST([PYTHON_INCS])
AM_CONDITIONAL([HAVEPYTHON],[test -n "$PYTHON_INCS"])
# Check for HDF5. This is required.
AX_LIB_HDF5
if test "$with_hdf5" != "yes"; then
......@@ -1991,7 +2027,7 @@ AM_CONDITIONAL([HAVEEAGLEFEEDBACK], [test $with_feedback = "EAGLE"])
# Handle .in files.
AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile examples/Cooling/CoolingRates/Makefile doc/Makefile doc/Doxyfile tests/Makefile])
AC_CONFIG_FILES([argparse/Makefile tools/Makefile])
AC_CONFIG_FILES([argparse/Makefile tools/Makefile logger/Makefile logger/tests/Makefile])
AC_CONFIG_FILES([tests/testReading.sh], [chmod +x tests/testReading.sh])
AC_CONFIG_FILES([tests/testActivePair.sh], [chmod +x tests/testActivePair.sh])
AC_CONFIG_FILES([tests/test27cells.sh], [chmod +x tests/test27cells.sh])
......@@ -2044,7 +2080,6 @@ AC_MSG_RESULT([
CPU profiler : $have_profiler
Pthread barriers : $have_pthread_barrier
VELOCIraptor enabled : $have_velociraptor
Particle Logger : $with_logger
FoF activated: : $enable_fof
Hydro scheme : $with_hydro
......@@ -2082,4 +2117,7 @@ AC_MSG_RESULT([
Custom icbrtf : $enable_custom_icbrtf
Boundary particles : $boundary_particles
Particle Logger : $with_logger
Python enabled : $have_python
------------------------])
......@@ -777,6 +777,7 @@ INPUT += @top_srcdir@/src/tracers/EAGLE
INPUT += @top_srcdir@/src/stars/EAGLE
INPUT += @top_srcdir@/src/feedback/EAGLE
INPUT += @top_srcdir@/src/black_holes/EAGLE
INPUT += @top_srcdir@/logger
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
......
......@@ -21,11 +21,13 @@ Cell graph
----------
An interactive graph of the cells is available with the configuration option ``--enable-cell-graph``.
During a run, SWIFT will generate a ``cell_hierarchy_*.csv`` file per MPI rank.
The command ``tools/make_cell_hierarchy.sh cell_hierarchy_*.csv`` merges the files together and generates the file ``cell_hierarchy.html``
During a run, SWIFT will generate a ``cell_hierarchy_*.csv`` file per MPI rank at the frequency given by the parameter ``--cell-dumps=n``.
The command ``tools/make_cell_hierarchy.sh cell_hierarchy_0000_*.csv`` merges the files at time step 0 together and generates the file ``cell_hierarchy.html``
that contains the graph and can be read with your favorite web browser.
With chrome, you cannot access the files directly, you will need to either access them through an existing server (e.g. public http provided by your university)
With most web browsers, you cannot access the files directly.
If it is the case, the cells will never appear (but everything else should be fine).
To solve this problem, you will need to either access them through an existing server (e.g. public http provided by your university)
or install ``npm`` and then run the following commands
.. code-block:: bash
......@@ -34,6 +36,14 @@ or install ``npm`` and then run the following commands
http-server .
Now you can open the web page ``http://localhost:8080/cell_hierarchy.html``.
When running a large simulation, the data loading may take a while (a few seconds for EAGLE_6).
Your browser should not be hanging, but will seems to be idle.
If you wish to add some information to the graph, you can do it by modifying the files ``src/space.c`` and ``tools/data/cell_hierarchy.html``.
In the first one, you will need to modify the calls to ``fprintf`` in the functions ``space_write_cell_hierarchy`` and ``space_write_cell``.
Here the code is simply writing CSV files containing all the required information about the cells.
In the second one, you will need to find the function ``mouseover`` and add the field that you have created.
You can also increase the size of the bubble through the style parameter ``height``.
Memory usage reports
--------------------
......
......@@ -11,7 +11,10 @@ For instance, just running the ``swift`` binary will not use any SPH or gravity;
the particles will just sit still!
Below is a list of the command line options and when they should be used. The same list
can be found by typing ``./swift -h``::
can be found by typing ``./swift -h``:
.. code-block:: none
-h, --help show this help message and exit
......@@ -65,5 +68,7 @@ can be found by typing ``./swift -h``::
from all ranks.
-y, --task-dumps=<int> Time-step frequency at which task analysis
files and/or tasks are dumped.
--cell-dumps=<int> Time-step frequency at which cell graphs
are dumped.
-Y, --threadpool-dumps=<int> Time-step frequency at which threadpool
tasks are dumped.
......@@ -370,6 +370,45 @@ The full section to start a typical cosmological run would be:
H_mass_fraction: 0.755
H_ionization_temperature: 1e4
.. _Parameters_Stars:
Stars
-----
The ``Stars`` section is used to set parameters that describe the Stars
calculations when doing feedback or enrichment. Note that if stars only act
gravitationally (i.e. SWIFT is run *without* ``--feedback``) no parameters
in this section are used.
The first four parameters are related to the neighbour search:
* The (relative) tolerance to converge smoothing lengths within:
``h_tolerance`` (Default: same as SPH scheme)
* The maximal smoothing length in internal units: ``h_max`` (Default: same
as SPH scheme)
* The minimal allowed smoothing length in terms of the gravitational
softening: ``h_min_ratio`` (Default: same as SPH scheme)
* The maximal (relative) allowed change in volume over one time-step:
``max_volume_change`` (Default: same as SPH scheme)
These four parameters are optional and will default to their SPH equivalent
if left unspecified. That is the value specified by the user in that
section or the default SPH value if left unspecified there as well.
The two remaining parameters can be used to overwrite the birth time (or
scale-factor) of the stars that were read from the ICs. This can be useful
to start a simulation with stars already of a given age. The parameters
are:
* Whether or not to overwrite anything: ``overwrite_birth_time``
(Default: 0)
* The value to use: ``birth_time``
If the birth time is set to ``-1`` then the stars will never enter any
feedback or enrichment loop. When these values are not specified, SWIFT
will start and use the birth times specified in the ICs. If no values are
given in the ICs, the stars' birth times will be zeroed, which can cause
issues depending on the type of run performed.
.. _Parameters_time_integration:
......
......@@ -38,7 +38,7 @@ Statistics:
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
theta: 0.5 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 64
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
......@@ -53,6 +53,11 @@ SPH:
minimal_temperature: 100.0 # (internal units)
initial_temperature: 268.7
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......@@ -64,7 +69,6 @@ FOF:
Scheduler:
max_top_level_cells: 16
cell_split_size: 100
tasks_per_cell: 5
Restarts:
......
......@@ -38,7 +38,7 @@ Statistics:
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
theta: 0.5 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 128
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
......@@ -53,6 +53,11 @@ SPH:
minimal_temperature: 100.0 # (internal units)
initial_temperature: 268.7
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......@@ -64,7 +69,6 @@ FOF:
Scheduler:
max_top_level_cells: 16
cell_split_size: 100
tasks_per_cell: 5
Restarts:
......
......@@ -38,7 +38,7 @@ Statistics:
# Parameters for the self-gravity scheme
Gravity:
eta: 0.025 # Constant dimensionless multiplier for time integration.
theta: 0.7 # Opening angle (Multipole acceptance criterion)
theta: 0.5 # Opening angle (Multipole acceptance criterion)
mesh_side_length: 256
comoving_DM_softening: 0.0026994 # Comoving DM softening length (in internal units).
max_physical_DM_softening: 0.0007 # Max physical DM softening length (in internal units).
......@@ -53,6 +53,11 @@ SPH:
minimal_temperature: 100.0 # (internal units)
initial_temperature: 268.7
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......@@ -64,7 +69,6 @@ FOF:
Scheduler:
max_top_level_cells: 32
cell_split_size: 100
tasks_per_cell: 5
Restarts:
......
......@@ -57,6 +57,13 @@ SPH:
h_min_ratio: 0.1 # Minimal smoothing in units of softening.
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
# Parameters related to the initial conditions
InitialConditions:
......
......@@ -59,6 +59,13 @@ SPH:
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......
......@@ -67,6 +67,13 @@ SPH:
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......
......@@ -58,6 +58,13 @@ SPH:
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......
......@@ -68,6 +68,13 @@ SPH:
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
minimal_temperature: 100 # (internal units)
# Parameters of the stars neighbour search
Stars:
resolution_eta: 1.1642 # Target smoothing length in units of the mean inter-particle separation
h_tolerance: 7e-3
overwrite_birth_time: 1
birth_time: 0.33333 # Pretend all the stars were born at z = 2
# Parameters for the Friends-Of-Friends algorithm
FOF:
basename: fof_output # Filename for the FOF outputs.
......
......@@ -45,6 +45,11 @@ SPH:
h_max: 10.
minimal_temperature: 100.
# Parameters for the stars neighbour search
Stars:
overwrite_birth_time: 1 # Make sure the stars in the ICs do not do any feedback
birth_time: -1. # by setting all of their birth times to -1
# Standard EAGLE cooling options
EAGLECooling:
dir_name: ./coolingtables/ # Location of the Wiersma+08 cooling tables
......
......@@ -45,6 +45,11 @@ SPH:
h_max: 10.
minimal_temperature: 10. # Kelvin
# Parameters for the stars neighbour search
Stars:
overwrite_birth_time: 1 # Make sure the stars in the ICs do not do any feedback
birth_time: -1. # by setting all of their birth times to -1
# Standard EAGLE cooling options
EAGLECooling:
dir_name: ./coolingtables/ # Location of the Wiersma+08 cooling tables
......
......@@ -40,7 +40,8 @@ SPH:
# Properties of the stars
Stars:
birth_time: 0.00991 # Give the star in the ICs a decent birth time
overwrite_birth_time: 1
birth_time: 0.00991 # Give the star in the ICs a decent birth time
# Parameters related to the initial conditions
InitialConditions:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment