compiling syscalc

Asked by Andrew Levin

Hi,

It seems there is a problem with the way I am setting the path to lhapdf when I compile SysCalc. What am I doing wrong?

Thanks.

Andrew

MG5_aMC>set lhapdf /cvmfs/cms.cern.ch/slc6_amd64_gcc491/external/lhapdf/6.1.5/bin/lhapdf-config
set lhapdf to /cvmfs/cms.cern.ch/slc6_amd64_gcc491/external/lhapdf/6.1.5/bin/lhapdf-config
save options --auto
save configuration file to /scratch2/anlevin/MG5_aMC_v2_2_3/input/mg5_configuration.txt
MG5_aMC>install SysCalc
Downloading http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
--2015-05-07 12:01:08-- http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
Resolving madgraph.phys.ucl.ac.be... 130.104.133.249
Connecting to madgraph.phys.ucl.ac.be|130.104.133.249|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34818 (34K) [application/x-gzip]
Saving to: `SysCalc.tgz'

100%[=========================================================================================================>] 34,818 156K/s in 0.2s

2015-05-07 12:01:09 (156 KB/s) - `SysCalc.tgz' saved [34818/34818]

compile SysCalc. This might takes a while.
cd src; make
make[1]: lhapdf-config: Command not found
make[1]: Entering directory `/scratch2/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
g++ -O -DDROP_CGAL -I../include -I -c SysCalc.cc
SysCalc.cc:6:27: error: LHAPDF/LHAPDF.h: No such file or directory
SysCalc.cc:10: error: \u2018LHAPDF\u2019 is not a namespace-name
SysCalc.cc:10: error: expected namespace-name before \u2018;\u2019 token
SysCalc.cc: In function \u2018std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >& split(const std::string&, char, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int)\u2019:
SysCalc.cc:16: error: variable \u2018std::stringstream ss\u2019 has initializer but incomplete type
SysCalc.cc: In constructor \u2018SysCalc::SysCalc(std::istream&, std::string, std::string, int, int, int)\u2019:
SysCalc.cc:261: error: \u2018initLHAPDF\u2019 was not declared in this scope
SysCalc.cc:263: error: \u2018getMaxNumSets\u2019 was not declared in this scope
SysCalc.cc:273: error: \u2018initPDFSet\u2019 was not declared in this scope
SysCalc.cc:275: error: \u2018numberPDF\u2019 was not declared in this scope
SysCalc.cc:359: warning: converting to \u2018int\u2019 from \u2018double\u2019
SysCalc.cc:360: warning: converting to \u2018int\u2019 from \u2018double\u2019
SysCalc.cc:374: error: \u2018initPDFSet\u2019 was not declared in this scope
SysCalc.cc:376: error: \u2018initPDFSet\u2019 was not declared in this scope
SysCalc.cc: In member function \u2018double SysCalc::calculatePDFWeight(int, double, int, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&)\u2019:
SysCalc.cc:597: error: \u2018xfx\u2019 was not declared in this scope
SysCalc.cc: In member function \u2018bool SysCalc::convertEvent()\u2019:
SysCalc.cc:625: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:626: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:631: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:668: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:693: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:716: error: \u2018usePDFMember\u2019 was not declared in this scope
SysCalc.cc:721: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:728: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:730: error: \u2018alphasPDF\u2019 was not declared in this scope
make[1]: *** [SysCalc.o] Error 1
make[1]: Leaving directory `/scratch2/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
make: *** [all] Error 2
Error detected during the compilation. Please check the compilation error and run make manually.

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,

SysCalc only works with lhapdf5.

Cheers,

Olivier

On 07 May 2015, at 17:07, Andrew Levin <email address hidden> wrote:

