fNLO: compiling with root6.22 and gcc10

Asked by Hannes Jung

Dear experts

I want to run dijet production in fixed NLO mode, I succeed in producing histograms with Hwu format. Now I want to switch to root for having more options in histogram booking.
I use version MG5_aMC_v2_9_3 and the compiler setting with
source /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/ROOT-env.sh

However, using the template ananlysis code I get compiler errors, and I couldn't find where to change the g++ option (exporting CXXFLAGSS='-std=c++17 -lstdc++ ' does not help).
The compiler errors are:
-------------------------------------
INFO: Compiling P0_uxc_uxc...
WARNING: fct <function compile_dir at 0x7fb7f0cf2160> does not return 0. Stopping the code in a clean way. The error was:
A compilation Error occurs when trying to compile /nfs/dust/cms/user/jung/cvs/madgraph/MG5_aMC_v2_9_3/jj-13TeV-ptcut40-fNLO-NNPDF31NNLO-HT-root-req_acc_FO=0.1-test/SubProcesses/P0_uxu_uux.
The compilation fails with the following output message:
    /cvmfs/sft.cern.ch/lcg/releases/gcc/10.3.0-f5826/x86_64-centos7/bin/gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../FixedOrderAnalysis/ -I/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include ../../FixedOrderAnalysis//analysis_root_template.f
    /cvmfs/sft.cern.ch/lcg/releases/gcc/10.3.0-f5826/x86_64-centos7/bin/gfortran -O -fno-automatic -ffixed-line-length-132 -c -I. -I../../FixedOrderAnalysis/ -I/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include ../../FixedOrderAnalysis//rbook_fe8.f
    /cvmfs/sft.cern.ch/lcg/releases/gcc/10.3.0-f5826/x86_64-centos7/bin/g++ -O -static-libstdc++ -std=c++11 -I/nfs/dust/cms/user/jung/cvs/madgraph/MG5_aMC_v2_9_3/HEPTools/lhapdf6_py3/include -c -I. -I../../FixedOrderAnalysis/ -I/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include ../../FixedOrderAnalysis//rbook_be8.cc
    In file included from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TString.h:28,
                     from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TNamed.h:26,
                     from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TAxis.h:24,
                     from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TH1.h:24,
                     from ../../FixedOrderAnalysis//rbook_be8.cc:19:
    /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/ROOT/RStringView.hxx:84:17: error: expected type-specifier
       84 | operator std::string_view() const { return std::string_view(fData,fLength); }
          | ^~~
    In file included from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TNamed.h:26,
                     from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TAxis.h:24,
                     from /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include/TH1.h:24,
                     from ../../FixedOrderAnalysis//rbook_be8.cc:19:
.....
-----------------------------------------

In Template/NLO/Cards/FO_analyse_card.dat I have:
FO_ANALYSIS_FORMAT = root
FO_EXTRALIBS = Core Hist Matrix MathCore RIO dl Thread m
FO_EXTRAPATHS = /cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/lib
FO_INCLUDEPATHS =/cvmfs/sft.cern.ch/lcg/releases/LCG_99/ROOT/v6.22.06/x86_64-centos7-gcc10-opt/include
FO_ANALYSE = analysis_root_template.o

How could I get the proper root compiler options in place ?

thanks a lot in advance

Best
Hannes

Question information

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

Did you try to modify the file Source/make_opts ?
This should allow you to change the compilation flag needed here
(but I do not have root and have never tested personally such option)

Cheers,

Olivier

Revision history for this message
Hannes Jung (hannes.jung) said :
#2

Dear Olivier
thanks a lot for your reply.
I am still a bit lost, which make_opts should be changed ?
I found Template/NLO/Source/make_opts.inc, but changing this has no effect.

Thanks a lot
Cheers
Hannes

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

If you change that one, you need to re-create the code (so rerun the output command)
So I would advise to change the one in Sourcce directory of the generated code.

Cheers,

Olivier

> On 14 Jan 2022, at 18:35, Hannes Jung <email address hidden> wrote:
>
> Question #700211 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/700211
>
> Status: Answered => Open
>
> Hannes Jung is still having a problem:
> Dear Olivier
> thanks a lot for your reply.
> I am still a bit lost, which make_opts should be changed ?
> I found Template/NLO/Source/make_opts.inc, but changing this has no effect.
>
> Thanks a lot
> Cheers
> Hannes
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Hannes Jung (hannes.jung) said :
#4

Hi Olivier

I am running the follwing commands:
....
generate p p > j j [QCD]
output jj-13TeV-ptcut40-fNLO-NNPDF31NNLO-HT-root-req_acc_FO=0.1-test
launch NLO -p
set req_acc_FO=0.01
....

how could I do without the output command ?
Cheers
Hannes

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

you can do
> launch jj-13TeV-ptcut40-fNLO-NNPDF31NNLO-HT-root-req_acc_FO=0.1-test NLO -p
> set req_acc_FO=0.01
...

> On 14 Jan 2022, at 21:15, Hannes Jung <email address hidden> wrote:
>
> Question #700211 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/700211
>
> Status: Answered => Open
>
> Hannes Jung is still having a problem:
> Hi Olivier
>
> I am running the follwing commands:
> ....
> generate p p > j j [QCD]
> output jj-13TeV-ptcut40-fNLO-NNPDF31NNLO-HT-root-req_acc_FO=0.1-test
> launch NLO -p
> c
> ....
>
> how could I do without the output command ?
> Cheers
> Hannes
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Hannes Jung (hannes.jung) said :
#6

Dear Olivier

thanks a lot, with this it worked.

It also works by changing in Template/NLO/Source/make_opts.inc
----------------------------------
...
ifneq ($(lhapdf),)
  CXXFLAGS += $(shell $(lhapdf) --cppflags)
--> CXXFLAGS +=-std=c++17 -lstdc++
  ifeq ($(lhapdfversion),6)
....
--------------------------------

Thanks a lot again
Cheers
Hannes

Can you help with this problem?

Provide an answer of your own, or ask Hannes Jung for more information if necessary.

To post a message you must log in.