Using Whizard at Glasgow

The Monte Carlo event generator Whizard needs O'Caml to be available, and needs to be set up with several other packages in order to simulate linear collider beam spectra. Though Whizard v2 is now available, v1.9.7 was used for consistency with previous datasets.

Whizard required gcc greater than 4.3 to build so as much as possible was done on an SL6 machine.

Below is a brain dump.

Late in the process I found a helpful script which is probably the best place to start:

Here is a helpful talk about the beam spectra from Tim Barklow:

O'caml build

O'caml built happily in our SL5 release (eg ppepc103) but found a missing library when trying to build in our SL6 release. Stayed with SL5.

Downloaded tarball from

./configure -prefix /afs/
make world > 2>&1 
make bootstrap > loglocal.bootstrap 2>&1
make opt > loglocal.opt 2>&1 
make opt.opt > loglocal.opt.opt 2>&1 
make install > loglocal.install 2>&1
make installopt > loglocal.installopt 2>&1
make installoptopt > loglocal.installoptopt 2>&1
export PATH=$PATH:/afs/

stdhep build

Downloaded stdhep from

to compile stdhep in SL6 had to change src/stdhep_arch:


FFLAGS= $(DFLG) -fd-lines-as-comments -fno-second-underscore

and to change mcfio/arch_mcfio:



export STDHEP_DIR=/afs/

Whizard build

Downloaded tarball from

Whizard needed gcc 4.3 or above to compile and in practice locally this meant SL6 (eg ppepc147).

A minor modification was required to the Whizard configure file because an apparent change to --version output in Ocaml led to parsing failure when checking Ocaml version.

[robson@ppepc145 Whizard197_SL6]$ diff configure configure_mod
< $AWK 'NR==1 && $5 ~ /version/ {
< split ($6, version, "[.+]+");
> $AWK 'NR==1 && $4 ~ /version/ {
> split ($5, version, "[.+]+");

To get beam spectra

svn export
export energy_spread=$PWD/energy_spread
 export LUMI_LINKER=${energy_spread}/lumi_linker_000
 export PHOTONS_B1=${energy_spread}/photons_beam1_linker_000
 export PHOTONS_B2=${energy_spread}/photons_beam2_linker_000
 export EBEAM=${energy_spread}/ebeam_in_linker_000
 export PBEAM=${energy_spread}/pbeam_in_linker_000
 export LUMI_EE_LINKER=${energy_spread}/lumi_ee_linker_000
 export LUMI_EG_LINKER=${energy_spread}/lumi_eg_linker_000
 export LUMI_GE_LINKER=${energy_spread}/lumi_ge_linker_000
 export LUMI_GG_LINKER=${energy_spread}/lumi_gg_linker_000

For the beam spectra:

svn export

- and split the lines in that file that were too long for f90.


To get a6f:

svn export
cd kinds-src
 make install
 cd ../vamp-src/
 make install
 cd ../whizard-src/
 gfortran -I../include -c mpi90.f90 limits.f90 diagnostics.f90 
 cd ..
 make -C a6f/include/ A6F=.. WHIZ=../.. WH195=../.. SHELL=/bin/bash



- currently not available; script attached to this wiki page.

bash 6.4.22 gfortran
cd v6_422/src/
mv upinit.f upinit.f-orig
mv pydecy.f pydecy.f-orig
 svn export
svn export
touch upinit.f
touch pydecy.f
cd ../lib/
mv liblund.a libpythia6422.a
export PYTHIA_LIB=/afs/
export PYTHIA_DIR=/afs/


svn export
tar zxvf tauola_desy.tar.gz 
cd tauola_desy/TAUOLA
export WHZ=/afs/
cd photos-F/
make 4kD-all
bash make_tauola_script 
cd tauola
mv glib.a libtauola.a
cd ..
cd photos
mv glib.a libphotos.a
cd ..
export TAUOLALIB=/afs/
export PHOTOSLIB=/afs/
cd ../..

whizard itself:

FMCFIO=/afs/ STDHEP=/afs/ ./configure_mod --enable-stdhep --prefix=/afs/ USERLIBS="/afs/ /afs/ $TAUOLALIB/libtauola.a $PHOTOSLIB/libphotos.a" F77=gfortran > log.configure 2>&1

To look at Whizard diagrams:

latex whizard-channels.tex 
dvips whizard-channels.dvi -o

-- Aidan Robson - 2014-04-23


  • Pythia build script from R Hatcher, currently not visible to visitors at his homepage
Topic attachments
I Attachment History Action Size Date Who Comment
Unix shell scriptsh r1 manage 19.7 K 2014-04-23 - 09:05 AidanRobson Pythia build script from R Hatcher, currently not visible to visitors at his homepage
Topic revision: r1 - 2014-04-23 - AidanRobson
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback