Skip to content
Snippets Groups Projects
Commit 9b6c2c66 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Removed support for the defunct option to run VELOCIraptor every fixed number...

Removed support for the defunct option to run VELOCIraptor every fixed number of steps rather than at a fixed time.
parent 4d1cd61f
No related branches found
No related tags found
2 merge requests!721Velociraptor outputs,!719Velociraptor output strategy
...@@ -50,8 +50,10 @@ HDF5 library, not a parallel build. ...@@ -50,8 +50,10 @@ HDF5 library, not a parallel build.
Compiling SWIFT Compiling SWIFT
--------------- ---------------
The next part is compiling SWIFT with VELOCIraptor and assumes you already The next part is compiling SWIFT with VELOCIraptor and assumes you already
downloaded SWIFT from the GitLab_, this can be done by running:: downloaded SWIFT from the GitLab_, this can be done by running
.. code:: bash
./autogen.sh ./autogen.sh
./configure --with-velociraptor=/path/to/VELOCIraptor-STF/src ./configure --with-velociraptor=/path/to/VELOCIraptor-STF/src
make make
...@@ -60,16 +62,16 @@ In which ``./autogen.sh`` only needs to be run once after the code is cloned ...@@ -60,16 +62,16 @@ In which ``./autogen.sh`` only needs to be run once after the code is cloned
from the GitLab_, and ``/path/to/`` is the path to the ``VELOCIraptor-STF`` from the GitLab_, and ``/path/to/`` is the path to the ``VELOCIraptor-STF``
directory on your machine. In general ``./configure`` can be run with other directory on your machine. In general ``./configure`` can be run with other
options as desired. After this we can run SWIFT with VELOCIraptor, but for this options as desired. After this we can run SWIFT with VELOCIraptor, but for this
we first need to add several lines to the yaml file of our simulation:: we first need to add several lines to the yaml file of our simulation
#structure finding options .. code:: YAML
StructureFinding:
config_file_name: stf_input_6dfof_dmonly_sub.cfg StructureFinding:
basename: ./stf config_file_name: stf_input_6dfof_dmonly_sub.cfg
output_time_format: 1 basename: ./stf
scale_factor_first: 0.02 scale_factor_first: 0.02
delta_time: 1.02 delta_time: 1.02
In which we specify the ``.cfg`` file that is used by VELOCIraptor and the In which we specify the ``.cfg`` file that is used by VELOCIraptor and the
other parameters which SWIFT needs to use. In the case of other parameters which SWIFT needs to use. In the case of
......
...@@ -10,10 +10,8 @@ InternalUnitSystem: ...@@ -10,10 +10,8 @@ InternalUnitSystem:
StructureFinding: StructureFinding:
config_file_name: stf_input.cfg # Name of the STF config file. config_file_name: stf_input.cfg # Name of the STF config file.
basename: ./stf # Common part of the name of output files. basename: ./stf # Common part of the name of output files.
output_time_format: 0 # Specifies the frequency format of structure finding. 0 for simulation steps (delta_step) and 1 for simulation time intervals (delta_time).
scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run) scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first structure finding output (in internal units). time_first: 0.01 # Time of the first structure finding output (in internal units).
delta_step: 1000 # Time difference between consecutive structure finding outputs (in internal units) in simulation steps.
delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals. delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals.
# Cosmological parameters # Cosmological parameters
......
...@@ -10,10 +10,8 @@ InternalUnitSystem: ...@@ -10,10 +10,8 @@ InternalUnitSystem:
StructureFinding: StructureFinding:
config_file_name: stf_input.cfg # Name of the STF config file. config_file_name: stf_input.cfg # Name of the STF config file.
basename: ./stf # Common part of the name of output files. basename: ./stf # Common part of the name of output files.
output_time_format: 0 # Specifies the frequency format of structure finding. 0 for simulation steps (delta_step) and 1 for simulation time intervals (delta_time).
scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run) scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first structure finding output (in internal units). time_first: 0.01 # Time of the first structure finding output (in internal units).
delta_step: 1000 # Time difference between consecutive structure finding outputs (in internal units) in simulation steps.
delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals. delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals.
# Cosmological parameters # Cosmological parameters
......
...@@ -10,10 +10,8 @@ InternalUnitSystem: ...@@ -10,10 +10,8 @@ InternalUnitSystem:
StructureFinding: StructureFinding:
config_file_name: stf_input.cfg # Name of the STF config file. config_file_name: stf_input.cfg # Name of the STF config file.
basename: ./stf # Common part of the name of output files. basename: ./stf # Common part of the name of output files.
output_time_format: 0 # Specifies the frequency format of structure finding. 0 for simulation steps (delta_step) and 1 for simulation time intervals (delta_time).
scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run) scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first structure finding output (in internal units). time_first: 0.01 # Time of the first structure finding output (in internal units).
delta_step: 1000 # Time difference between consecutive structure finding outputs (in internal units) in simulation steps.
delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals. delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals.
# Cosmological parameters # Cosmological parameters
......
...@@ -10,7 +10,6 @@ InternalUnitSystem: ...@@ -10,7 +10,6 @@ InternalUnitSystem:
StructureFinding: StructureFinding:
config_file_name: stf_input_6dfof_dmonly_sub.cfg config_file_name: stf_input_6dfof_dmonly_sub.cfg
basename: ./stf basename: ./stf
output_time_format: 1
scale_factor_first: 0.02 scale_factor_first: 0.02
delta_time: 1.02 delta_time: 1.02
......
...@@ -61,7 +61,6 @@ InitialConditions: ...@@ -61,7 +61,6 @@ InitialConditions:
StructureFinding: StructureFinding:
config_file_name: stfconfig_input.cfg config_file_name: stfconfig_input.cfg
basename: ./stf basename: ./stf
output_time_format: 1
scale_factor_first: 0.02 scale_factor_first: 0.02
delta_time: 1.02 delta_time: 1.02
...@@ -156,6 +156,16 @@ DomainDecomposition: ...@@ -156,6 +156,16 @@ DomainDecomposition:
itr: 100 # When adaptive defines the ratio of inter node communication time to data redistribution time, in the range 0.00001 to 10000000.0. itr: 100 # When adaptive defines the ratio of inter node communication time to data redistribution time, in the range 0.00001 to 10000000.0.
# Lower values give less data movement during redistributions, at the cost of global balance which may require more communication. # Lower values give less data movement during redistributions, at the cost of global balance which may require more communication.
# Structure finding options (requires velociraptor)
StructureFinding:
config_file_name: stf_input.cfg # Name of the STF config file.
basename: ./stf # Common part of the name of output files.
scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first structure finding output (in internal units).
delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals.
output_list_on: 0 # (Optional) Enable the output list
output_list: stflist.txt # (Optional) File containing the output times (see documentation in "Parameter File" section)
# Parameters related to the equation of state ------------------------------------------ # Parameters related to the equation of state ------------------------------------------
EoS: EoS:
...@@ -286,15 +296,3 @@ EAGLEChemistry: ...@@ -286,15 +296,3 @@ EAGLEChemistry:
init_abundance_Magnesium: 0.000 # Inital fraction of particle mass in Magnesium init_abundance_Magnesium: 0.000 # Inital fraction of particle mass in Magnesium
init_abundance_Silicon: 0.000 # Inital fraction of particle mass in Silicon init_abundance_Silicon: 0.000 # Inital fraction of particle mass in Silicon
init_abundance_Iron: 0.000 # Inital fraction of particle mass in Iron init_abundance_Iron: 0.000 # Inital fraction of particle mass in Iron
# Structure finding options (requires velociraptor)
StructureFinding:
config_file_name: stf_input.cfg # Name of the STF config file.
basename: ./stf # Common part of the name of output files.
output_time_format: 0 # Specifies the frequency format of structure finding. 0 for simulation steps (delta_step) and 1 for simulation time intervals (delta_time).
scale_factor_first: 0.92 # Scale-factor of the first snaphot (cosmological run)
time_first: 0.01 # Time of the first structure finding output (in internal units).
delta_step: 1000 # Time difference between consecutive structure finding outputs (in internal units) in simulation steps.
delta_time: 1.10 # Time difference between consecutive structure finding outputs (in internal units) in simulation time intervals.
output_list_on: 0 # (Optional) Enable the output list
output_list: stflist.txt # (Optional) File containing the output times (see documentation in "Parameter File" section)
...@@ -264,7 +264,6 @@ void velociraptor_invoke(struct engine *e) { ...@@ -264,7 +264,6 @@ void velociraptor_invoke(struct engine *e) {
const int nr_cells = s->nr_cells; const int nr_cells = s->nr_cells;
int *cell_node_ids = NULL; int *cell_node_ids = NULL;
static int stf_output_count = 0; static int stf_output_count = 0;
int active_stf_output_count;
/* Allow thread to run on any core for the duration of the call to /* Allow thread to run on any core for the duration of the call to
* VELOCIraptor so that * VELOCIraptor so that
...@@ -294,15 +293,9 @@ void velociraptor_invoke(struct engine *e) { ...@@ -294,15 +293,9 @@ void velociraptor_invoke(struct engine *e) {
/* Append base name with either the step number or time depending on what /* Append base name with either the step number or time depending on what
* format is specified in the parameter file. */ * format is specified in the parameter file. */
char outputFileName[PARSER_MAX_LINE_SIZE + 128]; char outputFileName[PARSER_MAX_LINE_SIZE + 128];
if (e->stf_output_freq_format == io_stf_steps)
active_stf_output_count = e->step;
else if (e->stf_output_freq_format == io_stf_time)
active_stf_output_count = stf_output_count;
else
active_stf_output_count = 0;
snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor", snprintf(outputFileName, PARSER_MAX_LINE_SIZE + 128, "%s_%04i.VELOCIraptor",
e->stfBaseName, active_stf_output_count); e->stfBaseName, stf_output_count);
/* Allocate and populate an array of swift_vel_parts to be passed to /* Allocate and populate an array of swift_vel_parts to be passed to
* VELOCIraptor. */ * VELOCIraptor. */
...@@ -350,7 +343,7 @@ void velociraptor_invoke(struct engine *e) { ...@@ -350,7 +343,7 @@ void velociraptor_invoke(struct engine *e) {
} }
/* Call VELOCIraptor. */ /* Call VELOCIraptor. */
if (!InvokeVelociraptor(nr_gparts, nr_hydro_parts, active_stf_output_count, if (!InvokeVelociraptor(nr_gparts, nr_hydro_parts, stf_output_count,
swift_parts, cell_node_ids, outputFileName)) swift_parts, cell_node_ids, outputFileName))
error("Exiting. Call to VELOCIraptor failed on rank: %d.", e->nodeID); error("Exiting. Call to VELOCIraptor failed on rank: %d.", e->nodeID);
......
...@@ -22,14 +22,6 @@ ...@@ -22,14 +22,6 @@
/* Config parameters. */ /* Config parameters. */
#include "../config.h" #include "../config.h"
/**
* @brief The different formats for when to run structure finding.
*/
enum io_stf_output_format {
io_stf_steps = 0, /*!< Output every N steps */
io_stf_time /*!< Output at fixed time intervals */
};
/* Forward declaration */ /* Forward declaration */
struct engine; struct engine;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment