|
- Timestamp:
-
Jan 4, 2017, 8:52:12 PM (8 years ago)
- Author:
-
gallmei
- Comment:
-
cosmetics
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v13
|
v14
|
|
1 | | = Compiling GiBUU = |
| 1 | = Compiling GiBUU = |
2 | 2 | |
3 | 3 | Compiling GiBUU usually is as easy as typing '''make''' in the GiBUU base directory. However, a couple of options are available for special situations (see also [//Documentation/makefile_robodoc/masterindex.html Makefile Documentation]). |
4 | 4 | |
5 | | Before compiling, make sure that all [wiki:tools prerequisites] are fulfilled. Note that the whole compilation process is steared by GNU make. |
| 5 | Before compiling, make sure that all [wiki:tools prerequisites] are fulfilled. |
| 6 | |
| 7 | |
| 8 | You may compile your code via |
| 9 | make [VAR=val | ...] |
| 10 | with VAR = ... |
| 11 | |
| 12 | * FORT: |
| 13 | * FORT = ifort,gfortran,... |
| 14 | * FORT = /path/to/intel/compiler/ifort |
| 15 | |
| 16 | * MODE: |
| 17 | * MODE = opt0,opt1,opt2,opt3 |
| 18 | * MODE = opt4 |
| 19 | * MODE = opt5 |
| 20 | * MODE = lto |
| 21 | * MODE = prof |
| 22 | * MODE = callGraph |
| 23 | |
| 24 | * STATIC: |
| 25 | * STATIC = 0|1 |
| 26 | |
| 27 | * FPE: |
| 28 | * FPE = 0|1|2|3 |
| 29 | |
| 30 | * ARCH: |
| 31 | * ARCH = 32 |
| 32 | |
| 33 | * ARGS: |
| 34 | * ARGS = "..." |
6 | 35 | |
7 | 36 | |
… |
… |
|
23 | 52 | == Choosing an Optimization Level == |
24 | 53 | |
25 | | By default GiBUU is compiled with debugging flags, which is good for development and bug tracking, but the produced executable may be quite slow. If you want an optimized executable, you should compile with |
| 54 | By default GiBUU is compiled with optimizing flags switched on, corresponding to compiler flags '-O3'. You may change the optimization level by calling e.g. |
| 55 | {{{ |
| 56 | make MODE=opt1 |
| 57 | }}} |
| 58 | This works with all compilers and lets you specify the optimization level (0-3). |
26 | 59 | |
27 | | {{{ |
28 | | make MODE=opt3 |
29 | | }}} |
| 60 | 1) Full debugging code for development and bug tracking is generated with |
| 61 | {{{ |
| 62 | make MODE=opt0 |
| 63 | }}} |
30 | 64 | |
31 | | This works with all compilers and lets you specify the optimization level (0-3). Another option is to use profiling flags: |
32 | 65 | |
33 | | {{{ |
34 | | make MODE=prof |
35 | | }}} |
| 66 | 2) Another option is to use profiling flags: |
| 67 | {{{ |
| 68 | make MODE=prof |
| 69 | }}} |
| 70 | Currently this only works with ifort & gfortran, and produces an executable which is suitable for profiling with gprof. |
36 | 71 | |
37 | | Currently this only works with ifort & gfortran, and produces an executable which is suitable for profiling with gprof. |
38 | | |
| 72 | 3) In order to get the most optimized code, you may use e.g. |
| 73 | {{{ |
| 74 | make MODE=lto ARGS="-fopenmp -march=native" |
| 75 | }}} |
39 | 76 | |
40 | 77 | == Static vs. Dynamic Linking == |
|