Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
grid_options_descriptions.rst 6.62 KiB

Population grid code options

The following chapter contains all grid code options, along with their descriptions There are 1 options that are not described yet.

Public options

The following options are meant to be changed by the user.

C_auto_logging: Dictionary containing parameters to be logged by binary_c. The structure of this dictionary is as follows: the key is used as the headline which the user can then catch. The value at that key is a list of binary_c system parameters (like star[0].mass)
C_logging_code: Variable to store the exact code that is used for the custom_logging. In this way the user can do more complex logging, as well as putting these logging strings in files.
amt_cores: The amount of cores that the population grid will use. The multiprocessing is useful but make sure to figure out how many logical cores the machine has. The core is multiprocessed, not multithreaded, and will gain no extra speed when amt_cores exceeds the amount of logical cores. Input: int
binary: Set this to 1 if the population contains binaries. Input: int
combine_ensemble_with_thread_joining: BOolean flag on whether to combine everything and return it to the user or if false: write it to data_dir/ensemble_output_{popuation_id}_{thread_id}.json
condor: Int flag whether to use a condor type population evolution. Not implemented yet.
custom_logging_func_memaddr: Memory adress where the custom_logging_function is stored. Input: int
evolution_type: Variable containing the type of evolution used of the grid. Multiprocessing or linear processing
failed_systems_threshold: Variable storing the maximum amount of systems that are allowed to fail before logging their commandline arguments to failed_systems log files
gridcode_filename: Filename for the grid code. Set and used by the population object. TODO: allow the user to provide their own function, rather than only a generated function.
log_args: Boolean to log the arguments. Unused
log_args_dir: Directory to log the arguments to. Unused
log_file: Log file for the population object. Unused
log_runtime_systems: Whether to log the runtime of the systems . Each systems run by the thread is logged to a file and is stored in the tmp_dir. (1 file per thread). Don't use this if you are planning to run alot of systems. This is mostly for debugging and finding systems that take long to run. Integer, default = 0. if value is 1 then the systems are logged
modulo: No description available yet
parse_function: Function that the user can provide to handle the output the binary_c. This function has to take the arguments (self, output). Its best not to return anything in this function, and just store stuff in the grid_options['results'] dictionary, or just output results to a file
repeat: Factor of how many times a system should be repeated. Consider the evolution splitting binary_c argument for supernovae kick repeating.
slurm: Int flag whether to use a slurm type population evolution.
source_file_filename: Variable containing the source file containing lines of binary_c commandline calls. These all have to start with binary_c.
tmp_dir: Directory where certain types of output are stored. The grid code is stored in that directory, as well as the custom logging libraries. Log files and other diagnostics will usually be written to this location, unless specified otherwise
verbosity: Verbosity of the population code. Default is 0, by which only errors will be printed. Higher values will show more output, which is good for debugging.
weight: Weight factor for each system. The calculated probability is mulitplied by this. If the user wants each system to be repeated several times, then this variable should not be changed, rather change the _repeat variable instead, as that handles the reduction in probability per system. This is useful for systems that have a process with some random element in it.

Private options

The following options are not meant to be changed by the user, as these options are used and set internally by the object itself. The description still is provided, but just for documentation purposes. | _binary_c_config_executable: Full path of the binary_c-config executable. This options is not used in the population object.

_binary_c_dir: Director where binary_c is stored. This options are not really used
_binary_c_executable: Full path to the binary_c executable. This options is not used in the population object.
_binary_c_shared_library: Full path to the libbinary_c file. This options is not used in the population object
_commandline_input: String containing the arguments passed to the population object via the command line. Set and used by the population object.
_count: Counter tracking which system the generator is on.
_custom_logging_shared_library_file: filename for the custom_logging shared library. Used and set by the population object
_end_time_evolution: Variable storing the end timestamp of the population evolution. Set by the object itself
_errors_exceeded: Variable storing a boolean flag whether the amount of errors was higher than the set threshold (failed_systems_threshold). If True, then the commandline arguments of the failing systems will not be stored in the failed_system_log files.
_errors_found: Variable storing a boolean flag whether errors by binary_c are encountered.
_evolution_type_options: List containing the evolution type options.
_failed_count: Variable storing the amount of failed systems.
_failed_prob: Variable storing the total probability of all the failed systems
_failed_systems_error_codes: List storing the unique error codes raised by binary_c of the failed systems
_grid_variables: Dictionary storing the grid_variables. These contain properties which are accessed by the _generate_grid_code function
_main_pid: Main process ID of the master process. Used and set by the population object.
_population_id: Variable storing a unique 32-char hex string.
_probtot: Total probability of the population.
_start_time_evolution: Variable storing the start timestamp of the population evolution. Set by the object itself.
_store_memaddr: Memory adress of the store object for binary_c.
_system_generator: Function object that contains the system generator function. This can be from a grid, or a source file, or a montecarlo grid.
_total_starcount: Variable storing the total amount of systems in the generator. Used and set by the population object.