-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathCOMPILE
97 lines (47 loc) · 2.46 KB
/
COMPILE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
__________________________________________________________________________________________
COMPILATION OF CFDWARP
__________________________________________________________________________________________
1. CFDWARP CONFIGURATION
In the CFDWARP main directory (where this file COMPILE is located) first configure
CFDWARP through the command
make config
or
make configx (to include experimental modules)
make configp (to have access to proprietary modules)
make configpx (to have access to the experimental and proprietary modules)
Then answer all multiple-choice questions. Note: make config compiles and runs
config.c in the config directory, which itself creates applyconfig.sh, a bash script
which is thereafter executed from within the config directory. To reestablish
your configuration at a later time, you can copy the file applyconfig.sh in a safe
place and rerun it from the config directory when needed.
2. WARP COMPILATION
Tweak .makefile-header if necessary in the top directory (this should only be
needed if compiling on an esoteric UNIX system or if you want to add additional
flags to the C compiler, or if you wish to use a different compiler from cc, icc,
mpicc, or gcc). Then, clean the directories and create the CFDWARP executable with the
commands:
make clean
make src
The executable is named warp and is in the src directory.
3. TOOLS COMPILATION
Clean the directories and create the tools with the commands:
make clean
make tools
The executables will be located in the tools directory.
4. CFDWARP PACKAGE CREATION
To create a tgz package that contains the warp executable along with some
documentation manuals, type at the prompt:
make tar
This will create a warp_package.tgz file in the tar directory. Compiling CFDWARP
as a statically-linked executable is preferable here as it will ensure that the
warp executable does not depend on any external library and can be run on any Linux
distribution.
5. CPU PROFILING
CPU profiling comes in handy to know which algorithms are not optimal and take
up more resources than expected. To enable CPU profiling, compile warp with the
-pg flag by saying yes to the "CPU profiling" question in the make config.
Then, run warp as usual:
./warp -r test.wrp -o out.01
When warp finishes, it will output a file called "gmon.out". This can be analyzed
using gprof with the analysis outputted to an ascii file as follows:
gprof ./warp gmon.out > analysis.txt