<spanclass="n">make</span><spanclass="n">mpi</span><spanclass="c1"># build with the OPT package</span>
<spanclass="n">Make</span><spanclass="o">.</span><spanclass="n">py</span><spanclass="o">-</span><spanclass="n">v</span><spanclass="o">-</span><spanclass="n">p</span><spanclass="n">opt</span><spanclass="o">-</span><spanclass="n">o</span><spanclass="n">mpi</span><spanclass="o">-</span><spanclass="n">a</span><spanclass="n">file</span><spanclass="n">mpi</span><spanclass="c1"># or one-line build via Make.py</span>
</pre></div>
</div>
<divclass="highlight-default"><divclass="highlight"><pre><span></span><spanclass="n">lmp_mpi</span><spanclass="o">-</span><spanclass="n">sf</span><spanclass="n">opt</span><spanclass="o">-</span><spanclass="ow">in</span><spanclass="ow">in</span><spanclass="o">.</span><spanclass="n">script</span><spanclass="c1"># run in serial</span>
<spanclass="n">mpirun</span><spanclass="o">-</span><spanclass="n">np</span><spanclass="mi">4</span><spanclass="n">lmp_mpi</span><spanclass="o">-</span><spanclass="n">sf</span><spanclass="n">opt</span><spanclass="o">-</span><spanclass="ow">in</span><spanclass="ow">in</span><spanclass="o">.</span><spanclass="n">script</span><spanclass="c1"># run in parallel</span>
<p><strong>Building LAMMPS with the OPT package:</strong></p>
<p>The lines above illustrate how to build LAMMPS with the OPT package in
two steps, using the “make” command. Or how to do it with one command
via the src/Make.py script, described in <aclass="reference internal"href="Section_start.html#start-4"><spanclass="std std-ref">Section 2.4</span></a> of the manual. Type “Make.py -h” for
help.</p>
<p>Note that if you use an Intel compiler to build with the OPT package,
the CCFLAGS setting in your Makefile.machine must include “-restrict”.
The Make.py command will add this automatically.</p>
<p><strong>Run with the OPT package from the command line:</strong></p>
<p>As in the lines above, use the “-sf opt”<aclass="reference internal"href="Section_start.html#start-7"><spanclass="std std-ref">command-line switch</span></a>, which will automatically append
“opt” to styles that support it.</p>
<p><strong>Or run with the OPT package by editing an input script:</strong></p>
<p>Use the <aclass="reference internal"href="suffix.html"><spanclass="doc">suffix opt</span></a> command, or you can explicitly add an
“opt” suffix to individual styles in your input script, e.g.</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.