-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSourceInstall.html
More file actions
148 lines (146 loc) · 22.4 KB
/
SourceInstall.html
File metadata and controls
148 lines (146 loc) · 22.4 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>MAST: Installation on Mac OS with MacPorts</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MAST
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('SourceInstall.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Installation on Mac OS with MacPorts </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This installs some dependencies using MacPorts followed by installation of PETSc, SLEPc, libMesh and <a class="el" href="namespace_m_a_s_t.html">MAST</a> using source.</p>
<ol type="1">
<li>Install Xcode from Mac App Store.</li>
<li>Install the command line tools to support the rest of the install process. Use Terminal app and type: <div class="fragment"><div class="line">$ xcode-select --install</div></div><!-- fragment --></li>
<li>Download and install <a href="https://www.xquartz.org">XQuartz</a></li>
<li>Download and install <a href="https://www.macports.org/install.php">MacPorts</a></li>
<li>Once installed, open a fresh terminal window and use the following commands to install the dependencies: <div class="fragment"><div class="line">$ sudo port install hdf5</div><div class="line">$ sudo port install boost</div><div class="line">$ sudo port install eigen3</div><div class="line">$ sudo port install cmake</div><div class="line">$ sudo port install openmpi-clang</div></div><!-- fragment --></li>
<li>The following assumes that PETSc, SLEPc, libMesh and <a class="el" href="namespace_m_a_s_t.html">MAST</a> will be installed in the directory: <code>{CODES}</code> If this directory is <code>~/Documents/codes/</code> (Note that in Unix <code>~/</code> is the users home directory), then create it using the following commands: <div class="fragment"><div class="line">$ cd ~/Documents</div><div class="line">$ mkdir codes</div><div class="line">$ cd codes</div></div><!-- fragment --> In the following steps, replace <code>{CODES}</code> with the directory path.</li>
<li>Download <a href="https://www.mcs.anl.gov/petsc/download/index.html">PETSc</a>. This will download the code to <code>~/Downloads</code> directory. Find the file name using command line <div class="fragment"><div class="line">$ ls -lt ~/Downloads</div></div><!-- fragment --> This will list all files in <code>~/Downloads</code> starting with the latest file. The PETSc file will likely have the following format: <code>petsc-*.tar.gz</code>, where <code>*</code> is replaced with the version number. The next step assumes that the file name is <code>{PETSC_FILE}.tar.gz</code>, where <code>{PETSC_FILE}</code> is the initial part of the file name preceding <code>.tar.gz</code>.</li>
<li>Create a directory where PETSc will be built; move <code>{PETSC_FILE}.tar.gz</code> to this directory and extract it. <div class="fragment"><div class="line">$ cd {CODES}</div><div class="line">$ mkdir petsc</div><div class="line">$ cd petsc</div><div class="line">$ mv ~/Downloads/{PETSC_FILE}.tar.gz ./</div></div><!-- fragment --> Replace <code>{PETSC_FILE}</code> with the name found in step 7. <div class="fragment"><div class="line">$ tar -zxf {PETSC_FILE}.tar.gz</div></div><!-- fragment --> This will create a directory by the name of <code>{PETSC_FILE}</code>.</li>
<li>Configure PETSc: <div class="fragment"><div class="line">$ cd {PETSC_FILE}</div></div><!-- fragment --> Create a text file containing the configuration options for PETSc. The following commands use <code>emacs</code> as the text editor to accomplish this task: <div class="fragment"><div class="line">$ emacs petsc_config_options</div></div><!-- fragment --> this will open emacs to edit file <code>petsc_config_options</code></li>
</ol>
<p>Copy and paste the PETSc configuration <a href="#petsc-options">options</a>. Then save these changes by typing <code><ctrl>x<ctrl>s</code>, where <code><ctrl></code> is the <code>Control</code> key. This is <code>Control</code> followed by <code>x</code>, then <code>Control</code> followed by <code>s</code>. Exit the editor by typing <code><ctrl>x<ctrl>c</code>. This is <code>Control</code> followed by <code>x</code>, then <code>Control</code> followed by <code>c</code>. Change the permission of this file to allow execution: </p><div class="fragment"><div class="line">$ chmod +x petsc_config_options</div></div><!-- fragment --><p> Configure petsc by executing this file: </p><div class="fragment"><div class="line">$ ./petsc_config_options</div></div><!-- fragment --><p> This will take some time, during which it will verify all configuration options, download, configure, build and install the external libraries specified in the configuration options. Note that once PETSc finishes configuration, it will list the options in the Terminal window. At the bottom should be the command to build PETSc.</p>
<ol type="1">
<li>Build PETSc by using the instructions provided by PETSc at the end of previous step. Following is the likely format suggested by PETSc, where <code>{PETSC_FILE}</code> is the name identified in 8. In case of any differences, follow PETSc's instructions. <div class="fragment"><div class="line">$ make PETSC_DIR={CODES}/petsc/{PETSC_FILE} PETSC_ARCH=arch-darwin-c-opt all</div></div><!-- fragment --> This will take some time to go through building the library. At the end, PETSc will print the command to install the library built in this step.</li>
<li>Install PETSc by using the instructions from PETSc in previous step. Again, replace <code>{PETSC_FILE}</code> with the name identified in step 8 and in case of any differences, follow the instructions from PETSc. <div class="fragment"><div class="line">$ make PETSC_DIR={CODES}/petsc/{PETSC_FILE} PETSC_ARCH=arch-darwin-c-opt install</div></div><!-- fragment --> This should install all the hearder files in <code>{CODES}/petsc/include</code> and the libraries in <code>{CODES}/petsc/lib</code>.</li>
<li>Download <a href="http://slepc.upv.es/download/">SLEPc</a>. This will download the file in <code>~/Downloads</code> and use the same procedure from step 7 to identify the file name: <div class="fragment"><div class="line">$ ls -lt ~/Downloads</div></div><!-- fragment --> The SLEPc file name should be of the following format: <code>{SLEPC_FILE}.tar.gz</code></li>
<li>Create a directory for building and installation of SLEPc. Move the file there and unpack it. In the following commands, replace <code>{SLEPC_FILE}</code> with the file name identified in the previous step. <div class="fragment"><div class="line">$ cd {CODES}</div><div class="line">$ mkdir slepc</div><div class="line">$ cd slepc</div><div class="line">$ mv ~/Downloads/{SLEPC_FILE}.tar.gz ./</div><div class="line">$ tar -zxf {SLEPC_FILE}.tar.gz</div></div><!-- fragment --> This should extract the code in the directory <code>{SLEPC_FILE}</code>.</li>
<li>Configure SLEPc. In the following commands, relace <code>{CODES}</code> with the full path identified in step 6. <div class="fragment"><div class="line">$ PETSC_DIR={CODES}/petsc ./configure --prefix=${PWD}/../</div></div><!-- fragment --> This will verify the PETSc installation and configure SLEPc for installation in <code>{CODES}/slepc</code>. It will also print the commands to be used for building SLEPc. Use these in the next step.</li>
<li>Build SLEPc: <div class="fragment"><div class="line">$ make SLEPC_DIR=$PWD PETSC_DIR={CODES}/petsc</div></div><!-- fragment --> This will build SLEPc and at the end will print the command to be used for installation of SLEPc.</li>
<li>Install using the instructions from SLEPc at the end of previous step: <div class="fragment"><div class="line">$ make SLEPC_DIR={CODES}/slepc/{SLEPC_FILE} PETSC_DIR={CODES}/petsc install</div></div><!-- fragment --></li>
<li>Download <a href="http://libmesh.github.io/installation.html">libMesh</a>: <div class="fragment"><div class="line">$ cd {CODES}</div><div class="line">$ mkdir libmesh</div><div class="line">$ cd libmesh</div><div class="line">$ git clone git:<span class="comment">//github.com/libMesh/libmesh.git [this will use git to clone the remote repository from GitHub to {CODES}/libmesh/libmesh ]</span></div><div class="line">$ cd libmesh</div></div><!-- fragment --></li>
<li>Configure libMesh. <div class="fragment"><div class="line">$ emacs libmesh_config_options</div></div><!-- fragment --> Copy and paste the contents of the configuration <a href="#libmesh-options">options</a>. Replace <code>{CODES}</code> with its full path identified above. Save: <code><ctrl>x<ctrl>s</code> Exit: <code><ctrl>x<ctrl>c</code> Make this file executable, and then run it. <div class="fragment"><div class="line">$ chmod +x libmesh_config_options</div><div class="line">$ ./libmesh_config_options</div></div><!-- fragment --> This will verify the installation of PETSc, SLEPc, and other dependencies, and configure the build options for libMesh. It will print all configured options on the Terminal. Verify that it is able to identify the correct versions for all dependencies (exodus, hdf5, metis, nemesis, parmetis, petsc, slepc, mpi, etc.)</li>
<li>Build libMesh: <div class="fragment"><div class="line">$ make -j N</div></div><!-- fragment --> Replace <code>N</code> with the number of cores on your machine to enable parallel build. This will build all components of libMesh.</li>
<li>Install libMesh: <div class="fragment"><div class="line">$ make install -j N</div></div><!-- fragment --> Replace <code>N</code> with the number of cores on your machine to enable parallel build.</li>
<li>Download <a class="el" href="namespace_m_a_s_t.html">MAST</a> <div class="fragment"><div class="line">$ cd {CODES}</div><div class="line">$ mkdir mast</div><div class="line">$ cd mast</div><div class="line">$ git clone https:<span class="comment">//github.com/MASTmultiphysics/mast-multiphysics.git</span></div></div><!-- fragment --></li>
<li>Configure <a class="el" href="namespace_m_a_s_t.html">MAST</a> <div class="fragment"><div class="line">$ cd ../</div><div class="line">$ mkdir dbg</div><div class="line">$ cd dbg</div></div><!-- fragment --> Create a file with configuration options for <a class="el" href="namespace_m_a_s_t.html">MAST</a> <div class="fragment"><div class="line">$ emacs mast_config_options</div></div><!-- fragment --> Copy and paste the <a class="el" href="namespace_m_a_s_t.html">MAST</a> configuration <a href="#mast-options">options</a>. Replace <code>{CODES}</code> with the full path Save: <code><ctrl>x<ctrl>s</code> Exit: <code><ctrl>x<ctrl>c</code> Make this file executable and run it: <div class="fragment"><div class="line">$ chmod +x mast_config_options</div><div class="line">$ ./mast_config_options</div></div><!-- fragment --></li>
<li>Build <a class="el" href="namespace_m_a_s_t.html">MAST</a>: <div class="fragment"><div class="line">$ make example_2 -j N</div></div><!-- fragment --> Replace N with the number of cores on your machine to enable parallel build.</li>
<li>Test <a class="el" href="namespace_m_a_s_t.html">MAST</a> by running example_2: <div class="fragment"><div class="line">$ ./examples/example_2/example_2 -ksp_type preonly -pc_type lu</div></div><!-- fragment --></li>
</ol>
<pre class="fragment">PETSC configuration options: (copy and past the content and replace
</pre><p> <code>{CODES}</code> with its path defined above) {: #petsc-options} </p><div class="fragment"><div class="line">python2.7 ./configure \</div><div class="line">--prefix=${PWD}/../ \</div><div class="line">--CC=mpicc-openmpi-clang \</div><div class="line">--CXX=mpicxx-openmpi-clang \</div><div class="line">--FC=mpif90-openmpi-clang \</div><div class="line">--with-fortran=0 \</div><div class="line">--with-mpiexec=/opt/local/bin/mpiexec-openmpi-clang \</div><div class="line">--with-shared-libraries=1 \</div><div class="line">--with-x=1 --with-x-dir=/opt/X11 \</div><div class="line">--with-debugging=0 \</div><div class="line">--with-lapack-lib=/usr/lib/liblapack.dylib \</div><div class="line">--with-blas-lib=/usr/lib/libblas.dylib \</div><div class="line">--download-superlu=yes \</div><div class="line">--download-superlu_dist=yes \</div><div class="line">--download-suitesparse=yes \</div><div class="line">--download-mumps=yes \</div><div class="line">--download-scalapack=yes \</div><div class="line">--download-parmetis=yes \</div><div class="line">--download-metis=yes \</div><div class="line">--download-hypre=yes \</div><div class="line">--download-ml=yes</div></div><!-- fragment --><p>libMesh configuration options: (copy and past the content and replace <code>{CODES}</code> with its path defined above) {: #libmesh-options} </p><div class="fragment"><div class="line">PETSC_DIR={CODES}/petsc \</div><div class="line">SLEPC_DIR={CODES}/slepc \</div><div class="line">FC=mpif90-openmpi-clang \</div><div class="line">F77=mpif90-openmpi-clang \</div><div class="line">CC=mpicc-openmpi-clang \</div><div class="line">CXX=mpicxx-openmpi-clang \</div><div class="line">./configure --prefix=${PWD}/../ \</div><div class="line">--enable-mpi \</div><div class="line">--disable-unique-<span class="keywordtype">id</span> \</div><div class="line">--enable-dependency-tracking \</div><div class="line">--enable-fortran \</div><div class="line">--enable-shared \</div><div class="line">--enable-exceptions \</div><div class="line">--disable-openmp \</div><div class="line">--disable-<span class="keywordflow">default</span>-comm-world \</div><div class="line">--enable-tracefiles \</div><div class="line">--enable-amr \</div><div class="line">--enable-vsmoother \</div><div class="line">--enable-periodic \</div><div class="line">--enable-dirichlet \</div><div class="line">--enable-parmesh \</div><div class="line">--enable-nodeconstraint \</div><div class="line">--enable-ghosted \</div><div class="line">--enable-pfem \</div><div class="line">--enable-ifem \</div><div class="line">--enable-second \</div><div class="line">--enable-xdr \</div><div class="line">--enable-reference-counting \</div><div class="line">--enable-perflog \</div><div class="line">--enable-examples \</div><div class="line">--enable-boost \</div><div class="line">--disable-trilinos \</div><div class="line">--disable-tbb \</div><div class="line">--enable-sfc \</div><div class="line">--disable-tecplot \</div><div class="line">--disable-tecio \</div><div class="line">--enable-metis \</div><div class="line">--enable-parmetis \</div><div class="line">--enable-tetgen \</div><div class="line">--enable-triangle \</div><div class="line">--disable-vtk \</div><div class="line">--enable-hdf5 \</div><div class="line">--enable-libHilbert \</div><div class="line">--enable-nanoflann \</div><div class="line">--enable-exodus \</div><div class="line">--enable-netcdf \</div><div class="line">--enable-petsc \</div><div class="line">--enable-slepc \</div><div class="line">--with-mpi=/opt/local \</div><div class="line">--with-tbb=/opt/local/include/tbb \</div><div class="line">--with-tbb-lib=/opt/local/lib \</div><div class="line">--with-metis=<span class="keyword">internal</span> \</div><div class="line">--with-hdf5=/opt/local/ \</div><div class="line">--with-methods=<span class="stringliteral">"opt dbg"</span></div></div><!-- fragment --><p><a class="el" href="namespace_m_a_s_t.html">MAST</a> configuration options: (copy and past the content and replace <code>{CODES}</code> with its path defined above) {: #mast-options} </p><div class="fragment"><div class="line">export CODES_PATH={CODES} \</div><div class="line">cmake ../mast-multiphysics \</div><div class="line">-DMPI_C_COMPILER=mpicc-openmpi-clang \</div><div class="line">-DMPI_CXX_COMPILER=mpicxx-openmpi-clang \</div><div class="line">-DCMAKE_C_COMPILER=mpicc-openmpi-clang \</div><div class="line">-DCMAKE_CXX_COMPILER=mpicxx-openmpi-clang \</div><div class="line">-DCMAKE_Fortran_COMPILER=mpif90-openmpi-clang \</div><div class="line">-DlibMesh_DIR=${CODES_PATH}/libmesh \</div><div class="line">-DPETSc_DIR=${CODES_PATH}/petsc \</div><div class="line">-DSLEPc_DIR=${CODES_PATH}/slepc \</div><div class="line">-DBOOST_ROOT=/opt/local \</div><div class="line">-DCMAKE_BUILD_TYPE=Debug</div></div><!-- fragment --> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="InstallationPage.html">Installation instructions</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>