forked from Vayu/PJFry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
503 lines (408 loc) · 20.9 KB
/
INSTALL
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
Installing libpjfry version 1.0.0
=================================
On Unix/Linux and similar systems, execute the following commands:
autoreconf -f -i
./configure [--prefix=/path] \
[--with-mcc-path=/path/mcc] \
[--with-integrals=auto,qcdloop2,qcdloop1,oneloop,qcdloop] \
[LDFLAGS='linker flags'] \
[CXXFLAGS='c++ flags']
make
make install
If --prefix is not specified, the library will be installed
into the system default library path (usually /usr/local/lib).
If --with-mcc option is not specified, the configure script will try to
find Mathematica installation in system PATH and a few common locations.
You can override this behavior by setting --with-mcc-path=no
or give full path to the appropriate mcc tool --with-mcc-path=/path/mcc
If --with-integrals option is not specified, the configure script will
try to find some usable scalar integrals library from the supported list:
QCDLoop 2.x (qcdloop-config, libqcdloop 2.x)
QCDLoop1 (libqcdloop1)
OneLOoop (libavh_olo)
QCDLoop 1.x (libqcdloop 1.x and libff)
Choosing the underlying library is a configure / compile time option but
one can have different PJFry variants built and installed in (completely)
separate directories.
You can select which library to use by e.g. --with-integral=oneloop
and then tell the configure script where to look for it by setting
LDFLAGS='-L/path/to/scalar/integral/library'
(Additional required flags, e.g. '-lgfortran', can also be added to LDFLAGS)
Simple complete examples of the building procedures (for Unix/Linux running
the bash shell and gcc/gfortran >= 4.x) can be found in the end of this file.
MathLink interface
==================
MathLink interface consists of single executable, which will be installed to
$prefix/bin/PJFry
Use the following command to run it inside Mathematica:
Install["path/bin/PJFry"]
Note: if dynamic linking was chosen by configure script, the libpjfry.so
should be in system library search path or in the LD_LIBRARY_PATH
environment variable.
Running FORTRAN examples
========================
Use 'make check' to compile a few simple examples of library use in FORTRAN
(also see note for g77 and ifort users)
REMARK for gcc 4.1 users with 32-bit OS
=======================================
On 32-bit OS with old gcc versions, enabling optimization produces wrong code.
You have this problem if 'examples/demo' produces NaN's in the output.
Possible solutions:
1. Use gcc of more recent version (>=4.3)
2. Compile with -O instead -O2 (e.g. CXXFLAGS='-g -O')
3. Use SSE instructions for floating point operations (if you CPU supports them)
(e.g. CXXFLAGS='-g -O2 -mfpmath=sse')
4. Try disabling faulty optimizations: CXXFLAGS='-g -O2 -fno-schedule-insns -fno-regmove'
REMARK for g77 and ifort users
==============================
FORTRAN interface follows GNU calling conventions for COMPLEX type by default.
To work with g77 this library needs to be compiled with FFLAGS='-fno-f2c'
(also library for scalar integrals).
Alternatively (and with ifort) you can use ./configure --enable-f2c=yes
This will make program expect f2c conventions from scalar integral library
and expose its interface following the same convention.
Note that this option does not add -ff2c flag, if you are use it with
gfortran you would have to add -ff2c manually to FFLAGS and FCFLAGS
Setting the underlying "Default Precision KIND" (DPKIND)
========================================================
PJFry always uses the standard C / C++ "double" precision in its calculations.
By default, it also expects that the underlying scalar integrals library
returns values in the standard C / C++ "double" precision format.
However, PJFry can also use an underlying library built to provide another
(e.g. better) "Default Precision KIND" (DPKIND).
One just needs to set the DPKIND identifier in the CXXFLAGS, when running
the configure script.
For the C / C++ "float", Fortran REAL*4 (REAL / KIND=4 / kind(1.0) /
selected_real_kind(6)) use e.g.: CXXFLAGS='-g -O2 -DDPKIND=4'
One does not need to set it for the default C / C++ "double", Fortran
REAL*8 (DOUBLE PRECISION / KIND=8 / kind(1d0) / selected_real_kind(15)),
but one can still add '-DDPKIND=8', if desired.
(This is the default precision provided by all four underlying libraries.)
For the C / C++ "long double", Fortran REAL*10 (KIND=10 /
selected_real_kind(18)) use e.g.: CXXFLAGS='-g -O2 -DDPKIND=10'
(One can build the OneLOoop library so that it provides this precision
when one sets e.g. 'DPKIND = selected_real_kind(18)' in its 'Config' file.
One can cheat the QCDLoop1 and QCDLoop 1.x libraries to use this precision
when one builds them adding '-freal-8-real-10' into their '(AM_)FFLAGS'.)
For the C / C++ "__float128", Fortran REAL*16 (KIND=16 / kind(1q0) /
selected_real_kind(33)) use e.g.: CXXFLAGS='-g -O2 -DDPKIND=16'
(In any case, the standard "GCC Quad-Precision Math Library" libquadmath
is used, which one may need to install on one's operating system first.
One can build the OneLOoop library so that it provides this precision
when one sets e.g. 'DPKIND = kind(1q0)' in its 'Config' file.
The QCDLoop 2.x library provides this precision automatically.)
PJFry + QCDLoop 2.x ( https://qcdloop.web.cern.ch/qcdloop/ )
============================================================
############### PJFry_QCDLoop2.build.sh BEGINS BELOW ###############
#!/usr/bin/env bash
# Where to build (and install) the "PJFry + QCDLoop 2.x" bundle.
# PJFry="/opt/PJFry_QCDLoop2" # note: it usually needs "sudo"
# PJFry="/usr/local/PJFry_QCDLoop2" # note: it usually needs "sudo"
PJFry="${HOME}/PJFry_QCDLoop2"
# Additional (optional) PJFry configuration features and packages.
PJFry_Options=""
# PJFry_Options="${PJFry_Options} --enable-golem-mode=yes" # default=no
# PJFry_Options="${PJFry_Options} --enable-cache-low=yes" # default=no
PJFry_Options="${PJFry_Options} --with-mcc-path=no" # default=auto
if [ -z "${PJFry}" ] ; then PJFry="${HOME}/PJFry_QCDLoop2" ; fi # just a precaution
# One first needs to build and install the QCDLoop 2.x package.
# QCDLoop 2.x is an object-oriented library of one-loop scalar
# Feynman integrals, evaluated close to four dimensions:
# https://qcdloop.web.cern.ch/qcdloop/
# Its authors have designed the source code in C++, extended the formalism
# to complex masses, provided a simple mechanism to switch from double to
# quadruple precision, boosted speed and finally implemented LRU caching
# algorithms. A Fortran wrapper in the library (backwards compatible with
# the older QCDLoop 1.x / FF) is also present.
# The current source code can be found on GitHub:
# https://github.com/scarrazza/qcdloop
# QCDLoop 2.x (dynamic library only)
cd
rm -rf ${PJFry} # clean the destination directory tree
mkdir -p ${PJFry}
cd ${PJFry}
rm -rf qcdloop # clean the source code directory tree
git clone https://github.com/scarrazza/qcdloop.git
cd qcdloop
# sed -i -e "{s/\bpython\b/&3/}" `grep -l -r "\bpython\b" ./` # use python3
sed -i -e '{s/-fstack-protector-strong/-fstack-protector-all/}' CMakeLists.txt
# sed -i -e '{s/-fstack-protector-strong/-fstack-protector/}' CMakeLists.txt
sed -i -e '{s/-march=nocona/-march=native/}' CMakeLists.txt
sed -i -e '{s/-mtune=haswell/-mtune=native/}' CMakeLists.txt
mkdir build
cd build
# cmake -DCMAKE_INSTALL_PREFIX="${PJFry}" -DENABLE_FORTRAN_WRAPPER=ON -DENABLE_EXAMPLES=ON ../ > cmake.out.txt 2>&1
cmake -DCMAKE_INSTALL_PREFIX="${PJFry}" -DENABLE_FORTRAN_WRAPPER=OFF -DENABLE_EXAMPLES=ON ../ > cmake.out.txt 2>&1
make -k > make.out.txt 2>&1
./cache_test > cache_test.out.txt 2>&1
./cmass_test > cmass_test.out.txt 2>&1
./trigger_test > trigger_test.out.txt 2>&1
# gfortran -o fortran_test ../examples/fortran_test.f -Wl,-rpath,./ -Wl,-rpath,"${PWD}" libqcdloop.so -lquadmath
# ./fortran_test > fortran_test.out.txt 2>&1
make -k install > make_install.out.txt 2>&1
sync
cd
# One can now add the PJFry package.
# PJFry + QCDLoop 2.x (static and dynamic libraries)
cd
cd ${PJFry}
rm -rf PJFry # clean the source code directory tree
git clone https://github.com/Vayu/PJFry.git # download the newest source code
cd PJFry
# sed -i -e "{s/\bpython\b/&3/}" `grep -l -r "\bpython\b" ./` # use python3
autoreconf -f -i > autoreconf.out.txt 2>&1
export LD_LIBRARY_PATH="${PJFry}/lib:${LD_LIBRARY_PATH}"
export PATH="${PJFry}/bin:${PATH}"
# ./configure --prefix="${PJFry}" ${PJFry_Options} --with-integrals=qcdloop2 CXXFLAGS="-g -O2 -DDPKIND=16" > configure.out.txt 2>&1
./configure --prefix="${PJFry}" ${PJFry_Options} --with-integrals=qcdloop2 > configure.out.txt 2>&1
make -k > make.out.txt 2>&1
make -k check > make_check.out.txt 2>&1
cd ./examples; ./demo > demo.out.txt 2>&1; cd ../ # run the small built-in demo
make -k install > make_install.out.txt 2>&1
sync
cd
# Create a simple "setup.sh" script in "${PJFry}/PJFry/examples"
cd
cat <<EOF > "${PJFry}/PJFry/examples/setup.sh"
PJFry="${PJFry}"
export LD_LIBRARY_PATH="\${PJFry}/lib:\${LD_LIBRARY_PATH}"
export PATH="\${PJFry}/bin:\${PATH}"
# # CXXFLAGS="-I\${PJFry}/include"
# # LDLIBS="-L\${PJFry}/lib -lpjfry"
# gfortran -I\${PJFry}/PJFry/examples demo.f -L\${PJFry}/lib -lpjfry && ./a.out
# root -b -l -q demo.cxx
# g++ -I\${PJFry}/include demo.cxx -L\${PJFry}/lib -lpjfry && ./a.out
# root -b -l -q arXiv_0812_2134.cxx
# \`root-config --cxx --cflags\` -I\${PJFry}/include arXiv_0812_2134.cxx -L\${PJFry}/lib -lpjfry && ./a.out
EOF
sync
cd
# end of file PJFry_QCDLoop2.build.sh by Jacek M. Holeczek
############### PJFry_QCDLoop2.build.sh ENDS ABOVE ###############
PJFry + QCDLoop1 / FF ( https://bitbucket.org/njet/qcdloop1/src/master/ )
=========================================================================
############### PJFry_QCDLoop1.build.sh BEGINS BELOW ###############
#!/usr/bin/env bash
# Where to build (and install) the "PJFry + QCDLoop1 / FF" bundle.
# PJFry="/opt/PJFry_QCDLoop1" # note: it usually needs "sudo"
# PJFry="/usr/local/PJFry_QCDLoop1" # note: it usually needs "sudo"
PJFry="${HOME}/PJFry_QCDLoop1"
# Additional (optional) PJFry configuration features and packages.
PJFry_Options=""
# PJFry_Options="${PJFry_Options} --enable-golem-mode=yes" # default=no
# PJFry_Options="${PJFry_Options} --enable-cache-low=yes" # default=no
PJFry_Options="${PJFry_Options} --with-mcc-path=no" # default=auto
if [ -z "${PJFry}" ] ; then PJFry="${HOME}/PJFry_QCDLoop1" ; fi # just a precaution
# One first needs to build and install the QCDLoop1 / FF package.
# QCDLoop1 / FF is a library of one-loop scalar Feynman integrals, evaluated
# close to four dimensions, with modifications for easier integration with
# the NJet library: https://bitbucket.org/njet/qcdloop1/src/master/
# It is based on the QCDloop 1.x / FF package: https://qcdloop.fnal.gov/
# The current source code can be found on Bitbucket:
# https://bitbucket.org/njet/qcdloop1/src/master/
# QCDLoop1 / FF (static and dynamic libraries)
cd
rm -rf ${PJFry} # clean the destination directory tree
mkdir -p ${PJFry}
cd ${PJFry}
rm -rf qcdloop1 # clean the source code directory tree
git clone https://bitbucket.org/njet/qcdloop1.git
cd qcdloop1
# sed -i -e "{s/-std=legacy/& -freal-8-real-10/}" Makefile.am # DPKIND=10
autoreconf -f -i > autoreconf.out.txt 2>&1
./configure --prefix="${PJFry}" > configure.out.txt 2>&1
make -k > make.out.txt 2>&1
make -k install > make_install.out.txt 2>&1
make -k test > make_test.out.txt 2>&1
./test > test.out.txt 2>&1 # run the small built-in test
sync
cd
# One can now add the PJFry package.
# PJFry + QCDLoop1 / FF (static and dynamic libraries)
cd
cd ${PJFry}
rm -rf PJFry # clean the source code directory tree
git clone https://github.com/Vayu/PJFry.git # download the newest source code
cd PJFry
# sed -i -e "{s/\bpython\b/&3/}" `grep -l -r "\bpython\b" ./` # use python3
autoreconf -f -i > autoreconf.out.txt 2>&1
export LD_LIBRARY_PATH="${PJFry}/lib:${LD_LIBRARY_PATH}"
# ./configure --prefix="${PJFry}" ${PJFry_Options} --with-integrals=qcdloop1 CXXFLAGS="-g -O2 -DDPKIND=10" LDFLAGS="-L${PJFry}/lib" > configure.out.txt 2>&1
./configure --prefix="${PJFry}" ${PJFry_Options} --with-integrals=qcdloop1 LDFLAGS="-L${PJFry}/lib" > configure.out.txt 2>&1
make -k > make.out.txt 2>&1
make -k check > make_check.out.txt 2>&1
cd ./examples; ./demo > demo.out.txt 2>&1; cd ../ # run the small built-in demo
make -k install > make_install.out.txt 2>&1
sync
cd
# Create a simple "setup.sh" script in "${PJFry}/PJFry/examples"
cd
cat <<EOF > "${PJFry}/PJFry/examples/setup.sh"
PJFry="${PJFry}"
export LD_LIBRARY_PATH="\${PJFry}/lib:\${LD_LIBRARY_PATH}"
# # export PATH="\${PJFry}/bin:\${PATH}"
# # CXXFLAGS="-I\${PJFry}/include"
# # LDLIBS="-L\${PJFry}/lib -lpjfry"
# gfortran -I\${PJFry}/PJFry/examples demo.f -L\${PJFry}/lib -lpjfry && ./a.out
# root -b -l -q demo.cxx
# g++ -I\${PJFry}/include demo.cxx -L\${PJFry}/lib -lpjfry && ./a.out
# root -b -l -q arXiv_0812_2134.cxx
# \`root-config --cxx --cflags\` -I\${PJFry}/include arXiv_0812_2134.cxx -L\${PJFry}/lib -lpjfry && ./a.out
EOF
sync
cd
# end of file PJFry_QCDLoop1.build.sh by Jacek M. Holeczek
############### PJFry_QCDLoop1.build.sh ENDS ABOVE ###############
PJFry + OneLOop ( https://helac-phegas.web.cern.ch/helac-phegas/OneLOop.html )
==============================================================================
############### PJFry_OneLOop.build.sh BEGINS BELOW ###############
#!/usr/bin/env bash
# Where to build (and install) the "PJFry + OneLOop" bundle.
# PJFry="/opt/PJFry_OneLOop" # note: it usually needs "sudo"
# PJFry="/usr/local/PJFry_OneLOop" # note: it usually needs "sudo"
PJFry="${HOME}/PJFry_OneLOop"
# Additional (optional) PJFry configuration features and packages.
PJFry_Options=""
# PJFry_Options="${PJFry_Options} --enable-golem-mode=yes" # default=no
# PJFry_Options="${PJFry_Options} --enable-cache-low=yes" # default=no
PJFry_Options="${PJFry_Options} --with-mcc-path=no" # default=auto
if [ -z "${PJFry}" ] ; then PJFry="${HOME}/PJFry_OneLOop" ; fi # just a precaution
# One first needs to build the OneLOop package (in-place).
# OneLOop is a package to evaluate the one-loop scalar 1-point, 2-point,
# 3-point and 4-point functions, for all kinematical configurations
# relevant for collider-physics, and for any non-positive imaginary
# parts of the internal squared masses:
# https://helac-phegas.web.cern.ch/helac-phegas/OneLOop.html
# It deals with all UV and IR divergences within dimensional regularization.
# Furthermore, it provides routines to evaluate these functions using
# straightforward numerical integration.
# The current source code can be found on Bitbucket:
# https://bitbucket.org/hameren/oneloop/src/master/
# OneLOop (static and dynamic libraries, in-place)
cd
rm -rf ${PJFry} # clean the source code / destination directory tree
mkdir -p ${PJFry}
cd ${PJFry}
rm -rf oneloop # clean the source code directory tree
git clone https://bitbucket.org/hameren/oneloop.git
cd oneloop
# sed -i -e "{s/\bpython\b/&3/}" `grep -l -r "\bpython\b" ./` # use python3
# sed -i -e "{s/kind(1d0)/selected_real_kind(18)/}" Config # DPKIND=10
# note: PJFry requires "TLEVEL = yes" in the "Config" file
sed -i -e "{s/TLEVEL = no/TLEVEL = yes/}" Config # old-style top-level routines
sed -i -e "{s/CPPINTF = no/CPPINTF = yes/}" Config # C++ interface (just for fun)
sed -i -e "{s/'cru'/'cUru'/}" create.py # a small fix for new ar versions
rm -f avh_olo.f90 *.o *.a *.so *.mod `find ./ -name "*.pyc"`
./create.py # build the static library
rm -f avh_olo.f90 *.o *.mod `find ./ -name "*.pyc"`
./create.py dynamic # build the dynamic library
rm -f *.o `find ./ -name "*.pyc"`
sync
cd
# One can now add the PJFry package.
# PJFry + OneLOop (static and dynamic libraries)
cd
cd ${PJFry}
rm -rf PJFry # clean the source code directory tree
git clone https://github.com/Vayu/PJFry.git # download the newest source code
cd PJFry
# sed -i -e "{s/\bpython\b/&3/}" `grep -l -r "\bpython\b" ./` # use python3
autoreconf -f -i > autoreconf.out.txt 2>&1
export LD_LIBRARY_PATH="${PJFry}/oneloop:${LD_LIBRARY_PATH}"
# ./configure --prefix="${PJFry}" ${PJFry_Options} --with-integrals=oneloop CXXFLAGS="-g -O2 -DDPKIND=10" LDFLAGS="-L${PJFry}/oneloop" > configure.out.txt 2>&1
./configure --prefix="${PJFry}" ${PJFry_Options} --with-integrals=oneloop LDFLAGS="-L${PJFry}/oneloop" > configure.out.txt 2>&1
make -k > make.out.txt 2>&1
make -k check > make_check.out.txt 2>&1
cd ./examples; ./demo > demo.out.txt 2>&1; cd ../ # run the small built-in demo
make -k install > make_install.out.txt 2>&1
sync
cd
# Create a simple "setup.sh" script in "${PJFry}/PJFry/examples"
cd
cat <<EOF > "${PJFry}/PJFry/examples/setup.sh"
PJFry="${PJFry}"
export LD_LIBRARY_PATH="\${PJFry}/lib:\${PJFry}/oneloop:\${LD_LIBRARY_PATH}"
# # export PATH="\${PJFry}/bin:\${PATH}"
# # CXXFLAGS="-I\${PJFry}/include"
# # LDLIBS="-L\${PJFry}/lib -lpjfry"
# gfortran -I\${PJFry}/PJFry/examples demo.f -L\${PJFry}/lib -lpjfry && ./a.out
# root -b -l -q demo.cxx
# g++ -I\${PJFry}/include demo.cxx -L\${PJFry}/lib -lpjfry && ./a.out
# root -b -l -q arXiv_0812_2134.cxx
# \`root-config --cxx --cflags\` -I\${PJFry}/include arXiv_0812_2134.cxx -L\${PJFry}/lib -lpjfry && ./a.out
EOF
sync
cd
# end of file PJFry_OneLOop.build.sh by Jacek M. Holeczek
############### PJFry_OneLOop.build.sh ENDS ABOVE ###############
PJFry + QCDLoop 1.x / FF ( https://qcdloop.fnal.gov/ )
======================================================
############### PJFry_QCDLoop-1.97.build.sh BEGINS BELOW ###############
#!/usr/bin/env bash
# Where to build (and install) the "PJFry + QCDLoop 1.x / FF" bundle.
# PJFry="/opt/PJFry_QCDLoop-1.97" # note: it usually needs "sudo"
# PJFry="/usr/local/PJFry_QCDLoop-1.97" # note: it usually needs "sudo"
PJFry="${HOME}/PJFry_QCDLoop-1.97"
# Additional (optional) PJFry configuration features and packages.
PJFry_Options=""
# PJFry_Options="${PJFry_Options} --enable-golem-mode=yes" # default=no
# PJFry_Options="${PJFry_Options} --enable-cache-low=yes" # default=no
PJFry_Options="${PJFry_Options} --with-mcc-path=no" # default=auto
if [ -z "${PJFry}" ] ; then PJFry="${HOME}/PJFry_QCDLoop-1.97" ; fi # just a precaution
# One first needs to build the QCDLoop 1.97 / FF package (in-place).
# QCDLoop 1.x / FF is a library of one-loop scalar Feynman integrals,
# evaluated close to four dimensions: https://qcdloop.fnal.gov/
# It is based on the FF package: https://gjvo.home.xs4all.nl/FF.html
# The current "packaged source code" version (dated 2020.07.24) is:
# https://qcdloop.fnal.gov/QCDLoop-1.97.tar.gz
# QCDLoop 1.97 / FF (static libraries only, in-place)
cd
rm -rf ${PJFry} # clean the source code / destination directory tree
mkdir -p ${PJFry}
cd ${PJFry}
wget https://qcdloop.fnal.gov/QCDLoop-1.97.tar.gz
tar -zxf QCDLoop-1.97.tar.gz
rm -f `find ./ -name "._*" -print` # remove spurious files
chmod go-w,go+r `find QCDLoop-1.97 -type f -print` # fix permissions of files
chmod go-w,go+rx `find QCDLoop-1.97 -type d -print` # fix permissions of directories
cd QCDLoop-1.97
# note: edit the "./ff/ffinit_mine.f" in two places ("path = '...'").
# sed -i -e "{s/-std=legacy/& -freal-8-real-10/}" `find ./ -name "[mM]akefile"` # DPKIND=10
sed -i -e "{s/\bcru\b/cUru/}" `find ./ -name "[mM]akefile"` # a small fix for new ar versions
make -k > make.out.txt 2>&1
./test > test.out.txt 2>&1 # run the small built-in test
sync
cd
# One can now add the PJFry package.
# PJFry + QCDLoop 1.97 / FF (static libraries only)
cd
cd ${PJFry}
rm -rf PJFry # clean the source code directory tree
git clone https://github.com/Vayu/PJFry.git # download the newest source code
cd PJFry
# sed -i -e "{s/\bpython\b/&3/}" `grep -l -r "\bpython\b" ./` # use python3
autoreconf -f -i > autoreconf.out.txt 2>&1
# ./configure --prefix="${PJFry}" ${PJFry_Options} --enable-shared=no --with-integrals=qcdloop CXXFLAGS="-g -O2 -DDPKIND=10" LDFLAGS="-Wl,--no-as-needed -lstdc++ -L${PJFry}/QCDLoop-1.97/ql -L${PJFry}/QCDLoop-1.97/ff" > configure.out.txt 2>&1
./configure --prefix="${PJFry}" ${PJFry_Options} --enable-shared=no --with-integrals=qcdloop LDFLAGS="-Wl,--no-as-needed -lstdc++ -L${PJFry}/QCDLoop-1.97/ql -L${PJFry}/QCDLoop-1.97/ff" > configure.out.txt 2>&1
make -k > make.out.txt 2>&1
make -k check > make_check.out.txt 2>&1
cd ./examples; ./demo > demo.out.txt 2>&1; cd ../ # run the small built-in demo
make -k install > make_install.out.txt 2>&1
sync
cd
# Create a simple "setup.sh" script in "${PJFry}/PJFry/examples"
cd
cat <<EOF > "${PJFry}/PJFry/examples/setup.sh"
PJFry="${PJFry}"
# # export LD_LIBRARY_PATH="\${PJFry}/lib:\${LD_LIBRARY_PATH}"
# # export PATH="\${PJFry}/bin:\${PATH}"
# # CXXFLAGS="-I\${PJFry}/include"
# # LDLIBS="-L\${PJFry}/lib -lpjfry -L\${PJFry}/QCDLoop-1.97/ql -lqcdloop -L\${PJFry}/QCDLoop-1.97/ff -lff -lgfortran -lstdc++"
# gfortran -I\${PJFry}/PJFry/examples demo.f -L\${PJFry}/lib -lpjfry -L\${PJFry}/QCDLoop-1.97/ql -lqcdloop -L\${PJFry}/QCDLoop-1.97/ff -lff -lstdc++ && ./a.out
# g++ -I\${PJFry}/include demo.cxx -L\${PJFry}/lib -lpjfry -L\${PJFry}/QCDLoop-1.97/ql -lqcdloop -L\${PJFry}/QCDLoop-1.97/ff -lff -lgfortran && ./a.out
# \`root-config --cxx --cflags\` -I\${PJFry}/include arXiv_0812_2134.cxx -L\${PJFry}/lib -lpjfry -L\${PJFry}/QCDLoop-1.97/ql -lqcdloop -L\${PJFry}/QCDLoop-1.97/ff -lff -lgfortran && ./a.out
EOF
sync
cd
# end of file PJFry_QCDLoop-1.97.build.sh by Jacek M. Holeczek
############### PJFry_QCDLoop-1.97.build.sh ENDS ABOVE ###############