Tests Failing: WrongFermionFlow

Bug #1664353 reported by Joshua Ellis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

On MadGraph 2.5.2, a lot of the tests are failing, all with the same error:

```
ERROR: test_change_to_complex_mass_scheme (tests.unit_tests.core.test_base_objects.ModelTest2)
Check that a model can be converted to complex mass scheme
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/josh/MG5_aMC_v2_5_2/tests/unit_tests/core/test_base_objects.py", line 936, in setUp
    cmd.do_import('model sm')
  File "/tmp/josh/MG5_aMC_v2_5_2/madgraph/interface/master_interface.py", line 269, in do_import
    self.cmd.do_import(self, *args, **opts)
  File "/tmp/josh/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 5043, in do_import
    complex_mass_scheme=self.options['complex_mass_scheme'])
  File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 128, in import_model
    model = import_full_model(model_path, decay, prefix)
  File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 274, in import_full_model
    model = ufo2mg5_converter.load_model()
  File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 432, in load_model
    self.add_interaction(interaction_info, color_info)
  File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 1069, in add_interaction
    nb_fermion)
  File "/tmp/josh/MG5_aMC_v2_5_2/aloha/aloha_fct.py", line 87, in get_fermion_flow
    raise WrongFermionFlow, 'incoherent IO state: %s' % expr
WrongFermionFlow: incoherent IO state: [array('i', [6])]
```

Of the tests run by `tests/test_manager.py`, 78 fail:

```
FAILED ( errors=78)
test_model_name test_use_as_benchmark test_ImportUFONoSideEffectLO test_get_nflav_sm test_detect_identical_parameters test_detect_special_parameters test_detect_zero_iden_couplings test_locate_couplings test_merge_iden_couplings test_merge_identical_parameters test_put_parameters_to_zero test_remove_couplings test_remove_interactions test_restrict_from_a_param_card test_setup_particles test_getsetvertexlist_exceptions test_check_param test_load_with_restrict_model test_simple_import test_UFO_CPP_helas_call_writer test_UFO_Python_helas_call_writer test_UFO_fortran_helas_call_writer test_configs_8fs test_case_sensitive test_refactorize test_run_python_matrix_element test_get_color_data_lines_from_color_matrix_EW test_get_fks_j_from_i_lines_EW test_write_b_sf_fks_EW test_write_born_fks_EW test_write_born_nhel_file_EW test_write_coloramps_file_EW test_write_configs_file_born_EW test_write_decayBW_file_EW test_write_fks_info_file_EW test_write_ij_lines_EW test_write_leshouche_file_EW test_write_leshouche_info_file_EW test_write_lh_order_EW test_write_matrix_element_fks_EW test_write_maxconfigs_EW test_write_mparticles_EW test_write_nexternal_file_EW test_write_nfksconfigs_file_EW test_write_pdf_file_EW test_write_pdf_wrapper_EW test_write_pmass_file_EW test_write_props_file_born_EW test_write_real_me_wrapper_EW test_write_sborn_sf_EW test_w_nlo_gen test_w_nlo_gen_gosam test_write_pythia8_parameter_files test_get_final_part test_InvalidCmd test_fks_helas_multi_process_ppz_loonly test_fks_helas_real_process_init test_get_fks_info_list test_diagram_tag_gg_ggg test_diagram_tag_uu_uug test_reorder_permutation test_sort_proc test_link_butdg_butd test_link_gutdb_butd test_link_udxwpg_udxwp test_link_uuddg_uudd test_link_uuddg_uugg test_link_uuuug_guug test_sort_fks_proc test_identify_me_tag_qq_qqg test_non_identify_me_tag_qq_qqg test_identify_me_tag_qq_qg test_get_s_and_t_ub_tdg test_diagram_tag_gg_ggg test_diagram_tag_to_diagram_uux_nglue test_diagram_tag_uu_uug test_reorder_permutation test_change_to_complex_mass_scheme
```

All of them fail with the exact same error as above.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1664353] [NEW] Tests Failing: WrongFermionFlow
Download full text (8.0 KiB)

Hi,

I do not reproduce this with the version 2.5.2 on my computer.
How did you get that version? From the tarball? Via bar? Or via the auto-update?

Cheers,

Olivier

> On 13 Feb 2017, at 20:59, Joshua Ellis <email address hidden> wrote:
>
> Public bug reported:
>
> On MadGraph 2.5.2, a lot of the tests are failing, all with the same
> error:
>
> ```
> ERROR: test_change_to_complex_mass_scheme (tests.unit_tests.core.test_base_objects.ModelTest2)
> Check that a model can be converted to complex mass scheme
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/josh/MG5_aMC_v2_5_2/tests/unit_tests/core/test_base_objects.py", line 936, in setUp
> cmd.do_import('model sm')
> File "/tmp/josh/MG5_aMC_v2_5_2/madgraph/interface/master_interface.py", line 269, in do_import
> self.cmd.do_import(self, *args, **opts)
> File "/tmp/josh/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 5043, in do_import
> complex_mass_scheme=self.options['complex_mass_scheme'])
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 128, in import_model
> model = import_full_model(model_path, decay, prefix)
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 274, in import_full_model
> model = ufo2mg5_converter.load_model()
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 432, in load_model
> self.add_interaction(interaction_info, color_info)
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 1069, in add_interaction
> nb_fermion)
> File "/tmp/josh/MG5_aMC_v2_5_2/aloha/aloha_fct.py", line 87, in get_fermion_flow
> raise WrongFermionFlow, 'incoherent IO state: %s' % expr
> WrongFermionFlow: incoherent IO state: [array('i', [6])]
> ```
>
> Of the tests run by `tests/test_manager.py`, 78 fail:
>
> ```
> FAILED ( errors=78)
> test_model_name test_use_as_benchmark test_ImportUFONoSideEffectLO test_get_nflav_sm test_detect_identical_parameters test_detect_special_parameters test_detect_zero_iden_couplings test_locate_couplings test_merge_iden_couplings test_merge_identical_parameters test_put_parameters_to_zero test_remove_couplings test_remove_interactions test_restrict_from_a_param_card test_setup_particles test_getsetvertexlist_exceptions test_check_param test_load_with_restrict_model test_simple_import test_UFO_CPP_helas_call_writer test_UFO_Python_helas_call_writer test_UFO_fortran_helas_call_writer test_configs_8fs test_case_sensitive test_refactorize test_run_python_matrix_element test_get_color_data_lines_from_color_matrix_EW test_get_fks_j_from_i_lines_EW test_write_b_sf_fks_EW test_write_born_fks_EW test_write_born_nhel_file_EW test_write_coloramps_file_EW test_write_configs_file_born_EW test_write_decayBW_file_EW test_write_fks_info_file_EW test_write_ij_lines_EW test_write_leshouche_file_EW test_write_leshouche_info_file_EW test_write_lh_order_EW test_write_matrix_element_fks_EW test_write_maxconfigs_EW test_write_mparticles_EW test_write_nexternal_file_EW test_write_nfksconfigs_file_EW test_write_pdf_file_EW test_write_pdf_wrapper_EW test_write_pmass_file_EW test_write_props_file_born_EW test_write_real_...

Read more...

Revision history for this message
Joshua Ellis (jp-ellis) wrote :

Steps to reproduce it on my computer:

```sh
cd $(mktemp -d)
wget https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz -O - | tar xz
wget https://gist.githubusercontent.com/JP-Ellis/59ce09b218a5497d0466e77933b1e3b2/raw/81cb9e52e1503905fe946b7c442f59792319b088/python2.diff -O - | patch -lp 1
cd MG5_aMC_v2_5_2
./bin/mg5_aMC # Just to check that it launches fine
cd tests
./test_manager.py
```

This is with python 2.7.13. Note that on my system, `/usr/bin/python` defaults to python3, hence the patch (this is an Arch Linux, soon Ubuntu, Debian and probably most other Linux distributions will also be doing this).

Also, two files fail in the patch as they have different line endings which aren't correctly recorded in the gist. Ultimately, this makes no difference to which tests fail.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote : Re: [Bug 1664353] Re: Tests Failing: WrongFermionFlow

I can not test your patch, since I do not have python2 on my machine.
But I can confirm that it works for me.

Note that the advised way to run with non standard python installation is to specify the path to python then:
So in your case
python2 ./bin/mg5_aMC

If you find some functionality who does not work with that setup, please let us know and we will fix those.
I’m not sure how much the test routine is designed to run with that type of non standard python.

Cheers,

Olivier

On 14 Feb 2017, at 11:11, Joshua Ellis <<email address hidden><mailto:<email address hidden>>> wrote:

wget https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz -O - | tar xz

Revision history for this message
Joshua Ellis (jp-ellis) wrote :

The patch replaces every instance of:

> #!/usr/bin/env python

with

> #!/usr/bin/env python2

As a result, running `./bin/mg5_aMC` becomes equivalent to `/usr/bin/env python2 ./bin/mg5_aMC`. So the patch really should not change anything.

Just to confirm:

```
cd $(mktemp -d)
wget https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.2.tar.gz -O - | tar xz
cd MG5_aMC_v2_5_2
cd tests
python2 ./test_manager.py
```
results in exactly the same 78 tests failing just as before.

Revision history for this message
Joshua Ellis (jp-ellis) wrote :

Also, the reason I'm running those tests is that I want to test all the functionalities and make sure that are working, instead of discovering in hindsight that a functionality I thought was working in fact wasn't.

(I also seem unable to edit comments I just posted?)

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :
Download full text (4.7 KiB)

Hi Josh,

I actually reproduce your error but only on linux machine.
Looks like that they are some side effect. (i.e. the tests seems to pass when you run them one by one) but some fail we they are run in a sequential way.

I’m investigating that,

Cheers,

Olivier

> On 14 Feb 2017, at 12:33, Joshua Ellis <email address hidden> wrote:
>
> Also, the reason I'm running those tests is that I want to test all the
> functionalities and make sure that are working, instead of discovering
> in hindsight that a functionality I thought was working in fact wasn't.
>
> (I also seem unable to edit comments I just posted?)
>
> --
> You received this bug notification because you are subscribed to
> MadGraph5_aMC@NLO.
> https://bugs.launchpad.net/bugs/1664353
>
> Title:
> Tests Failing: WrongFermionFlow
>
> Status in MadGraph5_aMC@NLO:
> New
>
> Bug description:
> On MadGraph 2.5.2, a lot of the tests are failing, all with the same
> error:
>
> ```
> ERROR: test_change_to_complex_mass_scheme (tests.unit_tests.core.test_base_objects.ModelTest2)
> Check that a model can be converted to complex mass scheme
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/tmp/josh/MG5_aMC_v2_5_2/tests/unit_tests/core/test_base_objects.py", line 936, in setUp
> cmd.do_import('model sm')
> File "/tmp/josh/MG5_aMC_v2_5_2/madgraph/interface/master_interface.py", line 269, in do_import
> self.cmd.do_import(self, *args, **opts)
> File "/tmp/josh/MG5_aMC_v2_5_2/madgraph/interface/madgraph_interface.py", line 5043, in do_import
> complex_mass_scheme=self.options['complex_mass_scheme'])
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 128, in import_model
> model = import_full_model(model_path, decay, prefix)
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 274, in import_full_model
> model = ufo2mg5_converter.load_model()
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 432, in load_model
> self.add_interaction(interaction_info, color_info)
> File "/tmp/josh/MG5_aMC_v2_5_2/models/import_ufo.py", line 1069, in add_interaction
> nb_fermion)
> File "/tmp/josh/MG5_aMC_v2_5_2/aloha/aloha_fct.py", line 87, in get_fermion_flow
> raise WrongFermionFlow, 'incoherent IO state: %s' % expr
> WrongFermionFlow: incoherent IO state: [array('i', [6])]
> ```
>
> Of the tests run by `tests/test_manager.py`, 78 fail:
>
> ```
> FAILED ( errors=78)
> test_model_name test_use_as_benchmark test_ImportUFONoSideEffectLO test_get_nflav_sm test_detect_identical_parameters test_detect_special_parameters test_detect_zero_iden_couplings test_locate_couplings test_merge_iden_couplings test_merge_identical_parameters test_put_parameters_to_zero test_remove_couplings test_remove_interactions test_restrict_from_a_param_card test_setup_particles test_getsetvertexlist_exceptions test_check_param test_load_with_restrict_model test_simple_import test_UFO_CPP_helas_call_writer test_UFO_Python_helas_call_writer test_UFO_fortran_helas_call_writer test_configs_8fs tes...

Read more...

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Hi,

So I have investigate this and this is a border effect of the function "add model"
So as long as you do not use such function, you should be fine.

Cheers,

Olivier

Revision history for this message
Joshua Ellis (jp-ellis) wrote :

Hi Olivier,

Thanks for the update. I don't think I'll be using that (at least, not anytime soon). Glad you could identify the bug :)

Josh

Changed in mg5amcnlo:
status: New → Fix Committed
Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.