How do I compile vendor/CutTools for NLO?

Asked by Robert Cantrill

Hi

I'm trying to generate events using MadGraph at nlo and I'm having what I believe to be problems compiling CutTools.

I am using Fortran version gcc46.

I have configured and compiled fastjet and lhapdf and set the paths to both fastjet-config and lhapdf-config.

I'm generating p p > e- ve~ [QCD]. (Eventually I would like to generate p p > h > t t~ b b~ but I thought I'd start with something basic)

When I do the output MY_FIRST_AMCATNLO_RUN command, I get the error message below. From reading the bug reports I thought it may have something to do with the version of Fortran I'm using but as I say, I'm using Fortran version gcc46, which I thought should be advanced enough.

If you have any advice, it would be greatly appreciated. Thanks in advance.

Best regards,
Rob

INFO: Compiling CutTools. This has to be done only once and can take a couple of minutes.
Error detected in "output MY_FIRST_AMCATNLO_RUN"
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 /afs/cern.ch/user/r/rcantril/MadGraph3/MG5_aMC_v2_1_2_beta2/vendor/CutTools.
 The compilation fails with the following output message:
     cp -p ./src/cts/cts_qpr.in ./src/cts/cts_mpr.h
     mkdir -p includects
     cp -p ./src/cts/cts_qpc.in ./src/cts/cts_mpc.h
     cp -p ./src/avh/* includects/
     cp -p ./src/cts/cts_qprec.in ./src/cts/cts_mprec.h
     cp -p ./src/cts/cts_qpinit.in ./src/cts/cts_mpinit.h
     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 `/afs/cern.ch/user/r/rcantril/MadGraph3/MG5_aMC_v2_1_2_beta2/vendor/CutTools/includects'
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpfun90.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpmod90.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpmodm90.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c mpmodx90.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c avh_olo.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c cts_type.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c cts_tensors.f90
     gfortran -fno-automatic -O2 -funroll-all-loops -c cts_constants.f90
     mpmodx90.f90:32.12:

     use mpmodule
                 1
     Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
     cts_mprec.h:1.14:
         Included at cts_constants.f90:5:

       use mpmodule
                   1
     Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
     cts_mprec.h:1.14:
         Included at cts_tensors.f90:2:

       use mpmodule
                   1
     Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
     mpmodm90.f90:34.12:

     use mpmodule
                 1
     Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
     mpmod90.f90:43.12:

     use mpfunmod
                 1
     Fatal Error: Can't open module file 'mpfunmod.mod' for reading at (1): No such file or directory
     make[1]: *** [libcts.a(mpmodx90.o)] Error 1
     make[1]: *** Waiting for unfinished jobs....
     make[1]: *** [libcts.a(mpmodm90.o)] Error 1
     make[1]: *** [libcts.a(cts_tensors.o)] Error 1
     make[1]: *** [libcts.a(mpmod90.o)] Error 1
     make[1]: *** [libcts.a(cts_constants.o)] Error 1
     cts_mprec.h:1.14:
         Included at cts_type.f90:57:

       use mpmodule
                   1
     Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
     make[1]: *** [libcts.a(cts_type.o)] Error 1
     avh_olo.f90:21938.19:

       use mpmodule
                        1
     Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
     make[1]: *** [libcts.a(avh_olo.o)] Error 1
     ar rv libcts.a mpfun90.o
     ar: creating libcts.a
     a - mpfun90.o
     make[1]: Leaving directory `/afs/cern.ch/user/r/rcantril/MadGraph3/MG5_aMC_v2_1_2_beta2/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:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
Valentin Hirschi Edit question
Last query:
Last reply:
Revision history for this message
Nicola Orlando (nicola-orlando) said :
#1

Hi all,
just to confirm I'm having the same problem.

I use the following setup

gcc (GCC) 4.7.2
Python 2.7.4

I ran the command sequence

set output_dependencies internal
generate p p > t t~ [QCD]
output AMCATNLO_tt
launch AMCATNLO_tt

The latter terminates with the same error message reported by Robert.

Best regards,
Nicola

Revision history for this message
Robert Cantrill (robert-cantrill) said :
#2

Hi

I was wondering if there is any news on this problem?

I've now upgraded to gcc47 and I am still experiencing the same error.

Cheers,
Rob

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

Valentin is currently in holliday up to the 21 July (if I'm correct).
I can try to help, but the best is probably to wait for him.

so if you do not want to wait for Valentin,
1) could you try with the MG5_aMC 2.1.2?
2) what return
gcc --version
g++ --version
gfortran --version
3) Are you using a mac, SLC5/6, Ubuntu?

Cheers,

Olivier

Revision history for this message
Robert Cantrill (robert-cantrill) said :
#4

Hi Olivier

Thanks for getting back to me. MG5_aMCv2.1.2 is the version I'm currently using and this gives me the same problem.

When I execute the version commands I get the following,

[rcantril@ui63 MadGraph]$ gcc --version
gcc (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[rcantril@ui63 MadGraph]$ g++ --version
g++ (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[rcantril@ui63 MadGraph]$ gfortran --version
GNU Fortran (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING

I'm running using Linux and I'm using slc6.

Cheers,
Rob

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

Hi Rob,

so everything seems good on that point,

Do you have a file:
/afs/cern.ch/user/r/rcantril/MadGraph3/MG5_aMC_v2_1_2_beta2/vendor/CutTools/includects/mpmodule.mod

if not do you have it with a different case and/or a file with a similar name in that directory?

I hope so since clearly I have not the knowledge to help you more if this is not a stupid problem like that, since I have no knowledge of the language (f90) use for that part of the code.

Cheers,

Olivier

Revision history for this message
Robert Cantrill (robert-cantrill-2009) said :
#6

Hi Olivier

Sorry for the late reply, I was travelling last week and wasn't able to check email.

I did check CutTools for mpmodule.mod and it was there. So I'm still unsure about what is causing the problem.

Cheers,
Rob

Revision history for this message
Valentin Hirschi (valentin-hirschi) said :
#7

Sorry of the late reply, I was on holiday last week (as pointed out by Olivier).

Could you try to recompile CutTools by hand, with the following command:

cd /afs/cern.ch/user/r/rcantril/MadGraph3/MG5_aMC_v2_1_2_beta2/vendor/CutTools
make clean
make

If this works, then MG5_aMC will not recompile it at any point (unless you change the output_dependencies option or if you change your compiler) so that you should be able to use the framework without problems.

From the log you sent me, it seems that you compiled CutTools in multi-core compilation mode. At some point in the past, I had made sure that MG5_aMC would compile CT on one core only, since I had problems with multi-core compilation for CT in the past.
This might have been accidentally changed in some recent revision of the code. I

'll double check this, but could you also try to recompile it in multicore mode with

 cd /afs/cern.ch/user/r/rcantril/MadGraph3/MG5_aMC_v2_1_2_beta2/vendor/CutTools
make clean
make -j8

(i.e. change 8 to whatever maximum number of core you have on the machine you are compiling from) and see if it crashes in this case?

Revision history for this message
Robert Cantrill (robert-cantrill-2009) said :
#8

Hi Valentin

What you've suggested has helped, however I think the main problem was due to the version of fortran not being set up properly. Version gcc46 was setup (or so I believed) on my machine and I confirmed this by doing 'g++ --version', but the way in which I set it up was to use the Atlas setup, which will automatically set up the version of fortran for you. We have recently done a hard installation of fortran 4.6 on our computers and this has helped resolve the problem.

I have to use the Atlas setup in order to run my program. I've found that if I cd into CutTools and compile before I setup the Atlas software everything runs fine. So I'm guessing there is some sort of miss-match between the fortran setups.

Thanks for you help.

Best regards,
Rob

Revision history for this message
Tamasi (tamasi-kar) said :
#9

Hi,

I have the same error on lxplus and the above solution did not work for me. Earlier I had cache.mod file missing when compiling collier which is now solved and now I have exactly the same error as above. I tried recompiling CutTools manually and the error remains.
I am using the latest version of MadGraph and do the following in the madgraph interface
>import model loop_sm
>generate g g > h h [QCD]
>output test_loop_sm
after which the above error starting from

"mpmodx90.f90:32:4:

 use mpmodule
    1
Fatal Error: Can't open module file 'mpmodule.mod' for reading at (1): No such file or directory
compilation terminated.
"
Below are the outputs for the gcc, g++ and gfortran version.

[tkar@lxplus603 CutTools]$ gcc --version
gcc (GCC) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[tkar@lxplus603 CutTools]$ g++ --version
g++ (GCC) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[tkar@lxplus603 CutTools]$ gfortran --version
GNU Fortran (GCC) 6.2.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I have been trying to fix this from a very long time. Any help would be very much appreciated. Thank you.

Cheers,
Tamasi

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

Can you open a bug report for that?
Having a bug report will allow to attach file. In this case it would be interesting to have the full log file when you try to compile cuttools.

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Robert Cantrill for more information if necessary.

To post a message you must log in.