Merge lp:~mg5hpcteam/mg5amcnlo/mg5hpc into lp:~mg5core2/mg5amcnlo/2.5.5

Proposed by Olivier Mattelaer
Status: Merged
Merge reported by: Olivier Mattelaer
Merged at revision: not available
Proposed branch: lp:~mg5hpcteam/mg5amcnlo/mg5hpc
Merge into: lp:~mg5core2/mg5amcnlo/2.5.5
Diff against target: 7199 lines (+2105/-973)
151 files modified
MadSpin/decay.py (+9/-4)
Template/LO/Source/.make_opts (+10/-4)
Template/LO/Source/dsample.f (+39/-8)
Template/LO/SubProcesses/genps.f (+140/-81)
Template/LO/SubProcesses/refine.sh (+1/-1)
Template/LO/SubProcesses/unwgt.f (+1/-1)
Template/NLO/FixedOrderAnalysis/HwU.f (+199/-59)
Template/NLO/FixedOrderAnalysis/HwU.inc (+0/-22)
Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f (+2/-2)
Template/NLO/SubProcesses/check_poles.f (+1/-0)
Template/NLO/SubProcesses/collect_events.f (+4/-4)
Template/NLO/SubProcesses/driver_mintFO.f (+2/-0)
Template/NLO/SubProcesses/driver_mintMC.f (+3/-8)
Template/RWGTNLO/makefile (+1/-1)
UpdateNotes.txt (+9/-1)
VERSION (+3/-2)
aloha/create_aloha.py (+10/-7)
madgraph/interface/amcatnlo_run_interface.py (+4/-2)
madgraph/interface/common_run_interface.py (+39/-28)
madgraph/interface/extended_cmd.py (+20/-6)
madgraph/interface/loop_interface.py (+4/-1)
madgraph/interface/madevent_interface.py (+72/-8)
madgraph/interface/madgraph_interface.py (+3/-1)
madgraph/iolibs/export_fks.py (+13/-3)
madgraph/iolibs/export_v4.py (+23/-8)
madgraph/iolibs/file_writers.py (+52/-0)
madgraph/iolibs/files.py (+6/-2)
madgraph/iolibs/template_files/born_fks.inc (+33/-10)
madgraph/iolibs/template_files/loop_optimized/helas_calls_split.inc (+2/-2)
madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc (+12/-2)
madgraph/iolibs/template_files/loop_optimized/mp_compute_loop_coefs.inc (+20/-4)
madgraph/iolibs/template_files/loop_optimized/mp_helas_calls_split.inc (+2/-2)
madgraph/iolibs/template_files/madevent_combine_events.f (+16/-5)
madgraph/iolibs/template_files/madevent_makefile_source (+2/-2)
madgraph/iolibs/template_files/makefile_sa_f_sp (+1/-1)
madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc (+2/-1)
madgraph/iolibs/template_files/matrix_standalone_v4.inc (+2/-1)
madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc (+2/-0)
madgraph/loop/loop_helas_objects.py (+7/-2)
madgraph/madevent/combine_runs.py (+7/-4)
madgraph/madevent/gen_ximprove.py (+61/-12)
madgraph/madevent/sum_html.py (+20/-1)
madgraph/various/banner.py (+16/-13)
madgraph/various/cluster.py (+11/-2)
madgraph/various/lhe_parser.py (+4/-0)
madgraph/various/misc.py (+6/-2)
mg5decay/decay_objects.py (+3/-0)
models/check_param_card.py (+5/-3)
models/import_ufo.py (+3/-4)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f (+35/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f (+35/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f (+35/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f (+37/-13)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f (+37/-13)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f (+37/-13)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f (+35/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f (+35/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f (+37/-13)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f (+11/-9)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f (+2/-1)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+15/-3)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f (+15/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f (+2/-1)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f (+2/-1)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f (+2/-1)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/mp_helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/mp_helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f (+2/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/helas_calls_uvct_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_CT_calls_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f (+15/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_coef_construction_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_compute_loop_coefs.f (+23/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_helas_calls_ampb_1.f (+3/-3)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/mp_helas_calls_uvct_1.f (+3/-3)
tests/time_db (+258/-257)
tests/unit_tests/iolibs/test_export_fks_EW.py (+1/-1)
vendor/DiscreteSampler/DiscreteSampler.f (+1/-1)
To merge this branch: bzr merge lp:~mg5hpcteam/mg5amcnlo/mg5hpc
Reviewer Review Type Date Requested Status
Valentin Hirschi (community) Approve
Review via email: mp+323606@code.launchpad.net

Description of the change

Modification to the core of MG5 to increase modularity of the code in a way which allows
the MPI plugin to work.

To post a comment you must log in.
Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

Hi Olivier,

There are quite a few things I don't understand well. So could you please elaborate on those in reply to this message or directly on skype if you think this would be more convenient?

a) In 'madgraph/interface/common_run_interface.py':

415 - if amcatnlo:
416 - run_card = banner_mod.RunCardNLO(opt['run_card'])
417 - else:
418 - run_card = banner_mod.RunCard(opt['run_card'])
419 + run_card = banner_mod.RunCard(opt['run_card'])

How is this giving you the same behavior as before given that I don't see banner_mod.RunCard modifications that would turn it into a factory. Or was that feature already there before?

b)

+ self.run_card = run_card

What is the reason for adding the attribute self.run_card to the inteface?

c)
I dont get this:

+ if self.configured > time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'):
553 + #just ensure that cluster specific are correctly handled
554 + self.cluster.modify_interface(self)

what are the cases where this has an effect, and why discriminating against the random and run_card attribute?

d) this addition here:

+ IF(CONFSUB(I,SYMCONF(J)).NE.0) THEN

in super_auto_dsig is probably for you to better control what processes are selected. Did you check that it couldn't have any side effect in the normal workflow of madevent?

e) I see:

         self.add_param('survey_splitting', -1, hidden=True, include=False)
841 + self.add_param('survey_nchannel_per_job', 2, hidden=True, include=False)

Isn't it a bit weird to have a new banner parameter that is only relevant in the presence of a plugin? Also, I imagine that having both active at the same time would crash the code?

f) I don't understand this:

+ def modify_interface(self, run_interface):
856 + """routine which allow to modify the run_card/mg5cmd object to change the
857 + default behavior of the runs.
858 + This is called at the time of the compilation of the run_card.
859 + Note that this function can be called multiple times by run.
860 + """
861 + #run_card = run_interface.run_card
862 + return

and especially why it is in the cluster.py file?

g) I am a bit against this change:

- logger.error("Plugin %s is not supported by this version of MG5aMC." % name)
876 - plugin_support[name] = False
877 + if __debug__:
878 + logger.error("Plugin %s seems not supported by this version of MG5aMC. Keep it active (please update status)" % name)
879 + plugin_support[name] = True
880 + else:
881 + logger.error("Plugin %s is not supported by this version of MG5aMC." % name)
882 + plugin_support[name] = False

I like the idea, but please change the message in non-debug mode so as to let the user know that he can still try to run the plugin in the '--debug' mode, at his own risk of course.

review: Needs Information
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :
Download full text (7.8 KiB)

Hi Valentin,

Thanks a lot for this.

> How is this giving you the same behavior as before given that I don't see banner_mod.RunCard modifications that would turn it into a factory. Or was that feature already there before?

Yes the RunCard class is and has always been a factory class.
The funny part is since this is the motherless of RunCardLO and RunCardNLO they are both factory class as well.
So in principle if you call RunCardLO(path) the instance created can be RunCardNLO. Not sure it really work though.

> b)
>
> + self.run_card = run_card
>
> What is the reason for adding the attribute self.run_card to the inteface?

This is always useful to keep such information directly available rather than recompute it systematically.

> c)
> I dont get this:
>
> + if self.configured > time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'):
> 553 + #just ensure that cluster specific are correctly handled
> 554 + self.cluster.modify_interface(self)

This is more security than anything else.

> d) this addition here:
>
> + IF(CONFSUB(I,SYMCONF(J)).NE.0) THEN
>
> in super_auto_dsig is probably for you to better control what processes are selected. Did you check that it couldn't have any side effect in the normal workflow of madevent?

This line is not needed in madevent since those will never be selected. In MPI, since I run multiple integral in a row, it is better/required to double check that those are not selected.

> e) I see:
>
> self.add_param('survey_splitting', -1, hidden=True, include=False)
> 841 + self.add_param('survey_nchannel_per_job', 2, hidden=True, include=False)
>
> Isn't it a bit weird to have a new banner parameter that is only relevant in the presence of a plugin? Also, I imagine that having both active at the same time would crash the code?

This parameter has some impact for normal survey. It was just hardcoded before and I allow like this more flexibility.
Having both active, will not make the code to crash since they depend of different job strategy.

> f) I don't understand this:
>
> + def modify_interface(self, run_interface):
> 856 + """routine which allow to modify the run_card/mg5cmd object to change the
> 857 + default behavior of the runs.
> 858 + This is called at the time of the compilation of the run_card.
> 859 + Note that this function can be called multiple times by run.
> 860 + """
> 861 + #run_card = run_interface.run_card
> 862 + return
>
> and especially why it is in the cluster.py file?

The idea is that a plugin might want to change the default job strategy and therefore influence the way the job are created.
(like setting the survey_nchannel_per_job higher or lower or survey_splitting higher or lower)

In MPI, I'm using it for the following:
        run_card.set('survey_splitting',0, changeifuserset=False)
        run_card.set('survey_nchannel_per_job', 50, changeifuserset=False)
        run_card.set('gridpack', True, changeifuserset=True)

        if run_card['nhel']:
            logger.warning('MPI mode does not support MC over helicity')
            run_card.se...

Read more...

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :
Download full text (10.3 KiB)

Hi Olivier,

On Fri, May 26, 2017 at 10:57 AM, Olivier Mattelaer <
<email address hidden>> wrote:

> Hi Valentin,
>
> Thanks a lot for this.
>
> > How is this giving you the same behavior as before given that I don't
> see banner_mod.RunCard modifications that would turn it into a factory. Or
> was that feature already there before?
>
> Yes the RunCard class is and has always been a factory class.
> The funny part is since this is the motherless of RunCardLO and RunCardNLO
> they are both factory class as well.
> So in principle if you call RunCardLO(path) the instance created can be
> RunCardNLO. Not sure it really work though.

Well, then it's clearly much better as you put it now, so perfect.

>
> > b)
> >
> > + self.run_card = run_card
> >
> > What is the reason for adding the attribute self.run_card to the
> inteface?
>
>
> This is always useful to keep such information directly available rather
> than recompute it systematically.
>

Well I'm just afraid of side-effects of such "optimization" that can happen
when the actual run_card and the attribute become de-synchronized.
But I assume that you take care of updating it whenever the code asks to
edit the card.
Also, I assume you make sure that this attribute is assigned whenever
loading the interface on an existing directory.
If so, then fine by me.

> > c)
> > I dont get this:
> >
> > + if self.configured > time_mod and hasattr(self, 'random') and
> hasattr(self, 'run_card'):
> > 553 + #just ensure that cluster specific are correctly
> handled
> > 554 + self.cluster.modify_interface(self)
>
> This is more security than anything else.

You mean that you only want this to happen for certain "type" of interface.
Then shouldn't you define a new class attribute that specifies if it
qualifies for such behaviors?
That maybe an overkill here, but would anyway be useful for future
interface-type of plugins no?

>
> > d) this addition here:
> >
> > + IF(CONFSUB(I,SYMCONF(J)).NE.0) THEN
> >
> > in super_auto_dsig is probably for you to better control what processes
> are selected. Did you check that it couldn't have any side effect in the
> normal workflow of madevent?
>
> This line is not needed in madevent since those will never be selected. In
> MPI, since I run multiple integral in a row, it is better/required to
> double check that those are not selected.

You mean multiple integral *in parallel*, so that you needed this to avoid
concurrency issues? Ok, I'm not sure how these could arise, but if you
confirm that this line cannot possibly impact the normal madevent workflow,
then I'm fine with it.

>
> > e) I see:
> >
> > self.add_param('survey_splitting', -1, hidden=True,
> include=False)
> > 841 + self.add_param('survey_nchannel_per_job', 2,
> hidden=True, include=False)
> >
> > Isn't it a bit weird to have a new banner parameter that is only
> relevant in the presence of a plugin? Also, I imagine that having both
> active at the same time would crash the code?
>
> This parameter has some impact for normal survey. It was just hardcoded
> before and I allow like this more flexibility.
> Having both active, will ...

Revision history for this message
Valentin Hirschi (valentin-hirschi) wrote :

You answered all my queries and as a result nothing needs immediate modification. I therefore approve this merge.

review: Approve
lp:~mg5hpcteam/mg5amcnlo/mg5hpc updated
352. By olivier-mattelaer

