Error during compiling in dummy_fct.f

Asked by Antonio Sandroni

Hi, im following the steps of arXiv:2111.02442v2 to generate events from VBF of W+ and W-; im literally using the code given at page 45/46 because i do not know anything of Fortran so i add the code given in dummy_fct.f (at the end of file) as said but after saving and using the other commands gives me this error:

Error detected in "generate_events run_02"
write debug file /home/antonio/Scaricati/mg5amcnlo/wxwx_tt_XLO/run_02_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/antonio/Scaricati/mg5amcnlo/wxwx_tt_XLO/SubProcesses/P1_wpwm_ttx.
 The compilation fails with the following output message:
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c driver.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c myamp.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c genps.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c unwgt.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c setcuts.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c get_color.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c cuts.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c cluster.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c reweight.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c initcluster.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c addmothers.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c setscales.f -I../../Source/
     gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c dummy_fct.f -I../../Source/
     dummy_fct.f:97:132:

        97 | integer ff
           | 1
     Error: Unexpected data declaration statement at (1)
     dummy_fct.f:98:1:

        98 | double precision mtop2,sHat,rat,cosTh
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:99:1:

        99 | double precision SumDot
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:100:1:

       100 | external SumDot
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:101:1:

       101 | mtop2 = (173.0d0)**2
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:102:1:

       102 | sHat = SumDot(p(0,1), p(0,2), 1d0)
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:103:1:

       103 | rat = 1.d0 - mtop2 / sHat
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:104:1:

       104 | do ff=nincoming+1,nexternal
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:107:1:

       107 | if(cosTh.gt.rat) then
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:108:1:

       108 | dummy_cuts=.false.
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:109:1:

       109 | return
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:110:1:

       110 | endif
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:111:1:

       111 | enddo
           | 1
     Error: Non-numeric character in statement label at (1)
     dummy_fct.f:103:3:

       103 | rat = 1.d0 - mtop2 / sHat
           | 1
     Error: Symbol ‘at’ at (1) has no IMPLICIT type
     dummy_fct.f:102:4:

       102 | sHat = SumDot(p(0,1), p(0,2), 1d0)
           | 1
     Error: Symbol ‘hat’ at (1) has no IMPLICIT type
     dummy_fct.f:103:18:

       103 | rat = 1.d0 - mtop2 / sHat
           | 1
     Error: Symbol ‘mtop2’ at (1) has no IMPLICIT type
     dummy_fct.f:103:25:

       103 | rat = 1.d0 - mtop2 / sHat
           | 1
     Error: Symbol ‘shat’ at (1) has no IMPLICIT type
     dummy_fct.f:101:5:

       101 | mtop2 = (173.0d0)**2
           | 1
     Error: Symbol ‘top2’ at (1) has no IMPLICIT type
     dummy_fct.f:108:10:

       108 | dummy_cuts=.false.
           | 1
     Error: Symbol ‘ummy_cuts’ at (1) has no IMPLICIT type
     dummy_fct.f:102:14:

       102 | sHat = SumDot(p(0,1), p(0,2), 1d0)
           | 1
     Error: Function ‘p’ at (1) has no IMPLICIT type
     make: *** [makefile:77: dummy_fct.o] Errore 1
     make: *** Attesa per i processi non terminati....

 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
Do i make a mistake in the coping of the code or is about the version of Fortran?
Thank in advance

Question information

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

Looks like an identation issue in your copy-paste.
Fortran has special meaning for the first seven carachter of each line.
and looks like those spaces are not correctly preserve with your procedure.

So I would suggest to add 7 emply space in front of each line. This should likely fix most issue (maybe not all)

Cheers,

Olivier

> On 6 Aug 2022, at 14:11, Antonio Sandroni <email address hidden> wrote:
>
> New question #702678 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/702678
>
> Hi, im following the steps of arXiv:2111.02442v2 to generate events from VBF of W+ and W-; im literally using the code given at page 45/46 because i do not know anything of Fortran so i add the code given in dummy_fct.f (at the end of file) as said but after saving and using the other commands gives me this error:
>
> Error detected in "generate_events run_02"
> write debug file /home/antonio/Scaricati/mg5amcnlo/wxwx_tt_XLO/run_02_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/antonio/Scaricati/mg5amcnlo/wxwx_tt_XLO/SubProcesses/P1_wpwm_ttx.
> The compilation fails with the following output message:
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c driver.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c myamp.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c genps.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c unwgt.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c setcuts.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c get_color.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c cuts.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c cluster.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c reweight.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c initcluster.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c addmothers.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c setscales.f -I../../Source/
> gfortran -w -fPIC -O -fbounds-check -ffixed-line-length-132 -w -c dummy_fct.f -I../../Source/
> dummy_fct.f:97:132:
>
> 97 | integer ff
> | 1
> Error: Unexpected data declaration statement at (1)
> dummy_fct.f:98:1:
>
> 98 | double precision mtop2,sHat,rat,cosTh
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:99:1:
>
> 99 | double precision SumDot
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:100:1:
>
> 100 | external SumDot
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:101:1:
>
> 101 | mtop2 = (173.0d0)**2
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:102:1:
>
> 102 | sHat = SumDot(p(0,1), p(0,2), 1d0)
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:103:1:
>
> 103 | rat = 1.d0 - mtop2 / sHat
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:104:1:
>
> 104 | do ff=nincoming+1,nexternal
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:107:1:
>
> 107 | if(cosTh.gt.rat) then
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:108:1:
>
> 108 | dummy_cuts=.false.
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:109:1:
>
> 109 | return
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:110:1:
>
> 110 | endif
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:111:1:
>
> 111 | enddo
> | 1
> Error: Non-numeric character in statement label at (1)
> dummy_fct.f:103:3:
>
> 103 | rat = 1.d0 - mtop2 / sHat
> | 1
> Error: Symbol ‘at’ at (1) has no IMPLICIT type
> dummy_fct.f:102:4:
>
> 102 | sHat = SumDot(p(0,1), p(0,2), 1d0)
> | 1
> Error: Symbol ‘hat’ at (1) has no IMPLICIT type
> dummy_fct.f:103:18:
>
> 103 | rat = 1.d0 - mtop2 / sHat
> | 1
> Error: Symbol ‘mtop2’ at (1) has no IMPLICIT type
> dummy_fct.f:103:25:
>
> 103 | rat = 1.d0 - mtop2 / sHat
> | 1
> Error: Symbol ‘shat’ at (1) has no IMPLICIT type
> dummy_fct.f:101:5:
>
> 101 | mtop2 = (173.0d0)**2
> | 1
> Error: Symbol ‘top2’ at (1) has no IMPLICIT type
> dummy_fct.f:108:10:
>
> 108 | dummy_cuts=.false.
> | 1
> Error: Symbol ‘ummy_cuts’ at (1) has no IMPLICIT type
> dummy_fct.f:102:14:
>
> 102 | sHat = SumDot(p(0,1), p(0,2), 1d0)
> | 1
> Error: Function ‘p’ at (1) has no IMPLICIT type
> make: *** [makefile:77: dummy_fct.o] Errore 1
> make: *** Attesa per i processi non terminati....
>
> 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
> Do i make a mistake in the coping of the code or is about the version of Fortran?
> Thank in advance
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Antonio Sandroni (antoniosandroni) said :
#2

Thank to Claudio Severi i solved this problem! It was a problem regarding the right placement of functions and variables in Fortran!
Thank