Compiling cuttools

Asked by Benjamin Fuks

Ciao guys,

I am still working on my single top process, and I have reached the step of compiling cuttools. I got the error message below. I am pretty sure it is a compilation issue. It seems that the standard gfortran compiler is not working due to 16kind reals. With which version of gfortran has amcatnlo been tested?

Cheers,

Benj

*****************

INFO: Compiling CutTools. This has to be done only once and can take a couple of minutes.
Error detected in "output singletop"
write debug file MG5_debug
If you need help with this issue please contact us on https://answers.launchpad.net/madgraph5
MadGraph5Error : A compilation Error occurs when trying to compile /scratch9/bfuks/aMCatNLO/vendor/CutTools.
 The compilation fails with the following output message:
     cp -p ./src/cts/cts_qpr.in ./src/cts/cts_mpr.h
     cp -p ./src/cts/cts_qpc.in ./src/cts/cts_mpc.h
     mkdir -p includects
     cp -p ./src/avh/* includects/
     cp -p ./src/cts/* includects/
     cp -p ./src/mpfun90/* includects/
     cp -p ./src/qcdloop/* includects/
     cp -p ./src/makefile includects/
     cd includects && make EXE="" FC="gfortran" FFLAGS="-fno-automatic -O2 -funroll-all-loops " default
     make[1]: Entering directory `/scratch9/bfuks/aMCatNLO/vendor/CutTools/includects'
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpfun90.f90
     ar rv libcts.a mpfun90.o
     ar: creating libcts.a
     a - mpfun90.o
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpmod90.f90
     ar rv libcts.a mpmod90.o
     a - mpmod90.o
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpmodm90.f90
     ar rv libcts.a mpmodm90.o
     a - mpmodm90.o
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpmodx90.f90
     ar rv libcts.a mpmodx90.o
     a - mpmodx90.o
     gfortran -fno-automatic -O2 -funroll-all-loops -c avh_olo.f90
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9638:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9641:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     avh_olo.f90:9650.13:

       allocate(tt(lb(dm):ub(dm)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9654.13:

       allocate(xx(lb(dm):ub(dm)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9655.2:

       xx(lb(dm):nn-1) = tt(lb(dm):nn-1)
       1
     Error: Unclassifiable statement at (1)
     avh_olo.f90:9656.2:

       xx(nn+1:ub(dm)) = tt(nn:ub(dm)-1)
       1
     Error: Unclassifiable statement at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9682:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9685:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     avh_olo.f90:9694.13:

       allocate(tt(lb(1):ub(1),lb(dm):ub(dm)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9698.13:

       allocate(xx(lb(1):ub(1),lb(dm):ub(dm)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9699.2:

       xx(:,lb(dm):nn-1) = tt(:,lb(dm):nn-1)
       1
     Error: Unclassifiable statement at (1)
     avh_olo.f90:9700.2:

       xx(:,nn+1:ub(dm)) = tt(:,nn:ub(dm)-1)
       1
     Error: Unclassifiable statement at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9726:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9729:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     avh_olo.f90:9738.13:

       allocate(tt(lb(1):ub(1),lb(2):ub(2),lb(dm):ub(dm)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9742.13:

       allocate(xx(lb(1):ub(1),lb(2):ub(2),lb(dm):ub(dm)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9743.2:

       xx(:,:,lb(dm):nn-1) = tt(:,:,lb(dm):nn-1)
       1
     Error: Unclassifiable statement at (1)
     avh_olo.f90:9744.2:

       xx(:,:,nn+1:ub(dm)) = tt(:,:,nn:ub(dm)-1)
       1
     Error: Unclassifiable statement at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9771:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9774:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     avh_olo.f90:9778.15:

         allocate(xx(l1:u1))
                    1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9782.13:

       allocate(tt(lb(1):ub(1)))
                  1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9785.14:

       allocate( xx(l1:u1) )
                   1
     Error: Syntax error in ALLOCATE statement at (1)
     avh_olo.f90:9787.2:

       xx(lb(1):ub(1)) = tt(lb(1):ub(1))
       1
     Error: Unclassifiable statement at (1)
     cts_mpr.h:1.13:
         Included at avh_olo.f90:9792:

      real(kind=16)&
                  1
     Error: Kind 16 not supported for type REAL at (1)
     Fatal Error: Error count reached limit of 25.
     make[1]: *** [libcts.a(avh_olo.o)] Error 1
     make[1]: Leaving directory `/scratch9/bfuks/aMCatNLO/vendor/CutTools/includects'
     make: *** [default] Error 2

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

Question information

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

Hi Benj,

You need gcc4.6 (or later) for this.
In principle you should have warning if your version is not compatible, did you miss those (or they are not working?)

Cheers,

Olivier

Revision history for this message
marco zaro (marco-zaro) said :
#2

mmm
the check of the version is currently done after launch...
indeed, if ct is needed at output time, we should think of moving it...
still, i do not completely like this, because in principle one should be able to just generate the code and then copy it to another machine...
up to you to decide
Cheers
Marco
On 16 Oct 2012, at 16:26, Olivier Mattelaer wrote:

> Question #211359 on MadGraph5 changed:
> https://answers.launchpad.net/madgraph5/+question/211359
>
> Status: Open => Answered
>
> Olivier Mattelaer proposed the following answer:
> Hi Benj,
>
> You need gcc4.6 (or later) for this.
> In principle you should have warning if your version is not compatible, did you miss those (or they are not working?)
>
>
> Cheers,
>
> Olivier
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

Hi Marco,

> still, i do not completely like this, because in principle one should be able to just generate the code and then copy it to another machine...

I agree on this, would be better to move the compilation of CT at the first launch command.

Cheers,

Olivier

On Oct 16, 2012, at 9:31 AM, marco zaro <email address hidden> wrote:

> Question #211359 on MadGraph5 changed:
> https://answers.launchpad.net/madgraph5/+question/211359
>
> marco zaro proposed the following answer:
> mmm
> the check of the version is currently done after launch...
> indeed, if ct is needed at output time, we should think of moving it...
> still, i do not completely like this, because in principle one should be able to just generate the code and then copy it to another machine...
> up to you to decide
> Cheers
> Marco
> On 16 Oct 2012, at 16:26, Olivier Mattelaer wrote:
>
>> Question #211359 on MadGraph5 changed:
>> https://answers.launchpad.net/madgraph5/+question/211359
>>
>> Status: Open => Answered
>>
>> Olivier Mattelaer proposed the following answer:
>> Hi Benj,
>>
>> You need gcc4.6 (or later) for this.
>> In principle you should have warning if your version is not compatible, did you miss those (or they are not working?)
>>
>>
>> Cheers,
>>
>> Olivier
>>
>> --
>> You received this question notification because you are a direct
>> subscriber of the question.
>
> --
> You received this question notification because you are a member of
> MadTeam, which is an answer contact for MadGraph5.

Revision history for this message
Benjamin Fuks (fuks) said :
#4

Hello,

Indeed, the warning was not printed. I have updated to the latest version of aMC2NLO, and I have also installed the latest gcc (this took a very long time... even longer than installing Root...). Good, so here is what I did:

MG5>set lhapdf /scratch9/bfuks/lhapdf-5.8.8/build/bin/lhapdf-config
MG5>set fortran_compiler /scratch9/bfuks/gcc/build/bin/gfortran
MG5>set fastjet /scratch9/bfuks/fastjet-3.0.3/build/bin/fastjet-config
MG5>define p = p b b~
MG5>define j = j b b~
MG5>generate p p > t j [QCD]

and I got the following warning message:
WARNING: In order to be able to run MadGraph @NLO, you need to have gfortran 4.6 or later installed.
gfortran 4.4.6 2011073 has been detected

The good news is that the warning is working. The bad news is that the command "set fortran_compiler" seems to have been ignored. Any clue?

Cheers and thanks!

Benj

Revision history for this message
marco zaro (marco-zaro) said :
#5

Ciao Benj,
the problem you are encountering comes from the fact that, for now, the fortran compiler must be in your path and called gfortran or g77.
it looks to me that this is used in many places (e.g. the install command, but I may be wrong)
isn't there any gcc/setup/gcc.sh script (this tipically is used to set that compiler as default one...)
Let me know!
Marco

On 18 Oct 2012, at 13:55, Benjamin Fuks wrote:

> Question #211359 on MadGraph5 changed:
> https://answers.launchpad.net/madgraph5/+question/211359
>
> Status: Answered => Open
>
> Benjamin Fuks is still having a problem:
> Hello,
>
>
> Indeed, the warning was not printed. I have updated to the latest version of aMC2NLO, and I have also installed the latest gcc (this took a very long time... even longer than installing Root...). Good, so here is what I did:
>
> MG5>set lhapdf /scratch9/bfuks/lhapdf-5.8.8/build/bin/lhapdf-config
> MG5>set fortran_compiler /scratch9/bfuks/gcc/build/bin/gfortran
> MG5>set fastjet /scratch9/bfuks/fastjet-3.0.3/build/bin/fastjet-config
> MG5>define p = p b b~
> MG5>define j = j b b~
> MG5>generate p p > t j [QCD]
>
> and I got the following warning message:
> WARNING: In order to be able to run MadGraph @NLO, you need to have gfortran 4.6 or later installed.
> gfortran 4.4.6 2011073 has been detected
>
> The good news is that the warning is working. The bad news is that the
> command "set fortran_compiler" seems to have been ignored. Any clue?
>
> Cheers and thanks!
>
>
> Benj
>
> --
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Benjamin Fuks (fuks) said :
#6

Ciao Marco,

This worked. Thank you!

However, I strongly suggest that the command set fortran compiler automatically updates the PATH and LD_LIBRAARY_PATH variables behind the scenes. This would facilitate the life of the user ;)

Now the next issue, when I type launch -m, amcatnlo crashes:

aMC@NLO>launch -m
How many core do you want to use? [24, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... ][60s to answer]
>
INFO: load configuration from /scratch9/bfuks/aMCatNLO/singletop/Cards/amcatnlo_configuration.txt
INFO: load configuration from /scratch9/bfuks/aMCatNLO/input/mg5_configuration.txt
INFO: load configuration from /scratch9/bfuks/aMCatNLO/singletop/Cards/amcatnlo_configuration.txt
Command "launch -m" interrupted with error:
TypeError : first argument must be string or compiled pattern
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in 'MG5_debug'.
Please attach this file to your report.

Benj

PS: I typed directly enter for the number of cores
PS2: I am uploading MG5_debug in a moment

Revision history for this message
Benjamin Fuks (fuks) said :
#7

As I am not finding the way to attach the debug file, I copy it here.

Cheers,

B>

#************************************************************
#* MadGraph 5 *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 1.5.2 2012-10-15 *
#* *
#* The MadGraph Development Team - Please visit us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph 5 *
#* *
#* run as ./bin/mg5 filename *
#* *
#************************************************************
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_optimized_output True
set gauge unitary
set complex_mass_scheme False
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
set lhapdf /scratch9/bfuks/lhapdf-5.8.8/build/bin/lhapdf-config
set fortran_compiler /scratch9/bfuks/gcc/build/bin/gfortran
set fastjet /scratch9/bfuks/fastjet-3.0.3/build/bin/fastjet-config
define j = j b b~
define p = p b b~
generate p p > t j [QCD]
add process p p > t~ j [QCD]
output singletop
launch -m
Traceback (most recent call last):
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/extended_cmd.py", line 814, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/extended_cmd.py", line 807, in onecmd_orig
    return func(arg, **opt)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/master_interface.py", line 403, in do_launch
    return self.cmd.do_launch(self, line, *args, **opts)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/amcatnlo_interface.py", line 593, in do_launch
    ext_program.run()
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/launch_ext_program.py", line 66, in run
    self.launch_program()
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/launch_ext_program.py", line 324, in launch_program
    usecmd = run_int.aMCatNLOCmd(me_dir=self.running_dir, options = self.cmd_int.options)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/amcatnlo_run_interface.py", line 566, in __init__
    self.set_configuration(amcatnlo=True)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/common_run_interface.py", line 410, in set_configuration
    return self.set_configuration(me5_config, final,initdir=self.me_dir)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/common_run_interface.py", line 476, in set_configuration
    self.do_set("%s %s --no_save" % (key, self.options[key]), log=False)
  File "/scratch9/bfuks/aMCatNLO/madgraph/interface/common_run_interface.py", line 298, in do_set
    misc.mod_compilator(self.me_dir, args[1], current)
  File "/scratch9/bfuks/aMCatNLO/madgraph/various/misc.py", line 264, in mod_compilator
    pattern = re.compile(current)
  File "/usr/lib64/python2.6/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/usr/lib64/python2.6/re.py", line 241, in _compile
    raise TypeError, "first argument must be string or compiled pattern"
TypeError: first argument must be string or compiled pattern
                          MadGraph Options
                          ----------------
               stdout_level : 10 (user set)
         group_subprocesses : False (user set)
  ignore_six_quark_processes : False
      loop_optimized_output : True
                      gauge : Feynman (user set)
        complex_mass_scheme : False

                         MadEvent Options
                          ----------------
     automatic_html_opening : True
                    nb_core : None
                   run_mode : 2

                      Configuration Options
                      ---------------------
                web_browser : None
                text_editor : None
          cluster_temp_path : None
            pythia-pgs_path : None (user set)
                    td_path : None (user set)
               delphes_path : None (user set)
                thepeg_path : /scratch9/bfuks/aMCatNLO (user set)
               cluster_type : condor
           madanalysis_path : None (user set)
              cluster_queue : None
           fortran_compiler : /scratch9/bfuks/gcc/build/bin/gfortran (user set)
                     lhapdf : lhapdf-config
     MCatNLO-utilities_path : /scratch9/bfuks/aMCatNLO/MCatNLO-utilities (user set)
        exrootanalysis_path : ./ExRootAnalysis
                 eps_viewer : None
                    timeout : 60
                    fastjet : fastjet-config
                 hepmc_path : /scratch9/bfuks/aMCatNLO (user set)
                auto_update : 7 (user set)
               pythia8_path : None (user set)
                  hwpp_path : /scratch9/bfuks/aMCatNLO (user set)

Revision history for this message
Benjamin Fuks (fuks) said :
#8

Ciao Marco,

Any news?

Cheers,

Benj

Revision history for this message
Benjamin Fuks (fuks) said :
#9

Ciao guys,

This bug is not there anymore, with the new version (I did a bzr pull this morning). But I still have issues with versioning and gcc. I'll try to clear it myself. If not succeeding, I will come back to you.

Cheers and thanks,

Benj