17
C USER CUSTOMIZABLE OPTIONS
19
## if(ComputeColorFlows) {
20
C The variables below are just used in the context of a JAMP consistency check turned off by default.
21
%(real_dp_format)s JAMP_DOUBLECHECK_THRES
22
PARAMETER (JAMP_DOUBLECHECK_THRES=1.0d-9)
23
LOGICAL DIRECT_ME_COMPUTATION, ME_COMPUTATION_FROM_JAMP
24
C Modify the logicals below to chose how the ME must be computed
25
C DIRECT_ME_COMPUTATION = Each loop amplitude is squared individually against all amplitudes with its own color factor.
26
C ME_COMPUTATION_FROM_JAMP = Amplitudes are first projected onto color flows (many less of them) which are then squared to form the ME.
27
C When setting both computation method to .TRUE., their systematic comparisons will be printed out.
29
DATA DIRECT_ME_COMPUTATION/.FALSE./
30
DATA ME_COMPUTATION_FROM_JAMP/.TRUE./
32
DATA DIRECT_ME_COMPUTATION/.TRUE./
33
DATA ME_COMPUTATION_FROM_JAMP/.FALSE./
36
C This parameter is designed for the check timing command of MG5. It skips the loop reduction.
38
PARAMETER (SKIPLOOPEVAL=.FALSE.)
39
C For timing checks. Stops the code after having only initialized its arrays from the external data files
41
PARAMETER (BOOTANDSTOP=.FALSE.)
43
INTEGER TIR_CACHE_SIZE
44
C To change memory foot-print of MadLoop, you can change this parameter to be 0,1 or 2 *and recompile*.
45
C Notice that this will impact MadLoop speed performances in the context of stability checks.
46
include 'tir_cache_size.inc'
134
175
%(real_dp_format)s HELSAVED(3,NCOMB)
137
%(real_dp_format)s BORNBUFF(0:NSQSO_BORN)
138
%(real_dp_format)s BUFFR(3,0:NSQUAREDSO),BUFFR_BIS(3,0:NSQUAREDSO),TEMP(0:3,0:NSQUAREDSO),TEMP1(0:NSQUAREDSO),TEMP2
178
%(real_dp_format)s BORNBUFF(0:NSQSO_BORN),TMPR
179
%(real_dp_format)s BUFFR(3,0:NSQUAREDSO),BUFFR_BIS(3,0:NSQUAREDSO),TEMP(0:3,0:NSQUAREDSO),TEMP1(0:NSQUAREDSO)
180
## if(not AmplitudeReduction){
181
%(real_dp_format)s TEMP2
183
%(real_dp_format)s TEMP2(3)
185
## if(ComputeColorFlows) {
186
%(real_dp_format)s BUFFRES(0:3,0:NSQUAREDSO)
139
188
%(complex_dp_format)s COEFS(MAXLWFSIZE,0:VERTEXMAXCOEFS-1,MAXLWFSIZE)
140
189
%(complex_dp_format)s CFTOT
141
190
LOGICAL FOUNDHELFILTER,FOUNDLOOPFILTER
275
345
%(complex_dp_format)s PL(0:3,0:NLOOPWAVEFUNCS)
276
346
common/%(proc_prefix)sWL/WL,PL
348
## if(not AmplitudeReduction){
278
349
%(complex_dp_format)s LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
351
%(complex_dp_format)s LOOPCOEFS(0:LOOPMAXCOEFS-1,NLOOPGROUPS)
279
353
common/%(proc_prefix)sLCOEFS/LOOPCOEFS
355
## if(AmplitudeReduction) {
356
C This flag is used to prevent the re-computation of the OpenLoop coefficients when changing the CTMode for the stability test.
357
LOGICAL SKIP_LOOPNUM_COEFS_CONSTRUCTION
358
DATA SKIP_LOOPNUM_COEFS_CONSTRUCTION/.FALSE./
359
COMMON/%(proc_prefix)sSKIP_COEFS/SKIP_LOOPNUM_COEFS_CONSTRUCTION
363
LOGICAL TIR_DONE(NLOOPGROUPS)
364
COMMON/%(proc_prefix)sTIRCACHING/TIR_DONE
367
## if(not AmplitudeReduction){
281
368
%(complex_dp_format)s AMPL(3,NCTAMPS)
370
%(complex_dp_format)s AMPL(3,NLOOPAMPS)
282
372
common/%(proc_prefix)sAMPL/AMPL
284
374
%(complex_dp_format)s LOOPRES(3,NSQUAREDSO,NLOOPGROUPS)
285
375
LOGICAL S(NSQUAREDSO,NLOOPGROUPS)
286
376
common/%(proc_prefix)sLOOPRES/LOOPRES,S
288
378
INTEGER CF_D(NCOLORROWS,%(color_matrix_size)s)
289
379
INTEGER CF_N(NCOLORROWS,%(color_matrix_size)s)
290
380
common/%(proc_prefix)sCF/CF_D,CF_N
324
415
CALL PRINT_MADLOOP_BANNER()
326
417
CALL setMadLoopPath(TMP)
327
418
CALL JOINPATH(MLPATH,PARAMFNAME,PARAMFN)
328
419
CALL MADLOOPPARAMREADER(PARAMFN,.TRUE.)
421
IF(.NOT.LoopInitStartOver) THEN
422
WRITE(*,*) 'INFO: For loop-induced processes it is preferable to always set the parameter LoopInitStartOver to True, so it is hard-set here to True.'
423
LoopInitStartOver=.TRUE.
425
IF(.NOT.HelInitStartOver) THEN
426
WRITE(*,*) "INFO: For loop-induced processes it is preferable to always set the parameter HelInitStartOver to True, so it is hard-set here to True.'
427
HelInitStartOver=.TRUE.
429
IF (CheckCycle.LT.5) THEN
430
WRITE(*,*) "INFO: Due to the dynamic setting of the reference scale for contributions comparisons, it is preferable to set the parameter CheckCycle to a value larger than 4, so it is hard-set here to 5.'
435
C Make sure that NROTATIONS_QP and NROTATIONS_DP are set to zero if AUTOMATIC_TIR_CACHE_CLEARING is disabled.
436
if(.NOT.AUTOMATIC_TIR_CACHE_CLEARING) THEN
437
IF(NROTATIONS_DP.NE.0.or.NROTATIONS_QP.NE.0) THEN
438
WRITE(*,*) 'INFO: AUTOMATIC_TIR_CACHE_CLEARING is disabled, so MadLoop automatically resets NROTATIONS_DP and NROTATIONS_QP to 0.'
333
C CALL MADLOOPPARAMREADER(paramFileName,.TRUE.)
334
445
QP_TOOLS_AVAILABLE=.FALSE.
335
446
INDEX_QP_TOOLS(1:QP_NLOOPLIB+1)=0
336
447
C SKIP THE ONES THAT NOT AVAILABLE
368
479
CALL %(proc_prefix)sSET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
370
HELDOUBLECHECKED=.NOT.DoubleCheckHelicityFilter
371
OPEN(1, FILE=LoopFilterFN, err=100, status='OLD', action='READ')
373
READ(1,*,END=101) (GOODAMP(I,J),I=1,NSQUAREDSO)
377
FOUNDLOOPFILTER=.FALSE.
380
GOODAMP(I,J)=(.NOT.USELOOPFILTER)
386
OPEN(1, FILE=HelFilterFN, err=102, status='OLD', action='READ')
388
READ(1,*,END=103) GOODHEL(I)
392
FOUNDHELFILTER=.FALSE.
399
481
OPEN(1, FILE=ColorNumFN, err=104, status='OLD', action='READ')
400
482
DO I=1,NCOLORROWS
401
483
READ(1,*,END=105) (CF_N(I,J),J=1,%(color_matrix_size)s)
444
526
WRITE(*,*) 'Stopped by user request.'
531
HELDOUBLECHECKED=(.NOT.DoubleCheckHelicityFilter).OR.(HelicityFilterLevel.eq.0)
532
OPEN(1, FILE=LoopFilterFN, err=100, status='OLD', action='READ')
534
READ(1,*,END=101) (GOODAMP(I,J),I=1,NSQUAREDSO)
538
FOUNDLOOPFILTER=.FALSE.
541
GOODAMP(I,J)=(.NOT.USELOOPFILTER)
547
IF (HelicityFilterLevel.eq.0) then
548
FOUNDHELFILTER=.TRUE.
554
OPEN(1, FILE=HelFilterFN, err=102, status='OLD', action='READ')
556
READ(1,*,END=103) GOODHEL(I)
560
FOUNDHELFILTER=.FALSE.
566
IF (HelicityFilterLevel.eq.1) then
567
C We must make sure to remove the matching-helicity optimisation, as requested by the user.
569
IF ((GOODHEL(J).GT.1).OR.(GOODHEL(J).LT.HELOFFSET)) THEN
578
C The born is of course 0 for loop-induced processes.
583
C First compute the borns, it will store them in ANS(0,I)
584
C It is left untouched for the rest of MadLoop evaluation.
585
C Notice that the squared split order index I does NOT
586
C correspond to the same ordering of J for the loop ME
587
C results stored in ANS(K,J), with K in [1-3].The ordering
588
C of each can be obtained with ML5SOINDEX_FOR_SQUARED_ORDERS
589
C and SQSOINDEX_FROM_ORDERS for the loop ME and born ME
590
C respectively. For this to work, we assume that there is
591
C always more squared split orders in the loop ME than in the
592
C born ME, which is practically always true. In any case, only
593
C the split_order summed value I=0 is used in ML5 code.
597
CALL %(proc_prefix)sSMATRIXHEL_SPLITORDERS(P_USER,USERHEL,BORNBUFF(0))
604
C For loop-induced, the reference for comparison is set later from the total contribution of the previous PS point considered.
605
C But you can edit here the value to be used for the first PS points.
606
IF (NPSPOINTS.EQ.0) THEN
609
IF(NPSPOINTS.GE.MAXNREF_EVALS) THEN
610
REF=Median(REF_EVALS,MAXNREF_EVALS)
612
REF=Median(REF_EVALS,NPSPOINTS)
616
C We set here the reference to the born summed over all split orders
454
624
MP_DONE_ONCE=.FALSE.
565
746
DO I=0,NSQUAREDSO
749
## if(not AmplitudeReduction){
569
754
AMPL(K,I)=(0.0d0,0.0d0)
572
C USE THE FIRST LOOP REDUCTION LIBRARY AND THE FIRST QP LOOP REDUCTION LIBRARY
758
C Start by using the first available loop reduction library and qp library.
763
C MadLoop jumps to this label during stability checks when it recomputes a rotated PS point
765
C For the computation of a rotated version of this PS point we must reset the TIR cache since this changes the definition of the loop denominators.
766
CALL %(proc_prefix)sCLEAR_TIR_CACHE()
768
## if(AmplitudeReduction) {
769
SKIP_LOOPNUM_COEFS_CONSTRUCTION=.FALSE.
771
C MadLoop jumps to this label during stability checks when it recomputes the same PS point with a different CTMode
773
C Of course the trick of reusing coefficients when reducing at the amplitude level only works when computing one helicity at a time
774
if (USERHEL.ne.-1) THEN
775
SKIP_LOOPNUM_COEFS_CONSTRUCTION = .TRUE.
778
## if(ComputeColorFlows) {
779
C We don't want to re-initialized the following quantities when checking the helicity filter. (which jumps to label 205 to probe each helicity).
780
C We however want to re-initialize them for each new computation part of the stability check (which jumps to label 200)
781
C This code is therefore placed before 205 and after 200.
782
CALL %(proc_prefix)sREINITIALIZE_CUMULATIVE_ARRAYS()
783
IF (ME_COMPUTATION_FROM_JAMP) THEN
784
C If both ME computational methods have been used, then the ME computation from color flows was stored in RES_FROM_JAMP and we must reset it here.
787
RES_FROM_JAMP(K,I)=0.0d0
791
IF ((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP) THEN
792
C When computing the ME with color flows, the Born ME will be computed as well, so we reset here the result obtained from the smatrix call above.
799
## if(iregi_available) {
800
C Free cache when using IREGI
801
IF(IREGIRECY.AND.MLReductionLib(I_LIB).EQ.3) THEN
807
C Even if the user did ask to turn off the automatic TIR cache clearing, we must do it now if the CTModeIndex rolls over the size of the TIR cache employed.
808
C Notice that we must do that only when processing a new CT mode as part of the stability test and not when computing a new helicity as part of the filtering process.
809
C This we check that we are not in the initialization phase.
810
C If we are not in CTModeRun=-1, then we never need to clear the cache since the TIR will always be used for a unique computation (not stab test).
811
C Also, it is clear that if we are running OPP when reaching this line, then we shouldn't clear the TIR cache as it might still be useful later.
812
C Finally, notice that the conditional statement below should never be true except you have TIR library supporting quadruple precision or when TIR_CACHE_SIZE<2.
813
IF((.NOT.CHECKPHASE.AND.(HELDOUBLECHECKED)).and.CTMODERUN.eq.-1.and.MLReductionLib(I_LIB).ne.1..AND.(%(proc_prefix)sTIRCACHE_INDEX(CTMODE).eq.(TIR_CACHE_SIZE+1))) THEN
814
CALL %(proc_prefix)sCLEAR_TIR_CACHE()
820
C MadLoop jumps to this label during initialization when it goes to the computation of the next helicity.
577
823
IF (.NOT.MP_PS_SET.AND.(CTMODE.EQ.0.OR.CTMODE.GE.4)) THEN
578
824
CALL %(proc_prefix)sSET_MP_PS(P_USER)
645
937
UVCT_REQ_SO_DONE=.TRUE.
647
IF (.NOT.CHECKPHASE.AND.HELDOUBLECHECKED.AND.HELPICKED.EQ.-1) THEN
652
DO I=1,%(nctamps_or_nloopamps)s
653
DO J=1,%(nbornamps_or_nloopamps)s
939
## if(not AmplitudeReduction) {
654
942
CFTOT=DCMPLX(CF_N(I,J)/DBLE(ABS(CF_D(I,J))),0.0d0)
655
943
IF(CF_D(I,J).LT.0) CFTOT=CFTOT*IMAG1
944
ITEMP = %(proc_prefix)sML5SQSOINDEX(%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(I),%(proc_prefix)sML5SOINDEX_FOR_BORN_AMP(J))
945
IF (.NOT.FILTER_SO.OR.SQSO_TARGET.EQ.ITEMP) THEN
947
TEMP2 = 2.0d0*HEL_MULT*DBLE(CFTOT*AMPL(K,I)*DCONJG(AMP(J)))
948
ANS(K,ITEMP)=ANS(K,ITEMP)+TEMP2
949
ANS(K,0)=ANS(K,0)+TEMP2
660
956
%(coef_construction)s
662
958
LOOP_REQ_SO_DONE=.TRUE.
960
## if(AmplitudeReduction) {
961
IF(SKIPLOOPEVAL) THEN
969
C We need the dummy argument I_SO for the squared order index to conform to the structure that the call to the LOOP* subroutine takes for processes with Born diagrams.
973
CTCALL_REQ_SO_DONE=.TRUE.
975
## if(ComputeColorFlows) {
976
IF (DIRECT_ME_COMPUTATION) THEN
979
## if(not LoopInduced) {
984
CFTOT=DCMPLX(CF_N(I,J)/DBLE(ABS(CF_D(I,J))),0.0d0)
985
IF(CF_D(I,J).LT.0) CFTOT=CFTOT*IMAG1
986
## if(not LoopInduced) {
987
ITEMP = %(proc_prefix)sML5SQSOINDEX(%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(I),%(proc_prefix)sML5SOINDEX_FOR_BORN_AMP(J))
989
TEMP2(K) = 2.0d0*HEL_MULT*DBLE(CFTOT*AMPL(K,I)*DCONJG(AMP(J)))
992
ITEMP = %(proc_prefix)sML5SQSOINDEX(%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(I),%(proc_prefix)sML5SOINDEX_FOR_LOOP_AMP(J))
993
TEMP2(1) = HEL_MULT*DBLE(CFTOT*(AMPL(1,I)*DCONJG(AMPL(1,J))))
994
C Computing the quantities below is not strictly necessary since the result should be finite
995
C It is however a good cross-check.
996
TEMP2(2) = HEL_MULT*DBLE(CFTOT*(AMPL(2,I)*DCONJG(AMPL(1,J)) + AMPL(1,I)*DCONJG(AMPL(2,J))))
997
TEMP2(3) = HEL_MULT*DBLE(CFTOT*(AMPL(3,I)*DCONJG(AMPL(1,J)) + AMPL(1,I)*DCONJG(AMPL(3,J))+AMPL(2,I)*DCONJG(AMPL(2,J))))
999
C To mimick the structure of the squared amplitude reduction, we add here the squared counterterm contribution directly to the result ANS() and put the loop contributions in the LOOPRES array which will be added to ANS later
1000
IF (I.LE.NCTAMPS) THEN
1001
IF (.NOT.FILTER_SO.OR.SQSO_TARGET.EQ.ITEMP) THEN
1003
ANS(K,ITEMP)=ANS(K,ITEMP)+TEMP2(K)
1004
ANS(K,0)=ANS(K,0)+TEMP2(K)
1009
LOOPRES(K,ITEMP,I-NCTAMPS)=LOOPRES(K,ITEMP,I-NCTAMPS)+TEMP2(K)
1010
C During the evaluation of the AMPL, we had stored the stability in S(1,*) so we now copy over this flag to the relevant contributing Squared orders.
1011
S(ITEMP,I-NCTAMPS)=S(1,I-NCTAMPS)
1017
## if(ComputeColorFlows) {
1021
## if(ComputeColorFlows){
1022
C We should compute the color flow either if it contributes to the final result (i.e. not used just for the filtering), or if the computation is only done from the color flows
1023
IF (((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP).OR.(H.EQ.USERHEL.OR.USERHEL.EQ.-1)) THEN
1024
C The cumulative quantities must only be computed if that helicity contributes according to user request (second argument of the subroutine below).
1025
CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS(HEL_MULT,(H.EQ.USERHEL.OR.USERHEL.EQ.-1))
1026
IF(ME_COMPUTATION_FROM_JAMP) THEN
1027
CALL %(proc_prefix)sCOMPUTE_RES_FROM_JAMP(BUFFRES,HEL_MULT)
1028
IF(((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP)) THEN
1029
C If the computation from the color flow is the only form of computation, we directly update the answer.
1032
ANS(K,I)=ANS(K,I)+BUFFRES(K,I)
1035
C When setting up the loop filter, it is important to set the quantitied LOOPRES.
1036
C Notice that you may have a more powerful filter with the direct computation mode because it can filter vanishing loop contributions for a particular squared split order only
1037
C The quantity LOOPRES defined below is not physical, but it's ok since it is only intended for the loop filtering.
1038
IF(.NOT.FOUNDLOOPFILTER.AND.USELOOPFILTER) THEN
1042
LOOPRES(K,I,J)=LOOPRES(K,I,J)+AMPL(K,NCTAMPS+J)
1047
C The if statement below is not strictly necessary but makes it clear when it is executed.
1048
ELSEIF(H.EQ.USERHEL.OR.USERHEL.EQ.-1) THEN
1049
C If both computational method is used, then we must just update RES_FROM_JAMP
1052
RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)+BUFFRES(K,I)
1063
## if(not AmplitudeReduction){
667
1064
%(coef_merging)s
1067
## if (ComputeColorFlows) {
1068
IF(DIRECT_ME_COMPUTATION) THEN
1069
C Lines below are not necessary when computing the ME from color flows
669
1071
DO I=0,NSQUAREDSO
671
1073
BUFFR_BIS(J,I)=ANS(J,I)
1076
## if (ComputeColorFlows) {
1081
## if(not AmplitudeReduction){
1082
C MadLoop jumps to this label during stability checks when it recomputes the same PS point with a different CTMode
1085
## if(iregi_available) {
676
1086
C Free cache when using IREGI
1087
IF(IREGIRECY.AND.MLReductionLib(I_LIB).EQ.3) THEN
1088
CALL IREGI_FREE_PS()
1093
C Even if the user did ask to turn off the automatic TIR cache clearing, we must do it now if the CTModeIndex rolls over the size of the TIR cache employed.
1094
C Notice that we must do that only when processing a new CT mode as part of the stability test and not when computing a new helicity as part of the filtering process.
1095
C This we check that we are not in the initialization phase.
1096
C If we are not in CTModeRun=-1, then we never need to clear the cache since the TIR will always be used for a unique computation (not stab test).
1097
C Also, it is clear that if we are running OPP when reaching this line, then we shouldn't clear the TIR cache as it might still be useful later.
1098
C Finally, notice that the conditional statement below should never be true except you have TIR library supporting quadruple precision or when TIR_CACHE_SIZE<2.
1099
IF((.NOT.CHECKPHASE.AND.(HELDOUBLECHECKED)).AND.CTMODERUN.eq.-1.and.MLReductionLib(I_LIB).ne.1.AND.(%(proc_prefix)sTIRCACHE_INDEX(CTMODE).eq.(TIR_CACHE_SIZE+1))) THEN
1100
CALL %(proc_prefix)sCLEAR_TIR_CACHE()
1105
C MadLoop jumps to this label just after having called the subroutine %(proc_prefix)sMP_COMPUTE_LOOP_COEFS to compute OpenLoop coefficients in quadruple precision (and not double precision as done above)
1109
## if (ComputeColorFlows) {
1110
IF(DIRECT_ME_COMPUTATION) THEN
1111
C Lines below are not necessary when computing the ME from color flows
679
1113
DO I=0,NSQUAREDSO
681
1115
ANS(J,I)=BUFFR_BIS(J,I)
1118
## if (ComputeColorFlows) {
1122
## if (ComputeColorFlows) {
1123
IF ((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP) THEN
1124
C We can skip the update of ANS if it was computed from color flows
685
1129
IF(SKIPLOOPEVAL) THEN
1133
## if(not AmplitudeReduction){
689
1134
DO I_SO=1,NSQUAREDSO
690
1135
DO J=1,NLOOPGROUPS
691
1136
S(I_SO,J)=.TRUE.
1375
## if (ComputeColorFlows) {
1376
IF (DIRECT_ME_COMPUTATION.AND.ME_COMPUTATION_FROM_JAMP) THEN
1377
WRITE(*,*) ' ================================= '
1378
WRITE(*,*) ' === JAMP double-checking test === '
1379
WRITE(*,*) ' ================================= '
1380
CALL %(proc_prefix)sWRITE_MOM(P)
1382
C We should finish by the summed orders
1383
I = MOD(J,NSQUAREDSO+1)
1385
WRITE(*,*) ' > Checking the sum of all chosen squared split orders'
1387
WRITE(*,*) ' > Checking squared split order #',I
1389
## if (LoopInduced) {
1394
RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)/DBLE(IDEN)
1395
IF (USERHEL.NE.-1) THEN
1396
RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)*HELAVGFACTOR
1398
IF (K.eq.0) WRITE(*,*) ' || Born :'
1399
IF (K.eq.1) WRITE(*,*) ' || Finite part :'
1400
IF (K.eq.2) WRITE(*,*) ' || Single pole residue :'
1401
IF (K.eq.3) WRITE(*,*) ' || Double pole residue :'
1402
WRITE(*,*) ' --> Direct result =',ANS(K,I)
1403
WRITE(*,*) ' --> Computed from JAMPS =',RES_FROM_JAMP(K,I)
1404
IF((RES_FROM_JAMP(K,I)+ANS(K,I)).EQ.0.0d0) THEN
1405
TMPR = ABS(RES_FROM_JAMP(K,I)-ANS(K,I))
1407
TMPR = ABS((ANS(K,I)-RES_FROM_JAMP(K,I))/((ANS(K,I)+RES_FROM_JAMP(K,I))/2.0d0))
1409
WRITE(*,*) ' --> Relative diff. =',TMPR
1410
IF(TMPR.GT.JAMP_DOUBLECHECK_THRES) THEN
1411
STOP 'Consistency cross-check of JAMPS failed.'
1415
WRITE(*,*) ' ================================= '
877
1419
IF(.NOT.CHECKPHASE.AND.HELDOUBLECHECKED.AND.(CTMODERUN.EQ.-1)) THEN
878
1420
STAB_INDEX=STAB_INDEX+1
879
1421
IF(DOING_QP_EVALS.AND.MLReductionLib(I_LIB).EQ.1) THEN
1523
2066
%(proc_prefix)sML5SQSOINDEX=%(proc_prefix)sML5SOINDEX_FOR_SQUARED_ORDERS(SQORDERS)
2069
C This is the inverse subroutine of ML5SOINDEX_FOR_SQUARED_ORDERS. Not directly useful, but provided nonetheless.
2070
SUBROUTINE %(proc_prefix)sML5GET_SQUARED_ORDERS_FOR_SOINDEX(SOINDEX,ORDERS)
2072
C This functions returns the orders identified by the squared split order index in argument. Order values correspond to following list of couplings (and in this order):
2073
C %(split_order_str_list)s
2078
PARAMETER (NSO=%(nSO)d, NSQSO=%(nSquaredSO)d)
2082
INTEGER SOINDEX, ORDERS(NSO)
2087
INTEGER SQPLITORDERS(NSQSO,NSO)
2088
COMMON/%(proc_prefix)sML5SQPLITORDERS/SQPLITORDERS
2092
IF (SOINDEX.gt.0.and.SOINDEX.le.NSQSO) THEN
2094
ORDERS(I) = SQPLITORDERS(SOINDEX,I)
2099
WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sML5GET_SQUARED_ORDERS_FOR_SOINDEX'
2100
WRITE(*,*) 'Could not find squared orders index ',SOINDEX
2105
C This is the inverse subroutine of getting amplitude SO orders. Not directly useful, but provided nonetheless.
2106
SUBROUTINE %(proc_prefix)sML5GET_ORDERS_FOR_AMPSOINDEX(SOINDEX,ORDERS)
2108
C This functions returns the orders identified by the split order index in argument. Order values correspond to following list of couplings (and in this order):
2109
C %(split_order_str_list)s
2114
PARAMETER (NSO=%(nSO)d, NAMPSO=%(nAmpSO)d)
2118
INTEGER SOINDEX, ORDERS(NSO)
2123
INTEGER AMPSPLITORDERS(NAMPSO,NSO)
2124
COMMON/%(proc_prefix)sML5AMPSPLITORDERS/AMPSPLITORDERS
2128
IF (SOINDEX.gt.0.and.SOINDEX.le.NAMPSO) THEN
2130
ORDERS(I) = AMPSPLITORDERS(SOINDEX,I)
2135
WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sML5GET_ORDERS_FOR_AMPSOINDEX'
2136
WRITE(*,*) 'Could not find amplitude split orders index ',SOINDEX
2142
C This function is not directly useful, but included for completeness
2143
INTEGER FUNCTION %(proc_prefix)sML5SOINDEX_FOR_AMPORDERS(ORDERS)
2145
C This functions returns the integer index identifying the amplitude split orders passed in argument which correspond to the values of the following list of couplings (and in this order):
2146
C %(split_order_str_list)s
2151
PARAMETER (NSO=%(nSO)d, NAMPSO=%(nAmpSO)d)
2160
INTEGER AMPSPLITORDERS(NAMPSO,NSO)
2161
COMMON/%(proc_prefix)sML5AMPSPLITORDERS/AMPSPLITORDERS
2167
IF (ORDERS(J).NE.AMPSPLITORDERS(I,J)) GOTO 1009
2169
%(proc_prefix)sML5SOINDEX_FOR_AMPORDERS = I
2174
WRITE(*,*) 'ERROR:: Stopping function %(proc_prefix)sML5SOINDEX_FOR_AMPORDERS'
2175
WRITE(*,*) 'Could not find squared orders ',(ORDERS(I),I=1,NSO)
1526
2180
C --=========================================--
1527
2181
C Definition of additional access routines
1528
2182
C --=========================================--
1541
2195
ALWAYS_TEST_STABILITY = ONOFF
2199
SUBROUTINE %(proc_prefix)sSET_AUTOMATIC_TIR_CACHE_CLEARING(ONOFF)
2201
C This function can be called by the MadLoop user so as to manually chose when
2202
C to reset the TIR cache.
2206
include 'MadLoopParams.inc'
2210
LOGICAL AUTOMATIC_TIR_CACHE_CLEARING
2211
DATA AUTOMATIC_TIR_CACHE_CLEARING/.TRUE./
2212
COMMON/%(proc_prefix)sRUNTIME_OPTIONS/AUTOMATIC_TIR_CACHE_CLEARING
2214
INTEGER N_DP_EVAL, N_QP_EVAL
2215
COMMON/%(proc_prefix)sN_EVALS/N_DP_EVAL,N_QP_EVAL
2217
## if(not TIRCaching){
2218
WRITE(*,*) 'Warning: No TIR caching implemented. Call to SET_AUTOMATIC_TIR_CACHE_CLEARING did nothing.'
2221
AUTOMATIC_TIR_CACHE_CLEARING = ONOFF
2223
IF (NRotations_DP.ne.0.or.NRotations_QP.ne.0) THEN
2224
WRITE(*,*) 'Warning: One cannot remove the TIR cache automatic clearing while at the same time keeping Lorentz rotations for stability tests.'
2225
WRITE(*,*) 'MadLoop will therefore automatically set NRotations_DP and NRotations_QP to 0.'
2228
CALL %(proc_prefix)sSET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
1545
2233
SUBROUTINE %(proc_prefix)sSET_COUPLINGORDERS_TARGET(SOTARGET)