> New question #266629 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/266629
>
> Hi,
>
> It seems there is a problem with the way I am setting the path to lhapdf when I compile SysCalc. What am I doing wrong?
>
> Thanks.
>
> Andrew
>
> MG5_aMC>set lhapdf /cvmfs/cms.cern.ch/slc6_amd64_gcc491/external/lhapdf/6.1.5/bin/lhapdf-config
> set lhapdf to /cvmfs/cms.cern.ch/slc6_amd64_gcc491/external/lhapdf/6.1.5/bin/lhapdf-config
> save options --auto
> save configuration file to /scratch2/anlevin/MG5_aMC_v2_2_3/input/mg5_configuration.txt
> MG5_aMC>install SysCalc
> Downloading http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
> --2015-05-07 12:01:08-- http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
> Resolving madgraph.phys.ucl.ac.be... 130.104.133.249
> Connecting to madgraph.phys.ucl.ac.be|130.104.133.249|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 34818 (34K) [application/x-gzip]
> Saving to: `SysCalc.tgz'
>
> 100%[=========================================================================================================>] 34,818 156K/s in 0.2s
>
> 2015-05-07 12:01:09 (156 KB/s) - `SysCalc.tgz' saved [34818/34818]
>
> compile SysCalc. This might takes a while.
> cd src; make
> make[1]: lhapdf-config: Command not found
> make[1]: Entering directory `/scratch2/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
> g++ -O -DDROP_CGAL -I../include -I -c SysCalc.cc
> SysCalc.cc:6:27: error: LHAPDF/LHAPDF.h: No such file or directory
> SysCalc.cc:10: error: \u2018LHAPDF\u2019 is not a namespace-name
> SysCalc.cc:10: error: expected namespace-name before \u2018;\u2019 token
> SysCalc.cc: In function \u2018std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >& split(const std::string&, char, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int)\u2019:
> SysCalc.cc:16: error: variable \u2018std::stringstream ss\u2019 has initializer but incomplete type
> SysCalc.cc: In constructor \u2018SysCalc::SysCalc(std::istream&, std::string, std::string, int, int, int)\u2019:
> SysCalc.cc:261: error: \u2018initLHAPDF\u2019 was not declared in this scope
> SysCalc.cc:263: error: \u2018getMaxNumSets\u2019 was not declared in this scope
> SysCalc.cc:273: error: \u2018initPDFSet\u2019 was not declared in this scope
> SysCalc.cc:275: error: \u2018numberPDF\u2019 was not declared in this scope
> SysCalc.cc:359: warning: converting to \u2018int\u2019 from \u2018double\u2019
> SysCalc.cc:360: warning: converting to \u2018int\u2019 from \u2018double\u2019
> SysCalc.cc:374: error: \u2018initPDFSet\u2019 was not declared in this scope
> SysCalc.cc:376: error: \u2018initPDFSet\u2019 was not declared in this scope
> SysCalc.cc: In member function \u2018double SysCalc::calculatePDFWeight(int, double, int, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&)\u2019:
> SysCalc.cc:597: error: \u2018xfx\u2019 was not declared in this scope
> SysCalc.cc: In member function \u2018bool SysCalc::convertEvent()\u2019:
> SysCalc.cc:625: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:626: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:631: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:668: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:693: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:716: error: \u2018usePDFMember\u2019 was not declared in this scope
> SysCalc.cc:721: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:728: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:730: error: \u2018alphasPDF\u2019 was not declared in this scope
> make[1]: *** [SysCalc.o] Error 1
> make[1]: Leaving directory `/scratch2/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
> make: *** [all] Error 2
> Error detected during the compilation. Please check the compilation error and run make manually.
>
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Andrew Levin (amlevin-g) said :
#2

Hi Olivier,

The same thing happens when I try to use lhapdf5.

Andrew

MG5_aMC>set lhapdf /cvmfs/cms.cern.ch/slc6_amd64_gcc490/external/lhapdf/5.9.1/bin/lhapdf-config
set lhapdf to /cvmfs/cms.cern.ch/slc6_amd64_gcc490/external/lhapdf/5.9.1/bin/lhapdf-config
save options --auto
save configuration file to /scratch/anlevin/MG5_aMC_v2_2_3/input/mg5_configuration.txt
MG5_aMC>install SysCalc
Downloading http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
--2015-05-08 02:45:12-- http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
Resolving madgraph.phys.ucl.ac.be... 130.104.133.249
Connecting to madgraph.phys.ucl.ac.be|130.104.133.249|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 34818 (34K) [application/x-gzip]
Saving to: `SysCalc.tgz'

100%[====================================================================================>] 34,818 201K/s in 0.2s

2015-05-08 02:45:13 (201 KB/s) - `SysCalc.tgz' saved [34818/34818]

compile SysCalc. This might takes a while.
cd src; make
make[1]: lhapdf-config: Command not found
make[1]: Entering directory `/scratch/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
g++ -O -DDROP_CGAL -I../include -I -c SysCalc.cc
SysCalc.cc:6:27: error: LHAPDF/LHAPDF.h: No such file or directory
SysCalc.cc:10: error: \u2018LHAPDF\u2019 is not a namespace-name
SysCalc.cc:10: error: expected namespace-name before \u2018;\u2019 token
SysCalc.cc: In function \u2018std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >& split(const std::string&, char, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int)\u2019:
SysCalc.cc:16: error: variable \u2018std::stringstream ss\u2019 has initializer but incomplete type
SysCalc.cc: In constructor \u2018SysCalc::SysCalc(std::istream&, std::string, std::string, int, int, int)\u2019:
SysCalc.cc:261: error: \u2018initLHAPDF\u2019 was not declared in this scope
SysCalc.cc:263: error: \u2018getMaxNumSets\u2019 was not declared in this scope
SysCalc.cc:273: error: \u2018initPDFSet\u2019 was not declared in this scope
SysCalc.cc:275: error: \u2018numberPDF\u2019 was not declared in this scope
SysCalc.cc:359: warning: converting to \u2018int\u2019 from \u2018double\u2019
SysCalc.cc:360: warning: converting to \u2018int\u2019 from \u2018double\u2019
SysCalc.cc:374: error: \u2018initPDFSet\u2019 was not declared in this scope
SysCalc.cc:376: error: \u2018initPDFSet\u2019 was not declared in this scope
SysCalc.cc: In member function \u2018double SysCalc::calculatePDFWeight(int, double, int, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&)\u2019:
SysCalc.cc:597: error: \u2018xfx\u2019 was not declared in this scope
SysCalc.cc: In member function \u2018bool SysCalc::convertEvent()\u2019:
SysCalc.cc:625: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:626: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:631: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:668: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:693: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:716: error: \u2018usePDFMember\u2019 was not declared in this scope
SysCalc.cc:721: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:728: error: \u2018alphasPDF\u2019 was not declared in this scope
SysCalc.cc:730: error: \u2018alphasPDF\u2019 was not declared in this scope
make[1]: *** [SysCalc.o] Error 1
make[1]: Leaving directory `/scratch/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
make: *** [all] Error 2
Error detected during the compilation. Please check the compilation error and run make manually.

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

Could you try the following patch?

=== modified file 'madgraph/interface/madgraph_interface.py'
--- madgraph/interface/madgraph_interface.py 2015-05-08 23:38:18 +0000
+++ madgraph/interface/madgraph_interface.py 2015-05-10 10:02:07 +0000
@@ -4649,6 +4649,9 @@
                     os.environ['LD_LIBRARY_PATH'] = ld_path
                 elif ld_path not in os.environ['LD_LIBRARY_PATH']:
                     os.environ['LD_LIBRARY_PATH'] += ';%s' % ld_path
+ if self.options['lhapdf'] != 'lhapdf-config':
+ if misc.which('lhapdf-config') != os.path.realpath(self.options['lhapdf']):
+ os.environ['PATH'] = '%s:%s' % os.environ['PATH']
             else:
                 raise self.InvalidCmd(‘lhapdf is required to compile/use SysCalc')

Cheers,

Olivier
On 08 May 2015, at 08:46, Andrew Levin <email address hidden> wrote:

> Question #266629 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/266629
>
> Status: Answered => Open
>
> Andrew Levin is still having a problem:
> Hi Olivier,
>
> The same thing happens when I try to use lhapdf5.
>
> Andrew
>
> MG5_aMC>set lhapdf /cvmfs/cms.cern.ch/slc6_amd64_gcc490/external/lhapdf/5.9.1/bin/lhapdf-config
> set lhapdf to /cvmfs/cms.cern.ch/slc6_amd64_gcc490/external/lhapdf/5.9.1/bin/lhapdf-config
> save options --auto
> save configuration file to /scratch/anlevin/MG5_aMC_v2_2_3/input/mg5_configuration.txt
> MG5_aMC>install SysCalc
> Downloading http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
> --2015-05-08 02:45:12-- http://madgraph.phys.ucl.ac.be/Downloads/SysCalc_V1.1.2.tar.gz
> Resolving madgraph.phys.ucl.ac.be... 130.104.133.249
> Connecting to madgraph.phys.ucl.ac.be|130.104.133.249|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 34818 (34K) [application/x-gzip]
> Saving to: `SysCalc.tgz'
>
> 100%[====================================================================================>]
> 34,818 201K/s in 0.2s
>
> 2015-05-08 02:45:13 (201 KB/s) - `SysCalc.tgz' saved [34818/34818]
>
> compile SysCalc. This might takes a while.
> cd src; make
> make[1]: lhapdf-config: Command not found
> make[1]: Entering directory `/scratch/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
> g++ -O -DDROP_CGAL -I../include -I -c SysCalc.cc
> SysCalc.cc:6:27: error: LHAPDF/LHAPDF.h: No such file or directory
> SysCalc.cc:10: error: \u2018LHAPDF\u2019 is not a namespace-name
> SysCalc.cc:10: error: expected namespace-name before \u2018;\u2019 token
> SysCalc.cc: In function \u2018std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >& split(const std::string&, char, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, int)\u2019:
> SysCalc.cc:16: error: variable \u2018std::stringstream ss\u2019 has initializer but incomplete type
> SysCalc.cc: In constructor \u2018SysCalc::SysCalc(std::istream&, std::string, std::string, int, int, int)\u2019:
> SysCalc.cc:261: error: \u2018initLHAPDF\u2019 was not declared in this scope
> SysCalc.cc:263: error: \u2018getMaxNumSets\u2019 was not declared in this scope
> SysCalc.cc:273: error: \u2018initPDFSet\u2019 was not declared in this scope
> SysCalc.cc:275: error: \u2018numberPDF\u2019 was not declared in this scope
> SysCalc.cc:359: warning: converting to \u2018int\u2019 from \u2018double\u2019
> SysCalc.cc:360: warning: converting to \u2018int\u2019 from \u2018double\u2019
> SysCalc.cc:374: error: \u2018initPDFSet\u2019 was not declared in this scope
> SysCalc.cc:376: error: \u2018initPDFSet\u2019 was not declared in this scope
> SysCalc.cc: In member function \u2018double SysCalc::calculatePDFWeight(int, double, int, std::vector<int, std::allocator<int> >&, std::vector<double, std::allocator<double> >&, std::vector<double, std::allocator<double> >&)\u2019:
> SysCalc.cc:597: error: \u2018xfx\u2019 was not declared in this scope
> SysCalc.cc: In member function \u2018bool SysCalc::convertEvent()\u2019:
> SysCalc.cc:625: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:626: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:631: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:668: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:693: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:716: error: \u2018usePDFMember\u2019 was not declared in this scope
> SysCalc.cc:721: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:728: error: \u2018alphasPDF\u2019 was not declared in this scope
> SysCalc.cc:730: error: \u2018alphasPDF\u2019 was not declared in this scope
> make[1]: *** [SysCalc.o] Error 1
> make[1]: Leaving directory `/scratch/anlevin/MG5_aMC_v2_2_3/SysCalc/src'
> make: *** [all] Error 2
> Error detected during the compilation. Please check the compilation error and run make manually.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Andrew Levin (amlevin-g) said :
#4

This line

os.environ['PATH'] = '%s:%s' % os.environ['PATH']

triggers an error:

TypeError: not enough arguments for format string

Can you help with this problem?

Provide an answer of your own, or ask Andrew Levin for more information if necessary.

To post a message you must log in.