lhapdf installation Mac

Asked by daniel camargo

hey guys,

I have trying to calculate the systematic errors using MG5 but seems like the installation of lhapdf in my mac is something wird. The installation says is ok and generate the folder lib, however there is not a 'bin' executable neither lhapdf-config file:

MG5_aMC>install lhapdf6
   You are installing 'lhapdf6', please cite ref(s): arXiv:1412.7420.
Downloading the HEPToolInstaller at:
   http://madgraph.physics.illinois.edu/Downloads/HEPToolsInstaller/HEPToolsInstaller_V106.tar.gz
Now installing lhapdf6. Be patient...
The specified path '/usr/local/MG5_aMC_v2_6_4/HEPTools' already contains an installation of tool 'lhapdf6'.
Rerun the HEPToolInstaller.py script again with the option '--force' if you want to overwrite it.
Tool lhapdf6 already installed in /usr/local/MG5_aMC_v2_6_4/HEPTools. Do you want to overwrite its installation? y/n >[y] [60s to answer]
>y
Now installing lhapdf6. Be patient...
Removing existing installation of tool 'lhapdf6' in '/usr/local/MG5_aMC_v2_6_4/HEPTools'.
Fetching data with command:
  curl -OL http://www.hepforge.org/archive/lhapdf/LHAPDF-6.1.6.tar.gz
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 243 100 243 0 0 1975 0 --:--:-- --:--:-- --:--:-- 1959
100 269 100 269 0 0 664 0 --:--:-- --:--:-- --:--:-- 664
100 112 100 112 0 0 207 0 --:--:-- --:--:-- --:--:-- 207
100 107 100 107 0 0 125 0 --:--:-- --:--:-- --:--:-- 125
100 107 100 107 0 0 108 0 --:--:-- --:--:-- --:--:-- 108
100 680k 0 680k 0 0 372k 0 --:--:-- 0:00:01 --:--:-- 929k
Installing tool 'lhapdf6'...
    > Follow the installation progress by running the command below in a separate terminal)
    > tail -f /usr/local/MG5_aMC_v2_6_4/HEPTools/lhapdf6/lhapdf6_install.log
Successful installation of 'lhapdf6' in '/usr/local/MG5_aMC_v2_6_4/HEPTools'.
lhapdf6 successfully installed in /usr/local/MG5_aMC_v2_6_4/HEPTools.
save options lhapdf
save configuration file to /usr/local/MG5_aMC_v2_6_4/input/mg5_configuration.txt
MG5_aMC>exit
sh-3.2# cd HEPTools/lhapdf6/
sh-3.2# ls
include lhapdf6_install.log lib
sh-3.2# cd lib/
sh-3.2# ls
libLHAPDF.a libLHAPDF.dylib libLHAPDF.la
sh-3.2#

Any suggestions? Thanks in advance.

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,

I'm running on Mac as well and do not reproduce this issue.
Did you check the content of the
lhapdf6_install.log
file?

Cheers,

Olivier

On 2 Feb 2019, at 18:37, daniel camargo <<email address hidden><mailto:<email address hidden>>> wrote:

lhapdf6_install.lo

Revision history for this message
daniel camargo (dacamargov) said :
#2

hey Oliver,

Yeah, you alright, the .log says that there is an error with the gcc compiler, even when it said that everything was ok:

''
.
.
.
running install
running build
running build_ext
building 'lhapdf' extension
gcc -fno-strict-aliasing -I/anaconda3/envs/py2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/private/tmp/tmp7cHyVO/LHAPDF-6.1.6/include -I/private/tmp/tmp7cHyVO/LHAPDF-6.1.6/include -I/anaconda3/envs/py2/include/python2.7 -c lhapdf.cpp -o build/temp.macosx-10.6-x86_64-2.7/lhapdf.o -I/usr/local/MG5_aMC_v2_6_4/HEPTools/boost/include -I/usr/local/MG5_aMC_v2_6_4/HEPTools/lhapdf6/include
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
lhapdf.cpp:249:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
make[2]: *** [all-local] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
copy index and conf file
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
 Finished LHAPDF6 installation
.
.
''

which is the gcc version to make this work out?

Cheers,

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

The setup that I recomend on mac is to kept the default gcc (actually clang) compiler

and just install gfortran (not the full gcc) on this link:
http://hpc.sourceforge.net/

Cheers,

Olivier

On 2 Feb 2019, at 22:32, daniel camargo <<email address hidden><mailto:<email address hidden>>> wrote:

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

daniel camargo posted a new comment:
hey Oliver,

Yeah, you alright, the .log says that there is an error with the gcc
compiler, even when it said that everything was ok:

''
.
.
.
running install
running build
running build_ext
building 'lhapdf' extension
gcc -fno-strict-aliasing -I/anaconda3/envs/py2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/private/tmp/tmp7cHyVO/LHAPDF-6.1.6/include -I/private/tmp/tmp7cHyVO/LHAPDF-6.1.6/include -I/anaconda3/envs/py2/include/python2.7 -c lhapdf.cpp -o build/temp.macosx-10.6-x86_64-2.7/lhapdf.o -I/usr/local/MG5_aMC_v2_6_4/HEPTools/boost/include -I/usr/local/MG5_aMC_v2_6_4/HEPTools/lhapdf6/include
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
lhapdf.cpp:249:10: fatal error: 'string' file not found
#include <string>
        ^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
make[2]: *** [all-local] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
copy index and conf file
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
      cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
      cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
Finished LHAPDF6 installation
.
.
''

which is the gcc version to make this work out?

Cheers,

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

Revision history for this message
daniel camargo (dacamargov) said :
#4

Hey Oliver,

Well, I installed it:

sh-3.2# gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-apple-darwin17.5.0
Configured with: ../gcc-8.1.0/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 8.1.0 (GCC)

but the error in the log file remains:

lhapdf.cpp:249:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
make[2]: *** [all-local] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
copy index and conf file
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
 Finished LHAPDF6 installation

What can I do? and there is another way to calculate the systematics errors with the MG5 output?

Thanks for any hint!

Revision history for this message
daniel camargo (dacamargov) said :
#5

Hey Oliver,

Now my MG5 have been damaged after the installation of gfortran, I got this error when I run some process:

INFO: Update the dependent parameter of the param_card.dat
Generating 10000 events with run name run_01
survey run_01
INFO: compile directory
compile Source Directory
Error detected in "generate_events run_01"
write debug file /usr/local/MG5_aMC_v2_6_4/PROC_sm_0/run_01_tag_1_debug.log
If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
MadGraph5Error : A compilation Error occurs when trying to compile /usr/local/MG5_aMC_v2_6_4/PROC_sm_0/Source.
 The compilation fails with the following output message:
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o StringCast.o StringCast.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o ranmar.o ranmar.f
     gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o alfas_functions.o alfas_functions.f
     gfortran: error trying to exec 'f951': execvp: No such file or directory
     make: *** [StringCast.o] Error 1
     make: *** Waiting for unfinished jobs....
     gfortran: error trying to exec 'f951': execvp: No such file or directory
     make: *** [ranmar.o] Error 1
     gfortran: error trying to exec 'f951': execvp: No such file or directory
     make: *** [alfas_functions.o] 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

how can I return my setup!

Thanks

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

Hi,

What return gcc --version ?
I believe that you install gcc manually and that your version of gcc is not the one installed on mac by default.
so you should uninstall that version of gcc first.

in my case, I have for gcc --version:

[2.6.5]$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Cheers,

Olivier

On 3 Feb 2019, at 00:32, daniel camargo <<email address hidden><mailto:<email address hidden>>> wrote:

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

daniel camargo posted a new comment:
Hey Oliver,

Well, I installed it:

sh-3.2# gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-apple-darwin17.5.0
Configured with: ../gcc-8.1.0/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 8.1.0 (GCC)

but the error in the log file remains:

lhapdf.cpp:249:10: fatal error: 'string' file not found
#include <string>
        ^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
make[2]: *** [all-local] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
copy index and conf file
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
      cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file target_file
      cp [-R [-H | -L | -P]] [-fi | -n] [-apvXc] source_file ... target_directory
Finished LHAPDF6 installation

What can I do? and there is another way to calculate the systematics
errors with the MG5 output?

Thanks for any hint!

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

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

If you want to get back to your previous setup, the easiest is likely timemachine.

Cheers,

Olivier

> On 3 Feb 2019, at 01:57, daniel camargo <email address hidden> wrote:
>
> Question #678301 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/678301
>
> daniel camargo posted a new comment:
> Hey Oliver,
>
> Now my MG5 have been damaged after the installation of gfortran, I got
> this error when I run some process:
>
> INFO: Update the dependent parameter of the param_card.dat
> Generating 10000 events with run name run_01
> survey run_01
> INFO: compile directory
> compile Source Directory
> Error detected in "generate_events run_01"
> write debug file /usr/local/MG5_aMC_v2_6_4/PROC_sm_0/run_01_tag_1_debug.log
> If you need help with this issue please contact us on https://answers.launchpad.net/mg5amcnlo
> MadGraph5Error : A compilation Error occurs when trying to compile /usr/local/MG5_aMC_v2_6_4/PROC_sm_0/Source.
> The compilation fails with the following output message:
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o StringCast.o StringCast.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o ranmar.o ranmar.f
> gfortran -O -w -fbounds-check -fPIC -ffixed-line-length-132 -c -o alfas_functions.o alfas_functions.f
> gfortran: error trying to exec 'f951': execvp: No such file or directory
> make: *** [StringCast.o] Error 1
> make: *** Waiting for unfinished jobs....
> gfortran: error trying to exec 'f951': execvp: No such file or directory
> make: *** [ranmar.o] Error 1
> gfortran: error trying to exec 'f951': execvp: No such file or directory
> make: *** [alfas_functions.o] 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
>
> how can I return my setup!
>
> Thanks
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
daniel camargo (dacamargov) said :
#8

Hey Oliver,

I manage to install properly MG5 again and it is working properly but still with the same problem with the LHAPDF stuff. I guess the problem is with my gfortran or gcc, here my versions:

sh-3.2# gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

sh-3.2# gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin18.2.0/8.2.0/lto-wrapper
Target: x86_64-apple-darwin18.2.0
Configured with: ../configure --build=x86_64-apple-darwin18.2.0 --prefix=/usr/local/Cellar/gcc/8.2.0 --libdir=/usr/local/Cellar/gcc/8.2.0/lib/gcc/8 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-8 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 8.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Thread model: posix
gcc version 8.2.0 (Homebrew GCC 8.2.0)

do that lhapdf library works with that configuration?

Thanks for any help!

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

This is not my setup so I do not know.
I personally do not trust homebrew for compiler in particular Gcc

If you face back the original issue. I would advise to install lhapdf manually

Cheers

Olivier

Get Outlook for iOS<https://aka.ms/o0ukef>

________________________________
From: <email address hidden> on behalf of daniel camargo <email address hidden>
Sent: Sunday, February 3, 2019 5:37 PM
To: Olivier Mattelaer
Subject: Re: [Question #678301]: lhapdf installation Mac

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

daniel camargo posted a new comment:
Hey Oliver,

I manage to install properly MG5 again and it is working properly but
still with the same problem with the LHAPDF stuff. I guess the problem
is with my gfortran or gcc, here my versions:

sh-3.2# gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

sh-3.2# gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/8.2.0/libexec/gcc/x86_64-apple-darwin18.2.0/8.2.0/lto-wrapper
Target: x86_64-apple-darwin18.2.0
Configured with: ../configure --build=x86_64-apple-darwin18.2.0 --prefix=/usr/local/Cellar/gcc/8.2.0 --libdir=/usr/local/Cellar/gcc/8.2.0/lib/gcc/8 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-8 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 8.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
Thread model: posix
gcc version 8.2.0 (Homebrew GCC 8.2.0)

do that lhapdf library works with that configuration?

Thanks for any help!

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

Can you help with this problem?

Provide an answer of your own, or ask daniel camargo for more information if necessary.

To post a message you must log in.