Skip to content
Snippets Groups Projects
Commit aff3dce7 authored by Santiago Ospina De Los Ríos's avatar Santiago Ospina De Los Ríos
Browse files

Move logging configuration out of tests

This helps to keep tests cleaner as well as centralizing logging settings.
parent 9d5451e5
No related branches found
No related tags found
1 merge request!39Resolve "Improve testing on jacobians"
_jacobian_type = numerical, analytical | expand
_name_sufix = {_jacobian_type}
__name = {_name_sufix}
[grid]
dimension = 2
file = grids/test_cell.msh
initial_level = 0
[model]
order = 1
jacobian_type = {_jacobian_type} # extra
[model.time_stepping]
rk_method = alexander_2
begin = 0.
end = 0.01
step = 2e-3
initial_step = 2e-3
min_step = 1e-3
max_step = 2e-3
decrease_factor = 0.9
increase_factor = 1.1
[model.writer]
file_path = {__name}
[model.compartments]
cell = 0
nucleoid = 1
############################ Model for cell ############################
[model.cell.initial]
u = 10
[model.cell.reaction]
u = -5*u
[model.cell.reaction.jacobian]
du_du = -5
[model.cell.diffusion]
u = 1.
############################ Model for nucleoid ############################
[model.nucleoid.initial]
u = 5
v = 10
[model.nucleoid.reaction]
u = -u*v
v = -10*u
[model.nucleoid.reaction.jacobian]
du_du = -v
du_dv = -u
dv_du = -10
dv_dv = 0
[model.nucleoid.diffusion]
u = 1.
v = 1.
######################### Compare with reference vtk #########################
[wrapper.vtkcompare]
name = {__name}/{__name}-cell-00005 {__name}/{__name}-nucleoid-00005
reference = reference/cell-00005 reference/nucleoid-00005
extension = vtu vtu
relative = 2e-2
absolute = 1e-9
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
......@@ -91,7 +20,7 @@ level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
level = trace
indent = 0
sinks = logfile, stdout
......@@ -102,17 +31,17 @@ indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
level = trace
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
level = trace
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
level = trace
indent = 4
# writer info go into this logger
......
__name = NFkappaB
# Test: Check that complicated problems have an approximately same analytic and
# numeric jacobian
import logging.ini
__name = test_NFkappaB
[grid]
dimension = 2
......@@ -12,7 +17,7 @@ order = 1
rk_method = alexander_2
begin = 0.
end = 365
step = 1e-3
initial_step = 1e-0
min_step = 1e-3
max_step = 1e-0
decrease_factor = 0.9
......@@ -248,54 +253,3 @@ IkBa_nucleus = 1
p65_IkB_nucleus = 1
IkBa_mRNA_nucleus = 1
IkBa_mRNA_1 = 1
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test: Compare a simple multidomain diffusion-reaction problem with respect
# to a reference solution produced by stable versions of the program
import logging.ini
__name = test_cell
[grid]
......@@ -65,54 +70,3 @@ reference = reference/cell-00005 reference/nucleoid-00005
extension = vtu vtu
relative = 2e-2
absolute = 1e-9
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
import logging.ini
_grow_rate = 0.2
_initial = 1
_geometry_type = cubes, triangles | expand geometry_type
......@@ -45,54 +47,3 @@ u = 0.
u = exp({_grow_rate}*t)
[model.domain.compare.l2_error]
u = 2.4e-4
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test: Check that the first steps of a pure diffusive problem evolve as a
# gaussian process
import logging.ini
_diffusion = 0.005
_t0 = 1.
_gauss_eq = exp(-((x-0.5)^2+(y-0.5)^2)/(4*t*{_diffusion})) / (4*pi*t*{_diffusion})
......@@ -47,54 +52,3 @@ u = {_diffusion}
u = {_gauss_eq}
[model.domain.compare.l2_error]
u = 0.255 , 0.076 | expand geometry_type
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test: Check that the first steps of a pure diffusive problem evolve as a
# gaussian process (mixed geometry version)
__name = test_gauss_mixed_geometry
_diffusion = 0.005
......@@ -66,54 +69,3 @@ u = {_diffusion}
u = {_gauss_eq}
[model.triangles.compare.l2_error]
u = 0.095
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test that checks fluxes on membranes with a reference vtk file produced with
# previous versions of dune_copasi_md
import logging.ini
__name = test_in_out
[grid]
......@@ -75,55 +78,3 @@ p65_nucleus = 0.01
[model.writer]
file_path = {__name}
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test: Check the interpolation output for math expression initialization
import logging.ini
_diffusion = 0.01
_t0 = 1.
_gauss_eq = exp(-((x-0.5)^2+(y-0.5)^2)/(2.*t*{_diffusion})) / (2*pi*t*{_diffusion})
_gauss_eq = exp(-((x-0.5)^2+(y-0.5)^2)/(4*t*{_diffusion})) / (4*pi*t*{_diffusion})
_geometry_type = cubes, triangles | expand geometry_type
__name = test_initial_{_geometry_type}
......@@ -48,54 +52,3 @@ u = {_diffusion}
u = {_gauss_eq}
[model.domain.compare.l2_error]
u = 7e-2, 5e-3 | expand geometry_type
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test: An inifile without `writer` section must be valid
import logging.ini
__name = test_no_writer
[grid]
......@@ -33,56 +37,3 @@ du_du = 1
[model.domain.diffusion]
u = 0.
# A inifile without `writer` section must be valid
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
# Test that checks interpolation of TIFF files with a reference vtk file
# Test: Checks interpolation of TIFF files with a reference vtk file
# produced with previous versions of dune_copasi_sd/md
import logging.ini
__name = test_tiff
[grid]
......@@ -50,54 +53,3 @@ reference = reference/{__name}-00000
extension = vtu
relative = 2e-2
absolute = 1e-9
############################ Logging settings #################################
# levels = off, critical, error, waring, notice, info, detail, debug, trace, all
# Sink setup for console stdcout
[logging.sinks.stdout]
level = info # max level to output on this sink
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Sink setup for logfile output
[logging.sinks.logfile]
level = all # max level to output on this sink
type = rank-0-file
file = {__name}.log
pattern = "[\\{reldays:0>2\\}-\\{reltime:8%T\\}] [\\{backend\\}] \\{msg\\}"
# Logger internal info go into this logger
[logging.internal]
level = off
# General info go into this logger
# Settings on this logger are the default values for other backend loggers
[logging.default]
level = detail
indent = 0
sinks = logfile, stdout
# Logger info go into this logger
[logging.backend.logging]
level = off
indent = 0
# Grid info go into this logger
[logging.backend.grid]
level = detail
indent = 2
# General model info go into this logger
[logging.backend.model]
level = detail
indent = 2
# Time stepping info go into this logger
[logging.backend.stepper]
level = detail
indent = 4
# writer info go into this logger
[logging.backend.writer]
level = trace
indent = 4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment