WHIZARD Installation instructions
Back to the main page.
We review here the installation of the tarball of the latest version of WHIZARD 2. Technical details about the installation of the development version from the SVN trunk can be found in the manual.
The philosophy of WHIZARD 2 is that the program is installed centrally in a computer, e.g. in a directory /usr/local/, where all the binaries, libraries and necessary files are located, while the users run the program in workspaces in their home directories. (Working in batch mode can be handled, too.) The following describes a system installation, but of course a user can install WHIZARD also in his/her home directory.
The general prerequisites for the installation are standard tools for software development like make etc., and two different compilers, a Fortran 2003 for the WHIZARD core and its corresponding libraries as well as the O'Caml compiler for the O'Mega matrix element generator. Please note that versions of WHIZARD / O'Mega up to 2.0.2 are incompatible with O'Caml versions 3.12.0+. Details and links for the compilers can be found here.
After you downloaded the most recent tarball from the main page, unpack it, go to the WHIZARD directory, create a new build directory and go there. In that directory, perform a ../configure FC=<your FORTRAN compiler> --prefix=/usr/local. Note that this is because the source and compile directories should be different to avoid any problems during compilation and installation. ../configure --help shows you the options for the configure process you have. The FC environment variable allows you to specify your FORTRAN compiler of choice. Note that WHIZARD 2 has been written in Fortran 2003 in a fully object-oriented way. We highly recommend usage of the standard gfortran compiler from version 4.5.0 on. You can access the help menu of configure by ../configure --help. ./configure -V shows you the actual version of your downloaded WHIZARD distribution. The possible environment variables are:
CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor FC Fortran compiler command FCFLAGS Fortran compiler flags F77 Fortran77 compiler command FFLAGS Fortran77 compiler flags CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor
For most of these there is no need to be set during installation.
The configure process checks for the build and host system type; only if this is not detected automatically, the user would have to specify this by himself. After that system-dependent files are searched for, LaTeX and Acroread for documentation and plots, the FORTRAN compiler is checked, and finally the O'Caml compiler. The next step is the checks for external programs like LHAPDF and HepMC. Finally, all the Makefiles are being built.
Note that parts of the WHIZARD do contain good old Fortran77 code, e.g. the PYTHIA bundle for showering and hadronization. These parts should better be compiled with the very same Fortran2003 compiler as the WHIZARD core. There is, however, one subtlety: when the configure flag FC gets a full system path as argument, libtool is not able to recognize this as a valid (GNU) Fortran77 compiler. It then searches automatically for binaries like f77, g77 etc. or a standard system compiler. This might result in a compilation failure of the Fortran77. A viable solution is to define an executable link and use this (not the full path!) as FC flag.
Compilation and Installation
The compilation is done by invoking make and finally make install. You could also do a make check in order to test whether the compilation has produced sane files on your system. This is highly recommended, but need to be done only for the first installation.
Be aware that there be problems for the installation if the install path or a user's home directory is part of an AFS file system. Several times problems were encountered connected with conflicts with permissions inside the OS permission environment variables and the AFS permission flags which triggered errors during the make install procedure. Also please avoid using make -j options of parallel execution of Makefile directives as AFS filesystems might not be fast enough to cope with this.
Back to the main page.