-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathroot_v6.14.06_pythia6.def
151 lines (123 loc) · 3.83 KB
/
root_v6.14.06_pythia6.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Bootstrap: library
From: centos:7
%files
images/thisroot6.sh /opt
%post
yum -y install wget
yum -y install dnf-plugins-core
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y update
yum repolist
yum -y install centos-release-scl
yum -y install devtoolset-7
scl enable devtoolset-7 bash
yum -y install file
yum -y install tar
yum -y install bzip2
BUILD_SW="gcc gcc-c++ gcc-gfortran cmake3 make imake autoconf automake pkgconfig libtool"
RETREVAL_SW="git wget subversion openssh-clients openssl-devel"
X11_UTILS="xorg-x11-utils"
X11_LIBS="libXt-devel libXpm-devel libXft-devel libXext-devel"
GRAPHICS_LIBS="mesa-libGLU-devel mesa-libGLw glew-devel motif-devel libpng-devel libjpeg-turbo-devel ftgl-devel"
DEVEL_LIBS="libxml2-devel gmp-devel gsl-devel log4cpp-devel bzip2-devel pcre-devel \
xz-devel zlib-devel freetype-devel fftw-devel blas-devel lapack-devel"
MISC_SW="vim nano gdb csh tcsh ed quota python-devel patch emacs"
yum -y install \
${BUILD_SW}\
${RETREVAL_SW}\
${X11_UTILS}\
${X11_LIBS}\
${GRAPHICS_LIBS}\
${DEVEL_LIBS}\
${MISC_SW}
yum -y install man
## Required by the packages used downstream (some gotchas here)
yum -y install man
yum -y install which
yum -y install ed
yum -y install automake
yum -y install perl
yum -y install libXt-devel
yum -y install openmotif-devel
yum -y install csh
## Need to get a new cmake version for ROOT6
ln -s /usr/bin/cmake3 /usr/bin/cmake
## For my sanity
yum -y install emacs
## Update the compiler
set -e
source scl_source enable devtoolset-7 || true
## Use 2 cores when building
export NCORES=2
## Create working directory
export GEN_DIR=/opt/generators
mkdir -p $GEN_DIR
cd $GEN_DIR
mv /opt/thisroot6.sh ${GEN_DIR}/.
## Get a copy of ROOT
git clone -b v6-14-06 --depth 1 --single-branch https://github.com/root-project/root.git root
## Get PYTHIA6 (with specific placement for NuWro)
wget --no-check-certificate http://root.cern.ch/download/pythia6.tar.gz
tar -xzvf pythia6.tar.gz
rm pythia6.tar.gz
wget --no-check-certificate https://pythia.org/download/pythia6/pythia6428.f
mv pythia6428.f pythia6/pythia6428.f
rm pythia6/pythia6416.f
## Build PYTHIA6 and copy to where NuWro expects it
cd pythia6
./makePythia6.linuxx8664
mkdir ${GEN_DIR}/root/lib
cp ${GEN_DIR}/pythia6/libPythia6.so ${GEN_DIR}/root/lib/.
## To avoid ROOT builtins:
yum -y install gl2ps-devel
yum -y install xxhash-devel
yum -y install lz4-devel
## Needed to install with python3
yum -y install python3-devel
export VERBOSE=1
## Now build root
mkdir ${GEN_DIR}/root/install
cd ${GEN_DIR}/root/install
cmake -DPYTHIA6_LIBRARY=${GEN_DIR}/root/lib/libPythia6.so \
-DCMAKE_CXX_STANDARD=14 \
-Dcxx11=OFF \
-Dcxx14=ON \
-Dpythia6=ON \
-Dminuit2=ON \
-Dmathmore=ON \
-Ddavix=OFF \
-Dfitsio=OFF \
-Dgfal=OFF \
-Dcastor=OFF \
-Dclad=OFF \
-Dhttp=OFF \
-Droot7=OFF \
-Dwebgui=OFF \
-Dxrootd=OFF \
-Dmlp=OFF \
-Dmysql=OFF \
-Doracle=OFF \
-Dpgsql=OFF \
-Droofit=OFF \
-Dspectrum=OFF \
-Dsqlite=OFF \
-Ddataframe=OFF \
-Dimt=OFF \
-Dtmva=OFF \
-Dtmva-cpu=OFF \
-Dtmva-pymva=OFF \
-Dssl=OFF \
-Dcudnn=OFF \
-Dexceptions=OFF \
-Dgdml=ON \
-Dbuiltin_clang=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-Dpython3=ON \
../
make -j ${NCORES}
mv /opt/generators/thisroot6.sh /opt/generators/root/install/bin/thisroot.sh
%environment
export SINGULARITY_SHELL=/bin/bash
export GEN_DIR=/opt/generators
export ROOTSYS=${GEN_DIR}/root/install
cd ${ROOTSYS}/bin; source thisroot.sh; cd -