Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GraDje13 committed Aug 12, 2024
1 parent acfe394 commit 9e8c380
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion python/gammaloop/data/config/gammaloop_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ drawing:
export_settings:
compile_cff: true
compile_separate_orientations: false
cpe_rounds_cff: 1
gammaloop_compile_options:
use_asm: false
inline_asm: false
optimization_level: 3
fast_math: true
unsafe_math: true
Expand Down
3 changes: 2 additions & 1 deletion python/gammaloop/interface/gammaloop_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ def __init__(self, path: str | None = None, quiet=False):
'export_settings': {
'compile_cff': True,
'compile_separate_orientations': False,
'cpe_rounds_cff': 1,
'gammaloop_compile_options': {
'use_asm': False,
'inline_asm': False,
'optimization_level': 3,
'fast_math': True,
'unsafe_math': True,
Expand Down
2 changes: 1 addition & 1 deletion python/gammaloop/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def check_integration_result(target: float, process_path: Path, max_mc_error_dif
error_for_check = run_yaml["error"][index_for_check]

absolute_difference = abs(res_for_check - target)
assert absolute_difference < max_mc_error_diff * error_for_check
assert absolute_difference <= max_mc_error_diff * error_for_check

if abs(target) > 0.:
relative_difference = absolute_difference / abs(target)
Expand Down
9 changes: 5 additions & 4 deletions python/gammaloop/tests/integration/test_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,18 @@ def test_scalar_3L_6P_topology_A_with_tropical_sampling(self, scalar_3L_6P_topol
command_list.add_command("set e_cm 10.")
command_list.add_command(
"set sampling {'type':'discrete_graph_sampling','subtype':'tropical'}")
command_list.add_command("set n_start 5000")
command_list.add_command("set n_max 10000")
command_list.add_command("set n_start 40000")
command_list.add_command("set n_max 40000")
command_list.add_command("set continuous_dim_learning_rate 0.0")
command_list.add_command("set seed 1")
command_list.add_command("integrate scalar_3L_6P_topology_A -r")

gl.run(command_list)
check_integration_result(
0., scalar_3L_6P_topology_A_export, imag_phase=False)
# This target is approximate, actual reference run showed 2.8555(17)e-36
# PySecDec reference run showed 2.8555(17)e-36
check_integration_result(
2.736e-36, scalar_3L_6P_topology_A_export, imag_phase=True, max_mc_error_diff=5.0, max_rel_error_diff=0.1, max_percent_error=0.1)
2.8555e-36, scalar_3L_6P_topology_A_export, imag_phase=True, max_mc_error_diff=5.0, max_rel_error_diff=0.1, max_percent_error=0.1)


class TestPhysicalTopologies:
Expand Down

0 comments on commit 9e8c380

Please sign in to comment.