fortran compiler issues

Asked by Sihyun Jeon

https://www.dropbox.com/s/m9wgfa9glnykkmc/HeavyMajoranaNeutrinoToEE_Schannel_M55_NLO.log?dl=0

Hi,
above is the error log.

I specified the link to f2py as you taught me few weeks ago.
(https://answers.launchpad.net/mg5amcnlo/+question/657970)

But I still have this long-long error which I am not sure of.

I also wrote the settings of f2py..

Thank you in advance,
Sihyun Jeon

[shjeon@lxplus079 MadGraph5_aMCatNLO]$ f2py -c --help-fcompiler
GnuFCompiler instance properties:
  archiver = ['/usr/bin/g77', '-cr']
  compile_switch = '-c'
  compiler_f77 = ['/usr/bin/g77', '-g', '-Wall', '-fno-second-
                    underscore', '-fPIC', '-O3', '-funroll-loops']
  compiler_f90 = None
  compiler_fix = None
  libraries = ['g2c']
  library_dirs = []
  linker_exe = ['/usr/bin/g77', '-g', '-Wall', '-g', '-Wall']
  linker_so = ['/usr/bin/g77', '-g', '-Wall', '-g', '-Wall', '-
                    shared']
  object_switch = '-o '
  ranlib = ['/usr/bin/g77']
  version = LooseVersion ('3.4.6')
  version_cmd = ['/usr/bin/g77', '--version']
Gnu95FCompiler instance properties:
  archiver = ['/usr/bin/gfortran', '-cr']
  compile_switch = '-c'
  compiler_f77 = ['/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-
                    second-underscore', '-fPIC', '-O3', '-funroll-loops']
  compiler_f90 = ['/usr/bin/gfortran', '-Wall', '-fno-second-underscore',
                    '-fPIC', '-O3', '-funroll-loops']
  compiler_fix = ['/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-
                    second-underscore', '-Wall', '-fno-second-underscore', '-
                    fPIC', '-O3', '-funroll-loops']
  libraries = ['gfortran']
  library_dirs = []
  linker_exe = ['/usr/bin/gfortran', '-Wall', '-Wall']
  linker_so = ['/usr/bin/gfortran', '-Wall', '-Wall', '-shared']
  object_switch = '-o '
  ranlib = ['/usr/bin/gfortran']
  version = LooseVersion ('4.4.7')
  version_cmd = ['/usr/bin/gfortran', '--version']
Fortran compilers found:
  --fcompiler=gnu GNU Fortran 77 compiler (3.4.6)
  --fcompiler=gnu95 GNU Fortran 95 compiler (4.4.7)
Compilers available for this platform, but not found:
  --fcompiler=absoft Absoft Corp Fortran Compiler
  --fcompiler=compaq Compaq Fortran Compiler
  --fcompiler=g95 G95 Fortran Compiler
  --fcompiler=intel Intel Fortran Compiler for 32-bit apps
  --fcompiler=intele Intel Fortran Compiler for Itanium apps
  --fcompiler=intelem Intel Fortran Compiler for EM64T-based apps
  --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler
  --fcompiler=nag NAGWare Fortran 95 Compiler
  --fcompiler=pg Portland Group Fortran Compiler
  --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler
Compilers not available on this platform:
  --fcompiler=hpux HP Fortran 90 Compiler
  --fcompiler=ibm IBM XL Fortran Compiler
  --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps
  --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps
  --fcompiler=mips MIPSpro Fortran Compiler
  --fcompiler=none Fake Fortran compiler
  --fcompiler=sun Sun or Forte Fortran 95 Compiler

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Sihyun Jeon
Solved:
Last query:
Last reply:

This question was reopened

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

Hi,

Looks like a problem with the linker.
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/external/gcc/4.8.1/bin/../lib/gcc/x86_64-redhat-linux-gnu/4.8.1/../../../../x86_64-redhat-linux-gnu/bin/ld: cannot find -lpython2.7

Do you have that library installed?

Cheers,

Olivier

> On 10 Oct 2017, at 20:47, Sihyun Jeon <email address hidden> wrote:
>
> New question #659234 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/659234
>
> https://www.dropbox.com/s/m9wgfa9glnykkmc/HeavyMajoranaNeutrinoToEE_Schannel_M55_NLO.log?dl=0
>
> Hi,
> above is the error log.
>
> I specified the link to f2py as you taught me few weeks ago.
> (https://answers.launchpad.net/mg5amcnlo/+question/657970)
>
> But I still have this long-long error which I am not sure of.
>
> I also wrote the settings of f2py..
>
>
> Thank you in advance,
> Sihyun Jeon
>
> [shjeon@lxplus079 MadGraph5_aMCatNLO]$ f2py -c --help-fcompiler
> GnuFCompiler instance properties:
> archiver = ['/usr/bin/g77', '-cr']
> compile_switch = '-c'
> compiler_f77 = ['/usr/bin/g77', '-g', '-Wall', '-fno-second-
> underscore', '-fPIC', '-O3', '-funroll-loops']
> compiler_f90 = None
> compiler_fix = None
> libraries = ['g2c']
> library_dirs = []
> linker_exe = ['/usr/bin/g77', '-g', '-Wall', '-g', '-Wall']
> linker_so = ['/usr/bin/g77', '-g', '-Wall', '-g', '-Wall', '-
> shared']
> object_switch = '-o '
> ranlib = ['/usr/bin/g77']
> version = LooseVersion ('3.4.6')
> version_cmd = ['/usr/bin/g77', '--version']
> Gnu95FCompiler instance properties:
> archiver = ['/usr/bin/gfortran', '-cr']
> compile_switch = '-c'
> compiler_f77 = ['/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-
> second-underscore', '-fPIC', '-O3', '-funroll-loops']
> compiler_f90 = ['/usr/bin/gfortran', '-Wall', '-fno-second-underscore',
> '-fPIC', '-O3', '-funroll-loops']
> compiler_fix = ['/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-
> second-underscore', '-Wall', '-fno-second-underscore', '-
> fPIC', '-O3', '-funroll-loops']
> libraries = ['gfortran']
> library_dirs = []
> linker_exe = ['/usr/bin/gfortran', '-Wall', '-Wall']
> linker_so = ['/usr/bin/gfortran', '-Wall', '-Wall', '-shared']
> object_switch = '-o '
> ranlib = ['/usr/bin/gfortran']
> version = LooseVersion ('4.4.7')
> version_cmd = ['/usr/bin/gfortran', '--version']
> Fortran compilers found:
> --fcompiler=gnu GNU Fortran 77 compiler (3.4.6)
> --fcompiler=gnu95 GNU Fortran 95 compiler (4.4.7)
> Compilers available for this platform, but not found:
> --fcompiler=absoft Absoft Corp Fortran Compiler
> --fcompiler=compaq Compaq Fortran Compiler
> --fcompiler=g95 G95 Fortran Compiler
> --fcompiler=intel Intel Fortran Compiler for 32-bit apps
> --fcompiler=intele Intel Fortran Compiler for Itanium apps
> --fcompiler=intelem Intel Fortran Compiler for EM64T-based apps
> --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler
> --fcompiler=nag NAGWare Fortran 95 Compiler
> --fcompiler=pg Portland Group Fortran Compiler
> --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler
> Compilers not available on this platform:
> --fcompiler=hpux HP Fortran 90 Compiler
> --fcompiler=ibm IBM XL Fortran Compiler
> --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps
> --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps
> --fcompiler=mips MIPSpro Fortran Compiler
> --fcompiler=none Fake Fortran compiler
> --fcompiler=sun Sun or Forte Fortran 95 Compiler
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Sihyun Jeon (shjeon) said :
#2

Hi Olivier,

"which python2.7" gives me below.
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/bin/python2.7

So I used the following command line
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib/
which has libpython2.7.so in it.

But it seems to be not working still...
And by googling some things, I guess LD_LIBRARY_PATH won't help the problem.

Is there a way to insert somewhere in the madgraph using patches the lines below that might solve this?
"ld -lpython2.7 -L/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib"

Or other solution would also be grateful.

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

Hi,

I would have expect that
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib/<http://cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib/>

would have solve the problem.

The second option that you can try is to set the
$LDFLAGS
I guess that doing the following should do the trick:
export LDFLAGS="-lpython2.7 -L/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib<http://cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib>"

Cheers,

Olivier

On 11 Oct 2017, at 17:09, Sihyun Jeon <<email address hidden><mailto:<email address hidden>>> wrote:

Question #659234 on MadGraph5_aMC@NLO changed:
https://answers.launchpad.net/mg5amcnlo/+question/659234

   Status: Answered => Open

Sihyun Jeon is still having a problem:
Hi Olivier,

"which python2.7" gives me below.
/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/bin/python2.7

So I used the following command line
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib/
which has libpython2.7.so in it.

But it seems to be not working still...
And by googling some things, I guess LD_LIBRARY_PATH won't help the problem.

Is there a way to insert somewhere in the madgraph using patches the lines below that might solve this?
"ld -lpython2.7 -L/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib"

Or other solution would also be grateful.

--
You received this question notification because you are an answer
contact for MadGraph5_aMC@NLO.

Revision history for this message
Sihyun Jeon (shjeon) said :
#4

Hello Olivier,

bad news is that neither of the suggestions did not work :(

good news is that I did find a way to solve it.
export LIBRARY_PATH=/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib
:)

Thanks anyways!!!

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

Hi,

Good job, Thanks this is very useful to know for the future.

Cheers,

Olivier

> On 12 Oct 2017, at 09:53, Sihyun Jeon <email address hidden> wrote:
>
> Question #659234 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/659234
>
> Status: Answered => Solved
>
> Sihyun Jeon confirmed that the question is solved:
> Hello Olivier,
>
> bad news is that neither of the suggestions did not work :(
>
> good news is that I did find a way to solve it.
> export LIBRARY_PATH=/cvmfs/cms.cern.ch/slc6_amd64_gcc481/cms/cmssw/CMSSW_7_1_30/external/slc6_amd64_gcc481/lib
> :)
>
> Thanks anyways!!!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Sihyun Jeon (shjeon) said :
#6

launch
Traceback (most recent call last):
  File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/extended_cmd.py", line 1438, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/extended_cmd.py", line 1392, in onecmd_orig
    return func(arg, **opt)
  File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/amcatnlo_run_interface.py", line 1228, in do_launch
    self.compile(mode, options)
  File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/amcatnlo_run_interface.py", line 4595, in compile
    misc.compile(cwd = sourcedir)
  File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/misc.py", line 479, in compile
    raise MadGraph5Error, error_text
MadGraph5Error: A compilation Error occurs when trying to compile /afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/Source.
The compilation fails with the following output message:
    rm -f ../lib/libdhelas.a
    cd DHELAS; make
    make[1]: Entering directory `/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/Source/DHELAS'
    ar cru ../../lib/libdhelas.a aloha_functions.o FFV2_3.o MP_FFV2_3.o FFV1L3_2.o MP_FFV1L3_2.o FFV2L2_1.o MP_FFV2L2_1.o FFV2L1_2.o MP_FFV2L1_2.o FFV1_2.o MP_FFV1_2.o FFV2_0.o MP_FFV2_0.o FFV1L2P0_3.o MP_FFV1L2P0_3.o FFV1_1.o MP_FFV1_1.o FFV1L3_1.o MP_FFV1L3_1.o FFV1L1P0_3.o MP_FFV1L1P0_3.o
    ranlib ../../lib/libdhelas.a
    make[1]: Leaving directory `/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/Source/DHELAS'
    make: *** No rule to make target `alfas_functions_lhapdf.o', needed by `../lib/libgeneric.a'. Stop.

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

Sorry Olivier to bother again.
After 'successfully' making the gridpacks (there were no lpython2.7 error messages like before) I happened to use the gridpack to generate the events by just doing ./bin/generate_events and now it still fails with another error.

Would it be the problem of incorrect use of lpython2.7? Or is it another error that should be fixed?

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

Hi,

To my point of view this seems completely independent of the f2py issue.

This sounds more a lhapdf problem.

Your Source directory should contain the following file (related to the PDF):
alfas_functions.f
alfas_functions_lhapdf.f

In the makefile, we use a variable to decide which of those two files we need to use.
GENERIC = $(alfas_functions).o

This variable depends in the file make_opts and depend if you require lhapdf in your run_card or not.
From the error it seems that the makefile does not know how to compile the file
alfas_functions_lhapdf.f

My guess is that such file is not present in your case in your Source directory.

Is it possible? I guess that this is linked to the CMS embedding, can you check?

Cheers,

Olivier

> On 12 Oct 2017, at 14:33, Sihyun Jeon <email address hidden> wrote:
>
> Question #659234 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/659234
>
> Status: Solved => Open
>
> Sihyun Jeon is still having a problem:
> launch
> Traceback (most recent call last):
> File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/extended_cmd.py", line 1438, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/extended_cmd.py", line 1392, in onecmd_orig
> return func(arg, **opt)
> File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/amcatnlo_run_interface.py", line 1228, in do_launch
> self.compile(mode, options)
> File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/amcatnlo_run_interface.py", line 4595, in compile
> misc.compile(cwd = sourcedir)
> File "/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/bin/internal/misc.py", line 479, in compile
> raise MadGraph5Error, error_text
> MadGraph5Error: A compilation Error occurs when trying to compile /afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/Source.
> The compilation fails with the following output message:
> rm -f ../lib/libdhelas.a
> cd DHELAS; make
> make[1]: Entering directory `/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/Source/DHELAS'
> ar cru ../../lib/libdhelas.a aloha_functions.o FFV2_3.o MP_FFV2_3.o FFV1L3_2.o MP_FFV1L3_2.o FFV2L2_1.o MP_FFV2L2_1.o FFV2L1_2.o MP_FFV2L1_2.o FFV1_2.o MP_FFV1_2.o FFV2_0.o MP_FFV2_0.o FFV1L2P0_3.o MP_FFV1L2P0_3.o FFV1_1.o MP_FFV1_1.o FFV1L3_1.o MP_FFV1L3_1.o FFV1L1P0_3.o MP_FFV1L1P0_3.o
> ranlib ../../lib/libdhelas.a
> make[1]: Leaving directory `/afs/cern.ch/work/s/shjeon/genproductions_2017_mg26x_3/bin/MadGraph5_aMCatNLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO/HeavyMajoranaNeutrinoToEMu_Schannel_M50_NLO_gridpack/work/gridpack/process/Source/DHELAS'
> make: *** No rule to make target `alfas_functions_lhapdf.o', needed by `../lib/libgeneric.a'. Stop.
>
> 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
>
>
>
> Sorry Olivier to bother again.
> After 'successfully' making the gridpacks (there were no lpython2.7 error messages like before) I happened to use the gridpack to generate the events by just doing ./bin/generate_events and now it still fails with another error.
>
> Would it be the problem of incorrect use of lpython2.7? Or is it another
> error that should be fixed?
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Sihyun Jeon (shjeon) said :
#8

I will ask and let you know.

Revision history for this message
Sihyun Jeon (shjeon) said :
#9

Hi Olivier, unforntunately we decided to evade this problem other way.
Instead of using gridpacks, our group was allowed to use lhe files by convenors for central production.

I don't know the timeline for when the cms-mc-generators would start debugging mgv2.6
but I will let you know if this problem still occurs even after this version becomes the default version for cms central production.