|
- Timestamp:
-
Sep 5, 2011, 10:56:36 AM (13 years ago)
- Author:
-
jweil
- Comment:
-
some corrections and extensions
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v8
|
v9
|
|
5 | 5 | Before compiling, make sure that all [wiki:tools prerequisites] are fulfilled. |
6 | 6 | |
7 | | 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. |
8 | | |
9 | 7 | Note that the whole compilation process is steared by GNU make. GiBUU is always compiled statically, so that we get a monolithic executable which does not depend on system libraries (with the exception of Mac OS X where static linking is not supported). |
10 | 8 | |
11 | 9 | == Choosing a Compiler == |
12 | 10 | |
13 | | By default the Makefile uses the first supported compiler which it finds on your system (ifort, gfortran, g95, sunf95 or lfc - in this order). But you can also tell the Makefile which compiler to use, by doing e.g.: |
| 11 | By default the Makefile uses the first supported compiler which is found on your system (ifort, gfortran, g95, sunf95 or pgf95 - in this order). But you can also tell the Makefile which compiler to use, by doing e.g.: |
14 | 12 | |
15 | 13 | {{{ |
… |
… |
|
37 | 35 | make MODE=prof |
38 | 36 | }}} |
| 37 | |
39 | 38 | Currently this only works with ifort & gfortran, and produces an executable which is suitable for profiling with gprof. |
40 | 39 | |
… |
… |
|
48 | 47 | }}} |
49 | 48 | |
50 | | This sets the level for floating point exceptions, which can be 0-3, where FPE=3 means none and FPE=0 means all. FPE=3 is the default. This flag is only supported with ifort and gfortran. |
| 49 | This sets the level for floating point exceptions, which can be 0-3, where FPE=3 means none and FPE=0 means all. FPE=3 is the default. This flag is only supported with ifort and gfortran. Note: We recommend not to use FPE, unless you feel really adventurous. The resulting executable is likely to crash (in particular, PYTHIA has trouble with FPE). |
51 | 50 | |
52 | 51 | |
… |
… |
|
60 | 59 | |
61 | 60 | This can potentially be up to four times faster than the standard single-threaded make ("-j1"), since four files can be compiled in parallel. |
| 61 | |
| 62 | == Rebuilding from scratch == |
| 63 | |
| 64 | If you want to discard all the object files which have already been generated (e.g. to rebuild with a different compiler or different options, or after making major changes to the code), you should type |
| 65 | |
| 66 | {{{ |
| 67 | make renew |
| 68 | }}} |
| 69 | |
| 70 | This will clean up all present object and module files and rebuild the dependencies, giving you a fresh start in building GiBUU. |
|