trouble with custom cut MG3.5

Asked by Le Van Dung

I generated a random process and I copied the dummy cut to an external file. I apply this dummy cut by changing the run card

 ['/home/dung/app/MG5_aMC_v3.5.0/cf.f'] = custom_fcts ! List of files containing user hook function

here is how the dummy function looks like

      logical FUNCTION dummy_cuts(P)
C**************************************************************************
C INPUT:
C P(0:3,1) MOMENTUM OF INCOMING PARTON
C P(0:3,2) MOMENTUM OF INCOMING PARTON
C P(0:3,3) MOMENTUM OF ...
C ALL MOMENTA ARE IN THE REST FRAME!!
C COMMON/JETCUTS/ CUTS ON JETS
C OUTPUT:
C TRUE IF EVENTS PASSES ALL CUTS LISTED
C**************************************************************************
      IMPLICIT NONE
c
c Constants
c
      include 'genps.inc'
      include 'nexternal.inc'
C
C ARGUMENTS
C
      REAL*8 P(0:3,nexternal)
C
C PARAMETERS
C
      real*8 PI
      parameter( PI = 3.14159265358979323846d0 )
c
c particle identification
c
      LOGICAL IS_A_J(NEXTERNAL),IS_A_L(NEXTERNAL)
      LOGICAL IS_A_B(NEXTERNAL),IS_A_A(NEXTERNAL),IS_A_ONIUM(NEXTERNAL)
      LOGICAL IS_A_NU(NEXTERNAL),IS_HEAVY(NEXTERNAL)
      logical do_cuts(nexternal)
      COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY,
     . IS_A_ONIUM, do_cuts

      dummy_cuts=.true.

      return
      end

But after that I got an error

Error detected in "generate_events run_01"
write debug file /home/dung/app/MG5_aMC_v3.5.0/test/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
str : A compilation Error occurs when trying to compile /home/dung/app/MG5_aMC_v3.5.0/test/SubProcesses/P1_ll_ll.
        The compilation fails with the following output message:
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c driver.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c myamp.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c genps.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c unwgt.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c setcuts.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c get_color.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c cuts.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c cluster.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c reweight.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c initcluster.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c addmothers.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c setscales.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c dummy_fct.f -I../../Source/ -I../../Source/PDF/gammaUPC
            dummy_fct.f:159:132:

              159 | COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY,
                  | 1
            Error: Syntax error in COMMON statement at (1)
            dummy_fct.f:160:8:

              160 | . IS_A_ONIUM, DO_CUTS
                  | 1
            Error: Invalid character in name at (1)
            make: *** [makefile:80: dummy_fct.o] Error 1
            make: *** Waiting for unfinished jobs....

        Please try to fix this compilations issue and retry.
        Help might be found at https://answers.launchpad.net/mg5amcnlo.
        If you think that this is a bug, you can report this at https://bugs.launchpad.net/mg5amcnlo

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Olivier Mattelaer
Solved:
Last query:
Last reply:
Revision history for this message
Best Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Thanks for reporting this.

Looks like our parser/formatter has some issue with the line
"COMMON /TO_SPECISA/IS_A_J,IS_A_A,IS_A_L,IS_A_B,IS_A_NU,IS_HEAVY,
     . IS_A_ONIUM, do_cuts"

Our parser does not actually know the use of "." as a continuation symbol.
I have just changed that line for the next release (3.5.2) that replace the "." by "&" symbol and that fixes the issues.

Thanks a lot,

Olivier

Revision history for this message
Le Van Dung (dunglvht) said :
#2

Thanks Olivier Mattelaer, that solved my question.