gibuu is hosted by Hepforge, IPPP Durham
GiBUU

Version 1 (modified by jweil, 15 years ago) (diff)

--

Compiling GiBUU

Compiling GiBUU usually is as easy as typing make in the GiBUU base directory. However, a couple of options are available for special situations.

If you compile GiBUU for the first time, you should start with make renew. This is also helpful sometimes when you want to redo the whole compilation instead of doing an incremental make or rebuild the dependencies.

Note that the whole compilation process is steared by GNU make. GiBUU is always compiled statically, so that we get a monolitic executable which does not depend on system libraries (with the exception of Mac OS X with static compilation is not supported).

Choosing a Compiler

By default the Makefile uses the first supported compiler which it finds on your system (ifort, gfortran, g95, sunf95, lahey - in this order). But you can also tell the Makefile which compiler to use, by doing e.g.:

make FORT=gfortran-4.5

In this way you can also specify the explicit path of the compiler:

make FORT=/opt/g95-install/bin/g95

Choosing an Optimization Level

By default GiBUU is compiled with debugging flags, which is good for development and bugtracking, but the produced executable may be quite slow. If you want an optimized exectutable, you should compile with

make MODE=opt3

This works with all compilers and lets you specify the optimization level (0-3). Another option is to use profiling flags:

make MODE=prof

Currently this only works with ifort & gfortran, and produces an executable which is suitable for profiling with gprof.

Floating Point Exceptions

Checks for floating point exceptions are turned off by default. To change this you can use e.g.

make FPE=0

This sets the level for floating point exceptions, which can be 0-3, where FPE=3 means none and FPR=0 means all. FPE=3 is the default. This flag is only supported with ifort and gfortran.