launch process complitation issue

Asked by Maxim Lysenko

Dear developers,

I tried to launch a process for a new imported model, but it gives a compilation error which I did not encounter previously. I checked my gcc and gfortran versions and they are the same (11.4.0).

The error log is the following:

INFO: Update the dependent parameter of the param_card.dat
WARNING: update the strong coupling value (alpha_s) to the value from the pdf selected: 0.13
Generating 10000 events with run name run_01
survey run_01
INFO: compile directory
Traceback (most recent call last):
  File "/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/bin/internal/ufomodel/write_param_card.py", line 180, in <module>
    ParamCardWriter('./param_card.dat', generic=True)
  File "/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/bin/internal/ufomodel/write_param_card.py", line 28, in __init__
    self.write_card(list_of_parameters)
  File "/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/bin/internal/ufomodel/write_param_card.py", line 88, in write_card
    self.write_dep_param_block(lhablock)
  File "/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/bin/internal/ufomodel/write_param_card.py", line 137, in write_dep_param_block
    value = complex(eval(param.value)).real
  File "<string>", line 1, in <module>
NameError: name 'cot' is not defined
compile Source Directory
Error detected in "generate_events run_01"
write debug file /home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/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/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source.
        The compilation fails with the following output message:
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o StringCast.o StringCast.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o ranmar.o ranmar.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o alfas_functions.o alfas_functions.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o transpole.o transpole.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o invarients.o invarients.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o hfill.o hfill.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o pawgraphs.o pawgraphs.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o ran1.o ran1.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o rw_events.o rw_events.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o rw_routines.o rw_routines.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o kin_functions.o kin_functions.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o open_file.o open_file.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o basecode.o basecode.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o setrun.o setrun.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o run_printout.o run_printout.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o dgauss.o dgauss.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o readgrid.o readgrid.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o getissud.o getissud.f
            cd DHELAS; make; cd ..
            make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
            make[1]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/DHELAS'
            cd PDF; make; cd ..
            make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
            make[1]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/PDF'
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o aloha_functions.o aloha_functions.f
            echo "remove previous compilation ElectroweakFluxDriver.o ../../lib/libgammaUPC.a pdfwrap_lhapdf.o"
            remove previous compilation ElectroweakFluxDriver.o ../../lib/libgammaUPC.a pdfwrap_lhapdf.o
            echo "need to compile opendata.o PhotonFlux.o ElectroweakFlux_dummy.o Ctq6Pdf.o pdfwrap.o pdf.o pdg2pdf.o NNPDFDriver.o eepdf.o gridpdfaux.o dfint.o kerset.o"
            need to compile opendata.o PhotonFlux.o ElectroweakFlux_dummy.o Ctq6Pdf.o pdfwrap.o pdf.o pdg2pdf.o NNPDFDriver.o eepdf.o gridpdfaux.o dfint.o kerset.o
            rm -rf ElectroweakFluxDriver.o ../../lib/libgammaUPC.a pdfwrap_lhapdf.o
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o opendata.o opendata.f
            cd PDF/gammaUPC; make -f makefile_dummy; cd ../../
            make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
            make[1]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/PDF/gammaUPC'
            cd MODEL; make
            make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
            make[1]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/MODEL'
            cd CERNLIB; make; cd ..
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o couplings.o couplings.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c gammaUPC_dummy.f
            cd BIAS/dummy; make; cd ../../
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o DiscreteSampler.o DiscreteSampler.f
            make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
            make[1]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/CERNLIB'
            make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
            make[1]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/BIAS/dummy'
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o abend.o abend.f
            ar cru ../../../lib/libgammaUPC.a gammaUPC_dummy.o
            ar: `u' modifier ignored since `D' is the default (see `U')
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o dlsqp2.o dlsqp2.f
            intparam_definition.inc:119:20:

              119 | $ *MDL_SW*COT(DCMPLX(MDL_ZETA)))/MDL_CAB)))
                  | 1
            Error: Function ‘cot’ at (1) has no IMPLICIT type
            intparam_definition.inc:119:20:

              119 | $ *MDL_SW*COT(DCMPLX(MDL_ZETA)))/MDL_CAB)))
                  | 1
            Error: Function ‘cot’ at (1) has no IMPLICIT type
            make[1]: *** [<builtin>: couplings.o] Error 1
            make[1]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/MODEL'
            make: *** [makefile:59: ../lib/libmodel.a] Error 2
            make: *** Waiting for unfinished jobs....
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o dummy.o dummy.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o PhotonFlux.o PhotonFlux.f
            ranlib ../../../lib/libgammaUPC.a
            ar cru ../../../lib/libbias.a dummy.o
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o lenocc.o lenocc.f
            ar: `u' modifier ignored since `D' is the default (see `U')
            make[1]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/PDF/gammaUPC'
            ranlib ../../../lib/libbias.a
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o ElectroweakFlux_dummy.o ElectroweakFlux_dummy.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o mtlprt.o mtlprt.f
            make[1]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/BIAS/dummy'
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o Ctq6Pdf.o Ctq6Pdf.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o mtlset.o mtlset.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o radmul.o radmul.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o pdfwrap.o pdfwrap.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o pdf.o pdf.f
            ar cru ../../lib/libcernlib.a abend.o dlsqp2.o lenocc.o mtlprt.o mtlset.o radmul.o
            ar: `u' modifier ignored since `D' is the default (see `U')
            ranlib ../../lib/libcernlib.a
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o pdg2pdf.o pdg2pdf.f
            make[1]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/CERNLIB'
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o NNPDFDriver.o NNPDFDriver.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV2P1N_3.o FFV2P1N_3.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV3P1N_3.o FFV3P1N_3.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o eepdf.o eepdf.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV3P1N_1.o FFV3P1N_1.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV3_0.o FFV3_0.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV2P1N_1.o FFV2P1N_1.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV2_3.o FFV2_3.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV3_3.o FFV3_3.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV2P1N_2.o FFV2P1N_2.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV3P1N_2.o FFV3P1N_2.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o FFV2_0.o FFV2_0.f
            ar cru ../../lib/libdhelas.a aloha_functions.o FFV2P1N_3.o FFV3P1N_3.o FFV3P1N_1.o FFV3_0.o FFV2P1N_1.o FFV2_3.o FFV3_3.o FFV2P1N_2.o FFV3P1N_2.o FFV2_0.o
            ar: `u' modifier ignored since `D' is the default (see `U')
            ranlib ../../lib/libdhelas.a
            make[1]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/DHELAS'
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o gridpdfaux.o gridpdfaux.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o dfint.o dfint.f
            gfortran -w -fPIC -O -ffixed-line-length-132 -c -o kerset.o kerset.f
            rm ../../lib/libpdf.a || echo "recompilation of ../../lib/libpdf.a"
            rm: cannot remove '../../lib/libpdf.a': No such file or directory
            recompilation of ../../lib/libpdf.a
            ar cru ../../lib/libpdf.a opendata.o PhotonFlux.o ElectroweakFlux_dummy.o Ctq6Pdf.o pdfwrap.o pdf.o pdg2pdf.o NNPDFDriver.o eepdf.o gridpdfaux.o dfint.o kerset.o
            ar: `u' modifier ignored since `D' is the default (see `U')
            ranlib ../../lib/libpdf.a
            (cd ./gammaUPC ; make -f makefile_dummy; cd ../)
            make[2]: Entering directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/PDF/gammaUPC'
            make[2]: Nothing to be done for 'all'.
            make[2]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/PDF/gammaUPC'
            make[1]: Leaving directory '/home/maximlysnk/MG5_aMC_v3_5_1/bin/l+/Source/PDF'

        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
quit
INFO:

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

Hi,

So looks like your model use a function "cot". Which is not recognised in the fortran code (neither in the python code actually).

In principle you could/should have use cmath.cot in your model, but I check my python version and python does not have such function. So you have to include the definition of the cot function within the UFO model. Did you do that?

Cheers,

Olivier

Revision history for this message
Maxim Lysenko (maximlysnk) said :
#2

I finally solved the problem. Apparently when writing the FeynRules file, one of the definitions had a 1/Tan[...] term. Somehow while importing the model this translated into cot function. Thank you for the help!

Best,

Maxim

Revision history for this message
Maxim Lysenko (maximlysnk) said :
#3

I realized the part of the issue came from externally installed lhapdf ((version 6.5.0), the error displayed here:

INFO: load configuration from /home/maxim/MG5_aMC_v3_5_1/bin/try/Cards/me5_configuration.txt
INFO: load configuration from /home/maxim/MG5_aMC_v3_5_1/input/mg5_configuration.txt
INFO: load configuration from /home/maxim/MG5_aMC_v3_5_1/bin/try/Cards/me5_configuration.txt
Using default text editor "vi". Set another one in ./input/mg5_configuration.txt
No valid eps viewer found. Please set in ./input/mg5_configuration.txt
generate_events run_01
The following switches determine which programs are run:
/================ Description =================|================ values ================|====== other options ======\
| 1. Choose the shower/hadronization program | shower = OFF | Pythia8 |
| 2. Choose the detector simulation program | detector = OFF | Delphes |
| 3. Choose an analysis package (plot/convert) | analysis = MadAnalysis5 | OFF |
| 4. Decay onshell particles | madspin = OFF | ON|onshell|full |
| 5. Add weights to events for new hypp. | reweight = Not Avail. | Please install module |
\===================================================================================================================/
Either type the switch number (1 to 5) to change its setting,
Set any switch explicitly (e.g. type 'shower=Pythia8' at the prompt)
Type 'help' for the list of all valid option
Type '0', 'auto', 'done' or just press enter when you are done.[60s to answer]
>
Do you want to edit a card (press enter to bypass editing)?
/------------------------------------------------------------\
| 1. param : param_card.dat |
| 2. run : run_card.dat |
| 3. madanalysis5_parton : madanalysis5_parton_card.dat |
\------------------------------------------------------------/
 you can also
   - enter the path to a valid card or banner.
   - use the 'set' command to modify a parameter directly.
     The set option works only for param_card and run_card.
     Type 'help set' for more information on this command.
   - call an external program (ASperGE/MadWidth/...).
     Type 'help' for the list of available command
 [0, done, 1, param, 2, run, 3, madanalysis5_parton, enter path][90s to answer]
>
INFO: Update the dependent parameter of the param_card.dat
INFO: Trying to download NNPDF23_nlo_as_0119
NNPDF23_nlo_as_0119.tar.gz: 20.6 MB[100.0%]
INFO: NNPDF23_nlo_as_0119 successfully downloaded and stored in /usr/local/share/LHAPDF
WARNING: update the strong coupling value (alpha_s) to the value from the pdf selected: 0.1190025
Generating 10000 events with run name run_01
survey run_01
INFO: compile directory
INFO: Using LHAPDF v6.5.0 interface for PDFs
2023/08/05 14:35:05.951457 cmd_run.go:1055: WARNING: cannot start document portal: dial unix /run/user/1000/bus: connect: no such file or directory
compile Source Directory
Using random number seed offset = 21
INFO: Running Survey
Creating Jobs
Working on SubProcesses
INFO: Compiling for process 1/8.
INFO: P1_uux_epem
Error detected in "generate_events run_01"
write debug file /home/maxim/MG5_aMC_v3_5_1/bin/try/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/maxim/MG5_aMC_v3_5_1/bin/try/SubProcesses/P1_uux_epem.
        The compilation fails with the following output message:
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c symmetry.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -w -fPIC -O -ffixed-line-length-132 -w -c idenparts.f -I../../Source/ -I../../Source/PDF/gammaUPC
            gfortran -o gensym symmetry.o idenparts.o -L../../lib/ -L../../lib/ -ldhelas -ldsample -lmodel -lgeneric -lpdf -lgammaUPC -lcernlib -O3 -I/usr/local/include -L/usr/local/lib -lLHAPDF -lLHAPDF -lbias -lstdc++
            /usr/bin/ld: ../../lib//libpdf.a(pdf_lhapdf62.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
            /usr/bin/ld: failed to set dynamic section sizes: bad value
            collect2: error: ld returned 1 exit status
            make: *** [makefile:62: gensym] Error 1

        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
quit
INFO:
MG5_aMC>

I do not understand what causes this error, can I ask for a hint on how to solve this?

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

I guess that the issue is that lhapdf was not compiled with the same compiler as the one you try to use to compile MG5aMC, trigerring some compatibility issue between the version and the linking option.

Revision history for this message
Maxim Lysenko (maximlysnk) said :
#5

Dear Olivier,

I builded gcc from source with version 13.2. But the main gcc version from apt library had a version of 11.4 which caused the compatibility issues. But completely switching to Ubuntu WSL 20.04 LTS from 22.04 completely solved the issue as python and gcc versions are more suitable for MG5 and other packages. Python version 3.10.xx somehow do not work well, which is the main version 22.04 version of Ubuntu. But Ubuntu 20.04 contains python 3.8.xx which works without any issues.

Thank you very much,

Maxim

Can you help with this problem?

Provide an answer of your own, or ask Maxim Lysenko for more information if necessary.

To post a message you must log in.