| 1 |
|
| 2 |
|
| 3 |
<!DOCTYPE html> |
| 4 |
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| 5 |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| 6 |
<head> |
| 7 |
<meta charset="utf-8"> |
| 8 |
|
| 9 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 10 |
|
| 11 |
<title>Compile LIGGGHTS(R)-PUBLIC for Windows — LIGGGHTS v3.X documentation</title> |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
<link rel="top" title="LIGGGHTS v3.X documentation" href="index.html"/> |
| 36 |
|
| 37 |
|
| 38 |
<script src="_static/js/modernizr.min.js"></script> |
| 39 |
|
| 40 |
</head> |
| 41 |
|
| 42 |
<body class="wy-body-for-nav" role="document"> |
| 43 |
|
| 44 |
|
| 45 |
<div class="wy-grid-for-nav"> |
| 46 |
|
| 47 |
|
| 48 |
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| 49 |
<div class="wy-side-scroll"> |
| 50 |
<div class="wy-side-nav-search"> |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
<a href="Manual.html" class="icon icon-home"> LIGGGHTS |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
</a> |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
<div class="version"> |
| 64 |
v3.X |
| 65 |
</div> |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
<div role="search"> |
| 71 |
<form id="rtd-search-form" class="wy-form" action="search.html" method="get"> |
| 72 |
<input type="text" name="q" placeholder="Search docs" /> |
| 73 |
<input type="hidden" name="check_keywords" value="yes" /> |
| 74 |
<input type="hidden" name="area" value="default" /> |
| 75 |
</form> |
| 76 |
</div> |
| 77 |
|
| 78 |
|
| 79 |
</div> |
| 80 |
|
| 81 |
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
<ul> |
| 89 |
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li> |
| 90 |
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li> |
| 91 |
<li class="toctree-l1"><a class="reference internal" href="Section_input_script.html">3. Input Script</a></li> |
| 92 |
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">4. Commands</a></li> |
| 93 |
<li class="toctree-l1"><a class="reference internal" href="Section_gran_models.html">5. Contact models</a></li> |
| 94 |
<li class="toctree-l1"><a class="reference internal" href="Section_mesh_modules.html">6. Mesh modules</a></li> |
| 95 |
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">7. Packages</a></li> |
| 96 |
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">8. How-to discussions</a></li> |
| 97 |
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">9. Modifying & extending LIGGGHTS(R)-PUBLIC</a></li> |
| 98 |
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">10. Python interface to LIGGGHTS(R)-PUBLIC</a></li> |
| 99 |
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">11. Errors</a></li> |
| 100 |
</ul> |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
</div> |
| 105 |
</div> |
| 106 |
</nav> |
| 107 |
|
| 108 |
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| 109 |
|
| 110 |
|
| 111 |
<nav class="wy-nav-top" role="navigation" aria-label="top navigation"> |
| 112 |
|
| 113 |
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| 114 |
<a href="Manual.html">LIGGGHTS</a> |
| 115 |
|
| 116 |
</nav> |
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
<div class="wy-nav-content"> |
| 121 |
<div class="rst-content"> |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
<div role="navigation" aria-label="breadcrumbs navigation"> |
| 139 |
|
| 140 |
<ul class="wy-breadcrumbs"> |
| 141 |
|
| 142 |
<li><a href="Manual.html">Docs</a> »</li> |
| 143 |
|
| 144 |
<li>Compile LIGGGHTS(R)-PUBLIC for Windows</li> |
| 145 |
|
| 146 |
|
| 147 |
<li class="wy-breadcrumbs-aside"> |
| 148 |
|
| 149 |
|
| 150 |
<a href="_sources/install_liggghts_windows.txt" rel="nofollow"> View page source</a> |
| 151 |
|
| 152 |
<a href="http://www.cfdem.com"> Website</a> |
| 153 |
|
| 154 |
<a href="Section_commands.html#comm" rel="nofollow"> Commands</a> |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
</li> |
| 159 |
|
| 160 |
</ul> |
| 161 |
|
| 162 |
|
| 163 |
<hr/> |
| 164 |
|
| 165 |
</div> |
| 166 |
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| 167 |
<div itemprop="articleBody"> |
| 168 |
|
| 169 |
<div class="section" id="compile-liggghts-r-public-for-windows"> |
| 170 |
<h1>Compile LIGGGHTS(R)-PUBLIC for Windows<a class="headerlink" href="#compile-liggghts-r-public-for-windows" title="Permalink to this headline">¶</a></h1> |
| 171 |
<hr class="docutils" /> |
| 172 |
<div class="section" id="description"> |
| 173 |
<h2>Description:<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2> |
| 174 |
<p>This routine describes how to setup your system in order to compile LIGGGHTS(R)-PUBLIC for Windows.</p> |
| 175 |
</div> |
| 176 |
<div class="section" id="prerequisites"> |
| 177 |
<h2>Prerequisites:<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2> |
| 178 |
<p>All mentioned programs are available for free.</p> |
| 179 |
<div class="section" id="mpi"> |
| 180 |
<h3>MPI:<a class="headerlink" href="#mpi" title="Permalink to this headline">¶</a></h3> |
| 181 |
<p>LIGGGHTS(R)-PUBLIC is a highly parallelized simulation engine. If you want to run simulations in parallel you have to install MPI (Message Passing Interface standard). We suggest to use the implementation of Microsoft, which is available <a class="reference external" href="http://msdn.microsoft.com/en-us/library/bb524831%28v=vs.85%29.aspx">here</a>. You need the binaries and the header files (included in the SDK). Please follow the instructions of the installer.</p> |
| 182 |
</div> |
| 183 |
<div class="section" id="git"> |
| 184 |
<h3>Git:<a class="headerlink" href="#git" title="Permalink to this headline">¶</a></h3> |
| 185 |
<p>GIT is an open-source version control system. We provide LIGGGHTS(R)-PUBLIC via <a class="reference external" href="http://github.com">github</a>. It is to your advantage to use any git program to keep your LIGGGHTS(R)-PUBLIC version up-to-date. We recommend to use <a class="reference external" href="http://git-scm.com">git-scm</a> as it provides a minimum bash environment too.</p> |
| 186 |
<p>You can set up your GIT environment to use the SSH-Keys thus you don’t have to enter your user and password multiple times. Check the GIT GUI documentation for more details.</p> |
| 187 |
<p><strong>Important: Git-scm will ask during installation how it should handle newlines; please use “Checkout as-is, commit Unix-style line endings”.</strong></p> |
| 188 |
</div> |
| 189 |
<div class="section" id="python-or-cygwin"> |
| 190 |
<h3>Python or Cygwin:<a class="headerlink" href="#python-or-cygwin" title="Permalink to this headline">¶</a></h3> |
| 191 |
<p>A python script updates the VS-project, thus you have to install either <a class="reference external" href="https://www.python.org/downloads/windows/">python</a> or <a class="reference external" href="https://www.cygwin.com/">cygwin</a>. In case of cygwin you can use another GIT program, because cygwin provides also a bash environment. The description of the procedure assumes that you have installed cygwin.</p> |
| 192 |
</div> |
| 193 |
<div class="section" id="visual-studio"> |
| 194 |
<h3>Visual studio:<a class="headerlink" href="#visual-studio" title="Permalink to this headline">¶</a></h3> |
| 195 |
<p>To compile LIGGGHTS(R)-PUBLIC you need a development environment. You can download Microsoft Visual Studio Express (current version: Express 2013 with Update 4 for Windows Desktop) for free from <a class="reference external" href="http://www.visualstudio.com">www.visualstudio.com</a>. Therefore, you have to create an Microsoft account.</p> |
| 196 |
</div> |
| 197 |
<div class="section" id="vtk-support"> |
| 198 |
<h3>VTK support:<a class="headerlink" href="#vtk-support" title="Permalink to this headline">¶</a></h3> |
| 199 |
<p>A detailed description how to compile LIGGGHTS(R)-PUBLIC with VTK support will follow here.</p> |
| 200 |
</div> |
| 201 |
</div> |
| 202 |
<div class="section" id="procedure"> |
| 203 |
<h2>Procedure:<a class="headerlink" href="#procedure" title="Permalink to this headline">¶</a></h2> |
| 204 |
<p>Basically the following steps have to be performed:</p> |
| 205 |
<ul class="simple"> |
| 206 |
<li>download/clone your repository from <a class="reference external" href="http://github.com">github</a></li> |
| 207 |
<li>update auto-generated header-files</li> |
| 208 |
<li>update your VS-project</li> |
| 209 |
<li>compile your LIGGGHTS(R)-PUBLIC version</li> |
| 210 |
</ul> |
| 211 |
<div class="section" id="download-clone-your-liggghts-r-public-version"> |
| 212 |
<h3>Download/clone your LIGGGHTS(R)-PUBLIC version:<a class="headerlink" href="#download-clone-your-liggghts-r-public-version" title="Permalink to this headline">¶</a></h3> |
| 213 |
<p>In this tutorial we use the suggested <a class="reference external" href="http://git-scm.com">git-scm</a>. You can use either the <em>Git GUI</em> or the <em>Git Bash</em>. In case of a bash you can follow the instructions in the documentation <a class="reference external" href="githubAccess_non-public.html">githubAccess_non-public</a>. Otherwise copy the link to your repository, for instance <em>https://github.com/CFDEMproject/LIGGGHTS-COMPANY.git</em>, into the <em>Git GUI</em> and save the repository at your computer, e.g. <em>C:/repositories/LIGGGHTS-COMPANY</em>.</p> |
| 214 |
<p>In the directory <em>LIGGGHTS-COMPANY/src/WINDOWS</em> you find an README, which describes the following steps in detail.</p> |
| 215 |
</div> |
| 216 |
<div class="section" id="update-auto-generated-header-files"> |
| 217 |
<h3>Update auto-generated header-files:<a class="headerlink" href="#update-auto-generated-header-files" title="Permalink to this headline">¶</a></h3> |
| 218 |
<p>Start <em>cygwin</em> and change your current directory to the src-directory inside of your repository, for instance</p> |
| 219 |
<div class="highlight-python"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">cygdrive</span><span class="o">/</span><span class="n">c</span><span class="o">/</span><span class="n">repositories</span><span class="o">/</span><span class="n">LIGGGHTS</span><span class="o">-</span><span class="n">COMPANY</span><span class="o">/</span><span class="n">src</span> |
| 220 |
</pre></div> |
| 221 |
</div> |
| 222 |
<p>Update the header files by</p> |
| 223 |
<div class="highlight-python"><div class="highlight"><pre>sh Make.sh styles |
| 224 |
sh Make.sh models |
| 225 |
</pre></div> |
| 226 |
</div> |
| 227 |
<p>You can check the files by</p> |
| 228 |
<div class="highlight-python"><div class="highlight"><pre>ls style_* |
| 229 |
</pre></div> |
| 230 |
</div> |
| 231 |
<p>which should output a list of style file headers.</p> |
| 232 |
</div> |
| 233 |
<div class="section" id="update-your-vs-project"> |
| 234 |
<h3>Update your VS-project:<a class="headerlink" href="#update-your-vs-project" title="Permalink to this headline">¶</a></h3> |
| 235 |
<p>In order to update the Visual Studio project in die WINDOWS directory run following commands (still in cygwin):</p> |
| 236 |
<div class="highlight-python"><div class="highlight"><pre>cd WINDOWS |
| 237 |
python update_project.py LIGGGHTS.vcxproj |
| 238 |
</pre></div> |
| 239 |
</div> |
| 240 |
</div> |
| 241 |
<div class="section" id="compile-your-liggghts-r-public-version"> |
| 242 |
<h3>Compile your LIGGGHTS(R)-PUBLIC version:<a class="headerlink" href="#compile-your-liggghts-r-public-version" title="Permalink to this headline">¶</a></h3> |
| 243 |
<p>Finally to compile your LIGGGHTS(R)-PUBLIC version open the file <em>LIGGGHTS_VS2013.sln</em> with Visual Studio.</p> |
| 244 |
<p>To compile with MPI:</p> |
| 245 |
<ol class="arabic simple"> |
| 246 |
<li>Switch to the correct setting for your system. <em>Debug</em> or <em>Release</em> and <em>32bit</em> or <em>64bit</em>.</li> |
| 247 |
</ol> |
| 248 |
<p>#. Check if the MPI include and lib directories are correctly set in the project properties of LIGGGHTS(R)-PUBLIC - Open the <em>LIGGGHTS/Properties</em> and go to <em>Configuration Properties/VC++ Directories</em>. |
| 249 |
For instance, a common include path is <em>C:Program Files x86Microsoft SDKsMPIInclude</em>. |
| 250 |
#. Build the LIGGGHTS(R)-PUBLIC project.</p> |
| 251 |
<p>To compile without MPI:</p> |
| 252 |
<ol class="arabic simple"> |
| 253 |
<li>Build the STUBS project.</li> |
| 254 |
<li>Build LIGGGHTS(R)-PUBLIC using Debug_STUBS or Release_STUBS configurations from the provided project. (use x64 for 64bit binary)</li> |
| 255 |
</ol> |
| 256 |
<p>You have now generated the executable <strong>LIGGGHTS.exe</strong> in the sub-directory <em>LIGGGHTS-COMPANYsrcWINDOWSRelease</em>. You can add this directory to your PATH environment variable to shorten the call command.</p> |
| 257 |
</div> |
| 258 |
<div class="section" id="run-an-example"> |
| 259 |
<h3>Run an example<a class="headerlink" href="#run-an-example" title="Permalink to this headline">¶</a></h3> |
| 260 |
<p>You can start a LIGGGHTS(R)-PUBLIC simulation inside of <em>cygwin</em> or a <em>command prompt</em> (search for cmd.exe). |
| 261 |
Assuming you use your cygwin, change to one example in your repository.</p> |
| 262 |
<div class="highlight-python"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">cygdrive</span><span class="o">/</span><span class="n">c</span><span class="o">/</span><span class="n">repositories</span><span class="o">/</span><span class="n">LIGGGHTS</span><span class="o">-</span><span class="n">COMPANY</span><span class="o">/</span><span class="n">examples</span><span class="o">/</span><span class="n">LIGGGHTS</span><span class="o">/</span><span class="n">Tutorials_public</span><span class="o">/</span><span class="n">chute_wear</span> |
| 263 |
</pre></div> |
| 264 |
</div> |
| 265 |
<p>and start the simulation by</p> |
| 266 |
<div class="highlight-python"><div class="highlight"><pre>/cygdrive/c/repositories/LIGGGHTS-COMPANY/src/WINDOWS/Release/LIGGGHTS.exe -in in.chute_wear |
| 267 |
</pre></div> |
| 268 |
</div> |
| 269 |
<p>If you added the Release-folder to your PATH variable the command shortens to</p> |
| 270 |
<div class="highlight-python"><div class="highlight"><pre>LIGGGHTS.exe -in in.chute_wear |
| 271 |
</pre></div> |
| 272 |
</div> |
| 273 |
</div> |
| 274 |
</div> |
| 275 |
<hr class="docutils" /> |
| 276 |
<div class="section" id="questions"> |
| 277 |
<h2>Questions?<a class="headerlink" href="#questions" title="Permalink to this headline">¶</a></h2> |
| 278 |
<p>If any questions remain, contact us.</p> |
| 279 |
</div> |
| 280 |
</div> |
| 281 |
|
| 282 |
|
| 283 |
</div> |
| 284 |
<div class="articleComments"> |
| 285 |
|
| 286 |
</div> |
| 287 |
</div> |
| 288 |
<footer> |
| 289 |
|
| 290 |
|
| 291 |
<hr/> |
| 292 |
|
| 293 |
<div role="contentinfo"> |
| 294 |
<p> |
| 295 |
© Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation. |
| 296 |
|
| 297 |
</p> |
| 298 |
</div> |
| 299 |
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| 300 |
|
| 301 |
</footer> |
| 302 |
|
| 303 |
</div> |
| 304 |
</div> |
| 305 |
|
| 306 |
</section> |
| 307 |
|
| 308 |
</div> |
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
<script type="text/javascript"> |
| 315 |
var DOCUMENTATION_OPTIONS = { |
| 316 |
URL_ROOT:'./', |
| 317 |
VERSION:'v3.X', |
| 318 |
LANGUAGE:'None', |
| 319 |
COLLAPSE_INDEX:false, |
| 320 |
FILE_SUFFIX:'.html', |
| 321 |
HAS_SOURCE: true, |
| 322 |
SOURCELINK_SUFFIX: '' |
| 323 |
}; |
| 324 |
</script> |
| 325 |
<script type="text/javascript" src="_static/jquery.js"></script> |
| 326 |
<script type="text/javascript" src="_static/underscore.js"></script> |
| 327 |
<script type="text/javascript" src="_static/doctools.js"></script> |
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
<script type="text/javascript" src="_static/js/theme.js"></script> |
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
<script type="text/javascript"> |
| 339 |
jQuery(function () { |
| 340 |
SphinxRtdTheme.StickyNav.enable(); |
| 341 |
}); |
| 342 |
</script> |
| 343 |
|
| 344 |
|
| 345 |
</body> |
| 346 |
</html> |