forked from SimVascular/simvascular.github.io-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocsCompile.html
More file actions
490 lines (412 loc) · 26.7 KB
/
docsCompile.html
File metadata and controls
490 lines (412 loc) · 26.7 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>SimVascular Docs</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/shop-item.css" rel="stylesheet" type="text/css" />
<link href="css/codestyle.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="font-awesome-4.1.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css">
<link rel="shortcut icon" href="img/favicon.ico">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars" id="barIcon"></i>
</button>
<a class="navbar-brand" id="brandName" href="index.html">
<img src="img/svlogo/svLogoSmallText.png" alt="...">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<!-- USER GUIDES -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><span class="fa fa-user"></span> User Guides</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsInstallation.html"><b><span class="fa fa-sign-in fa-rotate-90"></span> Installation</b></a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsQuickGuide.html"><b><span class="icon ion-ios7-bolt"></span> Quick Guide</b></a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsModelGuide.html"><b><span class="icon ion-settings"></span> Modeling</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsMeshing.html"><b><span class="icon ion-ios7-keypad"></span> Meshing</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsFlowSolver.html"><b><span class="icon ion-play"></span> Simulation</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docssvFSI.html"><b><span class="icon ion-plus-round"></span> svFSI</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsROMSimulation.html"><b><span class="icon ion-plus-round"></span> ROM Simulation</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsGenBC.html"><b><span class="icon ion-refresh"></span> GenBC</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsPythonInterface.html"><b><span class="icon ion-refresh"></span> Python Interface</b></a></li>
</ul>
</li>
<!-- CLINCAL CASES -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><i class="fa fa-stethoscope"></i> Clinical Cases</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase3.html"><b><span class="fa fa-user-md"></span> Coronary Normal</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase1.html"><b><span class="fa fa-user-md"></span> Aortofemoral Normal - 1</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase2.html"><b><span class="fa fa-user-md"></span> Aortofemoral Normal - 2</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase4.html"><b><span class="fa fa-user-md"></span> Healthy Pulmonary</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/projects/sv_tests"><b><span class="fa fa-user-md"></span> All demo projects</b></a></li>
</ul>
</li>
<!-- DEVELOPER GUIDES -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><span class="fa fa-caret-square-o-right"></span> Developer Guides</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsCompile.html"><b><span class="fa fa-file-text-o"></span> Compile Source Code</b></a></li>
</ul>
</li>
<!-- svCOMMUNITY -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><i class="fa fa-users"></i> svCommunity</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/forums/viewforum.php?f=188"><b><span class="fa fa-users"></span> Public Forum</b></a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/mailman/listinfo/simvascular-news"><b><span class="fa fa-sign-in"></span> Join News Mailing List</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/pipermail/simvascular-news/"><b><span class="fa fa-pencil-square-o"></span> News Mailing List Archive</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://github.com/SimVascular/SimVascular/issues"><b><span class="fa fa-bug"></span> Report bugs and request features</b></a></li>
</ul>
</li>
<!-- REFERENCES -->
<li>
<a href="docsRefs.html" id="dropdownMenu1" >
<b><span class="icon ion-document-text"></span>References</b>
</a>
</li>
<!-- Archives -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b> Archives</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="archiveQuickGuideSV2.html"><b>SimVascular 2.0</b></a></li>
</ul>
</li>
<!-- <li><a href="docsQuickGuide.html" id="btnQuickGuide"><b><span class="icon ion-ios7-bolt"></span> Quick Guide</b></a></li>
<li><a href="docsModelGuide.html" id="btnModelGuide"><b><span class="icon ion-settings"></span> Modeling</b></a></li>
<li><a href="docsMeshing.html" id="btnMeshing"><b><span class="icon ion-ios7-keypad"></span> Meshing</b></a></li>
<li><a href="docsPresolver.html" id="btnPresolver"><b><span class="icon ion-log-in"></span> svPre</b></a></li>
<li><a href="docsFlowSolver.html" id="btnFlowSolver"><b><span class="icon ion-play"></span> svSolver</b></a></li>
<li><a href="docsRefs.html" id="btnRefs"><b><span class="icon ion-document-text"></span> References</b></a></li>
<li><a href="clinicalCase1.html" id="btnRefs"><b>Case Studies</b></a></li> -->
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<!--Nav Bar -->
<div class="row">
<div class="col-xs-1 col-sm-1 hidden-md hidden-lg">
</div>
<!-- ONE COLUMN OF SPACE -->
<nav class="hidden-xs hidden-sm col-md-2 col-lg-2 bs-docs-sidebar">
<ul id="sidebar" class="nav nav-stacked fixed manSource"> <!--Nav Bar -->
<p><h3>Compile</h3></p>
<li><a href="#compileRequirements">System Requirements</a></li>
<li><a href="#sysSetupWin">System Setup</a>
<ul class="nav nav-stacked">
<li><a href="#sysSetupWin">Windows</a></li>
<li><a href="#sysSetupMac">Apple OS X</a></li>
<li><a href="#sysSetupLinux">Linux</a></li>
</ul>
<li><a href="#compileBuild">Steps for Compiling</a>
<li><a href="#compileRun">Running Simvascular</a>
<li><a href="#compileITKVTK">Additional Notes</a>
</ul>
</nav>
<!--Main Content -->
<div class="col-xs-10 col-sm-10 col-md-9 col-lg-9" id="manualContent">
<!-- ACTUAL CONTENT -->
<div class="manCompile"><section id="compileRequirements" class="group"><h1>Compiling SimVascular using CMake</h1>
<p><br>
<em>This guide gives an overview of compiling SimVascular using CMake. We also support standard MakeFiles.</em></p>
<p><br></p>
<h2>System Requirements</h2>
<table class="table table-bordered">
<thead>
<tr>
<th>Windows</th>
<th>Apple OS X</th>
<th>Linux</th>
</tr>
</thead>
<tr>
<td>Tested Configurations:
<ul>
<li>Windows 10</li>
<li>C++ compilers</li>
</ul>
Supported Compilers:
<ul>
<li>Visual Studio 2013 Community Edition <br>(version 12.0 update 5 for x64)</li>
<li>Visual Studio 2013 Professional <br>(version 12.0 update 5 for x64)</li>
</ul>
</td>
<td>Tested Configurations:
<ul>
<li>Version 10.10.5 (OS X Yosemite) <br>with XCode 7.2.1 (command line tools installed)</li>
<li>Version 10.12.1 (macOS Sierra) <br>with XCode 8.2.1 (command line tools installed)</li>
</ul>
Supported Compilers:
<ul>
<li>Apple LLVM version 7.0.2 (clang-700.1.81)</li>
<li>Apple LLVM version 8.0.0 (clang-800.0.42.1)</li>
</ul>
</td>
<td>Tested Configurations:
<ul>
<li>Ubuntu 14.04 64-bit desktop</li>
<li>Ubuntu 16.04 64-bit desktop</li>
</ul>
Supported Compilers:
<ul>
<li>gcc/g++ 4.8.5</li>
<li>gcc/g++ 5.4.0</li>
</ul>
</td>
</tr>
</table>
<p><em>On linux, use <code>gcc --version</code> to see which compiler you are using.</em>
<em>On mac, use <code>clang --version</code> to see which compiler you are using.</em></p>
</section>
<section id="sysSetupWin" class="subgroup"><h2>Required Libraries</h2>
<h3>Windows</h3>
<p>You need to install:
<ul>
<li>CMake, Visit <a href="http://www.cmake.org/"target="_blank"> cmake.org</a> for details.</li>
<li><a href="http://www.visualstudio.com/"target="_blank"> Microsoft Visual Studio</a> (with x64 compilers).</li>
<li><a href="https://software.intel.com/en-us/fortran-compilers"target="_blank"> Intel Visual Fortran</a></li>
<li>Qt developer package downloadable <a href="http://simvascular.stanford.edu/downloads/public/open_source/windows/qt/5.4/">here</a>.</li>
<li>MPICH2, available at: mpich2-1.4.1p1-win-x86-64.msi</li>
</ul></p>
</section>
<section id="sysSetupMac" class="subgroup"><h3>Apple OS X</h3>
<p>You need to install:
<ul>
<li>CMake, Visit <a href="http://www.cmake.org/"target="_blank"> cmake.org</a> for details.</li>
<li><a href="https://developer.apple.com/xcode">XCode</a> (make sure the version of XCode is the right version for your OS).</li>
<p>The XCode command line tools need to be installed. This can done with this command:</p>
<pre class="highlight plaintext"><code>xcode-select --install</code></pre>
<li>Qt developer package downloadable <a href="http://simvascular.stanford.edu/downloads/public/open_source/mac_osx/qt/5.4">here</a>.</li>
</ul></p>
</section>
<section id="sysSetupLinux" class="subgroup"><h3>Linux</h3>
<p>You will need the following packages, available from the APT repository:</p>
<pre class="highlight plaintext"><code>sudo apt-get install cmake
sudo apt-get install cmake-curses-gui
sudo apt-get install cmake-gui
</code></pre>
<p>Qt developer package downloadable <a href="http://simvascular.stanford.edu/downloads/public/open_source/linux/qt/5.4">here</a>.</p>
</section>
<section id="compileBuild" class="group"><h2>Steps for compiling</h2>
<p><p>Building SimVascular can be thought of as building two separate projects:
<li>SimVascular’s externals</li>
<li>SimVascular itself</li>
</p>
<p>
<pre class="highlight plaintext">
<code><img src="documentation/compile/imgs/folder.png" height="20" width="20"alt="..."><font color="##0000FF"> SimVascularSrc</font>
--- CMakeLists.txt: <ul><em>Highest level CMake file that contains very little. Simply builds the Externals project and then the SimVascular project. Should be the entrance location for anyone familiarizing themselves with SimVascular.</em></ul>
--- <img src="documentation/compile/imgs/folder.png" height="20" width="20"alt="..."><font color="##0000FF"> Externals</font>
<ul>--- CMakeLists.txt: <ul><em>Main CMake file for Externals. Very involved and contains options to use different versions of the externals, to build or download certain externals, etc. Many of these options are not available using the highest level CMake file, so if fine tuning of the Externals is desired, this is the spot to be.</em></ul></ul>
--- <img src="documentation/compile/imgs/folder.png" height="20" width="20"alt="..."><font color="##0000FF"> Code</font>
<ul>--- CMakeLists.txt: <ul><em>Main CMake file for SimVascular. Very involved and contains options for building/not building certain libraries, shared/static libraries, etc. Many of these options are also not available using the highest level CMake file, so if fine tuning of the SimVascular build is desirec, this is the spot to be.</em></ul></ul>
--- <img src="documentation/compile/imgs/folder.png" height="20" width="20"alt="..."><font color="##0000FF"> Remaining Src</font></code></pre>
</p>
<p>
<h3 id="buildingItAll">Building it all</h3>
<p>This is the easiest and most basic way to build SimVascular. If using a supported operating system and compiler, this is likely to work.</p>
<p>Follow the setup instructions for <a href="#sysSetupMac">Mac</a>, <a href="#sysSetupLinux">Linux</a>, or <a href="#sysSetupWin">Windows</a>.</p>
<p>Use git to clone the SimVascular source:</p>
<pre class="highlight plaintext"><code>git clone https://github.com/SimVascular/SimVascular.git SimVascularSrc</code></pre>
<p>Or fork the project on <a href="https://github.com/SimVascular/SimVascular">github</a>, and then clone the forked repository:</p>
<pre class="highlight plaintext"><code>git clone https://github.com/github<em>username/SimVascular.git SimVascularSrc</code></pre>
<h4>CMake command line</h4>
<p>If you use cmake on the command line (you must install cmake command line tools), enter the source and setup the project:</p>
<pre class="highlight plaintext"><code>cd SimVascularSrc
mkdir Build
cd Build
ccmake ..</code></pre>
<p>Configure the project with ‘c’. CMake will run and then error because it needs Qt. Point it to the location of the Qt5Config.cmake file:</p>
<pre class="highlight plaintext"><code><img src="documentation/compile/imgs/cmake</em>command<em>find</em>qt.png" alt="..."></code></pre>
<p>Reconfigure the project with ‘c’ until you can generate make files with ‘g’. </p>
<p>If you have no errors, generate the make files with ‘g’.</p>
<p>Proceed to <a href="#buildEverything">building the project</a>.</p>
<h4>CMake GUI</h4>
<p>If you use the cmake GUI, start the GUI and point to the source directory and a new build directory. You can choose a non-existent build directory, cmake will generate it for you.</p>
<pre class="highlight plaintext"><code><img src="documentation/compile/imgs/cmake_gui_setup.png" alt="..."></code></pre>
<p>Configure the project with ‘c’. Unless you want to specify custom compilers, use the default compilers. CMake will run and then error because it needs Qt. Point it to the location of the Qt5Config.cmake file:</p>
<pre class="highlight plaintext"><code><img src="documentation/compile/imgs/cmake_gui_find_qt.png" alt="..."></code></pre>
<p>Configure the project again and if Qt is found succesfully, Qt variables will show up in the GUI. Configure one more time, and then the ‘Generate’ button should be clickable. Generate the build files with Generate and exit the CMake GUI.</p>
<p>Proceed to <a href="#buildEverything">building the project</a>.</p>
<h4>Toplevel SimVascular Variables</h4>
<p>Most likely, all these variables should be fine and they should not be changed. These variables indicate what version of the pre-built binaries to download from the simvascular server. You can navigate and see the available pre-buit binaries <a href="http://simvascular.stanford.edu/downloads/public/simvascular/externals">here</a>.The toplevel variables you can edit correspond to the directory structure.</p>
<pre class="highlight plaintext"><code>$SV_PLATFORM_DIR -> Platform being used (mac_osx, ubuntu, windows)
$SV_PLATFORM_VERSION_DIR -> Platform version #
$SV_COMPILER_DIR -> Compiler being used
$SV_COMPILER_VERSION_DIR -> Compiler version #
$SV_ARCH_DIR -> Architecture (x32, x64)
$SV_BUILD_TYPE_DIR -> Compile type (Release, Debug, RelWithDebInfo, MinSizeRel)</code></pre>
<p>Note that changing these variables will only change the versions of the pre-built binaries downloaded. They will not change your physical configuration settings! For example, to actually change the compiler being used, the CMAKE<em>CXX</em>COMPILER variable should be changed.</p></p>
<p><h4 id="buildEverything">Build the project</h4>
<p>Navigate to the cmake build directory where you just generated the makefiles.</p>
<pre class="highlight plaintext"><code>cd /Users/username/Documents/Software/SimVascularSrc/Build
make</code></pre>
<p>If the build immediately errors, the system you are using is most likely not supported.</p>
<p>If you see warnings, please read them. It may be the case that your system does not have pre-built binaries of the externals. In which case, a default version of the pre-built externals will be download; however, it could cause errors when finally building the SimVascular project.</p>
<p>The build will proceed in two steps:
<ol>
<li>The externals will first be downloaded and then SimVascular will be automatically configured to build with these pre-built downloaded externals. If the build errors during the download of the externals, see the section about the <a href="#buildExternals">Externals</a>.</li>
<li>The SimVascular project itself will be built second. If the build errors during the actual build of SimVascular, see the section about building <a href="#buildSimVascular">standalone SimVascular</a>.
</ol>
</p>
<p>If the build did not error, navigate to the SimVascular build directory and launch the project!</p>
<pre class="highlight plaintext"><code>cd SimVascular-build
./mysim -qt</code></pre>
</p>
<p>
<h3 id="buildExternals">SimVascular’s Externals</h3>
<p>SimVascular depends directly on 9 major open source libraries:</p>
<ol>
<li><a href="https://www.tcl.tk">Tcl/Tk</a></li>
<li><a href="https://www.python.org">Python</a></li>
<li><a href="https://www.freetype.org">FreeType</a></li>
<li><a href="http://gdcm.sourceforge.net/wiki/index.php/Main_Page">GDCM</a></li>
<li><a href="https://itk.org">ITK</a></li>
<li><a href="http://www.vtk.org">VTK</a></li>
<li><a href="https://www.mmgtools.org">MMG</a></li>
<li><a href="https://www.opencascade.com">OpenCASCADE</a></li>
<li><a href="http://mitk.org/wiki/MITK">MITK</a></li>
</ol>
<p>Building all of these dependencies can take quite a while; thus, pre-built
binaries are provided for the supported operating systems.</p>
<p>If you want to build all of SimVascular, this information is likely unnecessary and go to <a href="#buildingItAll">building it all</a>.</p>
<h4>Downloading SimVascular’s Externals</h4>
<p>To download the most basic version of the externals, navigate to the externals, create a build directory, and configure:</p>
<pre class="highlight plaintext"><code>cd SimVascularSrc/Externals
mkdir Build
cd Build
ccmake ..</code></pre>
<p>By default, all externals should be set to be downloaded. To turn on and off certain externals, toggle the SV<em>EXTERNALS</em>ENABLE<em>‘External’ variables.</p>
<h4>Building SimVascular’s Externals</h4>
<p>If using pre-built binaries isn’t working for your system, you may need to build your own externals.</p>
<p>To do this, toggle off the SV</em>EXTERNALS<em>DOWNLOAD</em>‘External’ variables.</p>
<p>Building of externals has only been tested on the supported platforms, so there may be difficulties that arrise on other platforms</p>
<p>Note that on Mac you will need to obtain MacPorts with additional libraries, while on linux, additional packages will likely have to be installed with the package manager.</p>
<p>The latest externals source can be downloading frome <a href="http://simvascular.stanford.edu/downloads/public/simvascular/externals/2018.05/src/originals">here</a>.</p>
</p>
<p>
<h3 id="buildSimVascular">Building Standalone SimVascular</h3>
<p>If you choose to build SimVascular by itself, you will have to make sure you have all of SimVascular’s dependencies. If you are using your own versions of some of the externals like ITK, VTK, Python, Tcl, MITK, etc., be very careful. A VTK not built with the same version of Python, or an MITK not built with the corresponding versions of ITK, VTK, and Python can cause significant build issues. In addition, different versions of the externals have varying nuances that could cause both build problems and performance problems. This is why the suggested way to build is with the pre-built externals if possible. If not, the next best solution is to build the externals with the default versions of the externals.</p>
<p>If proceeding, create a build directory and configure the project</p>
<pre class="highlight plaintext"><code>cd SimVascularSrc/Code
mkdir Build
cd Build
ccmake ..</code></pre>
<p>You should come across a series of errors in which you need to specify the location of the externals package. For most externals, the location of the Config.cmake file needs to be specified; however, for TCL, PYTHON, MMG, and FREETYPE, the location of the toplevel directory needs to be specified.</p>
<p><a href="https://github.com/SimVascular/SimVascular/tree/master/Externals/TestWithCMake">Examples</a> of configuration setting can be found in the SimVascular source.</p>
</p></p>
</section>
<section id="compileRun" class="group"><h2>Running SimVascular</h2>
<p>To run SimVascular and other executables you need to run the startup script which will set up the environmnet variables and start the executable. These scripts should be run from the top level of the build directory:</p>
<table class="table table-bordered">
<thead>
<tr>
<th>Executable</th>
<th>Linux/OSX Script</th>
<th>Windows Script</th>
</tr>
</thead>
<tr>
<td>SimVascular</td>
<td>mysim</td>
<td>mysim.bat</td>
</tr>
</table>
</section>
<section id="compileITKVTK" class="group"><h2>Additional Notes</h2>
<h3>Linux: Multiple Compilers</h3>
<p>Some versions of the needed software do not compile correctly using certain
versions of gcc/g++. We use gcc-4.6 to compile many of the external libraries.
It is easy to obtain gcc-4.6 without overwriting your current version using
update-alternatives. Below is an example of how to install both gcc-4.6 and
gcc-4.8 on a ubuntu system.</p>
<pre class="highlight shell"><code>apt-get install c++-4.6 c++-4.8
update-alternatives --remove-all gcc
update-alternatives --remove-all g++
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 10
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
update-alternatives --set cc /usr/bin/gcc
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
update-alternatives --set c++ /usr/bin/g++
update-alternatives --config gcc
update-alternatives --config g++
</code></pre>
<p><br>
<br>
<br>
<br></p>
</section>
</div>
</div>
</div>
<!-- /.container -->
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid text-center">
<ul class="nav navbar-nav">
<li><a>Copyright © SimVascular Development Team - 2017</a></li>
</ul>
</div>
<!-- /.container -->
</nav>
<script src="js/jquery-1.11.0.js" type="text/javascript"></script><script src="js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
$('body').scrollspy({
target: '.bs-docs-sidebar',
offset: 40
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55333921-1', 'auto');
ga('send', 'pageview');
</script>
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>