merge with latest 2.5.6

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MadSpin/decay.py'
2--- MadSpin/decay.py 2017-05-22 08:05:00 +0000
3+++ MadSpin/decay.py 2017-07-13 10:23:41 +0000
4@@ -207,6 +207,7 @@
5 line+="\n"
6 return line
7
8+
9 def reshuffle_resonances(self,mother):
10 """ reset the momentum of each resonance in the production event
11 to the sum of momenta of the daughters
12@@ -222,9 +223,9 @@
13 if self.resonance[index]["mothup1"]==mother:
14 daughters.append(index)
15
16- if len(daughters)!=2:
17- logger.info("Got more than 2 (%s) daughters for one particles" % len(daughters))
18- logger.info("in one production event (before decay)")
19+# if len(daughters)!=2:
20+# logger.info("Got more than 2 (%s) daughters for one particles" % len(daughters))
21+# logger.info("in one production event (before decay)")
22
23
24 if daughters[0]>0:
25@@ -1633,11 +1634,15 @@
26 self.ask_edit_cards(['param_card'],[], plot=False)
27
28
29+ commandline = 'import model %s' % model.get('modelpath+restriction')
30+ if not model.mg5_name:
31+ commandline += ' --modelname'
32+ cmd.exec_cmd(commandline)
33+
34 line = 'compute_widths %s %s' % \
35 (' '.join([str(i) for i in opts['particles']]),
36 ' '.join('--%s=%s' % (key,value) for (key,value) in opts.items()
37 if key not in ['model', 'force', 'particles'] and value))
38- cmd.exec_cmd('import model %s' % model.get('modelpath+restriction'))
39
40 #pattern for checking complex mass scheme.
41 has_cms = re.compile(r'''set\s+complex_mass_scheme\s*(True|T|1|true|$|;)''', re.M)
42
43=== modified file 'Template/LO/Source/.make_opts'
44--- Template/LO/Source/.make_opts 2016-12-02 21:56:34 +0000
45+++ Template/LO/Source/.make_opts 2017-07-13 10:23:41 +0000
46@@ -37,9 +37,6 @@
47 CFLAGS= -O $(STDLIB_FLAG) $(MACFLAG)
48 endif
49
50-# Increase the number of allowed charcters in a Fortran line
51-FFLAGS+= -ffixed-line-length-132
52-
53 # Set FC unless it's defined by an environment variable
54 ifeq ($(origin FC),default)
55 FC=$(DEFAULT_F_COMPILER)
56@@ -48,6 +45,15 @@
57 F2PY=$(DEFAULT_F2PY_COMPILER)
58 endif
59
60+# Increase the number of allowed charcters in a Fortran line
61+ifeq ($(FC), ftn)
62+FFLAGS+= -extend-source # for ifort type of compiler
63+else
64+FFLAGS+= -ffixed-line-length-132
65+endif
66+
67+
68+
69 UNAME := $(shell uname -s)
70 ifeq ($(origin LDFLAGS), undefined)
71 LDFLAGS=$(STDLIB) $(MACFLAG)
72@@ -91,7 +97,7 @@
73 ifneq ($(lhapdf),)
74 CXXFLAGS += $(shell $(lhapdf) --cppflags)
75 alfas_functions=alfas_functions_lhapdf
76-llhapdf+= -lLHAPDF
77+llhapdf+= $(shell $(lhapdf) --libs) -lLHAPDF
78 else
79 alfas_functions=alfas_functions
80 llhapdf=
81
82=== modified file 'Template/LO/Source/dsample.f'
83--- Template/LO/Source/dsample.f 2015-10-01 10:08:45 +0000
84+++ Template/LO/Source/dsample.f 2017-07-13 10:23:41 +0000
85@@ -997,6 +997,43 @@
86
87 end subroutine write_discrete_grids
88
89+ subroutine write_grid(name)
90+c************************************************************************
91+c Write out the grid
92+c************************************************************************
93+ implicit none
94+
95+ character*(*) name
96+
97+ include 'genps.inc'
98+
99+ double precision tmean, trmean, tsigma
100+ integer dim, events, itm, kn, cur_it, invar, configs
101+ common /sample_common/
102+ . tmean, trmean, tsigma, dim, events, itm, kn, cur_it, invar, configs
103+
104+ double precision twgt, maxwgt,swgt(maxevents)
105+ integer lun, nw, itmin
106+ common/to_unwgt/twgt, maxwgt, swgt, lun, nw, itmin
107+
108+ double precision grid(2, ng, 0:maxinvar)
109+ common /data_grid/ grid
110+
111+ double precision force_max_wgt
112+ common/unwgt_secondary_max/force_max_wgt
113+
114+ integer i,j
115+
116+ open(26, file='ftn26',status='unknown')
117+ write(26,fmt='(4f21.17)') ((grid(2,i,j),i=1,ng),j=1,invar)
118+ write(26,*) twgt, force_max_wgt
119+c write(26,fmt='(4f21.16)') (alpha(i),i=1,maxconfigs)
120+ call write_discrete_grids(26,'ref')
121+ close(26)
122+ return
123+ end
124+
125+
126 subroutine read_discrete_grids(stream_id)
127 c************************************************************************
128 c Write out the grid using the DiscreteSampler module
129@@ -1714,7 +1751,7 @@
130 if (kn .ge. max_events .and. non_zero .le. 5) then
131 call none_pass(max_events)
132 endif
133- if (non_zero .eq. events .or. (kn .gt. 200*events .and.
134+ if (non_zero .ge. events .or. (kn .gt. 200*events .and.
135 $ non_zero .gt. 5)) then
136
137 c # special mode where we store information to combine them
138@@ -2179,13 +2216,7 @@
139 . /23X,11HCross sec =,e12.4/
140 . 13X,21HChi**2 per DoF. =,f12.4/1X,79(1H-))
141 if (use_cut .ne. 0) then
142- open(26, file='ftn26',status='unknown')
143- write(26,fmt='(4f21.17)')
144- $ ((grid(2,i,j),i=1,ng),j=1,invar)
145- write(26,*) twgt, force_max_wgt
146- call write_discrete_grids(26,'ref')
147-c write(26,fmt='(4f21.17)') (alpha(i),i=1,maxconfigs)
148- close(26)
149+ call write_grid('ftn26')
150 endif
151 call sample_writehtm()
152 c open(unit=22,file=result_file,status='old',
153
154=== modified file 'Template/LO/SubProcesses/genps.f'
155--- Template/LO/SubProcesses/genps.f 2016-09-06 15:01:18 +0000
156+++ Template/LO/SubProcesses/genps.f 2017-07-13 10:23:41 +0000
157@@ -124,7 +124,6 @@
158 integer sprop(maxsproc,-max_branch:-1,lmaxconfigs)
159 integer tprid(-max_branch:-1,lmaxconfigs)
160 common/to_sprop/sprop,tprid
161- integer lwgt(0:maxconfigs,maxinvar)
162 logical firsttime
163
164 double precision xprop(3,nexternal),tprop(3,nexternal)
165@@ -132,7 +131,7 @@
166 integer imatch
167 save maxwgt
168
169- integer ninvar, nconfigs
170+ integer ninvar
171
172 c
173 c External
174@@ -142,6 +141,9 @@
175 c
176 c Global
177 c
178+ integer lwgt(0:maxconfigs,maxinvar)
179+ common/to_lwgt/lwgt
180+
181 double precision pmass(nexternal)
182 common/to_mass/ pmass
183
184@@ -172,7 +174,6 @@
185 double precision stot,m1,m2
186 common/to_stot/stot,m1,m2
187
188- save lwgt
189 save ndim,nfinal,nbranch,nparticles
190
191 integer jfig,k
192@@ -200,40 +201,7 @@
193 c write(*,*) 'using iconfig',iconfig
194 if (firsttime) then
195 firsttime=.false.
196- do i=1,nexternal
197- m(i)=pmass(i)
198- enddo
199-c Set stot
200- if (nincoming.eq.1) then
201- stot=m(1)**2
202- else
203- m1=m(1)
204- m2=m(2)
205- if (abs(lpp(1)) .eq. 1 .or. abs(lpp(1)) .eq. 2) m1 = 0.938d0
206- if (abs(lpp(2)) .eq. 1 .or. abs(lpp(2)) .eq. 2) m2 = 0.938d0
207- if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0
208- if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0
209- if(ebeam(1).lt.m1) ebeam(1)=m1
210- if(ebeam(2).lt.m2) ebeam(2)=m2
211- pi1(0)=ebeam(1)
212- pi1(3)=sqrt(max(ebeam(1)**2-m1**2, 0d0))
213- pi2(0)=ebeam(2)
214- pi2(3)=-sqrt(max(ebeam(2)**2-m2**2, 0d0))
215- stot=m1**2+m2**2+2*(pi1(0)*pi2(0)-pi1(3)*pi2(3))
216- endif
217- write(*,'(x,a,f13.2)') 'Set CM energy to ',sqrt(stot)
218-c Start graph mapping
219- do i=1,mapconfig(0)
220- if (mapconfig(i) .eq. iconfig) this_config=i
221- enddo
222- write(*,*) 'Mapping Graph',iconfig,' to config',this_config
223- iconfig = this_config
224- nconfigs = 1
225- mincfig=iconfig
226- maxcfig=iconfig
227- call map_invarients(minvar,nconfigs,ninvar,mincfig,maxcfig,nexternal,nincoming)
228- maxwgt=0d0
229-c write(*,'(a,12i4)') 'Summing configs',(isym(i),i=1,isym(0))
230+ call configure_integral(this_config,mincfig, maxcfig, invar,maxwgt)
231 nparticles = nexternal
232 nfinal = nparticles-nincoming
233 nbranch = nparticles-2
234@@ -241,51 +209,10 @@
235 if (ndim .lt. 0) ndim = 0 !For 2->1 processes tjs 5/24/2010
236 if (abs(lpp(1)) .ge. 1) ndim=ndim+1
237 if (abs(lpp(2)) .ge. 1) ndim=ndim+1
238- call set_peaks
239- if (.false. ) then
240- call find_matches(iconfig,isym(0))
241- write(*,'(a,12i4)') 'Summing configs',(isym(i),i=1,isym(0))
242- endif
243- if (.false.) then
244- i=1
245- do while (mapconfig(i) .ne. iconfig
246- $ .and. i .lt. mapconfig(0))
247- i=i+1
248- enddo
249- endif
250-
251+ do i=1,nexternal
252+ m(i)=pmass(i)
253+ enddo
254 write(*,'(a,12e10.3)') ' Masses:',(m(i),i=1,nparticles)
255- do j=1,invar
256- lwgt(0,j)=0
257- enddo
258-c
259-c Here we set up which diagrams contribute to each variable
260-c in principle more than 1 diagram can contribute to a variable
261-c if we believe they will have identical structure.
262-c
263-c do i=1,mapconfig(0)
264- do i=mincfig,maxcfig
265-c do k=1,isym(0)
266-c i = isym(k)
267- write(*,'(15i4)') i,(minvar(j,i),j=1,ndim)
268- do j=1,ndim
269- ipole = minvar(j,i)
270- if (ipole .ne. 0) then
271- n = lwgt(0,ipole)+1
272- lwgt(n,ipole)=mapconfig(i)
273- lwgt(0,ipole)=n
274- endif
275- enddo
276- enddo
277-
278-c Initialize dsig (needed for subprocess group running mode)
279- dum=dsig(0,0,1)
280-
281- else
282- do i=1,11
283-c swidth(i)=-5d0 !tells us to use the same point over again
284- enddo
285-c swidth(10)=0d0
286 endif !First_time
287
288 if (.false.) then
289@@ -548,6 +475,138 @@
290 end
291
292
293+ subroutine configure_integral(iconfig,mincfig,maxcfig,invar,maxwgt)
294+c**************************************************************************
295+c inputs iconfig == Current configuration working on
296+c output m
297+c**************************************************************************
298+
299+ implicit none
300+
301+ include 'genps.inc'
302+ include 'maxconfigs.inc'
303+ include 'nexternal.inc'
304+ include 'maxamps.inc'
305+ include 'run.inc'
306+
307+c local
308+ double precision pi1(0:3),pi2(0:3),p0,p3
309+ double precision dum
310+ integer i,j,ipole,n
311+ integer nbranch,ndim,nconfigs
312+ integer ninvar
313+ integer nparticles,nfinal
314+
315+
316+c
317+c Arguments
318+c
319+ integer iconfig,mincfig,maxcfig,invar
320+ double precision maxwgt
321+c
322+c External
323+c
324+ double precision lambda,dot,dsig
325+ logical passcuts
326+
327+
328+ logical firsttime
329+ data firsttime/.true./
330+ save firsttime
331+c
332+c global
333+c
334+ double precision M(-max_branch:max_particles)
335+
336+ double precision pmass(nexternal)
337+ common/to_mass/ pmass
338+
339+ double precision stot,m1,m2
340+ common/to_stot/stot,m1,m2
341+
342+ integer mapconfig(0:lmaxconfigs), this_config
343+ common/to_mconfigs/mapconfig, this_config
344+
345+ integer Minvar(maxdim,lmaxconfigs)
346+ common /to_invar/ Minvar
347+
348+ integer lwgt(0:maxconfigs,maxinvar)
349+ common/to_lwgt/lwgt
350+
351+ if (firsttime)then
352+ firsttime=.false.
353+ do i=1,nexternal
354+ m(i)=pmass(i)
355+ enddo
356+c Set stot
357+ if (nincoming.eq.1) then
358+ stot=m(1)**2
359+ else
360+ m1=m(1)
361+ m2=m(2)
362+ if (abs(lpp(1)) .eq. 1 .or. abs(lpp(1)) .eq. 2) m1 = 0.938d0
363+ if (abs(lpp(2)) .eq. 1 .or. abs(lpp(2)) .eq. 2) m2 = 0.938d0
364+ if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0
365+ if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0
366+ if(ebeam(1).lt.m1) ebeam(1)=m1
367+ if(ebeam(2).lt.m2) ebeam(2)=m2
368+ pi1(0)=ebeam(1)
369+ pi1(3)=sqrt(max(ebeam(1)**2-m1**2, 0d0))
370+ pi2(0)=ebeam(2)
371+ pi2(3)=-sqrt(max(ebeam(2)**2-m2**2, 0d0))
372+ stot=m1**2+m2**2+2*(pi1(0)*pi2(0)-pi1(3)*pi2(3))
373+ endif
374+ write(*,'(x,a,f13.2)') 'Set CM energy to ',sqrt(stot)
375+ endif
376+c Start graph mapping
377+ do i=1,mapconfig(0)
378+ if (mapconfig(i) .eq. iconfig) this_config=i
379+ enddo
380+ write(*,*) 'Mapping Graph',iconfig,' to config',this_config
381+ iconfig = this_config
382+ nconfigs = 1
383+ mincfig=iconfig
384+ maxcfig=iconfig
385+ call map_invarients(minvar,nconfigs,ninvar,mincfig,maxcfig,nexternal,nincoming)
386+ maxwgt=0d0
387+c write(*,'(a,12i4)') 'Summing configs',(isym(i),i=1,isym(0))
388+ nparticles = nexternal
389+ nfinal = nparticles-nincoming
390+ nbranch = nparticles-2
391+ ndim = 3*nfinal-4
392+ if (ndim .lt. 0) ndim = 0 !For 2->1 processes tjs 5/24/2010
393+ if (abs(lpp(1)) .ge. 1) ndim=ndim+1
394+ if (abs(lpp(2)) .ge. 1) ndim=ndim+1
395+ call set_peaks
396+ do j=1,invar
397+ lwgt(0,j)=0
398+ enddo
399+c
400+c Here we set up which diagrams contribute to each variable
401+c in principle more than 1 diagram can contribute to a variable
402+c if we believe they will have identical structure.
403+c
404+c do i=1,mapconfig(0)
405+ do i=mincfig,maxcfig
406+c do k=1,isym(0)
407+c i = isym(k)
408+ write(*,'(15i4)') i,(minvar(j,i),j=1,ndim)
409+ do j=1,ndim
410+ ipole = minvar(j,i)
411+ if (ipole .ne. 0) then
412+ n = lwgt(0,ipole)+1
413+ lwgt(n,ipole)=mapconfig(i)
414+ lwgt(0,ipole)=n
415+ endif
416+ enddo
417+ enddo
418+
419+c Initialize dsig (needed for subprocess group running mode)
420+ dum=dsig(0,0,1)
421+
422+ return
423+ end
424+
425 subroutine one_tree(itree,iconfig,nbranch,P,M,S,X,jac,pswgt)
426 c************************************************************************
427 c Calculates the momentum for everything below in the tree until
428
429=== modified file 'Template/LO/SubProcesses/refine.sh'
430--- Template/LO/SubProcesses/refine.sh 2016-06-12 00:01:23 +0000
431+++ Template/LO/SubProcesses/refine.sh 2017-07-13 10:23:41 +0000
432@@ -89,7 +89,7 @@
433 if [ "$keeplog" = true ] ; then
434 echo "" >> $k; echo "ls status:" >> $k; ls >> $k
435 else
436- rm ftn26 > /dev/null
437+ rm ftn26 &> /dev/null
438 fi
439
440
441
442=== modified file 'Template/LO/SubProcesses/unwgt.f'
443--- Template/LO/SubProcesses/unwgt.f 2016-09-03 13:26:00 +0000
444+++ Template/LO/SubProcesses/unwgt.f 2017-07-13 10:23:41 +0000
445@@ -603,7 +603,7 @@
446 if (nincoming.eq.2) then
447 if (xbk(1) .gt. 0d0 .and. xbk(1) .le. 1d0 .and.
448 $ xbk(2) .gt. 0d0 .and. xbk(2) .le. 1d0) then
449- if(xbk(1).eq.1d0.or.pmass(1).eq.0d0) then
450+ if(lpp(2).ne.0.and.(xbk(1).eq.1d0.or.pmass(1).eq.0d0)) then
451 ! construct the beam momenta in each frame and compute the related (z)boost
452 ebi(0) = p(0,1)/xbk(1) ! this assumes that particle 1 is massless or mass equal to beam
453 ebi(1) = 0
454
455=== modified file 'Template/NLO/FixedOrderAnalysis/HwU.f'
456--- Template/NLO/FixedOrderAnalysis/HwU.f 2017-02-03 13:37:36 +0000
457+++ Template/NLO/FixedOrderAnalysis/HwU.f 2017-07-13 10:23:41 +0000
458@@ -1,7 +1,7 @@
459 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
460 C C
461 C HwU: Histograms with Uncertainties C
462-C By Rikkert Frederix, Dec. 2014 C
463+C By Rikkert Frederix, 12-2014--05-2017 C
464 C C
465 C Book, fill and write out histograms. Particularly suited for NLO C
466 C computations with correlations between points (ie. event and C
467@@ -9,26 +9,41 @@
468 C and PDF uncertainties through reweighting). C
469 C C
470 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
471+
472+c The module contains effectively the common block with allocatable
473+c variables (something not possible in old fortran version)
474+ module HwU_variables
475+ implicit none
476+ integer :: max_plots,max_points,max_bins,nwgts,np
477+ integer :: error_estimation=3
478+ logical, allocatable :: booked(:)
479+ integer, allocatable :: nbin(:),histi(:,:),p_bin(:),p_label(:)
480+ character(len=50), allocatable :: title(:)
481+ character(len=50), allocatable :: wgts_info(:)
482+ double precision, allocatable :: histy(:,:,:),histy_acc(:,:,:)
483+ $ ,histy2(:,:),histy_err(:,:),histxl(:,:),histxm(:,:)
484+ $ ,step(:),p_wgts(:,:)
485+ save
486+ end module HwU_variables
487+
488
489 c To be called once at the start of each run. Initialises the packages
490 c and sets the number of weights that need to be included for each point.
491 subroutine HwU_inithist(nweights,wgt_info)
492+ use HwU_variables
493 implicit none
494- include "HwU.inc"
495 integer i,nweights
496 character*(*) wgt_info(*)
497- do i=1,max_plots
498- booked(i)=.false.
499- enddo
500+ call HwU_deallocate_all
501+ max_plots=0
502+ max_points=0
503+ max_bins=0
504+ np=0
505 c Number of weights associated to each point. Note that the first
506 c weight should always be the 'central value' and it should not be
507 c zero if any of the other weights are non-zero.
508 nwgts=nweights
509- if (nwgts.gt.max_wgts) then
510- write (*,*) 'ERROR: increase max_wgts in HwU histogramming'
511- $ ,max_wgts,nwgts
512- stop 1
513- endif
514+ allocate(wgts_info(nwgts))
515 do i=1,nwgts
516 wgts_info(i)=wgt_info(i)
517 enddo
518@@ -48,10 +63,9 @@
519 c square root of the sum of the squares. Perform a weighted average
520 c iteration-by-iteration
521 c input 3: Same as input 2, but weighted average is same as from MINT
522+ use HwU_variables
523 implicit none
524 integer input
525- integer error_estimation
526- common /HwU_common2/ error_estimation
527 if (input.ge.0 .and. input.le.3) then
528 error_estimation=input
529 else
530@@ -60,39 +74,20 @@
531 endif
532 return
533 end
534-
535- block data HwU
536-c set the default for the error estimation method. To reduce the size of
537-c the executable, put the error_estimation variable in a separate common
538-c block. If we would have included the 'HwU.inc' file here, that
539-c complete common block seems to be included in the size executable
540-c (approx. 110 MB).
541- integer error_estimation
542- common /HwU_common2/ error_estimation
543- data error_estimation /3/
544- end
545-
546+
547 c Book the histograms at the start of the run. Give a 'label' (an
548 c integer) that identifies the plot when filling it and a title
549 c ('title_l') for each plot. Also the number of bins ('nbin_l') and the
550 c plot range (from 'xmin' to 'xmax') should be given.
551 subroutine HwU_book(label,title_l,nbin_l,xmin,xmax)
552+ use HwU_variables
553 implicit none
554- include "HwU.inc"
555 integer label,nbin_l,i,j
556 character*(*) title_l
557 double precision xmin,xmax
558-c Check that label and number of bins are reasonable
559- if (label.gt.max_plots) then
560- write (*,*) 'ERROR: increase max_plots in HwU histogramming'
561- $ ,max_plots, label
562- stop 1
563- endif
564- if (nbin_l.gt.max_bins) then
565- write (*,*) 'ERROR: increase max_bins in HwU histogramming'
566- $ ,max_bins,nbin_l
567- stop 1
568- endif
569+c Allocate space for new histograms if needed
570+ call HwU_allocate_histo(label,nbin_l)
571+c Setup the histogram
572 booked(label)=.true.
573 title(label)=title_l
574 nbin(label)=nbin_l
575@@ -111,7 +106,6 @@
576 histy2(label,i)=0d0
577 histy_err(label,i)=0d0
578 enddo
579- np=0
580 return
581 end
582
583@@ -121,8 +115,8 @@
584 c the 'HwU_inithist' subroutine. That means that each point should have
585 c the same number of weights.
586 subroutine HwU_fill(label,x,wgts)
587+ use HwU_variables
588 implicit none
589- include "HwU.inc"
590 integer label,i,j,bin
591 double precision x, wgts(*)
592 c If central weight is zero do not add this point.
593@@ -147,11 +141,7 @@
594 enddo
595 c If a new bin, add it to the list of points
596 np=np+1
597- if (np.gt.max_points) then
598- write (*,*) 'ERROR: increase max_points in HwU histogramming'
599- $ ,max_points
600- stop 1
601- endif
602+ call HwU_allocate_p
603 p_label(np)=label
604 p_bin(np)=bin
605 do j=1,nwgts
606@@ -159,7 +149,7 @@
607 enddo
608 return
609 end
610-
611+
612 c Call after all correlated contributions for a give phase-space
613 c point. I.e., every time you get a new set of random numbers from
614 c MINT/VEGAS. It adds the current list of points to the histograms. Add
615@@ -168,8 +158,8 @@
616 c this way, correlations between events and counter-events can be
617 c correctly taken into account.
618 subroutine HwU_add_points
619+ use HwU_variables
620 implicit none
621- include "HwU.inc"
622 integer i,j
623 do i=1,np
624 do j=1,nwgts
625@@ -192,12 +182,11 @@
626 c the current iteration so that they can be filled with the next
627 c iteration.
628 subroutine HwU_accum_iter(inclde,nPSpoints,values)
629+ use HwU_variables
630 implicit none
631- include "HwU.inc"
632 logical inclde
633 integer nPSpoints,label,i,j
634- double precision nPSinv,etot,vtot(max_wgts),niter,y_squared
635- $ ,values(2)
636+ double precision nPSinv,etot,niter,y_squared,values(2)
637 data niter /0d0/
638 nPSinv = 1d0/dble(nPSpoints)
639 if (inclde) niter = niter+1d0
640@@ -226,8 +215,8 @@
641 c intermediate stages this function can be called (together with
642 c HwU_output) to write intermediate plots to disk.
643 subroutine finalize_histograms(nPSpoints)
644+ use HwU_variables
645 implicit none
646- include "HwU.inc"
647 integer label,nPSpoints,i,j
648 double precision nPSinv,niter,dummy(2)
649 nPSinv=1d0/dble(nPSpoints)
650@@ -257,13 +246,13 @@
651 c histograms the central value should not be zero if any of the other
652 c weights are non-zero.
653 subroutine accumulate_results(label,nPSinv,niter,values)
654+ use HwU_variables
655 implicit none
656- include "HwU.inc"
657 integer label,i,j
658- double precision nPSinv,etot,vtot(max_wgts),niter,y_squared
659+ double precision nPSinv,etot,niter,y_squared
660 $ ,values(2),a1,a2
661- integer error_estimation
662- common /HwU_common2/ error_estimation
663+ double precision,allocatable :: vtot(:)
664+ if (.not. allocated(vtot)) allocate(vtot(nwgts))
665 if (error_estimation.eq.2) then
666 c Use the weighted average bin-by-bin. This is not really justified
667 c for fNLO computations, because for bins with low statistics, the
668@@ -395,14 +384,15 @@
669 c Write the histograms to disk at the end of the run, multiplying the
670 c output by 'xnorm'
671 subroutine HwU_output(unit,xnorm)
672+ use HwU_variables
673 implicit none
674- include "HwU.inc"
675 integer unit,i,j,label
676 integer max_length
677- parameter (max_length=(max_wgts+3)*17)
678- character*(max_length) buffer
679+ character(len=:), allocatable :: buffer
680 character*4 str_nbin
681 double precision xnorm
682+ if (.not. allocated(buffer))
683+ & allocate(character(len=(nwgts+3)*17) :: buffer)
684 c column info: x_min, x_max, y (central value), dy, {extra
685 c weights}.
686 write (unit,'(a$)') '##& xmin'
687@@ -440,9 +430,156 @@
688 write (unit,'(a)') ''
689 write (unit,'(a)') ''
690 enddo
691- return
692- end
693-
694+ deallocate(buffer)
695+ return
696+ end
697+
698+c Clean all the allocatable variables:
699+ subroutine HwU_deallocate_all
700+ use HwU_variables
701+ implicit none
702+ if (allocated(wgts_info)) deallocate(wgts_info)
703+ if (allocated(booked)) deallocate(booked)
704+ if (allocated(title)) deallocate(title)
705+ if (allocated(nbin)) deallocate(nbin)
706+ if (allocated(step)) deallocate(step)
707+ if (allocated(histxl)) deallocate(histxl)
708+ if (allocated(histxm)) deallocate(histxm)
709+ if (allocated(histy)) deallocate(histy)
710+ if (allocated(histy_acc)) deallocate(histy_acc)
711+ if (allocated(histi)) deallocate(histi)
712+ if (allocated(histy2)) deallocate(histy2)
713+ if (allocated(histy_err)) deallocate(histy_err)
714+ if (allocated(p_bin)) deallocate(p_bin)
715+ if (allocated(p_label)) deallocate(p_label)
716+ if (allocated(p_wgts)) deallocate(p_wgts)
717+ return
718+ end
719+
720+
721+ subroutine HwU_allocate_p
722+ use HwU_variables
723+ implicit none
724+ integer,allocatable :: itemp1(:)
725+ double precision, allocatable :: temp2(:,:)
726+ if (.not. allocated(p_bin)) then
727+ allocate(p_bin(max_plots))
728+ allocate(p_label(max_plots))
729+ allocate(p_wgts(nwgts,max_plots))
730+ max_points=max_plots
731+ else
732+ if (np.gt.max_points) then
733+c p_bin
734+ allocate(itemp1(np+max_plots))
735+ itemp1(1:max_points)=p_bin
736+ call move_alloc(itemp1,p_bin)
737+
738+c p_label
739+ allocate(itemp1(np+max_plots))
740+ itemp1(1:max_points)=p_label
741+ call move_alloc(itemp1,p_label)
742+c p_wgts
743+ allocate(temp2(nwgts,np+max_plots))
744+ temp2(1:nwgts,1:max_points)=p_wgts
745+ call move_alloc(temp2,p_wgts)
746+ max_points=np+max_plots
747+ endif
748+ endif
749+ return
750+ end
751+
752+ subroutine HwU_allocate_histo(label,nbin_l)
753+ use HwU_variables
754+ implicit none
755+ logical,allocatable :: ltemp(:)
756+ integer,allocatable :: itemp1(:),itemp2(:,:)
757+ character(len=50),allocatable :: ctemp(:)
758+ double precision, allocatable :: temp1(:),temp2(:,:),temp3(:,:,:)
759+ integer label,i,nbin_l,label_max,nbin_max
760+ logical debug
761+ parameter (debug=.true.)
762+c Check if variables are already allocated. If not, simply allocate a
763+c single histogram
764+ if (.not. allocated(booked)) then
765+ allocate(booked(1))
766+ booked(1)=.false.
767+ allocate(title(1))
768+ allocate(nbin(1))
769+ allocate(step(1))
770+ allocate(histxl(1,nbin_l))
771+ allocate(histxm(1,nbin_l))
772+ allocate(histy(nwgts,1,nbin_l))
773+ allocate(histy_acc(nwgts,1,nbin_l))
774+ allocate(histi(1,nbin_l))
775+ allocate(histy2(1,nbin_l))
776+ allocate(histy_err(1,nbin_l))
777+ max_plots=1
778+ max_bins=nbin_l
779+ endif
780+c If current label is greater than the plots already allocated, increase
781+c the size of the allocated arrays. This is kind of slow, but shouldn't
782+c really matter since it's only done at the start of a run.
783+ if (label.gt.max_plots .or. nbin_l.gt.max_bins) then
784+ label_max=max(label,max_plots)
785+ nbin_max=max(nbin_l,max_bins)
786+c booked
787+ allocate(ltemp(label_max))
788+ ltemp(1:max_plots)=booked
789+ call move_alloc(ltemp,booked)
790+ do i=max_plots+1,label_max
791+ booked(i)=.false. ! histos have not yet been setup
792+ enddo
793+c title
794+ allocate(ctemp(label_max))
795+ ctemp(1:max_plots)=title
796+ call move_alloc(ctemp,title)
797+c nbin
798+ allocate(itemp1(label_max))
799+ itemp1(1:max_plots)=nbin
800+ call move_alloc(itemp1,nbin)
801+c step
802+ allocate(temp1(label_max))
803+ temp1(1:max_plots)=step
804+ call move_alloc(temp1,step)
805+c histxl
806+ allocate(temp2(label_max,nbin_max))
807+ temp2(1:max_plots,1:max_bins)=histxl
808+ call move_alloc(temp2,histxl)
809+c histxm
810+ allocate(temp2(label_max,nbin_max))
811+ temp2(1:max_plots,1:max_bins)=histxm
812+ call move_alloc(temp2,histxm)
813+c histy
814+ allocate(temp3(nwgts,label_max,nbin_max))
815+ temp3(1:nwgts,1:max_plots,1:max_bins)=histy
816+ call move_alloc(temp3,histy)
817+c histy_acc
818+ allocate(temp3(nwgts,label_max,nbin_max))
819+ temp3(1:nwgts,1:max_plots,1:max_bins)=histy_acc
820+ call move_alloc(temp3,histy_acc)
821+c histi
822+ allocate(itemp2(label_max,nbin_max))
823+ itemp2(1:max_plots,1:max_bins)=histi
824+ call move_alloc(itemp2,histi)
825+c histy2
826+ allocate(temp2(label_max,nbin_max))
827+ temp2(1:max_plots,1:max_bins)=histy2
828+ call move_alloc(temp2,histy2)
829+c histy_err
830+ allocate(temp2(label_max,nbin_max))
831+ temp2(1:max_plots,1:max_bins)=histy_err
832+ call move_alloc(temp2,histy_err)
833+c Update maximums
834+ max_plots=label_max
835+ max_bins=nbin_max
836+ elseif (booked(label)) then
837+ write (*,*) 'ERROR in HwU.f: histogram already booked',label
838+ stop
839+ endif
840+ return
841+ end
842+
843+
844 c dummy subroutine
845 subroutine accum(idummy)
846 integer idummy
847@@ -451,3 +588,6 @@
848 subroutine addfil(string)
849 character*(*) string
850 end
851+
852+
853+
854
855=== removed file 'Template/NLO/FixedOrderAnalysis/HwU.inc'
856--- Template/NLO/FixedOrderAnalysis/HwU.inc 2016-02-18 14:05:45 +0000
857+++ Template/NLO/FixedOrderAnalysis/HwU.inc 1970-01-01 00:00:00 +0000
858@@ -1,22 +0,0 @@
859-* -*-fortran-*-
860-
861- integer max_plots,max_bins,max_wgts,max_points
862- parameter (max_plots=200)
863- parameter (max_bins=100)
864- parameter (max_wgts=1024)
865- parameter (max_points=max_plots*40)
866-
867- logical booked(max_plots)
868- integer nbin(max_plots),nwgts,np,p_bin(max_points)
869- & ,p_label(max_points),histi(max_plots,max_bins)
870- character*50 title(max_plots)
871- character*50 wgts_info(max_wgts)
872- double precision histy(max_wgts,max_plots,max_bins)
873- $ ,histy_acc(max_wgts,max_plots,max_bins),histy2(max_plots
874- $ ,max_bins),histy_err(max_plots,max_bins),histxl(max_plots
875- $ ,max_bins),histxm(max_plots,max_bins),step(max_plots)
876- $ ,p_wgts(max_wgts,max_points)
877-
878- common/HwU_common/histy,histy_acc,histy2,histy_err,histxl,histxm
879- & ,p_wgts,step,histi,nbin,p_bin,p_label,np,nwgts
880- & ,booked,title,wgts_info
881
882=== modified file 'Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f'
883--- Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f 2014-12-03 11:51:14 +0000
884+++ Template/NLO/FixedOrderAnalysis/analysis_HwU_template.f 2017-07-13 10:23:41 +0000
885@@ -17,12 +17,12 @@
886 c o) The first argument is an integer that labels the histogram. In
887 c the analysis_end and analysis_fill subroutines this label is used
888 c to keep track of the histogram. The label should be a number
889-c between 1 and max_plots=200 (can be increased in HwU.inc).
890+c starting at 1 and be increased for each plot.
891 c o) The second argument is a string that will apear above the
892 c histogram. Do not use brackets "(" or ")" inside this string.
893 c o) The third, forth and fifth arguments are the number of bis, the
894 c lower edge of the first bin and the upper edge of the last
895-c bin. There is a maximum of 100 bins per histogram.
896+c bin.
897 c o) When including scale and/or PDF uncertainties, declare a
898 c histogram for each weight, and compute the uncertainties from the
899 c final set of histograms
900
901=== removed symlink 'Template/NLO/MCatNLO/include/HwU.inc'
902=== target was u'../../FixedOrderAnalysis/HwU.inc'
903=== modified file 'Template/NLO/SubProcesses/check_poles.f'
904--- Template/NLO/SubProcesses/check_poles.f 2017-04-13 09:51:06 +0000
905+++ Template/NLO/SubProcesses/check_poles.f 2017-07-13 10:23:41 +0000
906@@ -183,6 +183,7 @@
907 enddo
908 enddo
909
910+ CALL UPDATE_AS_PARAM()
911 call sborn(p_born, born)
912 call sloopmatrix_thres(p_born,virt_wgts,tolerance,
913 1 accuracies,return_code)
914
915=== modified file 'Template/NLO/SubProcesses/collect_events.f'
916--- Template/NLO/SubProcesses/collect_events.f 2016-02-24 12:45:15 +0000
917+++ Template/NLO/SubProcesses/collect_events.f 2017-07-13 10:23:41 +0000
918@@ -1,6 +1,6 @@
919 program collect_events
920 implicit none
921- character*120 string120,eventfile
922+ character*512 string512,eventfile
923 character*19 basicfile,nextbasicfile
924 character*15 outputfile
925 integer istep,i,numoffiles,nbunches,nevents,ievents,junit(80)
926@@ -65,9 +65,9 @@
927 nevents=0
928 xtotal=0.d0
929 do while (.true.)
930- read(10,'(120a)',err=2,end=2) string120
931- eventfile=string120(2:index(string120,' '))
932- read(string120(index(string120,' '):120),*)
933+ read(10,'(512a)',err=2,end=2) string512
934+ eventfile=string512(2:index(string512,' '))
935+ read(string512(index(string512,' '):512),*)
936 $ ievents,absxsec,xsecfrac
937 if (ievents.eq.0) cycle
938 nevents=nevents+ievents
939
940=== modified file 'Template/NLO/SubProcesses/driver_mintFO.f'
941--- Template/NLO/SubProcesses/driver_mintFO.f 2017-05-09 11:54:11 +0000
942+++ Template/NLO/SubProcesses/driver_mintFO.f 2017-07-13 10:23:41 +0000
943@@ -505,6 +505,7 @@
944
945 subroutine update_fks_dir(nFKS)
946 implicit none
947+ include 'run.inc'
948 integer nFKS
949 integer nFKSprocess
950 common/c_nFKSprocess/nFKSprocess
951@@ -513,6 +514,7 @@
952 call leshouche_inc_chooser()
953 call setcuts
954 call setfksfactor(.false.)
955+ if (ickkw.eq.3) call configs_and_props_inc_chooser()
956 return
957 end
958
959
960=== modified file 'Template/NLO/SubProcesses/driver_mintMC.f'
961--- Template/NLO/SubProcesses/driver_mintMC.f 2017-05-09 12:41:29 +0000
962+++ Template/NLO/SubProcesses/driver_mintMC.f 2017-07-13 10:23:41 +0000
963@@ -719,14 +719,7 @@
964 c
965 c Here I want to set up with B.W. we map and which we don't
966 c
967- dconfig = dconfig-iconfig
968- if (dconfig .eq. 0) then
969- write(*,*) 'Not subdividing B.W.'
970- lbw(0)=0
971- else
972- write(*,*) 'Error BW setting: not supported at NLO'
973- stop 1
974- endif
975+ lbw(0)=0
976 10 format( a)
977 12 format( a,i4)
978 end
979@@ -1207,6 +1200,7 @@
980
981 subroutine update_fks_dir(nFKS)
982 implicit none
983+ include 'run.inc'
984 integer nFKS
985 integer nFKSprocess
986 common/c_nFKSprocess/nFKSprocess
987@@ -1215,6 +1209,7 @@
988 call leshouche_inc_chooser()
989 call setcuts
990 call setfksfactor(.true.)
991+ if (ickkw.eq.3) call configs_and_props_inc_chooser()
992 return
993 end
994
995
996=== modified file 'Template/RWGTNLO/makefile'
997--- Template/RWGTNLO/makefile 2016-05-26 23:36:59 +0000
998+++ Template/RWGTNLO/makefile 2017-07-13 10:23:41 +0000
999@@ -10,7 +10,7 @@
1000 rwgt2py.so: rwgt.f makefile $(LIBS)
1001 touch __init__.py
1002 touch ../__init__.py
1003- $(F2PY) $(LINKLIBS) $(LDFLAGS) -c $(RWGT) -m rwgt2py --fcompiler=$(FC)
1004+ $(F2PY) $(LINKLIBS) $(LDFLAGS) -c $(RWGT) -m rwgt2py --f77exec=$(FC)
1005
1006 $(LIBS):
1007 cd PDF; make
1008
1009=== modified file 'UpdateNotes.txt'
1010--- UpdateNotes.txt 2017-05-24 22:17:29 +0000
1011+++ UpdateNotes.txt 2017-07-13 10:23:41 +0000
1012@@ -1,6 +1,14 @@
1013 Update notes for MadGraph5_aMC@NLO (in reverse time order)
1014
1015-2.5.5(25/05/17)
1016+2.5.6 (XX/XX/XX)
1017+ OM: Fixing an issue, leading to NAN for some of the channel of integration for complicated processes.
1018+ RF: Refactor of the HwU.f fortran code. Gives more flexibility and potentially lower
1019+ memory requirements.
1020+ RF: Fixed bug #1694548 (problem with NLO for QCD-charged heavy vector bosons)
1021+ RF: Another fix (adding on a fix in 2.5.5) related to FxFx merging in case there are
1022+ diagrams with 1->3 decays
1023+
1024+2.5.5(26/05/17)
1025 OM: Fixing bug in the creation of the LO gridpack introduced in 2.4.3. Since 2.4.3 the generated
1026 gridpack were lacking to include the generated grid for each channel. This does not lead to
1027 bias but to a significant slow down of the associated gridpack.
1028
1029=== modified file 'VERSION'
1030--- VERSION 2017-05-24 22:17:29 +0000
1031+++ VERSION 2017-07-13 10:23:41 +0000
1032@@ -1,5 +1,6 @@
1033-version = 2.5.5
1034-date = 2017-05-25
1035+version = 2.5.6.beta
1036+date = 2017-05-26
1037+
1038
1039
1040
1041
1042=== modified file 'aloha/create_aloha.py'
1043--- aloha/create_aloha.py 2017-02-23 11:28:51 +0000
1044+++ aloha/create_aloha.py 2017-07-13 10:23:41 +0000
1045@@ -407,19 +407,22 @@
1046 @staticmethod
1047 def mod_propagator_expression(tag, text):
1048 """Change the index of the propagator to match the current need"""
1049- data = re.split(r'(\b[a-zA-Z]\w*?)\(([\'\w,\s]*?)\)',text)
1050
1051+ data = re.split(r'(\b[a-zA-Z]\w*?)\(([\'\w,\s\"\+\-]*?)\)',text)
1052+ to_change = {}
1053+ for old, new in tag.items():
1054+ if isinstance(new, str):
1055+ new='\'%s\'' % new
1056+ else:
1057+ new = str(new)
1058+ to_change[r'%s' % old] = new
1059 pos=-2
1060 while pos +3 < len(data):
1061 pos = pos+3
1062 ltype = data[pos]
1063 if ltype != 'complex':
1064- for old, new in tag.items():
1065- if isinstance(new, str):
1066- new='\'%s\'' % new
1067- else:
1068- new = str(new)
1069- data[pos+1] = re.sub(r'\b%s\b' % old, new, data[pos+1])
1070+ data[pos+1] = re.sub(r'\b(?<!-)(%s)\b' % '|'.join(to_change),
1071+ lambda x: to_change[x.group()], data[pos+1])
1072 data[pos+1] = '(%s)' % data[pos+1]
1073 text=''.join(data)
1074 return text
1075
1076=== modified file 'madgraph/interface/amcatnlo_run_interface.py'
1077--- madgraph/interface/amcatnlo_run_interface.py 2017-05-15 09:41:27 +0000
1078+++ madgraph/interface/amcatnlo_run_interface.py 2017-07-13 10:23:41 +0000
1079@@ -1265,7 +1265,8 @@
1080 if self.param_card_iterator:
1081 param_card_iterator = self.param_card_iterator
1082 self.param_card_iterator = [] #avoid to next generate go trough here
1083- param_card_iterator.store_entry(self.run_name, self.results.current['cross'])
1084+ param_card_iterator.store_entry(self.run_name, self.results.current['cross'],
1085+ error=self.results.current['error'])
1086 orig_name = self.run_name
1087 #go trough the scal
1088 with misc.TMP_variable(self, 'allow_notification_center', False):
1089@@ -1282,7 +1283,8 @@
1090 argss[0] = mode
1091 self.do_launch("", options=options, argss=argss, switch=switch)
1092 #self.exec_cmd("launch -f ",precmd=True, postcmd=True,errorhandling=False)
1093- param_card_iterator.store_entry(self.run_name, self.results.current['cross'])
1094+ param_card_iterator.store_entry(self.run_name, self.results.current['cross'],
1095+ error=self.results.current['error'])
1096 #restore original param_card
1097 param_card_iterator.write(pjoin(self.me_dir,'Cards','param_card.dat'))
1098 name = misc.get_scan_name(orig_name, self.run_name)
1099
1100=== modified file 'madgraph/interface/common_run_interface.py'
1101--- madgraph/interface/common_run_interface.py 2017-05-24 22:17:29 +0000
1102+++ madgraph/interface/common_run_interface.py 2017-07-13 10:23:41 +0000
1103@@ -110,13 +110,11 @@
1104 logger.info(" by condor cluster (since condor has it's own way to prevent it).")
1105
1106 def help_plot(self):
1107- logger.info("syntax: help [RUN] [%s] [-f]" % '|'.join(self._plot_mode))
1108+ logger.info("syntax: plot [RUN] [%s] [-f]" % '|'.join(self._plot_mode))
1109 logger.info("-- create the plot for the RUN (current run by default)")
1110 logger.info(" at the different stage of the event generation")
1111 logger.info(" Note than more than one mode can be specified in the same command.")
1112- logger.info(" This require to have MadAnalysis and td require. By default")
1113- logger.info(" if those programs are installed correctly, the creation")
1114- logger.info(" will be performed automaticaly during the event generation.")
1115+ logger.info(" This requires to have MadAnalysis and td installed.")
1116 logger.info(" -f options: answer all question by default.")
1117
1118 def help_compute_widths(self):
1119@@ -645,9 +643,7 @@
1120 fsock = open(pjoin(me_dir,'RunWeb'),'w')
1121 fsock.write(`pid`)
1122 fsock.close()
1123-
1124- misc.Popen([os.path.relpath(pjoin(self.dirbin, 'gen_cardhtml-pl'), me_dir)],
1125- cwd=me_dir)
1126+ self.gen_card_html()
1127
1128 self.to_store = []
1129 self.run_name = None
1130@@ -749,6 +745,16 @@
1131 def do_treatcards(self, line, amcatnlo=False):
1132 """Advanced commands: create .inc files from param_card.dat/run_card.dat"""
1133
1134+
1135+ #ensure that the cluster/card are consistent
1136+ if hasattr(self, 'run_card'):
1137+ self.cluster.modify_interface(self)
1138+ else:
1139+ try:
1140+ self.cluster.modify_interface(self)
1141+ except Exception, error:
1142+ misc.sprint(str(error))
1143+
1144 keepwidth = False
1145 if '--keepwidth' in line:
1146 keepwidth = True
1147@@ -758,10 +764,7 @@
1148
1149 if mode in ['run', 'all']:
1150 if not hasattr(self, 'run_card'):
1151- if amcatnlo:
1152- run_card = banner_mod.RunCardNLO(opt['run_card'])
1153- else:
1154- run_card = banner_mod.RunCard(opt['run_card'])
1155+ run_card = banner_mod.RunCard(opt['run_card'])
1156 else:
1157 run_card = self.run_card
1158
1159@@ -1164,6 +1167,17 @@
1160 auto_open=False)
1161 return True
1162
1163+ def gen_card_html(self):
1164+ """ """
1165+ devnull = open(os.devnull, 'w')
1166+ try:
1167+ misc.call(['./bin/internal/gen_cardhtml-pl'], cwd=self.me_dir,
1168+ stdout=devnull, stderr=devnull)
1169+ except Exception:
1170+ pass
1171+ devnull.close()
1172+
1173+
1174 def create_plot(self, mode='parton', event_path=None, output=None, tag=None):
1175 """create the plot"""
1176
1177@@ -2216,7 +2230,8 @@
1178 #===============================================================================
1179 @staticmethod
1180 def get_MadAnalysis5_interpreter(mg5_path, ma5_path, mg5_interface=None,
1181- logstream = sys.stdout, loglevel =logging.INFO, forced = True):
1182+ logstream = sys.stdout, loglevel =logging.INFO, forced = True,
1183+ compilation=False):
1184 """ Makes sure to correctly setup paths and constructs and return an MA5 path"""
1185
1186 MA5path = os.path.normpath(pjoin(mg5_path,ma5_path))
1187@@ -2240,7 +2255,8 @@
1188 with misc.stdchannel_redirected(sys.stdout, os.devnull):
1189 with misc.stdchannel_redirected(sys.stderr, os.devnull):
1190 MA5_interpreter = MA5Interpreter(MA5path, LoggerLevel=loglevel,
1191- LoggerStream=logstream,forced=forced, no_compilation=True)
1192+ LoggerStream=logstream,forced=forced,
1193+ no_compilation=not compilation)
1194 except Exception as e:
1195 logger.warning('MadAnalysis5 failed to start so that MA5 analysis will be skipped.')
1196 error=StringIO.StringIO()
1197@@ -2579,7 +2595,8 @@
1198 self.options['madanalysis5_path'],
1199 logstream=sys.stdout,
1200 loglevel=100,
1201- forced=True)
1202+ forced=True,
1203+ compilation=True)
1204
1205
1206 # If failed to start MA5, then just leave
1207@@ -3069,9 +3086,9 @@
1208 logger.info("cluster handling will be done with PLUGIN: %s" % plug,'$MG:color:BLACK')
1209 self.cluster = plugin.new_cluster[cluster_name](**opt)
1210 break
1211- else:
1212- continue
1213- break
1214+ else:
1215+ continue
1216+ break
1217 else:
1218 raise self.InvalidCmd, "%s is not recognized as a supported cluster format." % cluster_name
1219
1220@@ -3186,14 +3203,8 @@
1221 self.update_status('', level=None)
1222 except Exception, error:
1223 pass
1224- devnull = open(os.devnull, 'w')
1225- try:
1226- misc.call(['./bin/internal/gen_cardhtml-pl'], cwd=self.me_dir,
1227- stdout=devnull, stderr=devnull)
1228- except Exception:
1229- pass
1230- devnull.close()
1231
1232+ self.gen_card_html()
1233 return super(CommonRunCmd, self).do_quit(line)
1234
1235 # Aliases
1236@@ -5224,9 +5235,9 @@
1237 if extrapaths:
1238 self.do_set('shower_card extrapaths %s ' % ' '.join(extrapaths))
1239 else:
1240- self.do_set('shower_card extrapaths None ')
1241-
1242-
1243+ self.do_set('shower_card extrapaths None ')
1244+
1245+
1246 def reask(self, *args, **opt):
1247
1248 cmd.OneLinePathCompletion.reask(self,*args, **opt)
1249@@ -5550,7 +5561,7 @@
1250 fsock.write(text)
1251 self.reload_card(path)
1252
1253-
1254+
1255
1256 def do_compute_widths(self, line):
1257 signal.alarm(0) # avoid timer if any
1258
1259=== modified file 'madgraph/interface/extended_cmd.py'
1260--- madgraph/interface/extended_cmd.py 2017-04-06 21:08:27 +0000
1261+++ madgraph/interface/extended_cmd.py 2017-07-13 10:23:41 +0000
1262@@ -1150,14 +1150,15 @@
1263 raise 'No such file or directory %s' % args[1]
1264
1265
1266- def check_answer_in_input_file(self, question_instance, default, path=False):
1267+ def check_answer_in_input_file(self, question_instance, default, path=False, line=None):
1268 """Questions can have answer in output file (or not)"""
1269
1270 if not self.inputfile:
1271 return None# interactive mode
1272
1273- line = self.get_stored_line()
1274- # line define if a previous answer was not answer correctly
1275+ if line is None:
1276+ line = self.get_stored_line()
1277+ # line define if a previous answer was not answer correctly
1278 if not line:
1279 try:
1280 line = self.inputfile.next()
1281@@ -1198,6 +1199,12 @@
1282 possibility = [opt for opt in options if line.lower()==opt.lower()]
1283 if len (possibility)==1:
1284 return possibility[0]
1285+ if '=' in line and ' ' in line.strip():
1286+ line,n = re.subn('\s*=\s*','=', line)
1287+ if n:
1288+ return self.check_answer_in_input_file(question_instance, default, path=path, line=line)
1289+
1290+
1291
1292 # No valid answer provides
1293 if self.haspiping:
1294@@ -1205,8 +1212,8 @@
1295 return None # print the question and use the pipe
1296 else:
1297 logger.info(question_instance.question)
1298- logger.warning('The answer to the previous question is not set in your input file')
1299- logger.warning('Use %s value' % default)
1300+ logger.warning('found line : %s' % line)
1301+ logger.warning('This answer is not valid for current question. Keep it for next question and use here default: %s', default)
1302 self.store_line(line)
1303 return str(default)
1304
1305@@ -2135,7 +2142,12 @@
1306 return self.reask()
1307 elif len(self.allow_arg)==0:
1308 return True
1309- elif not self.casesensitive:
1310+ elif ' ' in line.strip() and '=' in self.value:
1311+ line,n = re.subn(r'\s*=\s*', '=', line)
1312+ if n:
1313+ self.default(line)
1314+ return self.postcmd(stop, line)
1315+ if not self.casesensitive:
1316 for ans in self.allow_arg:
1317 if ans.lower() == self.value.lower():
1318 self.value = ans
1319@@ -2143,6 +2155,8 @@
1320 break
1321 else:
1322 raise Exception
1323+
1324+
1325 else:
1326 raise Exception
1327 except Exception,error:
1328
1329=== modified file 'madgraph/interface/loop_interface.py'
1330--- madgraph/interface/loop_interface.py 2017-04-06 21:08:27 +0000
1331+++ madgraph/interface/loop_interface.py 2017-07-13 10:23:41 +0000
1332@@ -890,7 +890,8 @@
1333 local_installer = ['ninja', 'collier']
1334 required = ['cuttools', 'iregi']
1335 order = ['cuttools', 'iregi', 'ninja', 'collier', 'golem', 'pjfry']
1336-
1337+ bypassed = ['pjfry']
1338+
1339 @property
1340 def answer(self):
1341 return self.code
1342@@ -971,6 +972,8 @@
1343 'required': 'will be installed (required)'}
1344
1345 for i,key in enumerate(self.order,1):
1346+ if key in self.bypassed and self.code[key] == 'off':
1347+ continue
1348 if os.path.sep not in self.code[key]:
1349 question += '%s. %%(start_blue)s%-9s %-5s %-13s%%(stop)s : %s%s\n' % \
1350 tuple([i,]+descript[key]+[status[self.code[key]],]+\
1351
1352=== modified file 'madgraph/interface/madevent_interface.py'
1353--- madgraph/interface/madevent_interface.py 2017-05-03 09:21:01 +0000
1354+++ madgraph/interface/madevent_interface.py 2017-07-13 10:23:41 +0000
1355@@ -425,6 +425,11 @@
1356 self.run_options_help([("--" + key,value[-1]) for (key,value) in \
1357 self._survey_options.items()])
1358
1359+
1360+ def help_restart_gridpack(self):
1361+ logger.info("syntax: restart_gridpack --precision= --restart_zero")
1362+
1363+
1364 def help_launch(self):
1365 """exec generate_events for 2>N and calculate_width for 1>N"""
1366 logger.info("syntax: launch [run_name] [options])")
1367@@ -2014,6 +2019,57 @@
1368 return
1369
1370 ############################################################################
1371+
1372+ ############################################################################
1373+ def do_restart_gridpack(self, line):
1374+ """ syntax restart_gridpack --precision=1.0 --restart_zero
1375+ collect the result of the current run and relaunch each channel
1376+ not completed or optionally a completed one with a precision worse than
1377+ a threshold (and/or the zero result channel)"""
1378+
1379+
1380+ args = self.split_arg(line)
1381+ # Check argument's validity
1382+ self.check_survey(args)
1383+
1384+ # initialize / remove lhapdf mode
1385+ #self.run_card = banner_mod.RunCard(pjoin(self.me_dir, 'Cards', 'run_card.dat'))
1386+ #self.configure_directory()
1387+
1388+ gensym = gen_ximprove.gensym(self)
1389+
1390+ min_precision = 1.0
1391+ resubmit_zero=False
1392+ if '--precision=' in line:
1393+ s = line.index('--precision=') + len('--precision=')
1394+ arg=line[s:].split(1)[0]
1395+ min_precision = float(arg)
1396+
1397+ if '--restart_zero' in line:
1398+ resubmit_zero = True
1399+
1400+
1401+ gensym.resubmit(min_precision, resubmit_zero)
1402+ self.monitor(run_type='All jobs submitted for gridpack', html=True)
1403+
1404+ #will be done during the refine (more precisely in gen_ximprove)
1405+ cross, error = sum_html.make_all_html_results(self)
1406+ self.results.add_detail('cross', cross)
1407+ self.results.add_detail('error', error)
1408+ self.exec_cmd("print_results %s" % self.run_name,
1409+ errorhandling=False, printcmd=False, precmd=False, postcmd=False)
1410+
1411+ self.results.add_detail('run_statistics', dict(gensym.run_statistics))
1412+
1413+
1414+ #self.exec_cmd('combine_events', postcmd=False)
1415+ #self.exec_cmd('store_events', postcmd=False)
1416+ self.exec_cmd('decay_events -from_cards', postcmd=False)
1417+ self.exec_cmd('create_gridpack', postcmd=False)
1418+
1419+
1420+
1421+ ############################################################################
1422
1423 ############################################################################
1424 def do_generate_events(self, line):
1425@@ -2633,12 +2689,14 @@
1426 run_card = banner_mod.RunCard(opt['run_card'])
1427 else:
1428 run_card = self.run_card
1429+ self.run_card = run_card
1430+ self.cluster.modify_interface(self)
1431 if self.ninitial == 1:
1432 run_card['lpp1'] = 0
1433 run_card['lpp2'] = 0
1434 run_card['ebeam1'] = 0
1435 run_card['ebeam2'] = 0
1436-
1437+
1438 # Ensure that the bias parameters has all the required input from the
1439 # run_card
1440 if run_card['bias_module'].lower() not in ['dummy','none']:
1441@@ -2887,7 +2945,6 @@
1442 self.pass_in_difficult_integration_mode()
1443
1444 jobs, P_zero_result = ajobcreator.launch()
1445-
1446 # Check if all or only some fails
1447 if P_zero_result:
1448 if len(P_zero_result) == len(subproc):
1449@@ -3279,10 +3336,15 @@
1450 bannerfile = lhe_parser.EventFile(pjoin(self.me_dir, 'Events', self.run_name, '.banner.tmp.gz'),'w')
1451 banner = banner_mod.Banner(lhe.banner)
1452 banner.modify_init_cross(cross)
1453+ banner.set_lha_strategy(-4)
1454 banner.write(bannerfile, close_tag=False)
1455 bannerfile.close()
1456 # replace the lhe file by the new one
1457- os.system('cat %s %s > %s' %(bannerfile.name, output.name, lhe.name))
1458+ if lhe.name.endswith('.gz'):
1459+ os.system('cat %s %s > %s' %(bannerfile.name, output.name, lhe.name))
1460+ else:
1461+ os.system('cat %s %s > %s.gz' %(bannerfile.name, output.name, lhe.name))
1462+ os.remove(lhe.name)
1463 os.remove(bannerfile.name)
1464 os.remove(output.name)
1465
1466@@ -3365,9 +3427,8 @@
1467 os.remove(pjoin(G_path, 'ftn25'))
1468
1469 # 3) Update the index.html
1470- misc.call(['%s/gen_cardhtml-pl' % self.dirbin],
1471- cwd=pjoin(self.me_dir))
1472-
1473+ self.gen_card_html()
1474+
1475
1476 # 4) Move the Files present in Events directory
1477 E_path = pjoin(self.me_dir, 'Events')
1478@@ -4772,7 +4833,7 @@
1479 self.check_plot(args)
1480 logger.info('plot for run %s' % self.run_name)
1481 if not self.force:
1482- self.ask_edit_cards([], args, plot=True)
1483+ self.ask_edit_cards(['plot_card.dat'], args, plot=True)
1484
1485 if any([arg in ['all','parton'] for arg in args]):
1486 filename = pjoin(self.me_dir, 'Events', self.run_name, 'unweighted_events.lhe')
1487@@ -5148,7 +5209,9 @@
1488 #see when the last file was modified
1489 time_mod = max([os.path.getctime(pjoin(self.me_dir,'Cards','run_card.dat')),
1490 os.path.getctime(pjoin(self.me_dir,'Cards','param_card.dat'))])
1491- if self.configured > time_mod and hasattr(self, 'random'):
1492+ if self.configured > time_mod and hasattr(self, 'random') and hasattr(self, 'run_card'):
1493+ #just ensure that cluster specific are correctly handled
1494+ self.cluster.modify_interface(self)
1495 return
1496 else:
1497 self.configured = time.time()
1498@@ -5257,6 +5320,7 @@
1499 for nb_proc,subdir in enumerate(subproc):
1500 Pdir = pjoin(self.me_dir, 'SubProcesses',subdir.strip())
1501 self.compile(['clean'], cwd=Pdir)
1502+ self.configured = time.time()
1503
1504 ############################################################################
1505 ## HELPING ROUTINE
1506
1507=== modified file 'madgraph/interface/madgraph_interface.py'
1508--- madgraph/interface/madgraph_interface.py 2017-04-06 21:08:27 +0000
1509+++ madgraph/interface/madgraph_interface.py 2017-07-13 10:23:41 +0000
1510@@ -1193,7 +1193,7 @@
1511 if not args:
1512 if self._done_export:
1513 mode = self.find_output_type(self._done_export[0])
1514- if (self._done_export[1] == 'plugin' and mode not in self._export_formats):
1515+ if (self._done_export[1] == 'plugin' and mode in self._export_formats):
1516 args.append(mode)
1517 args.append(self._done_export[0])
1518 elif self._done_export[1].startswith(mode):
1519@@ -5057,6 +5057,8 @@
1520 try:
1521 self._curr_model = import_ufo.import_model(args[1], prefix=prefix,
1522 complex_mass_scheme=self.options['complex_mass_scheme'])
1523+ if os.path.sep in args[1] and "import" in self.history[-1]:
1524+ self.history[-1] = 'import model %s' % self._curr_model.get('modelpath+restriction')
1525 except import_ufo.UFOImportError, error:
1526 if 'not a valid UFO model' in str(error):
1527 logger_stderr.warning('WARNING: %s' % error)
1528
1529=== modified file 'madgraph/iolibs/export_fks.py'
1530--- madgraph/iolibs/export_fks.py 2017-05-09 13:42:19 +0000
1531+++ madgraph/iolibs/export_fks.py 2017-07-13 10:23:41 +0000
1532@@ -1009,6 +1009,13 @@
1533 (ifstring, part.get_pdg_code(), part.get_anti_pdg_code())
1534 iflines_width += 'get_width_from_id=abs(%s)\n' % part.get('width')
1535
1536+ # Make sure it compiles with an if-statement if the above lists are empty
1537+ if len(mass_particles)==0:
1538+ iflines_mass = 'if (.True.) then\n'
1539+
1540+ if len(width_particles)==0:
1541+ iflines_width = 'if (.True.) then\n'
1542+
1543 replace_dict = {'iflines_mass' : iflines_mass,
1544 'iflines_width' : iflines_width}
1545
1546@@ -2749,10 +2756,13 @@
1547 info_list = fks_born.get_fks_info_list()
1548 lines = []
1549 if info_list:
1550- # if the reals have been generated, fill with the corresponding value of ij
1551+ # if the reals have been generated, fill with the corresponding value of ij if
1552+ # ij is massless, or with 0 if ij is massive (no collinear singularity)
1553+ ij_list = [info['fks_info']['ij']if \
1554+ fks_born.born_matrix_element['processes'][0]['legs'][info['fks_info']['ij']-1]['massless'] \
1555+ else 0 for info in info_list]
1556 lines.append('INTEGER IJ_VALUES(%d)' % len(info_list))
1557- lines.append('DATA IJ_VALUES /' + \
1558- ', '.join(['%d' % info['fks_info']['ij'] for info in info_list]) + '/')
1559+ lines.append('DATA IJ_VALUES /' + ', '.join(['%d' % ij for ij in ij_list]) + '/')
1560 else:
1561 #otherwise just put the first leg
1562 lines.append('INTEGER IJ_VALUES(1)')
1563
1564=== modified file 'madgraph/iolibs/export_v4.py'
1565--- madgraph/iolibs/export_v4.py 2017-05-24 22:17:29 +0000
1566+++ madgraph/iolibs/export_v4.py 2017-07-13 10:23:41 +0000
1567@@ -639,10 +639,17 @@
1568 else:
1569 model_line='''$(LIBDIR)libmodel.$(libext): MODEL param_card.inc\n\tcd MODEL; make
1570 param_card.inc: ../Cards/param_card.dat\n\t../bin/madevent treatcards param\n'''
1571- text = open(path).read() % {'libraries': set_of_lib, 'model':model_line}
1572- writer.write(text)
1573-
1574- return True
1575+
1576+ replace_dict= {'libraries': set_of_lib,
1577+ 'model':model_line,
1578+ 'additional_dsample': '',
1579+ 'additional_dependencies':''}
1580+
1581+ if writer:
1582+ text = open(path).read() % replace_dict
1583+ writer.write(text)
1584+
1585+ return replace_dict
1586
1587 #===========================================================================
1588 # write_nexternal_madspin
1589@@ -2149,10 +2156,18 @@
1590 path = pjoin(_file_path,'iolibs','template_files','madevent_makefile_source')
1591 set_of_lib = '$(LIBDIR)libdhelas.$(libext) $(LIBDIR)libmodel.$(libext)'
1592 model_line='''$(LIBDIR)libmodel.$(libext): MODEL\n\t cd MODEL; make\n'''
1593- text = open(path).read() % {'libraries': set_of_lib, 'model':model_line}
1594- writer.write(text)
1595-
1596- return True
1597+
1598+ replace_dict= {'libraries': set_of_lib,
1599+ 'model':model_line,
1600+ 'additional_dsample': '',
1601+ 'additional_dependencies':''}
1602+
1603+ text = open(path).read() % replace_dict
1604+
1605+ if writer:
1606+ writer.write(text)
1607+
1608+ return replace_dict
1609
1610 #===========================================================================
1611 # write_matrix_element_v4
1612
1613=== modified file 'madgraph/iolibs/file_writers.py'
1614--- madgraph/iolibs/file_writers.py 2016-08-23 23:06:25 +0000
1615+++ madgraph/iolibs/file_writers.py 2017-07-13 10:23:41 +0000
1616@@ -19,6 +19,12 @@
1617
1618 import re
1619 import collections
1620+try:
1621+ import madgraph
1622+except ImportError:
1623+ import internal.misc
1624+else:
1625+ import madgraph.various.misc as misc
1626
1627 class FileWriter(file):
1628 """Generic Writer class. All writers should inherit from this class."""
1629@@ -392,6 +398,52 @@
1630 #===============================================================================
1631 # CPPWriter
1632 #===============================================================================
1633+
1634+
1635+ def remove_routine(self, text, fct_names, formatting=True):
1636+ """write the incoming text but fully removing the associate routine/function
1637+ text can be a path to a file, an iterator, a string
1638+ fct_names should be a list of functions to remove
1639+ """
1640+
1641+ f77_type = ['real*8', 'integer', 'double precision']
1642+ pattern = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \
1643+ % {'type':'|'.join(f77_type)}, re.I)
1644+
1645+ removed = []
1646+ if isinstance(text, str):
1647+ if '\n' in text:
1648+ text = text.split('\n')
1649+ else:
1650+ text = open(text)
1651+ if isinstance(fct_names, str):
1652+ fct_names = [fct_names]
1653+
1654+ to_write=True
1655+ for line in text:
1656+ fct = pattern.findall(line)
1657+ if fct:
1658+ if fct[0] in fct_names:
1659+ to_write = False
1660+ else:
1661+ to_write = True
1662+
1663+ if to_write:
1664+ if formatting:
1665+ if line.endswith('\n'):
1666+ line = line[:-1]
1667+ self.writelines(line)
1668+ else:
1669+ if not line.endswith('\n'):
1670+ line = '%s\n' % line
1671+ file.writelines(self, line)
1672+ else:
1673+ removed.append(line)
1674+
1675+ return removed
1676+
1677+
1678+
1679 class CPPWriter(FileWriter):
1680 """Routines for writing C++ lines. Keeps track of brackets,
1681 spaces, indentation and splitting of long lines"""
1682
1683=== modified file 'madgraph/iolibs/files.py'
1684--- madgraph/iolibs/files.py 2016-01-22 15:02:25 +0000
1685+++ madgraph/iolibs/files.py 2017-07-13 10:23:41 +0000
1686@@ -202,8 +202,12 @@
1687 starting_dir = os.path.join(cwd, starting_dir)
1688
1689 # Remove existing link if necessary
1690- if os.path.exists(os.path.join(starting_dir, name)):
1691- os.remove(os.path.join(starting_dir, name))
1692+ path = os.path.join(starting_dir, name)
1693+ if os.path.exists(path):
1694+ if os.path.realpath(path) != os.path.realpath(file_pos):
1695+ os.remove(os.path.join(starting_dir, name))
1696+ else:
1697+ return
1698
1699 if not abspath:
1700 target = os.path.relpath(file_pos, starting_dir)
1701
1702=== modified file 'madgraph/iolibs/template_files/born_fks.inc'
1703--- madgraph/iolibs/template_files/born_fks.inc 2017-05-09 13:46:36 +0000
1704+++ madgraph/iolibs/template_files/born_fks.inc 2017-07-13 10:23:41 +0000
1705@@ -58,6 +58,7 @@
1706 common/c_nfksprocess/nfksprocess
1707 double precision wgt_ME_born,wgt_ME_real
1708 common /c_wgt_ME_tree/ wgt_ME_born,wgt_ME_real
1709+ logical cond_ij
1710 C ----------
1711 C BEGIN CODE
1712 C ----------
1713@@ -65,11 +66,15 @@
1714 glu_ij = ij_values(nfksprocess)
1715 NTRY(nFKSprocess)=NTRY(nFKSprocess)+1
1716 if (NTRY(nFKSprocess).lt.2) then
1717+ if (glu_ij.eq.0) then
1718+ skip(nfksprocess)=0
1719+ else
1720 skip(nFKSprocess)=1
1721 do while(nhel(glu_ij ,skip(nFKSprocess)).ne.-NHEL(GLU_IJ ,1))
1722 skip(nFKSprocess)=skip(nFKSprocess)+1
1723 enddo
1724 skip(nFKSprocess)=skip(nFKSprocess)-1
1725+ endif
1726 endif
1727 DO JJ=1,NGRAPHS
1728 amp2(jj)=0d0
1729@@ -101,7 +106,11 @@
1730 ANS(2) = 0D0
1731 hel_fac=1d0
1732 DO IHEL=1,NCOMB
1733- if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1)) then
1734+ ! the following lines are to avoid segfaults when glu_ij=0
1735+ cond_ij=skip(nfksprocess).eq.0
1736+ if (.not.cond_ij) cond_ij=cond_ij.or.nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1)
1737+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
1738+ if (cond_ij) then
1739 IF ((GOODHEL(IHEL,nFKSprocess) .OR. GOODHEL(IHEL+SKIP(nFKSprocess),nFKSprocess) .OR. NTRY(nFKSprocess) .LT. 2) ) THEN
1740 ANS(1)=ANS(1)+BORN(P1,NHEL(1,IHEL),IHEL,BORNTILDE,borns)
1741 ANS(2)=ANS(2)+BORNTILDE
1742@@ -174,6 +183,7 @@
1743 integer nfksprocess
1744 common/c_nfksprocess/nfksprocess
1745 integer step_hel
1746+ logical cond_ij
1747 %(ij_lines)s
1748 C
1749 C COLOR DATA
1750@@ -188,20 +198,33 @@
1751 back_hel = nhel(glu_ij)
1752 borns(1) = 0d0
1753 borns(2) = 0d0
1754- if (back_hel.ne.0) then
1755- step_hel=-2*back_hel
1756+ if (glu_ij.ne.0) then
1757+ back_hel = nhel(glu_ij)
1758+ if (back_hel.ne.0) then
1759+ step_hel=-2*back_hel
1760+ else
1761+ step_hel=1
1762+ endif
1763 else
1764+ back_hel=0
1765 step_hel=1
1766 endif
1767 DO IHEL=back_hel,-back_hel,step_hel
1768- IF (IHEL.EQ.back_hel.OR.NHEL(GLU_IJ).NE.0) THEN
1769- if (nhel(glu_ij).ne.0) nhel(glu_ij) = ihel
1770+ if (glu_ij.ne.0) then
1771+ cond_ij=IHEL.EQ.back_hel.OR.NHEL(GLU_IJ).NE.0
1772+ else
1773+ cond_ij=IHEL.EQ.back_hel
1774+ endif
1775+ IF (cond_ij) THEN
1776+ if (glu_ij.ne.0) then
1777+ if (nhel(glu_ij).ne.0) nhel(glu_ij) = ihel
1778+ endif
1779 if (.not. calculatedBorn) then
1780 %(helas_calls)s
1781 do i=1,ngraphs
1782- if(ihel.eq.BACK_HEL)then
1783+ if(ihel.eq.back_hel)then
1784 saveamp(i,hell)=amp(i)
1785- elseif(ihel.eq.-BACK_HEL)then
1786+ elseif(ihel.eq.-back_hel)then
1787 saveamp(i,hell+skip(nFKSprocess))=amp(i)
1788 else
1789 write(*,*) "ERROR #1 in born.f"
1790@@ -210,9 +233,9 @@
1791 enddo
1792 elseif (calculatedBorn) then
1793 do i=1,ngraphs
1794- if(ihel.eq.BACK_HEL)then
1795+ if(ihel.eq.back_hel)then
1796 amp(i)=saveamp(i,hell)
1797- elseif(ihel.eq.-BACK_HEL)then
1798+ elseif(ihel.eq.-back_hel)then
1799 amp(i)=saveamp(i,hell+skip(nFKSprocess))
1800 else
1801 write(*,*) "ERROR #1 in born.f"
1802@@ -245,7 +268,7 @@
1803 ENDDO
1804 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
1805 ENDDO
1806- nhel(glu_ij) = back_hel
1807+ if (glu_ij.ne.0) nhel(glu_ij) = back_hel
1808 END
1809
1810
1811
1812=== modified file 'madgraph/iolibs/template_files/loop_optimized/helas_calls_split.inc'
1813--- madgraph/iolibs/template_files/loop_optimized/helas_calls_split.inc 2016-04-05 23:57:17 +0000
1814+++ madgraph/iolibs/template_files/loop_optimized/helas_calls_split.inc 2017-07-13 10:23:41 +0000
1815@@ -76,8 +76,8 @@
1816 %(complex_dp_format)s W(20,NWAVEFUNCS)
1817 common/%(proc_prefix)sW/W
1818
1819- %(complex_dp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,0:NLOOPWAVEFUNCS)
1820- %(complex_dp_format)s PL(0:3,0:NLOOPWAVEFUNCS)
1821+ %(complex_dp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,-1:NLOOPWAVEFUNCS)
1822+ %(complex_dp_format)s PL(0:3,-1:NLOOPWAVEFUNCS)
1823 common/%(proc_prefix)sWL/WL,PL
1824
1825 ## if(not AmplitudeReduction){
1826
1827=== modified file 'madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc'
1828--- madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2017-03-27 09:01:13 +0000
1829+++ madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2017-07-13 10:23:41 +0000
1830@@ -367,8 +367,8 @@
1831 %(complex_mp_format)s MPW(20,NWAVEFUNCS)
1832 common/%(proc_prefix)sMP_W/MPW
1833
1834- %(complex_dp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,0:NLOOPWAVEFUNCS)
1835- %(complex_dp_format)s PL(0:3,0:NLOOPWAVEFUNCS)
1836+ %(complex_dp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,-1:NLOOPWAVEFUNCS)
1837+ %(complex_dp_format)s PL(0:3,-1:NLOOPWAVEFUNCS)
1838 common/%(proc_prefix)sWL/WL,PL
1839
1840 ## if(not AmplitudeReduction){
1841@@ -597,12 +597,15 @@
1842
1843 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
1844 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
1845+C The index -1 is for the charge-conjugated fermions with flipped fermion flow.
1846 DO I=0,3
1847+ PL(I,-1)=DCMPLX(0.0d0,0.0d0)
1848 PL(I,0)=DCMPLX(0.0d0,0.0d0)
1849 ENDDO
1850 DO I=1,MAXLWFSIZE
1851 DO J=0,LOOPMAXCOEFS-1
1852 DO K=1,MAXLWFSIZE
1853+ WL(I,J,K,-1)=(0.0d0,0.0d0)
1854 IF(I.EQ.K.AND.J.EQ.0) then
1855 WL(I,J,K,0)=(1.0d0,0.0d0)
1856 ELSE
1857@@ -617,6 +620,13 @@
1858 ENDIF
1859 ENDIF
1860
1861+C This is the chare conjugate version of the unit 4-currents in the canonical cartesian basis.
1862+C This, for now, is only defined for 4-fermionic currents.
1863+WL(1,0,2,-1) = DCMPLX(-1.0d0,0.0d0)
1864+WL(2,0,1,-1) = DCMPLX(1.0d0,0.0d0)
1865+WL(3,0,4,-1) = DCMPLX(1.0d0,0.0d0)
1866+WL(4,0,3,-1) = DCMPLX(-1.0d0,0.0d0)
1867+
1868 C Make sure that lorentz rotation tests are not used if there is external loop wavefunction of spin 2 and that one specific helicity is asked
1869 NROTATIONS_DP_BU = NROTATIONS_DP
1870 NROTATIONS_QP_BU = NROTATIONS_QP
1871
1872=== modified file 'madgraph/iolibs/template_files/loop_optimized/mp_compute_loop_coefs.inc'
1873--- madgraph/iolibs/template_files/loop_optimized/mp_compute_loop_coefs.inc 2016-09-08 23:15:34 +0000
1874+++ madgraph/iolibs/template_files/loop_optimized/mp_compute_loop_coefs.inc 2017-07-13 10:23:41 +0000
1875@@ -130,12 +130,12 @@
1876 %(complex_dp_format)s DPW(20,NWAVEFUNCS)
1877 common/%(proc_prefix)sW/DPW
1878
1879- %(complex_mp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,0:NLOOPWAVEFUNCS)
1880- %(complex_mp_format)s PL(0:3,0:NLOOPWAVEFUNCS)
1881+ %(complex_mp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,-1:NLOOPWAVEFUNCS)
1882+ %(complex_mp_format)s PL(0:3,-1:NLOOPWAVEFUNCS)
1883 common/%(proc_prefix)sMP_WL/WL,PL
1884
1885- %(complex_dp_format)s DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,0:NLOOPWAVEFUNCS)
1886- %(complex_dp_format)s DP_PL(0:3,0:NLOOPWAVEFUNCS)
1887+ %(complex_dp_format)s DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,-1:NLOOPWAVEFUNCS)
1888+ %(complex_dp_format)s DP_PL(0:3,-1:NLOOPWAVEFUNCS)
1889 common/%(proc_prefix)sWL/DP_WL,DP_PL
1890
1891 ## if(not AmplitudeReduction){
1892@@ -222,8 +222,10 @@
1893 ENDDO
1894
1895 DO I=0,3
1896+ PL(I,-1)=CMPLX(ZERO,ZERO,KIND=16)
1897 PL(I,0)=CMPLX(ZERO,ZERO,KIND=16)
1898 IF (.NOT.COMPUTE_INTEGRAND_IN_QP) THEN
1899+ DP_PL(I,-1)=DCMPLX(0.0d0,0.0d0)
1900 DP_PL(I,0)=DCMPLX(0.0d0,0.0d0)
1901 ENDIF
1902 ENDDO
1903@@ -234,6 +236,8 @@
1904 DO I=1,MAXLWFSIZE
1905 DO J=0,LOOPMAXCOEFS-1
1906 DO K=1,MAXLWFSIZE
1907+ WL(I,J,K,-1)=(ZERO,ZERO)
1908+ DP_WL(I,J,K,-1)=(0.0d0,0.0d0)
1909 IF (I.EQ.K.AND.J.EQ.0) THEN
1910 WL(I,J,K,0)=(1.0e0_16,ZERO)
1911 ELSE
1912@@ -250,6 +254,18 @@
1913 ENDDO
1914 ENDDO
1915
1916+C This is the chare conjugate version of the unit 4-currents in the canonical cartesian basis.
1917+C This, for now, is only defined for 4-fermionic currents.
1918+WL(1,0,2,-1) = (-1.0e0_16,ZERO)
1919+WL(2,0,1,-1) = (1.0e0_16,ZERO)
1920+WL(3,0,4,-1) = (1.0e0_16,ZERO)
1921+WL(4,0,3,-1) = (-1.0e0_16,ZERO)
1922+DP_WL(1,0,2,-1) = DCMPLX(-1.0d0,0.0d0)
1923+DP_WL(2,0,1,-1) = DCMPLX(1.0d0,0.0d0)
1924+DP_WL(3,0,4,-1) = DCMPLX(1.0d0,0.0d0)
1925+DP_WL(4,0,3,-1) = DCMPLX(-1.0d0,0.0d0)
1926+
1927+
1928 DO K=1, 3
1929 ## if(not AmplitudeReduction){
1930 DO I=1,NCTAMPS
1931
1932=== modified file 'madgraph/iolibs/template_files/loop_optimized/mp_helas_calls_split.inc'
1933--- madgraph/iolibs/template_files/loop_optimized/mp_helas_calls_split.inc 2016-04-05 23:57:17 +0000
1934+++ madgraph/iolibs/template_files/loop_optimized/mp_helas_calls_split.inc 2017-07-13 10:23:41 +0000
1935@@ -60,8 +60,8 @@
1936 %(complex_mp_format)s W(20,NWAVEFUNCS)
1937 common/%(proc_prefix)sMP_W/W
1938
1939- %(complex_mp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,0:NLOOPWAVEFUNCS)
1940- %(complex_mp_format)s PL(0:3,0:NLOOPWAVEFUNCS)
1941+ %(complex_mp_format)s WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,-1:NLOOPWAVEFUNCS)
1942+ %(complex_mp_format)s PL(0:3,-1:NLOOPWAVEFUNCS)
1943 common/%(proc_prefix)sMP_WL/WL,PL
1944
1945 ## if(not AmplitudeReduction){
1946
1947=== modified file 'madgraph/iolibs/template_files/madevent_combine_events.f'
1948--- madgraph/iolibs/template_files/madevent_combine_events.f 2015-04-05 23:25:07 +0000
1949+++ madgraph/iolibs/template_files/madevent_combine_events.f 2017-07-13 10:23:41 +0000
1950@@ -65,6 +65,9 @@
1951 data s_buff/7*''/
1952 data jseed/-1/
1953 data buffclus/max_particles*' '/
1954+ double precision bias_weight
1955+ logical impact_xsec
1956+ common/bias/bias_weight,impact_xsec
1957 c-----
1958 c Begin Code
1959 c-----
1960@@ -118,7 +121,7 @@
1961 c
1962 I4 = 4
1963 R8 = 8
1964- record_length = 4*I4+maxexternal*I4*7+maxexternal*5*R8+3*R8+
1965+ record_length = 4*I4+maxexternal*I4*7+maxexternal*5*R8+4*R8+
1966 & 1000+7*s_bufflen+max_particles*clus_bufflen
1967 C $B$ scratch_name $B$ !this is tag for automatic modification by MW
1968 filename='scratch'
1969@@ -164,7 +167,9 @@
1970 read(sfnum,rec=iarray(i)) wgt,n,
1971 & ((ic(m,j),j=1,maxexternal),m=1,7),ievent,
1972 & ((p(m,j),m=0,4),j=1,maxexternal),sscale,aqcd,aqed,
1973- & buff,(s_buff(j),j=1,7),(buffclus(j),j=1,max_particles)
1974+ & buff,(s_buff(j),j=1,7),(buffclus(j),j=1,max_particles),
1975+ & bias_weight
1976+ if(bias_weight.ne.1d0) impact_xsec=.false.
1977 c Systematics info on/off
1978 if(s_buff(1)(1:7).eq.'<mgrwt>') then
1979 u_syst=.true.
1980@@ -205,7 +210,7 @@
1981 read(sfnum,rec=iarray(i)) wgt,n,
1982 & ((ic(m,j),j=1,maxexternal),m=1,7),ievent,
1983 & ((p(m,j),m=0,4),j=1,maxexternal),sscale,aqcd,aqed,
1984- & buff
1985+ & buff
1986 if (dabs(wgt) .gt. goal_wgt*xran1(jseed)) then
1987 keep(i) = .true.
1988 if (wgt.lt.0d0) has_negative = .true.
1989@@ -260,7 +265,8 @@
1990 read(sfnum,rec=iarray(i)) wgt,n,
1991 & ((ic(m,j),j=1,maxexternal),m=1,7),ievent,
1992 & ((p(m,j),m=0,4),j=1,maxexternal),sscale,aqcd,aqed,
1993- & buff,(s_buff(j),j=1,7),(buffclus(j),j=1,max_particles)
1994+ & buff,(s_buff(j),j=1,7),(buffclus(j),j=1,max_particles),
1995+ & bias_weight
1996 wgt=dsign(xsec/nreq,wgt)
1997 c Systematics info on/off
1998 if(s_buff(1)(1:7).eq.'<mgrwt>') then
1999@@ -638,6 +644,10 @@
2000 character*(clus_bufflen) buffclus(max_particles)
2001 data buffclus/max_particles*' '/
2002 c
2003+ double precision bias_weight
2004+ logical impact_xsec
2005+ common/bias/bias_weight,impact_xsec
2006+c
2007 c Les Houches init block (for the <init> info)
2008 c
2009 integer maxpup
2010@@ -696,7 +706,8 @@
2011 write(sfnum,rec=kevent) wgt,n,
2012 & ((ic(m,j),j=1,maxexternal),m=1,7),ievent,
2013 & ((p(m,j),m=0,4),j=1,maxexternal),sscale,aqcd,aqed,
2014- & buff,(s_buff(j),j=1,7),(buffclus(j),j=1,max_particles)
2015+ & buff,(s_buff(j),j=1,7),(buffclus(j),j=1,max_particles),
2016+ & bias_weight
2017 sum=sum+dabs(wgt)
2018 found=.false.
2019 do i=1,nprup
2020
2021=== modified file 'madgraph/iolibs/template_files/madevent_makefile_source'
2022--- madgraph/iolibs/template_files/madevent_makefile_source 2016-11-18 09:46:17 +0000
2023+++ madgraph/iolibs/template_files/madevent_makefile_source 2017-07-13 10:23:41 +0000
2024@@ -11,7 +11,7 @@
2025 # Source files
2026
2027 PROCESS= hfill.o matrix.o myamp.o
2028-DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o
2029+DSAMPLE = dsample.o ranmar.o DiscreteSampler.o StringCast.o %(additional_dsample)s
2030 HBOOK = hfill.o hcurve.o hbook1.o hbook2.o
2031 GENERIC = $(alfas_functions).o transpole.o invarients.o hfill.o pawgraphs.o ran1.o \
2032 rw_events.o rw_routines.o kin_functions.o open_file.o basecode.o setrun.o \
2033@@ -71,7 +71,7 @@
2034 select_events.o: select_events.f run_config.inc
2035 setrun.o: setrun.f nexternal.inc leshouche.inc run_card.inc run_config.inc
2036 rw_events.o: rw_events.f run_config.inc
2037-
2038+%(additional_dependencies)s
2039 run_card.inc: ../Cards/run_card.dat
2040 ../bin/madevent treatcards run
2041
2042
2043=== modified file 'madgraph/iolibs/template_files/makefile_sa_f_sp'
2044--- madgraph/iolibs/template_files/makefile_sa_f_sp 2016-11-13 13:28:20 +0000
2045+++ madgraph/iolibs/template_files/makefile_sa_f_sp 2017-07-13 10:23:41 +0000
2046@@ -24,4 +24,4 @@
2047
2048 matrix$(MENUM)py.so: matrix.f makefile $(LIBS)
2049 touch __init__.py
2050- $(F2PY) $(LINKLIBS) -c matrix.f -m matrix$(MENUM)py
2051\ No newline at end of file
2052+ $(F2PY) $(LINKLIBS) -c matrix.f -m matrix$(MENUM)py --f77exec=$(FC)
2053\ No newline at end of file
2054
2055=== modified file 'madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc'
2056--- madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2016-03-22 20:44:25 +0000
2057+++ madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2017-07-13 10:23:41 +0000
2058@@ -116,8 +116,9 @@
2059 COMMON/%(proc_prefix)sHELUSERCHOICE/USERHEL
2060
2061 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
2062+ COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS
2063 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
2064- COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS
2065+
2066 C
2067 C FUNCTIONS
2068 C
2069
2070=== modified file 'madgraph/iolibs/template_files/matrix_standalone_v4.inc'
2071--- madgraph/iolibs/template_files/matrix_standalone_v4.inc 2016-03-22 20:44:25 +0000
2072+++ madgraph/iolibs/template_files/matrix_standalone_v4.inc 2017-07-13 10:23:41 +0000
2073@@ -88,8 +88,9 @@
2074 %(den_factor_line)s
2075
2076 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
2077+ COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS
2078 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
2079- COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS
2080+
2081 C
2082 C FUNCTIONS
2083 C
2084
2085=== modified file 'madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc'
2086--- madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc 2015-10-12 19:04:37 +0000
2087+++ madgraph/iolibs/template_files/super_auto_dsig_group_v4.inc 2017-07-13 10:23:41 +0000
2088@@ -281,6 +281,7 @@
2089 TOTWGT=0D0
2090 DO J=1,SYMCONF(0)
2091 DO I=1,MAXSPROC
2092+ IF(CONFSUB(I,SYMCONF(J)).NE.0) THEN
2093 DO K=1,2
2094 TOTWGT=TOTWGT+SELPROC(K,I,J)
2095 IF(R.LT.TOTWGT)THEN
2096@@ -290,6 +291,7 @@
2097 GOTO 50
2098 ENDIF
2099 ENDDO
2100+ ENDIF
2101 ENDDO
2102 ENDDO
2103 50 CONTINUE
2104
2105=== modified file 'madgraph/loop/loop_helas_objects.py'
2106--- madgraph/loop/loop_helas_objects.py 2017-05-24 17:46:52 +0000
2107+++ madgraph/loop/loop_helas_objects.py 2017-07-13 10:23:41 +0000
2108@@ -2119,8 +2119,13 @@
2109 loopwfnumber=loopwfnumber+1
2110 for loopamp in loopdiag.get_loop_amplitudes():
2111 # Set the number of the starting wavefunction (common to all
2112- # diagrams) to one.
2113- loopamp.get_starting_loop_wavefunction().set('number',0)
2114+ # diagrams) to 0 or -1 if it requires complex conjugation.
2115+ start_loop_wf = loopamp.get_starting_loop_wavefunction()
2116+ if start_loop_wf.get('fermionflow')==1:
2117+ start_loop_wf.set('number',0)
2118+ else:
2119+ # External loop WF for flipped fermionflow.
2120+ start_loop_wf.set('number',-1)
2121 for amp in loopamp['amplitudes']:
2122 amp.set('number',loop_ampnumber)
2123 loop_ampnumber=loop_ampnumber+1
2124
2125=== modified file 'madgraph/madevent/combine_runs.py'
2126--- madgraph/madevent/combine_runs.py 2016-09-03 13:26:00 +0000
2127+++ madgraph/madevent/combine_runs.py 2017-07-13 10:23:41 +0000
2128@@ -117,7 +117,7 @@
2129 #back out with the appropriate scaled weight
2130 fsock = open(pjoin(channel, 'events.lhe'), 'w')
2131 wgt = results.axsec / results.nunwgt
2132- tot_nevents=0
2133+ tot_nevents, nb_file = 0, 0
2134 for result in results:
2135 i = result.name
2136 if channel.endswith(os.path.pathsep):
2137@@ -125,8 +125,9 @@
2138 else:
2139 path = channel + i
2140 nw = self.copy_events(fsock, pjoin(path,'events.lhe'), wgt)
2141- #tot_events += nw
2142- #logger.debug("Combined %s events to %s " % (tot_events, channel))
2143+ tot_nevents += nw
2144+ nb_file += 1
2145+ logger.debug("Combined %s file generating %s events for %s " , nb_file, tot_nevents, channel)
2146
2147 @staticmethod
2148 def get_fortran_str(nb):
2149@@ -143,8 +144,10 @@
2150
2151 new_wgt = self.get_fortran_str(new_wgt)
2152 old_line = ""
2153+ nb_evt =0
2154 for line in open(input):
2155 if old_line.startswith("<event>"):
2156+ nb_evt+=1
2157 data = line.split()
2158 if not len(data) == 6:
2159 raise MadGraph5Error, "Line after <event> should have 6 entries"
2160@@ -156,7 +159,7 @@
2161 new_wgt, ' '.join(data[3:]))
2162 fsock.write(line)
2163 old_line = line
2164-
2165+ return nb_evt
2166 def get_channels(self, proc_path):
2167 """Opens file symfact.dat to determine all channels"""
2168 sympath = os.path.join(proc_path, 'symfact.dat')
2169
2170=== modified file 'madgraph/madevent/gen_ximprove.py'
2171--- madgraph/madevent/gen_ximprove.py 2017-03-27 08:37:47 +0000
2172+++ madgraph/madevent/gen_ximprove.py 2017-07-13 10:23:41 +0000
2173@@ -104,13 +104,15 @@
2174 #if the user defines it in the run_card:
2175 if self.run_card['survey_splitting'] != -1:
2176 self.splitted_grid = self.run_card['survey_splitting']
2177+ if self.run_card['survey_nchannel_per_job'] != -1:
2178+ self.combining_job = self.run_card['survey_nchannel_per_job']
2179
2180 self.splitted_Pdir = {}
2181 self.splitted_for_dir = lambda x,y: self.splitted_grid
2182 self.combining_job_for_Pdir = lambda x: self.combining_job
2183 self.lastoffset = {}
2184
2185- def launch(self):
2186+ def launch(self, to_submit=True, clean=True):
2187 """ """
2188
2189 self.subproc = [l.strip() for l in open(pjoin(self.me_dir,'SubProcesses',
2190@@ -120,8 +122,8 @@
2191 P_zero_result = [] # check the number of times where they are no phase-space
2192
2193 nb_tot_proc = len(subproc)
2194+ job_list = {}
2195 for nb_proc,subdir in enumerate(subproc):
2196- job_list = {}
2197 self.cmd.update_status('Compiling for process %s/%s. <br> (previous processes already running)' % \
2198 (nb_proc+1,nb_tot_proc), level=None)
2199
2200@@ -130,15 +132,16 @@
2201 logger.info(' %s ' % subdir)
2202
2203 # clean previous run
2204- for match in misc.glob('*ajob*', Pdir):
2205- if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']:
2206- os.remove(match)
2207- for match in misc.glob('G*', Pdir):
2208- if os.path.exists(pjoin(match,'results.dat')):
2209- os.remove(pjoin(match, 'results.dat'))
2210- if os.path.exists(pjoin(match, 'ftn25')):
2211- os.remove(pjoin(match, 'ftn25'))
2212-
2213+ if clean:
2214+ for match in misc.glob('*ajob*', Pdir):
2215+ if os.path.basename(match)[:4] in ['ajob', 'wait', 'run.', 'done']:
2216+ os.remove(match)
2217+ for match in misc.glob('G*', Pdir):
2218+ if os.path.exists(pjoin(match,'results.dat')):
2219+ os.remove(pjoin(match, 'results.dat'))
2220+ if os.path.exists(pjoin(match, 'ftn25')):
2221+ os.remove(pjoin(match, 'ftn25'))
2222+
2223 #compile gensym
2224 self.cmd.compile(['gensym'], cwd=Pdir)
2225 if not os.path.exists(pjoin(Pdir, 'gensym')):
2226@@ -179,9 +182,55 @@
2227 raise Exception, 'Parsing error in gensym: %s' % stdout
2228
2229 self.cmd.compile(['madevent'], cwd=Pdir)
2230- self.submit_to_cluster(job_list)
2231+ if to_submit:
2232+ self.submit_to_cluster(job_list)
2233+ job_list = {}
2234+
2235 return job_list, P_zero_result
2236
2237+ def resubmit(self, min_precision=1.0, resubmit_zero=False):
2238+ """collect the result of the current run and relaunch each channel
2239+ not completed or optionally a completed one with a precision worse than
2240+ a threshold (and/or the zero result channel)"""
2241+
2242+ job_list, P_zero_result = self.launch(to_submit=False, clean=False)
2243+
2244+ for P , jobs in dict(job_list).items():
2245+ misc.sprint(jobs)
2246+ to_resub = []
2247+ for job in jobs:
2248+ if os.path.exists(pjoin(P, 'G%s' % job)) and os.path.exists(pjoin(P, 'G%s' % job, 'results.dat')):
2249+ one_result = sum_html.OneResult(job)
2250+ try:
2251+ one_result.read_results(pjoin(P, 'G%s' % job, 'results.dat'))
2252+ except:
2253+ to_resub.append(job)
2254+ if one_result.xsec == 0:
2255+ if resubmit_zero:
2256+ to_resub.append(job)
2257+ elif max(one_result.xerru, one_result.xerrc)/one_result.xsec > min_precision:
2258+ to_resub.append(job)
2259+ else:
2260+ to_resub.append(job)
2261+ if to_resub:
2262+ for G in to_resub:
2263+ try:
2264+ shutil.rmtree(pjoin(P, 'G%s' % G))
2265+ except Exception, error:
2266+ misc.sprint(error)
2267+ pass
2268+ misc.sprint(to_resub)
2269+ self.submit_to_cluster({P: to_resub})
2270+
2271+
2272+
2273+
2274+
2275+
2276+
2277+
2278+
2279+
2280
2281 def submit_to_cluster(self, job_list):
2282 """ """
2283
2284=== modified file 'madgraph/madevent/sum_html.py'
2285--- madgraph/madevent/sum_html.py 2017-02-14 10:10:56 +0000
2286+++ madgraph/madevent/sum_html.py 2017-07-13 10:23:41 +0000
2287@@ -436,16 +436,21 @@
2288 if update_statistics:
2289 self.run_statistics.aggregate_statistics([_.run_statistics for _ in self])
2290
2291- def compute_average(self):
2292+ def compute_average(self, error=None):
2293 """compute the value associate to this combination"""
2294
2295 nbjobs = len(self)
2296 if not nbjobs:
2297 return
2298+ max_xsec = max(one.xsec for one in self)
2299+ min_xsec = min(one.xsec for one in self)
2300 self.axsec = sum([one.axsec for one in self]) / nbjobs
2301 self.xsec = sum([one.xsec for one in self]) /nbjobs
2302 self.xerrc = sum([one.xerrc for one in self]) /nbjobs
2303 self.xerru = math.sqrt(sum([one.xerru**2 for one in self])) /nbjobs
2304+ if error:
2305+ self.xerrc = error
2306+ self.xerru = error
2307
2308 self.nevents = sum([one.nevents for one in self])
2309 self.nw = 0#sum([one.nw for one in self])
2310@@ -464,6 +469,20 @@
2311 self.eff_iter += result.eff_iter
2312 self.maxwgt_iter += result.maxwgt_iter
2313
2314+ #check full consistency
2315+ onefail = False
2316+ for one in list(self):
2317+ if one.xsec < (self.xsec - 25* one.xerru):
2318+ if not onefail:
2319+ logger.debug('multi run are inconsistent: %s < %s - 25* %s: assign error %s', one.xsec, self.xsec, one.xerru, error if error else max_xsec-min_xsec)
2320+ onefail = True
2321+ self.remove(one)
2322+ if onefail:
2323+ if error:
2324+ return self.compute_average(error)
2325+ else:
2326+ return self.compute_average((max_xsec-min_xsec)/2.)
2327+
2328
2329
2330 def compute_iterations(self):
2331
2332=== modified file 'madgraph/various/banner.py'
2333--- madgraph/various/banner.py 2017-03-03 10:01:29 +0000
2334+++ madgraph/various/banner.py 2017-07-13 10:23:41 +0000
2335@@ -149,7 +149,7 @@
2336 self[tag] = text
2337 text = ''
2338 store = False
2339- if store:
2340+ if store and not line.startswith(('<![CDATA[',']]>')):
2341 if line.endswith('\n'):
2342 text += line
2343 else:
2344@@ -382,18 +382,19 @@
2345 ff.write(header % { 'version':float(self.lhe_version)})
2346
2347
2348- for tag in [t for t in self.ordered_items if t in self.keys()]:
2349- if tag in exclude:
2350- continue
2351- capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag
2352- ff.write('<%(tag)s>\n%(text)s\n</%(tag)s>\n' % \
2353- {'tag':capitalized_tag, 'text':self[tag].strip()})
2354- for tag in [t for t in self.keys() if t not in self.ordered_items]:
2355- if tag in ['init'] or tag in exclude:
2356- continue
2357- capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag
2358- ff.write('<%(tag)s>\n%(text)s\n</%(tag)s>\n' % \
2359- {'tag':capitalized_tag, 'text':self[tag].strip()})
2360+ for tag in [t for t in self.ordered_items if t in self.keys()]+ \
2361+ [t for t in self.keys() if t not in self.ordered_items]:
2362+ if tag in ['init'] or tag in exclude:
2363+ continue
2364+ capitalized_tag = self.capitalized_items[tag] if tag in self.capitalized_items else tag
2365+ start_data, stop_data = '', ''
2366+ if '<' in self[tag] or '@' in self[tag]:
2367+ start_data = '\n<![CDATA['
2368+ stop_data = ']]>\n'
2369+ ff.write('<%(tag)s>%(start_data)s\n%(text)s\n%(stop_data)s</%(tag)s>\n' % \
2370+ {'tag':capitalized_tag, 'text':self[tag].strip(),
2371+ 'start_data': start_data, 'stop_data':stop_data})
2372+
2373
2374 if not '/header' in exclude:
2375 ff.write('</header>\n')
2376@@ -2618,7 +2619,9 @@
2377 #job handling of the survey/ refine
2378 self.add_param('job_strategy', 0, hidden=True, include=False)
2379 self.add_param('survey_splitting', -1, hidden=True, include=False)
2380+ self.add_param('survey_nchannel_per_job', 2, hidden=True, include=False)
2381 self.add_param('refine_evt_by_job', -1, hidden=True, include=False)
2382+
2383 # Specify what particle IDs to use for the CKKWL merging cut ktdurham
2384
2385 def check_validity(self):
2386
2387=== modified file 'madgraph/various/cluster.py'
2388--- madgraph/various/cluster.py 2017-03-13 11:26:51 +0000
2389+++ madgraph/various/cluster.py 2017-07-13 10:23:41 +0000
2390@@ -257,11 +257,11 @@
2391 target = path.rsplit('/SubProcesses',1)[0]
2392 elif 'MCatNLO' in path:
2393 target = path.rsplit('/MCatNLO',1)[0]
2394+ elif 'PY8_parallelization' in path:
2395+ target = path.rsplit('/PY8_parallelization',1)[0]
2396 elif second_path:
2397 target=path
2398 logger.warning("cluster.get_job_identifier runs unexpectedly. This should be fine but report this message if you have problem.")
2399- elif 'PY8_parallelization' in path:
2400- target = path.rsplit('/PY8_parallelization',1)[0]
2401 else:
2402 target = path
2403
2404@@ -537,6 +537,15 @@
2405 logger.warning("""This cluster didn't support metajob submit.""")
2406 return 0
2407
2408+ def modify_interface(self, run_interface):
2409+ """routine which allow to modify the run_card/mg5cmd object to change the
2410+ default behavior of the runs.
2411+ This is called at the time of the compilation of the run_card.
2412+ Note that this function can be called multiple times by run.
2413+ """
2414+ #run_card = run_interface.run_card
2415+ return
2416+
2417 class Packet(object):
2418 """ an object for handling packet of job, it is designed to be thread safe
2419 """
2420
2421=== modified file 'madgraph/various/lhe_parser.py'
2422--- madgraph/various/lhe_parser.py 2017-05-03 09:21:01 +0000
2423+++ madgraph/various/lhe_parser.py 2017-07-13 10:23:41 +0000
2424@@ -174,6 +174,10 @@
2425 def __init__(self, path, mode='r', *args, **opt):
2426 """open file and read the banner [if in read mode]"""
2427
2428+ if path.endswith('.gz') and mode == 'w' and\
2429+ isinstance(self, EventFileNoGzip):
2430+ path = path[:-3]
2431+
2432 self.parsing = True # check if/when we need to parse the event.
2433 self.eventgroup = False
2434 try:
2435
2436=== modified file 'madgraph/various/misc.py'
2437--- madgraph/various/misc.py 2017-05-22 09:11:33 +0000
2438+++ madgraph/various/misc.py 2017-07-13 10:23:41 +0000
2439@@ -1755,8 +1755,12 @@
2440 It has been validated for the last time with version: %s""",
2441 name, '.'.join(str(i) for i in val_ver))
2442 else:
2443- logger.error("Plugin %s is not supported by this version of MG5aMC." % name)
2444- plugin_support[name] = False
2445+ if __debug__:
2446+ logger.error("Plugin %s seems not supported by this version of MG5aMC. Keep it active (please update status)" % name)
2447+ plugin_support[name] = True
2448+ else:
2449+ logger.error("Plugin %s is not supported by this version of MG5aMC." % name)
2450+ plugin_support[name] = False
2451 return plugin_support[name]
2452
2453
2454
2455=== modified file 'mg5decay/decay_objects.py'
2456--- mg5decay/decay_objects.py 2017-02-14 15:08:19 +0000
2457+++ mg5decay/decay_objects.py 2017-07-13 10:23:41 +0000
2458@@ -1992,6 +1992,9 @@
2459 def running_externals(self, q, loopnum=2):
2460 """ Recalculate external parameters at the given scale. """
2461
2462+ if q < 0.5:
2463+ return
2464+
2465 # Raise error for wrong type of q
2466 if not isinstance(q, int) and not isinstance(q, long) and \
2467 not isinstance(q, float):
2468
2469=== modified file 'models/check_param_card.py'
2470--- models/check_param_card.py 2017-03-03 23:36:24 +0000
2471+++ models/check_param_card.py 2017-07-13 10:23:41 +0000
2472@@ -900,15 +900,17 @@
2473 yield param_card
2474
2475
2476- def store_entry(self, run_name, cross):
2477+ def store_entry(self, run_name, cross, error=None):
2478 """store the value of the cross-section"""
2479 if isinstance(cross, dict):
2480 info = dict(cross)
2481 info.update({'bench' : self.itertag, 'run_name': run_name})
2482 self.cross.append(info)
2483 else:
2484- self.cross.append({'bench' : self.itertag, 'run_name': run_name, 'cross(pb)':cross})
2485-
2486+ if error is None:
2487+ self.cross.append({'bench' : self.itertag, 'run_name': run_name, 'cross(pb)':cross})
2488+ else:
2489+ self.cross.append({'bench' : self.itertag, 'run_name': run_name, 'cross(pb)':cross, 'error(pb)':error})
2490
2491 def write_summary(self, path, order=None, lastline=False, nbcol=20):
2492 """ """
2493
2494=== modified file 'models/import_ufo.py'
2495--- models/import_ufo.py 2017-02-16 15:16:38 +0000
2496+++ models/import_ufo.py 2017-07-13 10:23:41 +0000
2497@@ -78,10 +78,9 @@
2498 last_model_path = os.path.join(MG5DIR, p, model_name)
2499 return os.path.join(MG5DIR, p, model_name)
2500 if os.path.isdir(model_name):
2501- if last_model_path != os.path.join(MG5DIR, model_name):
2502- logger.info("model loaded from: %s", os.path.join(os.getcwd(), model_name))
2503- last_model_path = os.path.join(MG5DIR, model_name)
2504- return model_name
2505+ logger.warning('No model %s found in default path. Did you mean \'import model ./%s\'',
2506+ model_name, model_name)
2507+ raise UFOImportError("Path %s is not a valid pathname" % model_name)
2508 else:
2509 raise UFOImportError("Path %s is not a valid pathname" % model_name)
2510
2511
2512=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f'
2513--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f 2017-05-09 14:31:51 +0000
2514+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_gg_ttx%born.f 2017-07-13 10:23:41 +0000
2515@@ -77,6 +77,7 @@
2516 COMMON/C_NFKSPROCESS/NFKSPROCESS
2517 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
2518 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
2519+ LOGICAL COND_IJ
2520 C ----------
2521 C BEGIN CODE
2522 C ----------
2523@@ -84,11 +85,15 @@
2524 GLU_IJ = IJ_VALUES(NFKSPROCESS)
2525 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
2526 IF (NTRY(NFKSPROCESS).LT.2) THEN
2527- SKIP(NFKSPROCESS)=1
2528- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2529- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2530- ENDDO
2531- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2532+ IF (GLU_IJ.EQ.0) THEN
2533+ SKIP(NFKSPROCESS)=0
2534+ ELSE
2535+ SKIP(NFKSPROCESS)=1
2536+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2537+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2538+ ENDDO
2539+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2540+ ENDIF
2541 ENDIF
2542 DO JJ=1,NGRAPHS
2543 AMP2(JJ)=0D0
2544@@ -121,7 +126,12 @@
2545 ANS(2) = 0D0
2546 HEL_FAC=1D0
2547 DO IHEL=1,NCOMB
2548- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
2549+ ! the following lines are to avoid segfaults when glu_ij=0
2550+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
2551+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
2552+ $ .EQ.NHEL(GLU_IJ,1)
2553+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
2554+ IF (COND_IJ) THEN
2555 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
2556 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
2557 $ 2) ) THEN
2558@@ -201,6 +211,7 @@
2559 INTEGER NFKSPROCESS
2560 COMMON/C_NFKSPROCESS/NFKSPROCESS
2561 INTEGER STEP_HEL
2562+ LOGICAL COND_IJ
2563 INTEGER IJ_VALUES(1)
2564 DATA IJ_VALUES / 1 /
2565 C
2566@@ -221,14 +232,27 @@
2567 BACK_HEL = NHEL(GLU_IJ)
2568 BORNS(1) = 0D0
2569 BORNS(2) = 0D0
2570- IF (BACK_HEL.NE.0) THEN
2571- STEP_HEL=-2*BACK_HEL
2572+ IF (GLU_IJ.NE.0) THEN
2573+ BACK_HEL = NHEL(GLU_IJ)
2574+ IF (BACK_HEL.NE.0) THEN
2575+ STEP_HEL=-2*BACK_HEL
2576+ ELSE
2577+ STEP_HEL=1
2578+ ENDIF
2579 ELSE
2580+ BACK_HEL=0
2581 STEP_HEL=1
2582 ENDIF
2583 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
2584- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
2585- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2586+ IF (GLU_IJ.NE.0) THEN
2587+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
2588+ ELSE
2589+ COND_IJ=IHEL.EQ.BACK_HEL
2590+ ENDIF
2591+ IF (COND_IJ) THEN
2592+ IF (GLU_IJ.NE.0) THEN
2593+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2594+ ENDIF
2595 IF (.NOT. CALCULATEDBORN) THEN
2596 CALL VXXXXX(P(0,1),ZERO,NHEL(1),-1*IC(1),W(1,1))
2597 CALL VXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
2598@@ -292,7 +316,7 @@
2599 ENDDO
2600 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
2601 ENDDO
2602- NHEL(GLU_IJ) = BACK_HEL
2603+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
2604 END
2605
2606
2607
2608=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f'
2609--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f 2017-05-09 14:31:51 +0000
2610+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uux_ttx%born.f 2017-07-13 10:23:41 +0000
2611@@ -80,6 +80,7 @@
2612 COMMON/C_NFKSPROCESS/NFKSPROCESS
2613 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
2614 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
2615+ LOGICAL COND_IJ
2616 C ----------
2617 C BEGIN CODE
2618 C ----------
2619@@ -87,11 +88,15 @@
2620 GLU_IJ = IJ_VALUES(NFKSPROCESS)
2621 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
2622 IF (NTRY(NFKSPROCESS).LT.2) THEN
2623- SKIP(NFKSPROCESS)=1
2624- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2625- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2626- ENDDO
2627- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2628+ IF (GLU_IJ.EQ.0) THEN
2629+ SKIP(NFKSPROCESS)=0
2630+ ELSE
2631+ SKIP(NFKSPROCESS)=1
2632+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2633+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2634+ ENDDO
2635+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2636+ ENDIF
2637 ENDIF
2638 DO JJ=1,NGRAPHS
2639 AMP2(JJ)=0D0
2640@@ -124,7 +129,12 @@
2641 ANS(2) = 0D0
2642 HEL_FAC=1D0
2643 DO IHEL=1,NCOMB
2644- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
2645+ ! the following lines are to avoid segfaults when glu_ij=0
2646+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
2647+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
2648+ $ .EQ.NHEL(GLU_IJ,1)
2649+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
2650+ IF (COND_IJ) THEN
2651 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
2652 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
2653 $ 2) ) THEN
2654@@ -207,6 +217,7 @@
2655 INTEGER NFKSPROCESS
2656 COMMON/C_NFKSPROCESS/NFKSPROCESS
2657 INTEGER STEP_HEL
2658+ LOGICAL COND_IJ
2659 INTEGER IJ_VALUES(1)
2660 DATA IJ_VALUES / 1 /
2661 C
2662@@ -227,14 +238,27 @@
2663 BACK_HEL = NHEL(GLU_IJ)
2664 BORNS(1) = 0D0
2665 BORNS(2) = 0D0
2666- IF (BACK_HEL.NE.0) THEN
2667- STEP_HEL=-2*BACK_HEL
2668+ IF (GLU_IJ.NE.0) THEN
2669+ BACK_HEL = NHEL(GLU_IJ)
2670+ IF (BACK_HEL.NE.0) THEN
2671+ STEP_HEL=-2*BACK_HEL
2672+ ELSE
2673+ STEP_HEL=1
2674+ ENDIF
2675 ELSE
2676+ BACK_HEL=0
2677 STEP_HEL=1
2678 ENDIF
2679 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
2680- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
2681- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2682+ IF (GLU_IJ.NE.0) THEN
2683+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
2684+ ELSE
2685+ COND_IJ=IHEL.EQ.BACK_HEL
2686+ ENDIF
2687+ IF (COND_IJ) THEN
2688+ IF (GLU_IJ.NE.0) THEN
2689+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2690+ ENDIF
2691 IF (.NOT. CALCULATEDBORN) THEN
2692 CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1))
2693 CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
2694@@ -292,7 +316,7 @@
2695 ENDDO
2696 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
2697 ENDDO
2698- NHEL(GLU_IJ) = BACK_HEL
2699+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
2700 END
2701
2702
2703
2704=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f'
2705--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f 2017-05-09 14:31:51 +0000
2706+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fks_loonly/%SubProcesses%P0_uxu_ttx%born.f 2017-07-13 10:23:41 +0000
2707@@ -80,6 +80,7 @@
2708 COMMON/C_NFKSPROCESS/NFKSPROCESS
2709 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
2710 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
2711+ LOGICAL COND_IJ
2712 C ----------
2713 C BEGIN CODE
2714 C ----------
2715@@ -87,11 +88,15 @@
2716 GLU_IJ = IJ_VALUES(NFKSPROCESS)
2717 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
2718 IF (NTRY(NFKSPROCESS).LT.2) THEN
2719- SKIP(NFKSPROCESS)=1
2720- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2721- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2722- ENDDO
2723- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2724+ IF (GLU_IJ.EQ.0) THEN
2725+ SKIP(NFKSPROCESS)=0
2726+ ELSE
2727+ SKIP(NFKSPROCESS)=1
2728+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2729+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2730+ ENDDO
2731+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2732+ ENDIF
2733 ENDIF
2734 DO JJ=1,NGRAPHS
2735 AMP2(JJ)=0D0
2736@@ -124,7 +129,12 @@
2737 ANS(2) = 0D0
2738 HEL_FAC=1D0
2739 DO IHEL=1,NCOMB
2740- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
2741+ ! the following lines are to avoid segfaults when glu_ij=0
2742+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
2743+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
2744+ $ .EQ.NHEL(GLU_IJ,1)
2745+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
2746+ IF (COND_IJ) THEN
2747 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
2748 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
2749 $ 2) ) THEN
2750@@ -207,6 +217,7 @@
2751 INTEGER NFKSPROCESS
2752 COMMON/C_NFKSPROCESS/NFKSPROCESS
2753 INTEGER STEP_HEL
2754+ LOGICAL COND_IJ
2755 INTEGER IJ_VALUES(1)
2756 DATA IJ_VALUES / 1 /
2757 C
2758@@ -227,14 +238,27 @@
2759 BACK_HEL = NHEL(GLU_IJ)
2760 BORNS(1) = 0D0
2761 BORNS(2) = 0D0
2762- IF (BACK_HEL.NE.0) THEN
2763- STEP_HEL=-2*BACK_HEL
2764+ IF (GLU_IJ.NE.0) THEN
2765+ BACK_HEL = NHEL(GLU_IJ)
2766+ IF (BACK_HEL.NE.0) THEN
2767+ STEP_HEL=-2*BACK_HEL
2768+ ELSE
2769+ STEP_HEL=1
2770+ ENDIF
2771 ELSE
2772+ BACK_HEL=0
2773 STEP_HEL=1
2774 ENDIF
2775 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
2776- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
2777- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2778+ IF (GLU_IJ.NE.0) THEN
2779+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
2780+ ELSE
2781+ COND_IJ=IHEL.EQ.BACK_HEL
2782+ ENDIF
2783+ IF (COND_IJ) THEN
2784+ IF (GLU_IJ.NE.0) THEN
2785+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2786+ ENDIF
2787 IF (.NOT. CALCULATEDBORN) THEN
2788 CALL OXXXXX(P(0,1),ZERO,NHEL(1),-1*IC(1),W(1,1))
2789 CALL IXXXXX(P(0,2),ZERO,NHEL(2),+1*IC(2),W(1,2))
2790@@ -292,7 +316,7 @@
2791 ENDDO
2792 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
2793 ENDDO
2794- NHEL(GLU_IJ) = BACK_HEL
2795+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
2796 END
2797
2798
2799
2800=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f'
2801--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f 2017-05-09 14:31:51 +0000
2802+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_gg_ttx%born.f 2017-07-13 10:23:41 +0000
2803@@ -55,7 +55,7 @@
2804 INTEGER IDEN_VALUES(8)
2805 DATA IDEN_VALUES /256, 256, 256, 256, 256, 256, 256, 256/
2806 INTEGER IJ_VALUES(8)
2807- DATA IJ_VALUES /1, 2, 3, 4, 1, 1, 2, 2/
2808+ DATA IJ_VALUES /1, 2, 0, 0, 1, 1, 2, 2/
2809 C
2810 C GLOBAL VARIABLES
2811 C
2812@@ -77,6 +77,7 @@
2813 COMMON/C_NFKSPROCESS/NFKSPROCESS
2814 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
2815 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
2816+ LOGICAL COND_IJ
2817 C ----------
2818 C BEGIN CODE
2819 C ----------
2820@@ -84,11 +85,15 @@
2821 GLU_IJ = IJ_VALUES(NFKSPROCESS)
2822 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
2823 IF (NTRY(NFKSPROCESS).LT.2) THEN
2824- SKIP(NFKSPROCESS)=1
2825- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2826- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2827- ENDDO
2828- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2829+ IF (GLU_IJ.EQ.0) THEN
2830+ SKIP(NFKSPROCESS)=0
2831+ ELSE
2832+ SKIP(NFKSPROCESS)=1
2833+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2834+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2835+ ENDDO
2836+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2837+ ENDIF
2838 ENDIF
2839 DO JJ=1,NGRAPHS
2840 AMP2(JJ)=0D0
2841@@ -121,7 +126,12 @@
2842 ANS(2) = 0D0
2843 HEL_FAC=1D0
2844 DO IHEL=1,NCOMB
2845- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
2846+ ! the following lines are to avoid segfaults when glu_ij=0
2847+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
2848+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
2849+ $ .EQ.NHEL(GLU_IJ,1)
2850+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
2851+ IF (COND_IJ) THEN
2852 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
2853 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
2854 $ 2) ) THEN
2855@@ -201,8 +211,9 @@
2856 INTEGER NFKSPROCESS
2857 COMMON/C_NFKSPROCESS/NFKSPROCESS
2858 INTEGER STEP_HEL
2859+ LOGICAL COND_IJ
2860 INTEGER IJ_VALUES(8)
2861- DATA IJ_VALUES /1, 2, 3, 4, 1, 1, 2, 2/
2862+ DATA IJ_VALUES /1, 2, 0, 0, 1, 1, 2, 2/
2863 C
2864 C COLOR DATA
2865 C
2866@@ -221,14 +232,27 @@
2867 BACK_HEL = NHEL(GLU_IJ)
2868 BORNS(1) = 0D0
2869 BORNS(2) = 0D0
2870- IF (BACK_HEL.NE.0) THEN
2871- STEP_HEL=-2*BACK_HEL
2872+ IF (GLU_IJ.NE.0) THEN
2873+ BACK_HEL = NHEL(GLU_IJ)
2874+ IF (BACK_HEL.NE.0) THEN
2875+ STEP_HEL=-2*BACK_HEL
2876+ ELSE
2877+ STEP_HEL=1
2878+ ENDIF
2879 ELSE
2880+ BACK_HEL=0
2881 STEP_HEL=1
2882 ENDIF
2883 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
2884- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
2885- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2886+ IF (GLU_IJ.NE.0) THEN
2887+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
2888+ ELSE
2889+ COND_IJ=IHEL.EQ.BACK_HEL
2890+ ENDIF
2891+ IF (COND_IJ) THEN
2892+ IF (GLU_IJ.NE.0) THEN
2893+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2894+ ENDIF
2895 IF (.NOT. CALCULATEDBORN) THEN
2896 CALL VXXXXX(P(0,1),ZERO,NHEL(1),-1*IC(1),W(1,1))
2897 CALL VXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
2898@@ -292,7 +316,7 @@
2899 ENDDO
2900 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
2901 ENDDO
2902- NHEL(GLU_IJ) = BACK_HEL
2903+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
2904 END
2905
2906
2907
2908=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f'
2909--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f 2017-05-09 14:31:51 +0000
2910+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uux_ttx%born.f 2017-07-13 10:23:41 +0000
2911@@ -58,7 +58,7 @@
2912 INTEGER IDEN_VALUES(6)
2913 DATA IDEN_VALUES /36, 36, 36, 36, 36, 36/
2914 INTEGER IJ_VALUES(6)
2915- DATA IJ_VALUES /1, 2, 3, 4, 1, 2/
2916+ DATA IJ_VALUES /1, 2, 0, 0, 1, 2/
2917 C
2918 C GLOBAL VARIABLES
2919 C
2920@@ -80,6 +80,7 @@
2921 COMMON/C_NFKSPROCESS/NFKSPROCESS
2922 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
2923 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
2924+ LOGICAL COND_IJ
2925 C ----------
2926 C BEGIN CODE
2927 C ----------
2928@@ -87,11 +88,15 @@
2929 GLU_IJ = IJ_VALUES(NFKSPROCESS)
2930 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
2931 IF (NTRY(NFKSPROCESS).LT.2) THEN
2932- SKIP(NFKSPROCESS)=1
2933- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2934- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2935- ENDDO
2936- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2937+ IF (GLU_IJ.EQ.0) THEN
2938+ SKIP(NFKSPROCESS)=0
2939+ ELSE
2940+ SKIP(NFKSPROCESS)=1
2941+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
2942+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
2943+ ENDDO
2944+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
2945+ ENDIF
2946 ENDIF
2947 DO JJ=1,NGRAPHS
2948 AMP2(JJ)=0D0
2949@@ -124,7 +129,12 @@
2950 ANS(2) = 0D0
2951 HEL_FAC=1D0
2952 DO IHEL=1,NCOMB
2953- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
2954+ ! the following lines are to avoid segfaults when glu_ij=0
2955+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
2956+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
2957+ $ .EQ.NHEL(GLU_IJ,1)
2958+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
2959+ IF (COND_IJ) THEN
2960 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
2961 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
2962 $ 2) ) THEN
2963@@ -207,8 +217,9 @@
2964 INTEGER NFKSPROCESS
2965 COMMON/C_NFKSPROCESS/NFKSPROCESS
2966 INTEGER STEP_HEL
2967+ LOGICAL COND_IJ
2968 INTEGER IJ_VALUES(6)
2969- DATA IJ_VALUES /1, 2, 3, 4, 1, 2/
2970+ DATA IJ_VALUES /1, 2, 0, 0, 1, 2/
2971 C
2972 C COLOR DATA
2973 C
2974@@ -227,14 +238,27 @@
2975 BACK_HEL = NHEL(GLU_IJ)
2976 BORNS(1) = 0D0
2977 BORNS(2) = 0D0
2978- IF (BACK_HEL.NE.0) THEN
2979- STEP_HEL=-2*BACK_HEL
2980+ IF (GLU_IJ.NE.0) THEN
2981+ BACK_HEL = NHEL(GLU_IJ)
2982+ IF (BACK_HEL.NE.0) THEN
2983+ STEP_HEL=-2*BACK_HEL
2984+ ELSE
2985+ STEP_HEL=1
2986+ ENDIF
2987 ELSE
2988+ BACK_HEL=0
2989 STEP_HEL=1
2990 ENDIF
2991 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
2992- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
2993- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
2994+ IF (GLU_IJ.NE.0) THEN
2995+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
2996+ ELSE
2997+ COND_IJ=IHEL.EQ.BACK_HEL
2998+ ENDIF
2999+ IF (COND_IJ) THEN
3000+ IF (GLU_IJ.NE.0) THEN
3001+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3002+ ENDIF
3003 IF (.NOT. CALCULATEDBORN) THEN
3004 CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1))
3005 CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
3006@@ -292,7 +316,7 @@
3007 ENDDO
3008 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
3009 ENDDO
3010- NHEL(GLU_IJ) = BACK_HEL
3011+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
3012 END
3013
3014
3015
3016=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f'
3017--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f 2017-05-09 14:31:51 +0000
3018+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_pptt_fksreal/%SubProcesses%P0_uxu_ttx%born.f 2017-07-13 10:23:41 +0000
3019@@ -58,7 +58,7 @@
3020 INTEGER IDEN_VALUES(6)
3021 DATA IDEN_VALUES /36, 36, 36, 36, 36, 36/
3022 INTEGER IJ_VALUES(6)
3023- DATA IJ_VALUES /1, 2, 3, 4, 1, 2/
3024+ DATA IJ_VALUES /1, 2, 0, 0, 1, 2/
3025 C
3026 C GLOBAL VARIABLES
3027 C
3028@@ -80,6 +80,7 @@
3029 COMMON/C_NFKSPROCESS/NFKSPROCESS
3030 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
3031 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
3032+ LOGICAL COND_IJ
3033 C ----------
3034 C BEGIN CODE
3035 C ----------
3036@@ -87,11 +88,15 @@
3037 GLU_IJ = IJ_VALUES(NFKSPROCESS)
3038 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
3039 IF (NTRY(NFKSPROCESS).LT.2) THEN
3040- SKIP(NFKSPROCESS)=1
3041- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3042- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3043- ENDDO
3044- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3045+ IF (GLU_IJ.EQ.0) THEN
3046+ SKIP(NFKSPROCESS)=0
3047+ ELSE
3048+ SKIP(NFKSPROCESS)=1
3049+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3050+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3051+ ENDDO
3052+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3053+ ENDIF
3054 ENDIF
3055 DO JJ=1,NGRAPHS
3056 AMP2(JJ)=0D0
3057@@ -124,7 +129,12 @@
3058 ANS(2) = 0D0
3059 HEL_FAC=1D0
3060 DO IHEL=1,NCOMB
3061- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
3062+ ! the following lines are to avoid segfaults when glu_ij=0
3063+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
3064+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
3065+ $ .EQ.NHEL(GLU_IJ,1)
3066+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
3067+ IF (COND_IJ) THEN
3068 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
3069 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
3070 $ 2) ) THEN
3071@@ -207,8 +217,9 @@
3072 INTEGER NFKSPROCESS
3073 COMMON/C_NFKSPROCESS/NFKSPROCESS
3074 INTEGER STEP_HEL
3075+ LOGICAL COND_IJ
3076 INTEGER IJ_VALUES(6)
3077- DATA IJ_VALUES /1, 2, 3, 4, 1, 2/
3078+ DATA IJ_VALUES /1, 2, 0, 0, 1, 2/
3079 C
3080 C COLOR DATA
3081 C
3082@@ -227,14 +238,27 @@
3083 BACK_HEL = NHEL(GLU_IJ)
3084 BORNS(1) = 0D0
3085 BORNS(2) = 0D0
3086- IF (BACK_HEL.NE.0) THEN
3087- STEP_HEL=-2*BACK_HEL
3088+ IF (GLU_IJ.NE.0) THEN
3089+ BACK_HEL = NHEL(GLU_IJ)
3090+ IF (BACK_HEL.NE.0) THEN
3091+ STEP_HEL=-2*BACK_HEL
3092+ ELSE
3093+ STEP_HEL=1
3094+ ENDIF
3095 ELSE
3096+ BACK_HEL=0
3097 STEP_HEL=1
3098 ENDIF
3099 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
3100- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
3101- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3102+ IF (GLU_IJ.NE.0) THEN
3103+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
3104+ ELSE
3105+ COND_IJ=IHEL.EQ.BACK_HEL
3106+ ENDIF
3107+ IF (COND_IJ) THEN
3108+ IF (GLU_IJ.NE.0) THEN
3109+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3110+ ENDIF
3111 IF (.NOT. CALCULATEDBORN) THEN
3112 CALL OXXXXX(P(0,1),ZERO,NHEL(1),-1*IC(1),W(1,1))
3113 CALL IXXXXX(P(0,2),ZERO,NHEL(2),+1*IC(2),W(1,2))
3114@@ -292,7 +316,7 @@
3115 ENDDO
3116 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
3117 ENDDO
3118- NHEL(GLU_IJ) = BACK_HEL
3119+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
3120 END
3121
3122
3123
3124=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f'
3125--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f 2016-09-15 20:20:30 +0000
3126+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f 2017-07-13 10:23:41 +0000
3127@@ -130,8 +130,9 @@
3128 COMMON/HELUSERCHOICE/USERHEL
3129
3130 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
3131+ COMMON/BORN_BEAM_POL/POLARIZATIONS
3132 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
3133- COMMON/BORN_BEAM_POL/POLARIZATIONS
3134+
3135 C
3136 C FUNCTIONS
3137 C
3138
3139=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%coef_construction_1.f'
3140--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%coef_construction_1.f 2016-04-06 18:45:52 +0000
3141+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%coef_construction_1.f 2017-07-13 10:23:41 +0000
3142@@ -76,9 +76,9 @@
3143 COMPLEX*16 W(20,NWAVEFUNCS)
3144 COMMON/W/W
3145
3146- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3147- $ ,0:NLOOPWAVEFUNCS)
3148- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3149+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3150+ $ -1:NLOOPWAVEFUNCS)
3151+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3152 COMMON/WL/WL,PL
3153
3154 COMPLEX*16 AMPL(3,NCTAMPS)
3155
3156=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%helas_calls_ampb_1.f'
3157--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
3158+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
3159@@ -76,9 +76,9 @@
3160 COMPLEX*16 W(20,NWAVEFUNCS)
3161 COMMON/W/W
3162
3163- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3164- $ ,0:NLOOPWAVEFUNCS)
3165- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3166+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3167+ $ -1:NLOOPWAVEFUNCS)
3168+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3169 COMMON/WL/WL,PL
3170
3171 COMPLEX*16 AMPL(3,NCTAMPS)
3172
3173=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_CT_calls_1.f'
3174--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_CT_calls_1.f 2016-04-06 18:45:52 +0000
3175+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_CT_calls_1.f 2017-07-13 10:23:41 +0000
3176@@ -76,9 +76,9 @@
3177 COMPLEX*16 W(20,NWAVEFUNCS)
3178 COMMON/W/W
3179
3180- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3181- $ ,0:NLOOPWAVEFUNCS)
3182- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3183+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3184+ $ -1:NLOOPWAVEFUNCS)
3185+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3186 COMMON/WL/WL,PL
3187
3188 COMPLEX*16 AMPL(3,NCTAMPS)
3189
3190=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f'
3191--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2017-03-28 07:06:02 +0000
3192+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2017-07-13 10:23:41 +0000
3193@@ -353,9 +353,9 @@
3194 COMPLEX*32 MPW(20,NWAVEFUNCS)
3195 COMMON/MP_W/MPW
3196
3197- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3198- $ ,0:NLOOPWAVEFUNCS)
3199- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3200+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3201+ $ -1:NLOOPWAVEFUNCS)
3202+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3203 COMMON/WL/WL,PL
3204
3205 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3206@@ -583,12 +583,16 @@
3207
3208 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
3209 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
3210+C The index -1 is for the charge-conjugated fermions with
3211+C flipped fermion flow.
3212 DO I=0,3
3213+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
3214 PL(I,0)=DCMPLX(0.0D0,0.0D0)
3215 ENDDO
3216 DO I=1,MAXLWFSIZE
3217 DO J=0,LOOPMAXCOEFS-1
3218 DO K=1,MAXLWFSIZE
3219+ WL(I,J,K,-1)=(0.0D0,0.0D0)
3220 IF(I.EQ.K.AND.J.EQ.0) THEN
3221 WL(I,J,K,0)=(1.0D0,0.0D0)
3222 ELSE
3223@@ -603,6 +607,14 @@
3224 ENDIF
3225 ENDIF
3226
3227+C This is the chare conjugate version of the unit 4-currents in
3228+C the canonical cartesian basis.
3229+C This, for now, is only defined for 4-fermionic currents.
3230+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
3231+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
3232+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
3233+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
3234+
3235 C Make sure that lorentz rotation tests are not used if there is
3236 C external loop wavefunction of spin 2 and that one specific
3237 C helicity is asked
3238
3239=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_coef_construction_1.f'
3240--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_coef_construction_1.f 2016-04-06 18:45:52 +0000
3241+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_coef_construction_1.f 2017-07-13 10:23:41 +0000
3242@@ -60,9 +60,9 @@
3243 COMPLEX*32 W(20,NWAVEFUNCS)
3244 COMMON/MP_W/W
3245
3246- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3247- $ ,0:NLOOPWAVEFUNCS)
3248- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
3249+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3250+ $ -1:NLOOPWAVEFUNCS)
3251+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
3252 COMMON/MP_WL/WL,PL
3253
3254 COMPLEX*32 AMPL(3,NCTAMPS)
3255
3256=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f'
3257--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f 2016-09-15 20:20:30 +0000
3258+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_compute_loop_coefs.f 2017-07-13 10:23:41 +0000
3259@@ -119,14 +119,14 @@
3260 COMPLEX*16 DPW(20,NWAVEFUNCS)
3261 COMMON/W/DPW
3262
3263- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3264- $ ,0:NLOOPWAVEFUNCS)
3265- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
3266+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3267+ $ -1:NLOOPWAVEFUNCS)
3268+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
3269 COMMON/MP_WL/WL,PL
3270
3271- COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3272- $ ,0:NLOOPWAVEFUNCS)
3273- COMPLEX*16 DP_PL(0:3,0:NLOOPWAVEFUNCS)
3274+ COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3275+ $ -1:NLOOPWAVEFUNCS)
3276+ COMPLEX*16 DP_PL(0:3,-1:NLOOPWAVEFUNCS)
3277 COMMON/WL/DP_WL,DP_PL
3278
3279 COMPLEX*32 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3280@@ -191,8 +191,10 @@
3281 ENDDO
3282
3283 DO I=0,3
3284+ PL(I,-1)=CMPLX(ZERO,ZERO,KIND=16)
3285 PL(I,0)=CMPLX(ZERO,ZERO,KIND=16)
3286 IF (.NOT.COMPUTE_INTEGRAND_IN_QP) THEN
3287+ DP_PL(I,-1)=DCMPLX(0.0D0,0.0D0)
3288 DP_PL(I,0)=DCMPLX(0.0D0,0.0D0)
3289 ENDIF
3290 ENDDO
3291@@ -200,6 +202,8 @@
3292 DO I=1,MAXLWFSIZE
3293 DO J=0,LOOPMAXCOEFS-1
3294 DO K=1,MAXLWFSIZE
3295+ WL(I,J,K,-1)=(ZERO,ZERO)
3296+ DP_WL(I,J,K,-1)=(0.0D0,0.0D0)
3297 IF (I.EQ.K.AND.J.EQ.0) THEN
3298 WL(I,J,K,0)=(1.0E0_16,ZERO)
3299 ELSE
3300@@ -216,6 +220,19 @@
3301 ENDDO
3302 ENDDO
3303
3304+C This is the chare conjugate version of the unit 4-currents in
3305+C the canonical cartesian basis.
3306+C This, for now, is only defined for 4-fermionic currents.
3307+ WL(1,0,2,-1) = (-1.0E0_16,ZERO)
3308+ WL(2,0,1,-1) = (1.0E0_16,ZERO)
3309+ WL(3,0,4,-1) = (1.0E0_16,ZERO)
3310+ WL(4,0,3,-1) = (-1.0E0_16,ZERO)
3311+ DP_WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
3312+ DP_WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
3313+ DP_WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
3314+ DP_WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
3315+
3316+
3317 DO K=1, 3
3318 DO I=1,NCTAMPS
3319 AMPL(K,I)=(ZERO,ZERO)
3320
3321=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_helas_calls_ampb_1.f'
3322--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
3323+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%mp_helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
3324@@ -60,9 +60,9 @@
3325 COMPLEX*32 W(20,NWAVEFUNCS)
3326 COMMON/MP_W/W
3327
3328- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3329- $ ,0:NLOOPWAVEFUNCS)
3330- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
3331+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3332+ $ -1:NLOOPWAVEFUNCS)
3333+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
3334 COMMON/MP_WL/WL,PL
3335
3336 COMPLEX*32 AMPL(3,NCTAMPS)
3337
3338=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f'
3339--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f 2017-05-09 14:31:51 +0000
3340+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%born.f 2017-07-13 10:23:41 +0000
3341@@ -74,6 +74,7 @@
3342 COMMON/C_NFKSPROCESS/NFKSPROCESS
3343 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
3344 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
3345+ LOGICAL COND_IJ
3346 C ----------
3347 C BEGIN CODE
3348 C ----------
3349@@ -81,11 +82,15 @@
3350 GLU_IJ = IJ_VALUES(NFKSPROCESS)
3351 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
3352 IF (NTRY(NFKSPROCESS).LT.2) THEN
3353- SKIP(NFKSPROCESS)=1
3354- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3355- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3356- ENDDO
3357- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3358+ IF (GLU_IJ.EQ.0) THEN
3359+ SKIP(NFKSPROCESS)=0
3360+ ELSE
3361+ SKIP(NFKSPROCESS)=1
3362+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3363+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3364+ ENDDO
3365+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3366+ ENDIF
3367 ENDIF
3368 DO JJ=1,NGRAPHS
3369 AMP2(JJ)=0D0
3370@@ -118,7 +123,12 @@
3371 ANS(2) = 0D0
3372 HEL_FAC=1D0
3373 DO IHEL=1,NCOMB
3374- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
3375+ ! the following lines are to avoid segfaults when glu_ij=0
3376+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
3377+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
3378+ $ .EQ.NHEL(GLU_IJ,1)
3379+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
3380+ IF (COND_IJ) THEN
3381 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
3382 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
3383 $ 2) ) THEN
3384@@ -199,6 +209,7 @@
3385 INTEGER NFKSPROCESS
3386 COMMON/C_NFKSPROCESS/NFKSPROCESS
3387 INTEGER STEP_HEL
3388+ LOGICAL COND_IJ
3389 INTEGER IJ_VALUES(4)
3390 DATA IJ_VALUES /1, 2, 1, 2/
3391 C
3392@@ -216,14 +227,27 @@
3393 BACK_HEL = NHEL(GLU_IJ)
3394 BORNS(1) = 0D0
3395 BORNS(2) = 0D0
3396- IF (BACK_HEL.NE.0) THEN
3397- STEP_HEL=-2*BACK_HEL
3398+ IF (GLU_IJ.NE.0) THEN
3399+ BACK_HEL = NHEL(GLU_IJ)
3400+ IF (BACK_HEL.NE.0) THEN
3401+ STEP_HEL=-2*BACK_HEL
3402+ ELSE
3403+ STEP_HEL=1
3404+ ENDIF
3405 ELSE
3406+ BACK_HEL=0
3407 STEP_HEL=1
3408 ENDIF
3409 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
3410- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
3411- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3412+ IF (GLU_IJ.NE.0) THEN
3413+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
3414+ ELSE
3415+ COND_IJ=IHEL.EQ.BACK_HEL
3416+ ENDIF
3417+ IF (COND_IJ) THEN
3418+ IF (GLU_IJ.NE.0) THEN
3419+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3420+ ENDIF
3421 IF (.NOT. CALCULATEDBORN) THEN
3422 CALL OXXXXX(P(0,1),ZERO,NHEL(1),-1*IC(1),W(1,1))
3423 CALL IXXXXX(P(0,2),ZERO,NHEL(2),+1*IC(2),W(1,2))
3424@@ -278,7 +302,7 @@
3425 ENDDO
3426 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
3427 ENDDO
3428- NHEL(GLU_IJ) = BACK_HEL
3429+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
3430 END
3431
3432
3433
3434=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f'
3435--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f 2016-09-15 20:20:30 +0000
3436+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f 2017-07-13 10:23:41 +0000
3437@@ -130,8 +130,9 @@
3438 COMMON/HELUSERCHOICE/USERHEL
3439
3440 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
3441+ COMMON/BORN_BEAM_POL/POLARIZATIONS
3442 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
3443- COMMON/BORN_BEAM_POL/POLARIZATIONS
3444+
3445 C
3446 C FUNCTIONS
3447 C
3448
3449=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%coef_construction_1.f'
3450--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%coef_construction_1.f 2016-04-06 18:45:52 +0000
3451+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%coef_construction_1.f 2017-07-13 10:23:41 +0000
3452@@ -76,9 +76,9 @@
3453 COMPLEX*16 W(20,NWAVEFUNCS)
3454 COMMON/W/W
3455
3456- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3457- $ ,0:NLOOPWAVEFUNCS)
3458- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3459+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3460+ $ -1:NLOOPWAVEFUNCS)
3461+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3462 COMMON/WL/WL,PL
3463
3464 COMPLEX*16 AMPL(3,NCTAMPS)
3465
3466=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%helas_calls_ampb_1.f'
3467--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
3468+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
3469@@ -76,9 +76,9 @@
3470 COMPLEX*16 W(20,NWAVEFUNCS)
3471 COMMON/W/W
3472
3473- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3474- $ ,0:NLOOPWAVEFUNCS)
3475- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3476+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3477+ $ -1:NLOOPWAVEFUNCS)
3478+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3479 COMMON/WL/WL,PL
3480
3481 COMPLEX*16 AMPL(3,NCTAMPS)
3482
3483=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_CT_calls_1.f'
3484--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_CT_calls_1.f 2016-04-06 18:45:52 +0000
3485+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_CT_calls_1.f 2017-07-13 10:23:41 +0000
3486@@ -76,9 +76,9 @@
3487 COMPLEX*16 W(20,NWAVEFUNCS)
3488 COMMON/W/W
3489
3490- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3491- $ ,0:NLOOPWAVEFUNCS)
3492- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3493+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3494+ $ -1:NLOOPWAVEFUNCS)
3495+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3496 COMMON/WL/WL,PL
3497
3498 COMPLEX*16 AMPL(3,NCTAMPS)
3499
3500=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f'
3501--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2017-03-28 07:06:02 +0000
3502+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2017-07-13 10:23:41 +0000
3503@@ -353,9 +353,9 @@
3504 COMPLEX*32 MPW(20,NWAVEFUNCS)
3505 COMMON/MP_W/MPW
3506
3507- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3508- $ ,0:NLOOPWAVEFUNCS)
3509- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3510+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3511+ $ -1:NLOOPWAVEFUNCS)
3512+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3513 COMMON/WL/WL,PL
3514
3515 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3516@@ -583,12 +583,16 @@
3517
3518 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
3519 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
3520+C The index -1 is for the charge-conjugated fermions with
3521+C flipped fermion flow.
3522 DO I=0,3
3523+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
3524 PL(I,0)=DCMPLX(0.0D0,0.0D0)
3525 ENDDO
3526 DO I=1,MAXLWFSIZE
3527 DO J=0,LOOPMAXCOEFS-1
3528 DO K=1,MAXLWFSIZE
3529+ WL(I,J,K,-1)=(0.0D0,0.0D0)
3530 IF(I.EQ.K.AND.J.EQ.0) THEN
3531 WL(I,J,K,0)=(1.0D0,0.0D0)
3532 ELSE
3533@@ -603,6 +607,14 @@
3534 ENDIF
3535 ENDIF
3536
3537+C This is the chare conjugate version of the unit 4-currents in
3538+C the canonical cartesian basis.
3539+C This, for now, is only defined for 4-fermionic currents.
3540+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
3541+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
3542+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
3543+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
3544+
3545 C Make sure that lorentz rotation tests are not used if there is
3546 C external loop wavefunction of spin 2 and that one specific
3547 C helicity is asked
3548
3549=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_coef_construction_1.f'
3550--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_coef_construction_1.f 2016-04-06 18:45:52 +0000
3551+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_coef_construction_1.f 2017-07-13 10:23:41 +0000
3552@@ -60,9 +60,9 @@
3553 COMPLEX*32 W(20,NWAVEFUNCS)
3554 COMMON/MP_W/W
3555
3556- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3557- $ ,0:NLOOPWAVEFUNCS)
3558- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
3559+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3560+ $ -1:NLOOPWAVEFUNCS)
3561+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
3562 COMMON/MP_WL/WL,PL
3563
3564 COMPLEX*32 AMPL(3,NCTAMPS)
3565
3566=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f'
3567--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f 2016-09-15 20:20:30 +0000
3568+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_compute_loop_coefs.f 2017-07-13 10:23:41 +0000
3569@@ -119,14 +119,14 @@
3570 COMPLEX*16 DPW(20,NWAVEFUNCS)
3571 COMMON/W/DPW
3572
3573- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3574- $ ,0:NLOOPWAVEFUNCS)
3575- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
3576+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3577+ $ -1:NLOOPWAVEFUNCS)
3578+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
3579 COMMON/MP_WL/WL,PL
3580
3581- COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3582- $ ,0:NLOOPWAVEFUNCS)
3583- COMPLEX*16 DP_PL(0:3,0:NLOOPWAVEFUNCS)
3584+ COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3585+ $ -1:NLOOPWAVEFUNCS)
3586+ COMPLEX*16 DP_PL(0:3,-1:NLOOPWAVEFUNCS)
3587 COMMON/WL/DP_WL,DP_PL
3588
3589 COMPLEX*32 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3590@@ -191,8 +191,10 @@
3591 ENDDO
3592
3593 DO I=0,3
3594+ PL(I,-1)=CMPLX(ZERO,ZERO,KIND=16)
3595 PL(I,0)=CMPLX(ZERO,ZERO,KIND=16)
3596 IF (.NOT.COMPUTE_INTEGRAND_IN_QP) THEN
3597+ DP_PL(I,-1)=DCMPLX(0.0D0,0.0D0)
3598 DP_PL(I,0)=DCMPLX(0.0D0,0.0D0)
3599 ENDIF
3600 ENDDO
3601@@ -200,6 +202,8 @@
3602 DO I=1,MAXLWFSIZE
3603 DO J=0,LOOPMAXCOEFS-1
3604 DO K=1,MAXLWFSIZE
3605+ WL(I,J,K,-1)=(ZERO,ZERO)
3606+ DP_WL(I,J,K,-1)=(0.0D0,0.0D0)
3607 IF (I.EQ.K.AND.J.EQ.0) THEN
3608 WL(I,J,K,0)=(1.0E0_16,ZERO)
3609 ELSE
3610@@ -216,6 +220,19 @@
3611 ENDDO
3612 ENDDO
3613
3614+C This is the chare conjugate version of the unit 4-currents in
3615+C the canonical cartesian basis.
3616+C This, for now, is only defined for 4-fermionic currents.
3617+ WL(1,0,2,-1) = (-1.0E0_16,ZERO)
3618+ WL(2,0,1,-1) = (1.0E0_16,ZERO)
3619+ WL(3,0,4,-1) = (1.0E0_16,ZERO)
3620+ WL(4,0,3,-1) = (-1.0E0_16,ZERO)
3621+ DP_WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
3622+ DP_WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
3623+ DP_WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
3624+ DP_WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
3625+
3626+
3627 DO K=1, 3
3628 DO I=1,NCTAMPS
3629 AMPL(K,I)=(ZERO,ZERO)
3630
3631=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_helas_calls_ampb_1.f'
3632--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
3633+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%mp_helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
3634@@ -60,9 +60,9 @@
3635 COMPLEX*32 W(20,NWAVEFUNCS)
3636 COMMON/MP_W/W
3637
3638- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3639- $ ,0:NLOOPWAVEFUNCS)
3640- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
3641+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3642+ $ -1:NLOOPWAVEFUNCS)
3643+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
3644 COMMON/MP_WL/WL,PL
3645
3646 COMPLEX*32 AMPL(3,NCTAMPS)
3647
3648=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f'
3649--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f 2017-05-09 14:31:51 +0000
3650+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%born.f 2017-07-13 10:23:41 +0000
3651@@ -74,6 +74,7 @@
3652 COMMON/C_NFKSPROCESS/NFKSPROCESS
3653 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
3654 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
3655+ LOGICAL COND_IJ
3656 C ----------
3657 C BEGIN CODE
3658 C ----------
3659@@ -81,11 +82,15 @@
3660 GLU_IJ = IJ_VALUES(NFKSPROCESS)
3661 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
3662 IF (NTRY(NFKSPROCESS).LT.2) THEN
3663- SKIP(NFKSPROCESS)=1
3664- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3665- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3666- ENDDO
3667- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3668+ IF (GLU_IJ.EQ.0) THEN
3669+ SKIP(NFKSPROCESS)=0
3670+ ELSE
3671+ SKIP(NFKSPROCESS)=1
3672+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3673+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3674+ ENDDO
3675+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3676+ ENDIF
3677 ENDIF
3678 DO JJ=1,NGRAPHS
3679 AMP2(JJ)=0D0
3680@@ -118,7 +123,12 @@
3681 ANS(2) = 0D0
3682 HEL_FAC=1D0
3683 DO IHEL=1,NCOMB
3684- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
3685+ ! the following lines are to avoid segfaults when glu_ij=0
3686+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
3687+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
3688+ $ .EQ.NHEL(GLU_IJ,1)
3689+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
3690+ IF (COND_IJ) THEN
3691 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
3692 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
3693 $ 2) ) THEN
3694@@ -199,6 +209,7 @@
3695 INTEGER NFKSPROCESS
3696 COMMON/C_NFKSPROCESS/NFKSPROCESS
3697 INTEGER STEP_HEL
3698+ LOGICAL COND_IJ
3699 INTEGER IJ_VALUES(4)
3700 DATA IJ_VALUES /1, 2, 1, 2/
3701 C
3702@@ -216,14 +227,27 @@
3703 BACK_HEL = NHEL(GLU_IJ)
3704 BORNS(1) = 0D0
3705 BORNS(2) = 0D0
3706- IF (BACK_HEL.NE.0) THEN
3707- STEP_HEL=-2*BACK_HEL
3708+ IF (GLU_IJ.NE.0) THEN
3709+ BACK_HEL = NHEL(GLU_IJ)
3710+ IF (BACK_HEL.NE.0) THEN
3711+ STEP_HEL=-2*BACK_HEL
3712+ ELSE
3713+ STEP_HEL=1
3714+ ENDIF
3715 ELSE
3716+ BACK_HEL=0
3717 STEP_HEL=1
3718 ENDIF
3719 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
3720- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
3721- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3722+ IF (GLU_IJ.NE.0) THEN
3723+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
3724+ ELSE
3725+ COND_IJ=IHEL.EQ.BACK_HEL
3726+ ENDIF
3727+ IF (COND_IJ) THEN
3728+ IF (GLU_IJ.NE.0) THEN
3729+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3730+ ENDIF
3731 IF (.NOT. CALCULATEDBORN) THEN
3732 CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1))
3733 CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
3734@@ -278,7 +302,7 @@
3735 ENDDO
3736 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
3737 ENDDO
3738- NHEL(GLU_IJ) = BACK_HEL
3739+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
3740 END
3741
3742
3743
3744=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f'
3745--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f 2017-05-09 14:31:51 +0000
3746+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_tdecay_fksreal/%SubProcesses%P0_t_budx%born.f 2017-07-13 10:23:41 +0000
3747@@ -56,7 +56,7 @@
3748 INTEGER IDEN_VALUES(3)
3749 DATA IDEN_VALUES /6, 6, 6/
3750 INTEGER IJ_VALUES(3)
3751- DATA IJ_VALUES /2, 3, 4/
3752+ DATA IJ_VALUES /0, 3, 4/
3753 C
3754 C GLOBAL VARIABLES
3755 C
3756@@ -78,6 +78,7 @@
3757 COMMON/C_NFKSPROCESS/NFKSPROCESS
3758 DOUBLE PRECISION WGT_ME_BORN,WGT_ME_REAL
3759 COMMON /C_WGT_ME_TREE/ WGT_ME_BORN,WGT_ME_REAL
3760+ LOGICAL COND_IJ
3761 C ----------
3762 C BEGIN CODE
3763 C ----------
3764@@ -85,11 +86,15 @@
3765 GLU_IJ = IJ_VALUES(NFKSPROCESS)
3766 NTRY(NFKSPROCESS)=NTRY(NFKSPROCESS)+1
3767 IF (NTRY(NFKSPROCESS).LT.2) THEN
3768- SKIP(NFKSPROCESS)=1
3769- DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3770- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3771- ENDDO
3772- SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3773+ IF (GLU_IJ.EQ.0) THEN
3774+ SKIP(NFKSPROCESS)=0
3775+ ELSE
3776+ SKIP(NFKSPROCESS)=1
3777+ DO WHILE(NHEL(GLU_IJ ,SKIP(NFKSPROCESS)).NE.-NHEL(GLU_IJ ,1))
3778+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)+1
3779+ ENDDO
3780+ SKIP(NFKSPROCESS)=SKIP(NFKSPROCESS)-1
3781+ ENDIF
3782 ENDIF
3783 DO JJ=1,NGRAPHS
3784 AMP2(JJ)=0D0
3785@@ -122,7 +127,12 @@
3786 ANS(2) = 0D0
3787 HEL_FAC=1D0
3788 DO IHEL=1,NCOMB
3789- IF (NHEL(GLU_IJ,IHEL).EQ.NHEL(GLU_IJ,1)) THEN
3790+ ! the following lines are to avoid segfaults when glu_ij=0
3791+ COND_IJ=SKIP(NFKSPROCESS).EQ.0
3792+ IF (.NOT.COND_IJ) COND_IJ=COND_IJ.OR.NHEL(GLU_IJ,IHEL)
3793+ $ .EQ.NHEL(GLU_IJ,1)
3794+ !if (nhel(glu_ij,ihel).EQ.NHEL(GLU_IJ,1).or.skip(nfksprocess).eq.0) then
3795+ IF (COND_IJ) THEN
3796 IF ((GOODHEL(IHEL,NFKSPROCESS) .OR. GOODHEL(IHEL
3797 $ +SKIP(NFKSPROCESS),NFKSPROCESS) .OR. NTRY(NFKSPROCESS) .LT.
3798 $ 2) ) THEN
3799@@ -203,8 +213,9 @@
3800 INTEGER NFKSPROCESS
3801 COMMON/C_NFKSPROCESS/NFKSPROCESS
3802 INTEGER STEP_HEL
3803+ LOGICAL COND_IJ
3804 INTEGER IJ_VALUES(3)
3805- DATA IJ_VALUES /2, 3, 4/
3806+ DATA IJ_VALUES /0, 3, 4/
3807 C
3808 C COLOR DATA
3809 C
3810@@ -220,14 +231,27 @@
3811 BACK_HEL = NHEL(GLU_IJ)
3812 BORNS(1) = 0D0
3813 BORNS(2) = 0D0
3814- IF (BACK_HEL.NE.0) THEN
3815- STEP_HEL=-2*BACK_HEL
3816+ IF (GLU_IJ.NE.0) THEN
3817+ BACK_HEL = NHEL(GLU_IJ)
3818+ IF (BACK_HEL.NE.0) THEN
3819+ STEP_HEL=-2*BACK_HEL
3820+ ELSE
3821+ STEP_HEL=1
3822+ ENDIF
3823 ELSE
3824+ BACK_HEL=0
3825 STEP_HEL=1
3826 ENDIF
3827 DO IHEL=BACK_HEL,-BACK_HEL,STEP_HEL
3828- IF (IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0) THEN
3829- IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3830+ IF (GLU_IJ.NE.0) THEN
3831+ COND_IJ=IHEL.EQ.BACK_HEL.OR.NHEL(GLU_IJ).NE.0
3832+ ELSE
3833+ COND_IJ=IHEL.EQ.BACK_HEL
3834+ ENDIF
3835+ IF (COND_IJ) THEN
3836+ IF (GLU_IJ.NE.0) THEN
3837+ IF (NHEL(GLU_IJ).NE.0) NHEL(GLU_IJ) = IHEL
3838+ ENDIF
3839 IF (.NOT. CALCULATEDBORN) THEN
3840 CALL IXXXXX(P(0,1),MDL_MT,NHEL(1),+1*IC(1),W(1,1))
3841 CALL OXXXXX(P(0,2),MDL_MB,NHEL(2),+1*IC(2),W(1,2))
3842@@ -284,7 +308,7 @@
3843 ENDDO
3844 BORNTILDE = BORNTILDE + ZTEMP*DCONJG(JAMPH(1,I))/DENOM(I)
3845 ENDDO
3846- NHEL(GLU_IJ) = BACK_HEL
3847+ IF (GLU_IJ.NE.0) NHEL(GLU_IJ) = BACK_HEL
3848 END
3849
3850
3851
3852=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f'
3853--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f 2016-02-27 14:33:01 +0000
3854+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/super_auto_dsig.f 2017-07-13 10:23:41 +0000
3855@@ -303,15 +303,17 @@
3856 TOTWGT=0D0
3857 DO J=1,SYMCONF(0)
3858 DO I=1,MAXSPROC
3859- DO K=1,2
3860- TOTWGT=TOTWGT+SELPROC(K,I,J)
3861- IF(R.LT.TOTWGT)THEN
3862- IPROC=I
3863- ICONF=J
3864- IMIRROR=K
3865- GOTO 50
3866- ENDIF
3867- ENDDO
3868+ IF(CONFSUB(I,SYMCONF(J)).NE.0) THEN
3869+ DO K=1,2
3870+ TOTWGT=TOTWGT+SELPROC(K,I,J)
3871+ IF(R.LT.TOTWGT)THEN
3872+ IPROC=I
3873+ ICONF=J
3874+ IMIRROR=K
3875+ GOTO 50
3876+ ENDIF
3877+ ENDDO
3878+ ENDIF
3879 ENDDO
3880 ENDDO
3881 50 CONTINUE
3882
3883=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f'
3884--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f 2016-09-15 20:20:30 +0000
3885+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f 2017-07-13 10:23:41 +0000
3886@@ -121,8 +121,9 @@
3887 DATA IDEN/24/
3888
3889 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
3890+ COMMON/BORN_BEAM_POL/POLARIZATIONS
3891 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
3892- COMMON/BORN_BEAM_POL/POLARIZATIONS
3893+
3894 C
3895 C FUNCTIONS
3896 C
3897
3898=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f'
3899--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2017-04-06 21:08:27 +0000
3900+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2017-07-13 10:23:41 +0000
3901@@ -358,9 +358,9 @@
3902 COMPLEX*32 MPW(20,NWAVEFUNCS)
3903 COMMON/ML5_0_MP_W/MPW
3904
3905- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3906- $ ,0:NLOOPWAVEFUNCS)
3907- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3908+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3909+ $ -1:NLOOPWAVEFUNCS)
3910+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3911 COMMON/ML5_0_WL/WL,PL
3912
3913 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3914@@ -591,12 +591,16 @@
3915
3916 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
3917 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
3918+C The index -1 is for the charge-conjugated fermions with
3919+C flipped fermion flow.
3920 DO I=0,3
3921+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
3922 PL(I,0)=DCMPLX(0.0D0,0.0D0)
3923 ENDDO
3924 DO I=1,MAXLWFSIZE
3925 DO J=0,LOOPMAXCOEFS-1
3926 DO K=1,MAXLWFSIZE
3927+ WL(I,J,K,-1)=(0.0D0,0.0D0)
3928 IF(I.EQ.K.AND.J.EQ.0) THEN
3929 WL(I,J,K,0)=(1.0D0,0.0D0)
3930 ELSE
3931@@ -611,6 +615,14 @@
3932 ENDIF
3933 ENDIF
3934
3935+C This is the chare conjugate version of the unit 4-currents in
3936+C the canonical cartesian basis.
3937+C This, for now, is only defined for 4-fermionic currents.
3938+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
3939+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
3940+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
3941+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
3942+
3943 C Make sure that lorentz rotation tests are not used if there is
3944 C external loop wavefunction of spin 2 and that one specific
3945 C helicity is asked
3946
3947=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f'
3948--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2017-04-06 21:08:27 +0000
3949+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2017-07-13 10:23:41 +0000
3950@@ -358,9 +358,9 @@
3951 COMPLEX*32 MPW(20,NWAVEFUNCS)
3952 COMMON/ML5_0_MP_W/MPW
3953
3954- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
3955- $ ,0:NLOOPWAVEFUNCS)
3956- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
3957+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
3958+ $ -1:NLOOPWAVEFUNCS)
3959+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
3960 COMMON/ML5_0_WL/WL,PL
3961
3962 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3963@@ -591,12 +591,16 @@
3964
3965 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
3966 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
3967+C The index -1 is for the charge-conjugated fermions with
3968+C flipped fermion flow.
3969 DO I=0,3
3970+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
3971 PL(I,0)=DCMPLX(0.0D0,0.0D0)
3972 ENDDO
3973 DO I=1,MAXLWFSIZE
3974 DO J=0,LOOPMAXCOEFS-1
3975 DO K=1,MAXLWFSIZE
3976+ WL(I,J,K,-1)=(0.0D0,0.0D0)
3977 IF(I.EQ.K.AND.J.EQ.0) THEN
3978 WL(I,J,K,0)=(1.0D0,0.0D0)
3979 ELSE
3980@@ -611,6 +615,14 @@
3981 ENDIF
3982 ENDIF
3983
3984+C This is the chare conjugate version of the unit 4-currents in
3985+C the canonical cartesian basis.
3986+C This, for now, is only defined for 4-fermionic currents.
3987+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
3988+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
3989+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
3990+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
3991+
3992 C Make sure that lorentz rotation tests are not used if there is
3993 C external loop wavefunction of spin 2 and that one specific
3994 C helicity is asked
3995
3996=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f'
3997--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2017-04-06 21:08:27 +0000
3998+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2017-07-13 10:23:41 +0000
3999@@ -352,9 +352,9 @@
4000 COMPLEX*32 MPW(20,NWAVEFUNCS)
4001 COMMON/ML5_0_MP_W/MPW
4002
4003- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4004- $ ,0:NLOOPWAVEFUNCS)
4005- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4006+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4007+ $ -1:NLOOPWAVEFUNCS)
4008+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4009 COMMON/ML5_0_WL/WL,PL
4010
4011 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4012@@ -583,12 +583,16 @@
4013
4014 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4015 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4016+C The index -1 is for the charge-conjugated fermions with
4017+C flipped fermion flow.
4018 DO I=0,3
4019+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4020 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4021 ENDDO
4022 DO I=1,MAXLWFSIZE
4023 DO J=0,LOOPMAXCOEFS-1
4024 DO K=1,MAXLWFSIZE
4025+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4026 IF(I.EQ.K.AND.J.EQ.0) THEN
4027 WL(I,J,K,0)=(1.0D0,0.0D0)
4028 ELSE
4029@@ -603,6 +607,14 @@
4030 ENDIF
4031 ENDIF
4032
4033+C This is the chare conjugate version of the unit 4-currents in
4034+C the canonical cartesian basis.
4035+C This, for now, is only defined for 4-fermionic currents.
4036+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4037+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4038+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4039+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4040+
4041 C Make sure that lorentz rotation tests are not used if there is
4042 C external loop wavefunction of spin 2 and that one specific
4043 C helicity is asked
4044
4045=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f'
4046--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2017-04-06 21:08:27 +0000
4047+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2017-07-13 10:23:41 +0000
4048@@ -358,9 +358,9 @@
4049 COMPLEX*32 MPW(20,NWAVEFUNCS)
4050 COMMON/ML5_0_MP_W/MPW
4051
4052- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4053- $ ,0:NLOOPWAVEFUNCS)
4054- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4055+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4056+ $ -1:NLOOPWAVEFUNCS)
4057+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4058 COMMON/ML5_0_WL/WL,PL
4059
4060 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4061@@ -591,12 +591,16 @@
4062
4063 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4064 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4065+C The index -1 is for the charge-conjugated fermions with
4066+C flipped fermion flow.
4067 DO I=0,3
4068+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4069 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4070 ENDDO
4071 DO I=1,MAXLWFSIZE
4072 DO J=0,LOOPMAXCOEFS-1
4073 DO K=1,MAXLWFSIZE
4074+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4075 IF(I.EQ.K.AND.J.EQ.0) THEN
4076 WL(I,J,K,0)=(1.0D0,0.0D0)
4077 ELSE
4078@@ -611,6 +615,14 @@
4079 ENDIF
4080 ENDIF
4081
4082+C This is the chare conjugate version of the unit 4-currents in
4083+C the canonical cartesian basis.
4084+C This, for now, is only defined for 4-fermionic currents.
4085+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4086+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4087+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4088+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4089+
4090 C Make sure that lorentz rotation tests are not used if there is
4091 C external loop wavefunction of spin 2 and that one specific
4092 C helicity is asked
4093
4094=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f'
4095--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2017-04-06 21:08:27 +0000
4096+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2017-07-13 10:23:41 +0000
4097@@ -358,9 +358,9 @@
4098 COMPLEX*32 MPW(20,NWAVEFUNCS)
4099 COMMON/ML5_0_MP_W/MPW
4100
4101- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4102- $ ,0:NLOOPWAVEFUNCS)
4103- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4104+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4105+ $ -1:NLOOPWAVEFUNCS)
4106+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4107 COMMON/ML5_0_WL/WL,PL
4108
4109 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4110@@ -591,12 +591,16 @@
4111
4112 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4113 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4114+C The index -1 is for the charge-conjugated fermions with
4115+C flipped fermion flow.
4116 DO I=0,3
4117+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4118 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4119 ENDDO
4120 DO I=1,MAXLWFSIZE
4121 DO J=0,LOOPMAXCOEFS-1
4122 DO K=1,MAXLWFSIZE
4123+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4124 IF(I.EQ.K.AND.J.EQ.0) THEN
4125 WL(I,J,K,0)=(1.0D0,0.0D0)
4126 ELSE
4127@@ -611,6 +615,14 @@
4128 ENDIF
4129 ENDIF
4130
4131+C This is the chare conjugate version of the unit 4-currents in
4132+C the canonical cartesian basis.
4133+C This, for now, is only defined for 4-fermionic currents.
4134+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4135+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4136+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4137+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4138+
4139 C Make sure that lorentz rotation tests are not used if there is
4140 C external loop wavefunction of spin 2 and that one specific
4141 C helicity is asked
4142
4143=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f'
4144--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2017-04-06 21:08:27 +0000
4145+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2017-07-13 10:23:41 +0000
4146@@ -358,9 +358,9 @@
4147 COMPLEX*32 MPW(20,NWAVEFUNCS)
4148 COMMON/ML5_0_MP_W/MPW
4149
4150- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4151- $ ,0:NLOOPWAVEFUNCS)
4152- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4153+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4154+ $ -1:NLOOPWAVEFUNCS)
4155+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4156 COMMON/ML5_0_WL/WL,PL
4157
4158 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4159@@ -591,12 +591,16 @@
4160
4161 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4162 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4163+C The index -1 is for the charge-conjugated fermions with
4164+C flipped fermion flow.
4165 DO I=0,3
4166+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4167 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4168 ENDDO
4169 DO I=1,MAXLWFSIZE
4170 DO J=0,LOOPMAXCOEFS-1
4171 DO K=1,MAXLWFSIZE
4172+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4173 IF(I.EQ.K.AND.J.EQ.0) THEN
4174 WL(I,J,K,0)=(1.0D0,0.0D0)
4175 ELSE
4176@@ -611,6 +615,14 @@
4177 ENDIF
4178 ENDIF
4179
4180+C This is the chare conjugate version of the unit 4-currents in
4181+C the canonical cartesian basis.
4182+C This, for now, is only defined for 4-fermionic currents.
4183+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4184+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4185+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4186+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4187+
4188 C Make sure that lorentz rotation tests are not used if there is
4189 C external loop wavefunction of spin 2 and that one specific
4190 C helicity is asked
4191
4192=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f'
4193--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2017-04-06 21:08:27 +0000
4194+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2017-07-13 10:23:41 +0000
4195@@ -352,9 +352,9 @@
4196 COMPLEX*32 MPW(20,NWAVEFUNCS)
4197 COMMON/ML5_0_MP_W/MPW
4198
4199- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4200- $ ,0:NLOOPWAVEFUNCS)
4201- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4202+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4203+ $ -1:NLOOPWAVEFUNCS)
4204+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4205 COMMON/ML5_0_WL/WL,PL
4206
4207 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4208@@ -583,12 +583,16 @@
4209
4210 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4211 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4212+C The index -1 is for the charge-conjugated fermions with
4213+C flipped fermion flow.
4214 DO I=0,3
4215+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4216 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4217 ENDDO
4218 DO I=1,MAXLWFSIZE
4219 DO J=0,LOOPMAXCOEFS-1
4220 DO K=1,MAXLWFSIZE
4221+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4222 IF(I.EQ.K.AND.J.EQ.0) THEN
4223 WL(I,J,K,0)=(1.0D0,0.0D0)
4224 ELSE
4225@@ -603,6 +607,14 @@
4226 ENDIF
4227 ENDIF
4228
4229+C This is the chare conjugate version of the unit 4-currents in
4230+C the canonical cartesian basis.
4231+C This, for now, is only defined for 4-fermionic currents.
4232+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4233+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4234+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4235+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4236+
4237 C Make sure that lorentz rotation tests are not used if there is
4238 C external loop wavefunction of spin 2 and that one specific
4239 C helicity is asked
4240
4241=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f'
4242--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2017-04-06 21:08:27 +0000
4243+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2017-07-13 10:23:41 +0000
4244@@ -352,9 +352,9 @@
4245 COMPLEX*32 MPW(20,NWAVEFUNCS)
4246 COMMON/ML5_0_MP_W/MPW
4247
4248- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4249- $ ,0:NLOOPWAVEFUNCS)
4250- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4251+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4252+ $ -1:NLOOPWAVEFUNCS)
4253+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4254 COMMON/ML5_0_WL/WL,PL
4255
4256 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4257@@ -583,12 +583,16 @@
4258
4259 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4260 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4261+C The index -1 is for the charge-conjugated fermions with
4262+C flipped fermion flow.
4263 DO I=0,3
4264+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4265 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4266 ENDDO
4267 DO I=1,MAXLWFSIZE
4268 DO J=0,LOOPMAXCOEFS-1
4269 DO K=1,MAXLWFSIZE
4270+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4271 IF(I.EQ.K.AND.J.EQ.0) THEN
4272 WL(I,J,K,0)=(1.0D0,0.0D0)
4273 ELSE
4274@@ -603,6 +607,14 @@
4275 ENDIF
4276 ENDIF
4277
4278+C This is the chare conjugate version of the unit 4-currents in
4279+C the canonical cartesian basis.
4280+C This, for now, is only defined for 4-fermionic currents.
4281+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4282+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4283+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4284+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4285+
4286 C Make sure that lorentz rotation tests are not used if there is
4287 C external loop wavefunction of spin 2 and that one specific
4288 C helicity is asked
4289
4290=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f'
4291--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f 2016-09-15 20:20:30 +0000
4292+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f 2017-07-13 10:23:41 +0000
4293@@ -133,8 +133,9 @@
4294 COMMON/ML5_0_HELUSERCHOICE/USERHEL
4295
4296 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4297+ COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4298 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4299- COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4300+
4301 C
4302 C FUNCTIONS
4303 C
4304
4305=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%coef_construction_1.f'
4306--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%coef_construction_1.f 2016-04-06 18:45:52 +0000
4307+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%coef_construction_1.f 2017-07-13 10:23:41 +0000
4308@@ -76,9 +76,9 @@
4309 COMPLEX*16 W(20,NWAVEFUNCS)
4310 COMMON/ML5_0_W/W
4311
4312- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4313- $ ,0:NLOOPWAVEFUNCS)
4314- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4315+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4316+ $ -1:NLOOPWAVEFUNCS)
4317+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4318 COMMON/ML5_0_WL/WL,PL
4319
4320 COMPLEX*16 AMPL(3,NCTAMPS)
4321
4322=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_ampb_1.f'
4323--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
4324+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
4325@@ -76,9 +76,9 @@
4326 COMPLEX*16 W(20,NWAVEFUNCS)
4327 COMMON/ML5_0_W/W
4328
4329- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4330- $ ,0:NLOOPWAVEFUNCS)
4331- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4332+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4333+ $ -1:NLOOPWAVEFUNCS)
4334+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4335 COMMON/ML5_0_WL/WL,PL
4336
4337 COMPLEX*16 AMPL(3,NCTAMPS)
4338
4339=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_uvct_1.f'
4340--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_uvct_1.f 2016-04-06 18:45:52 +0000
4341+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%helas_calls_uvct_1.f 2017-07-13 10:23:41 +0000
4342@@ -76,9 +76,9 @@
4343 COMPLEX*16 W(20,NWAVEFUNCS)
4344 COMMON/ML5_0_W/W
4345
4346- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4347- $ ,0:NLOOPWAVEFUNCS)
4348- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4349+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4350+ $ -1:NLOOPWAVEFUNCS)
4351+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4352 COMMON/ML5_0_WL/WL,PL
4353
4354 COMPLEX*16 AMPL(3,NCTAMPS)
4355
4356=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_CT_calls_1.f'
4357--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_CT_calls_1.f 2016-04-06 18:45:52 +0000
4358+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_CT_calls_1.f 2017-07-13 10:23:41 +0000
4359@@ -76,9 +76,9 @@
4360 COMPLEX*16 W(20,NWAVEFUNCS)
4361 COMMON/ML5_0_W/W
4362
4363- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4364- $ ,0:NLOOPWAVEFUNCS)
4365- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4366+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4367+ $ -1:NLOOPWAVEFUNCS)
4368+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4369 COMMON/ML5_0_WL/WL,PL
4370
4371 COMPLEX*16 AMPL(3,NCTAMPS)
4372
4373=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f'
4374--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2017-03-28 14:32:20 +0000
4375+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2017-07-13 10:23:41 +0000
4376@@ -352,9 +352,9 @@
4377 COMPLEX*32 MPW(20,NWAVEFUNCS)
4378 COMMON/ML5_0_MP_W/MPW
4379
4380- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4381- $ ,0:NLOOPWAVEFUNCS)
4382- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4383+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4384+ $ -1:NLOOPWAVEFUNCS)
4385+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4386 COMMON/ML5_0_WL/WL,PL
4387
4388 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4389@@ -583,12 +583,16 @@
4390
4391 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4392 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4393+C The index -1 is for the charge-conjugated fermions with
4394+C flipped fermion flow.
4395 DO I=0,3
4396+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4397 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4398 ENDDO
4399 DO I=1,MAXLWFSIZE
4400 DO J=0,LOOPMAXCOEFS-1
4401 DO K=1,MAXLWFSIZE
4402+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4403 IF(I.EQ.K.AND.J.EQ.0) THEN
4404 WL(I,J,K,0)=(1.0D0,0.0D0)
4405 ELSE
4406@@ -603,6 +607,14 @@
4407 ENDIF
4408 ENDIF
4409
4410+C This is the chare conjugate version of the unit 4-currents in
4411+C the canonical cartesian basis.
4412+C This, for now, is only defined for 4-fermionic currents.
4413+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4414+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4415+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4416+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4417+
4418 C Make sure that lorentz rotation tests are not used if there is
4419 C external loop wavefunction of spin 2 and that one specific
4420 C helicity is asked
4421
4422=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_coef_construction_1.f'
4423--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_coef_construction_1.f 2016-04-06 18:45:52 +0000
4424+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_coef_construction_1.f 2017-07-13 10:23:41 +0000
4425@@ -60,9 +60,9 @@
4426 COMPLEX*32 W(20,NWAVEFUNCS)
4427 COMMON/ML5_0_MP_W/W
4428
4429- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4430- $ ,0:NLOOPWAVEFUNCS)
4431- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4432+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4433+ $ -1:NLOOPWAVEFUNCS)
4434+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4435 COMMON/ML5_0_MP_WL/WL,PL
4436
4437 COMPLEX*32 AMPL(3,NCTAMPS)
4438
4439=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f'
4440--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f 2016-09-15 20:20:30 +0000
4441+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_compute_loop_coefs.f 2017-07-13 10:23:41 +0000
4442@@ -118,14 +118,14 @@
4443 COMPLEX*16 DPW(20,NWAVEFUNCS)
4444 COMMON/ML5_0_W/DPW
4445
4446- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4447- $ ,0:NLOOPWAVEFUNCS)
4448- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4449+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4450+ $ -1:NLOOPWAVEFUNCS)
4451+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4452 COMMON/ML5_0_MP_WL/WL,PL
4453
4454- COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4455- $ ,0:NLOOPWAVEFUNCS)
4456- COMPLEX*16 DP_PL(0:3,0:NLOOPWAVEFUNCS)
4457+ COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4458+ $ -1:NLOOPWAVEFUNCS)
4459+ COMPLEX*16 DP_PL(0:3,-1:NLOOPWAVEFUNCS)
4460 COMMON/ML5_0_WL/DP_WL,DP_PL
4461
4462 COMPLEX*32 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4463@@ -190,8 +190,10 @@
4464 ENDDO
4465
4466 DO I=0,3
4467+ PL(I,-1)=CMPLX(ZERO,ZERO,KIND=16)
4468 PL(I,0)=CMPLX(ZERO,ZERO,KIND=16)
4469 IF (.NOT.COMPUTE_INTEGRAND_IN_QP) THEN
4470+ DP_PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4471 DP_PL(I,0)=DCMPLX(0.0D0,0.0D0)
4472 ENDIF
4473 ENDDO
4474@@ -199,6 +201,8 @@
4475 DO I=1,MAXLWFSIZE
4476 DO J=0,LOOPMAXCOEFS-1
4477 DO K=1,MAXLWFSIZE
4478+ WL(I,J,K,-1)=(ZERO,ZERO)
4479+ DP_WL(I,J,K,-1)=(0.0D0,0.0D0)
4480 IF (I.EQ.K.AND.J.EQ.0) THEN
4481 WL(I,J,K,0)=(1.0E0_16,ZERO)
4482 ELSE
4483@@ -215,6 +219,19 @@
4484 ENDDO
4485 ENDDO
4486
4487+C This is the chare conjugate version of the unit 4-currents in
4488+C the canonical cartesian basis.
4489+C This, for now, is only defined for 4-fermionic currents.
4490+ WL(1,0,2,-1) = (-1.0E0_16,ZERO)
4491+ WL(2,0,1,-1) = (1.0E0_16,ZERO)
4492+ WL(3,0,4,-1) = (1.0E0_16,ZERO)
4493+ WL(4,0,3,-1) = (-1.0E0_16,ZERO)
4494+ DP_WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4495+ DP_WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4496+ DP_WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4497+ DP_WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4498+
4499+
4500 DO K=1, 3
4501 DO I=1,NCTAMPS
4502 AMPL(K,I)=(ZERO,ZERO)
4503
4504=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_ampb_1.f'
4505--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
4506+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
4507@@ -60,9 +60,9 @@
4508 COMPLEX*32 W(20,NWAVEFUNCS)
4509 COMMON/ML5_0_MP_W/W
4510
4511- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4512- $ ,0:NLOOPWAVEFUNCS)
4513- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4514+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4515+ $ -1:NLOOPWAVEFUNCS)
4516+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4517 COMMON/ML5_0_MP_WL/WL,PL
4518
4519 COMPLEX*32 AMPL(3,NCTAMPS)
4520
4521=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_uvct_1.f'
4522--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_uvct_1.f 2016-04-06 18:45:52 +0000
4523+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%mp_helas_calls_uvct_1.f 2017-07-13 10:23:41 +0000
4524@@ -60,9 +60,9 @@
4525 COMPLEX*32 W(20,NWAVEFUNCS)
4526 COMMON/ML5_0_MP_W/W
4527
4528- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4529- $ ,0:NLOOPWAVEFUNCS)
4530- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4531+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4532+ $ -1:NLOOPWAVEFUNCS)
4533+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4534 COMMON/ML5_0_MP_WL/WL,PL
4535
4536 COMPLEX*32 AMPL(3,NCTAMPS)
4537
4538=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f'
4539--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f 2016-09-15 20:20:30 +0000
4540+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f 2017-07-13 10:23:41 +0000
4541@@ -153,8 +153,9 @@
4542 DATA IDEN/144/
4543
4544 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4545+ COMMON/BORN_BEAM_POL/POLARIZATIONS
4546 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4547- COMMON/BORN_BEAM_POL/POLARIZATIONS
4548+
4549 C
4550 C FUNCTIONS
4551 C
4552
4553=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f'
4554--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f 2016-09-15 20:20:30 +0000
4555+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f 2017-07-13 10:23:41 +0000
4556@@ -181,8 +181,9 @@
4557 COMMON/HELUSERCHOICE/USERHEL
4558
4559 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4560+ COMMON/BORN_BEAM_POL/POLARIZATIONS
4561 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4562- COMMON/BORN_BEAM_POL/POLARIZATIONS
4563+
4564 C
4565 C FUNCTIONS
4566 C
4567
4568=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f'
4569--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f 2016-09-15 20:20:30 +0000
4570+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f 2017-07-13 10:23:41 +0000
4571@@ -181,8 +181,9 @@
4572 COMMON/HELUSERCHOICE/USERHEL
4573
4574 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4575+ COMMON/BORN_BEAM_POL/POLARIZATIONS
4576 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4577- COMMON/BORN_BEAM_POL/POLARIZATIONS
4578+
4579 C
4580 C FUNCTIONS
4581 C
4582
4583=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%coef_construction_1.f'
4584--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%coef_construction_1.f 2016-04-06 18:45:52 +0000
4585+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%coef_construction_1.f 2017-07-13 10:23:41 +0000
4586@@ -76,9 +76,9 @@
4587 COMPLEX*16 W(20,NWAVEFUNCS)
4588 COMMON/MG5_1_W/W
4589
4590- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4591- $ ,0:NLOOPWAVEFUNCS)
4592- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4593+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4594+ $ -1:NLOOPWAVEFUNCS)
4595+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4596 COMMON/MG5_1_WL/WL,PL
4597
4598 COMPLEX*16 AMPL(3,NCTAMPS)
4599
4600=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%helas_calls_ampb_1.f'
4601--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
4602+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
4603@@ -76,9 +76,9 @@
4604 COMPLEX*16 W(20,NWAVEFUNCS)
4605 COMMON/MG5_1_W/W
4606
4607- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4608- $ ,0:NLOOPWAVEFUNCS)
4609- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4610+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4611+ $ -1:NLOOPWAVEFUNCS)
4612+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4613 COMMON/MG5_1_WL/WL,PL
4614
4615 COMPLEX*16 AMPL(3,NCTAMPS)
4616
4617=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_CT_calls_1.f'
4618--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_CT_calls_1.f 2016-04-06 18:45:52 +0000
4619+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_CT_calls_1.f 2017-07-13 10:23:41 +0000
4620@@ -76,9 +76,9 @@
4621 COMPLEX*16 W(20,NWAVEFUNCS)
4622 COMMON/MG5_1_W/W
4623
4624- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4625- $ ,0:NLOOPWAVEFUNCS)
4626- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4627+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4628+ $ -1:NLOOPWAVEFUNCS)
4629+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4630 COMMON/MG5_1_WL/WL,PL
4631
4632 COMPLEX*16 AMPL(3,NCTAMPS)
4633
4634=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f'
4635--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2017-03-28 07:06:02 +0000
4636+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2017-07-13 10:23:41 +0000
4637@@ -352,9 +352,9 @@
4638 COMPLEX*32 MPW(20,NWAVEFUNCS)
4639 COMMON/MG5_1_MP_W/MPW
4640
4641- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4642- $ ,0:NLOOPWAVEFUNCS)
4643- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4644+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4645+ $ -1:NLOOPWAVEFUNCS)
4646+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4647 COMMON/MG5_1_WL/WL,PL
4648
4649 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4650@@ -583,12 +583,16 @@
4651
4652 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4653 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4654+C The index -1 is for the charge-conjugated fermions with
4655+C flipped fermion flow.
4656 DO I=0,3
4657+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4658 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4659 ENDDO
4660 DO I=1,MAXLWFSIZE
4661 DO J=0,LOOPMAXCOEFS-1
4662 DO K=1,MAXLWFSIZE
4663+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4664 IF(I.EQ.K.AND.J.EQ.0) THEN
4665 WL(I,J,K,0)=(1.0D0,0.0D0)
4666 ELSE
4667@@ -603,6 +607,14 @@
4668 ENDIF
4669 ENDIF
4670
4671+C This is the chare conjugate version of the unit 4-currents in
4672+C the canonical cartesian basis.
4673+C This, for now, is only defined for 4-fermionic currents.
4674+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4675+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4676+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4677+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4678+
4679 C Make sure that lorentz rotation tests are not used if there is
4680 C external loop wavefunction of spin 2 and that one specific
4681 C helicity is asked
4682
4683=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_coef_construction_1.f'
4684--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_coef_construction_1.f 2016-04-06 18:45:52 +0000
4685+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_coef_construction_1.f 2017-07-13 10:23:41 +0000
4686@@ -60,9 +60,9 @@
4687 COMPLEX*32 W(20,NWAVEFUNCS)
4688 COMMON/MG5_1_MP_W/W
4689
4690- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4691- $ ,0:NLOOPWAVEFUNCS)
4692- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4693+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4694+ $ -1:NLOOPWAVEFUNCS)
4695+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4696 COMMON/MG5_1_MP_WL/WL,PL
4697
4698 COMPLEX*32 AMPL(3,NCTAMPS)
4699
4700=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_compute_loop_coefs.f'
4701--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_compute_loop_coefs.f 2016-09-15 20:20:30 +0000
4702+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_compute_loop_coefs.f 2017-07-13 10:23:41 +0000
4703@@ -118,14 +118,14 @@
4704 COMPLEX*16 DPW(20,NWAVEFUNCS)
4705 COMMON/MG5_1_W/DPW
4706
4707- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4708- $ ,0:NLOOPWAVEFUNCS)
4709- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4710+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4711+ $ -1:NLOOPWAVEFUNCS)
4712+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4713 COMMON/MG5_1_MP_WL/WL,PL
4714
4715- COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4716- $ ,0:NLOOPWAVEFUNCS)
4717- COMPLEX*16 DP_PL(0:3,0:NLOOPWAVEFUNCS)
4718+ COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4719+ $ -1:NLOOPWAVEFUNCS)
4720+ COMPLEX*16 DP_PL(0:3,-1:NLOOPWAVEFUNCS)
4721 COMMON/MG5_1_WL/DP_WL,DP_PL
4722
4723 COMPLEX*32 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4724@@ -190,8 +190,10 @@
4725 ENDDO
4726
4727 DO I=0,3
4728+ PL(I,-1)=CMPLX(ZERO,ZERO,KIND=16)
4729 PL(I,0)=CMPLX(ZERO,ZERO,KIND=16)
4730 IF (.NOT.COMPUTE_INTEGRAND_IN_QP) THEN
4731+ DP_PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4732 DP_PL(I,0)=DCMPLX(0.0D0,0.0D0)
4733 ENDIF
4734 ENDDO
4735@@ -199,6 +201,8 @@
4736 DO I=1,MAXLWFSIZE
4737 DO J=0,LOOPMAXCOEFS-1
4738 DO K=1,MAXLWFSIZE
4739+ WL(I,J,K,-1)=(ZERO,ZERO)
4740+ DP_WL(I,J,K,-1)=(0.0D0,0.0D0)
4741 IF (I.EQ.K.AND.J.EQ.0) THEN
4742 WL(I,J,K,0)=(1.0E0_16,ZERO)
4743 ELSE
4744@@ -215,6 +219,19 @@
4745 ENDDO
4746 ENDDO
4747
4748+C This is the chare conjugate version of the unit 4-currents in
4749+C the canonical cartesian basis.
4750+C This, for now, is only defined for 4-fermionic currents.
4751+ WL(1,0,2,-1) = (-1.0E0_16,ZERO)
4752+ WL(2,0,1,-1) = (1.0E0_16,ZERO)
4753+ WL(3,0,4,-1) = (1.0E0_16,ZERO)
4754+ WL(4,0,3,-1) = (-1.0E0_16,ZERO)
4755+ DP_WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4756+ DP_WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4757+ DP_WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4758+ DP_WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4759+
4760+
4761 DO K=1, 3
4762 DO I=1,NCTAMPS
4763 AMPL(K,I)=(ZERO,ZERO)
4764
4765=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_helas_calls_ampb_1.f'
4766--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
4767+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%mp_helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
4768@@ -60,9 +60,9 @@
4769 COMPLEX*32 W(20,NWAVEFUNCS)
4770 COMMON/MG5_1_MP_W/W
4771
4772- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4773- $ ,0:NLOOPWAVEFUNCS)
4774- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4775+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4776+ $ -1:NLOOPWAVEFUNCS)
4777+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4778 COMMON/MG5_1_MP_WL/WL,PL
4779
4780 COMPLEX*32 AMPL(3,NCTAMPS)
4781
4782=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f'
4783--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f 2016-09-15 20:20:30 +0000
4784+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f 2017-07-13 10:23:41 +0000
4785@@ -121,8 +121,9 @@
4786 DATA IDEN/36/
4787
4788 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4789+ COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4790 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4791- COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4792+
4793 C
4794 C FUNCTIONS
4795 C
4796
4797=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f'
4798--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f 2016-09-15 20:20:30 +0000
4799+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f 2017-07-13 10:23:41 +0000
4800@@ -137,8 +137,9 @@
4801 DATA IDEN/256/
4802
4803 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4804+ COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4805 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4806- COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4807+
4808 C
4809 C FUNCTIONS
4810 C
4811
4812=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f'
4813--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f 2016-09-15 20:20:30 +0000
4814+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f 2017-07-13 10:23:41 +0000
4815@@ -121,8 +121,9 @@
4816 DATA IDEN/36/
4817
4818 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
4819+ COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4820 DATA ((POLARIZATIONS(I,J),I=0,NEXTERNAL),J=0,5)/NPOLENTRIES*-1/
4821- COMMON/ML5_0_BORN_BEAM_POL/POLARIZATIONS
4822+
4823 C
4824 C FUNCTIONS
4825 C
4826
4827=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/coef_construction_1.f'
4828--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/coef_construction_1.f 2016-04-06 18:45:52 +0000
4829+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/coef_construction_1.f 2017-07-13 10:23:41 +0000
4830@@ -76,9 +76,9 @@
4831 COMPLEX*16 W(20,NWAVEFUNCS)
4832 COMMON/ML5_0_W/W
4833
4834- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4835- $ ,0:NLOOPWAVEFUNCS)
4836- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4837+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4838+ $ -1:NLOOPWAVEFUNCS)
4839+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4840 COMMON/ML5_0_WL/WL,PL
4841
4842 COMPLEX*16 AMPL(3,NCTAMPS)
4843
4844=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_ampb_1.f'
4845--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_ampb_1.f 2016-04-06 18:45:52 +0000
4846+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_ampb_1.f 2017-07-13 10:23:41 +0000
4847@@ -76,9 +76,9 @@
4848 COMPLEX*16 W(20,NWAVEFUNCS)
4849 COMMON/ML5_0_W/W
4850
4851- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4852- $ ,0:NLOOPWAVEFUNCS)
4853- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4854+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4855+ $ -1:NLOOPWAVEFUNCS)
4856+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4857 COMMON/ML5_0_WL/WL,PL
4858
4859 COMPLEX*16 AMPL(3,NCTAMPS)
4860
4861=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_uvct_1.f'
4862--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_uvct_1.f 2016-04-06 18:45:52 +0000
4863+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/helas_calls_uvct_1.f 2017-07-13 10:23:41 +0000
4864@@ -76,9 +76,9 @@
4865 COMPLEX*16 W(20,NWAVEFUNCS)
4866 COMMON/ML5_0_W/W
4867
4868- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4869- $ ,0:NLOOPWAVEFUNCS)
4870- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4871+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4872+ $ -1:NLOOPWAVEFUNCS)
4873+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4874 COMMON/ML5_0_WL/WL,PL
4875
4876 COMPLEX*16 AMPL(3,NCTAMPS)
4877
4878=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_CT_calls_1.f'
4879--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_CT_calls_1.f 2016-04-06 18:45:52 +0000
4880+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_CT_calls_1.f 2017-07-13 10:23:41 +0000
4881@@ -76,9 +76,9 @@
4882 COMPLEX*16 W(20,NWAVEFUNCS)
4883 COMMON/ML5_0_W/W
4884
4885- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4886- $ ,0:NLOOPWAVEFUNCS)
4887- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4888+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4889+ $ -1:NLOOPWAVEFUNCS)
4890+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4891 COMMON/ML5_0_WL/WL,PL
4892
4893 COMPLEX*16 AMPL(3,NCTAMPS)
4894
4895=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f'
4896--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2017-03-28 07:06:02 +0000
4897+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2017-07-13 10:23:41 +0000
4898@@ -352,9 +352,9 @@
4899 COMPLEX*32 MPW(20,NWAVEFUNCS)
4900 COMMON/ML5_0_MP_W/MPW
4901
4902- COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4903- $ ,0:NLOOPWAVEFUNCS)
4904- COMPLEX*16 PL(0:3,0:NLOOPWAVEFUNCS)
4905+ COMPLEX*16 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4906+ $ -1:NLOOPWAVEFUNCS)
4907+ COMPLEX*16 PL(0:3,-1:NLOOPWAVEFUNCS)
4908 COMMON/ML5_0_WL/WL,PL
4909
4910 COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4911@@ -583,12 +583,16 @@
4912
4913 C SETUP OF THE COMMON STARTING EXTERNAL LOOP WAVEFUNCTION
4914 C IT IS ALSO PS POINT INDEPENDENT, SO IT CAN BE DONE HERE.
4915+C The index -1 is for the charge-conjugated fermions with
4916+C flipped fermion flow.
4917 DO I=0,3
4918+ PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4919 PL(I,0)=DCMPLX(0.0D0,0.0D0)
4920 ENDDO
4921 DO I=1,MAXLWFSIZE
4922 DO J=0,LOOPMAXCOEFS-1
4923 DO K=1,MAXLWFSIZE
4924+ WL(I,J,K,-1)=(0.0D0,0.0D0)
4925 IF(I.EQ.K.AND.J.EQ.0) THEN
4926 WL(I,J,K,0)=(1.0D0,0.0D0)
4927 ELSE
4928@@ -603,6 +607,14 @@
4929 ENDIF
4930 ENDIF
4931
4932+C This is the chare conjugate version of the unit 4-currents in
4933+C the canonical cartesian basis.
4934+C This, for now, is only defined for 4-fermionic currents.
4935+ WL(1,0,2,-1) = DCMPLX(-1.0D0,0.0D0)
4936+ WL(2,0,1,-1) = DCMPLX(1.0D0,0.0D0)
4937+ WL(3,0,4,-1) = DCMPLX(1.0D0,0.0D0)
4938+ WL(4,0,3,-1) = DCMPLX(-1.0D0,0.0D0)
4939+
4940 C Make sure that lorentz rotation tests are not used if there is
4941 C external loop wavefunction of spin 2 and that one specific
4942 C helicity is asked
4943
4944=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_coef_construction_1.f'
4945--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_coef_construction_1.f 2016-04-06 18:45:52 +0000
4946+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_coef_construction_1.f 2017-07-13 10:23:41 +0000
4947@@ -60,9 +60,9 @@
4948 COMPLEX*32 W(20,NWAVEFUNCS)
4949 COMMON/ML5_0_MP_W/W
4950
4951- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4952- $ ,0:NLOOPWAVEFUNCS)
4953- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4954+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4955+ $ -1:NLOOPWAVEFUNCS)
4956+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4957 COMMON/ML5_0_MP_WL/WL,PL
4958
4959 COMPLEX*32 AMPL(3,NCTAMPS)
4960
4961=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_compute_loop_coefs.f'
4962--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_compute_loop_coefs.f 2016-09-15 20:20:30 +0000
4963+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/mp_compute_loop_coefs.f 2017-07-13 10:23:41 +0000
4964@@ -118,14 +118,14 @@
4965 COMPLEX*16 DPW(20,NWAVEFUNCS)
4966 COMMON/ML5_0_W/DPW
4967
4968- COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4969- $ ,0:NLOOPWAVEFUNCS)
4970- COMPLEX*32 PL(0:3,0:NLOOPWAVEFUNCS)
4971+ COMPLEX*32 WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4972+ $ -1:NLOOPWAVEFUNCS)
4973+ COMPLEX*32 PL(0:3,-1:NLOOPWAVEFUNCS)
4974 COMMON/ML5_0_MP_WL/WL,PL
4975
4976- COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE
4977- $ ,0:NLOOPWAVEFUNCS)
4978- COMPLEX*16 DP_PL(0:3,0:NLOOPWAVEFUNCS)
4979+ COMPLEX*16 DP_WL(MAXLWFSIZE,0:LOOPMAXCOEFS-1,MAXLWFSIZE,
4980+ $ -1:NLOOPWAVEFUNCS)
4981+ COMPLEX*16 DP_PL(0:3,-1:NLOOPWAVEFUNCS)
4982 COMMON/ML5_0_WL/DP_WL,DP_PL
4983
4984 COMPLEX*32 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
4985@@ -190,8 +190,10 @@
4986 ENDDO
4987
4988 DO I=0,3
4989+ PL(I,-1)=CMPLX(ZERO,ZERO,KIND=16)
4990 PL(I,0)=CMPLX(ZERO,ZERO,KIND=16)
4991 IF (.NOT.COMPUTE_INTEGRAND_IN_QP) THEN
4992+ DP_PL(I,-1)=DCMPLX(0.0D0,0.0D0)
4993 DP_PL(I,0)=DCMPLX(0.0D0,0.0D0)
4994 ENDIF
4995 ENDDO
4996@@ -199,6 +201,8 @@
4997 DO I=1,MAXLWFSIZE
4998 DO J=0,LOOPMAXCOEFS-1
4999 DO K=1,MAXLWFSIZE
5000+ WL(I,J,K,-1)=(ZERO,ZERO)
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches