"Previous Section"_Section_packages.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line "Return to Section accelerate overview"_Section_accelerate.html 5.3.6 OPT package :h4 The OPT package was developed by James Fischer (High Performance Technologies), David Richie, and Vincent Natoli (Stone Ridge Technologies). It contains a handful of pair styles whose compute() methods were rewritten in C++ templated form to reduce the overhead due to if tests and other conditional code. Here is a quick overview of how to use the OPT package. More details follow. make yes-opt make mpi # build with the OPT package Make.py -v -p opt -o mpi -a file mpi # or one-line build via Make.py :pre lmp_mpi -sf opt -in in.script # run in serial mpirun -np 4 lmp_mpi -sf opt -in in.script # run in parallel :pre [Required hardware/software:] None. [Building LAMMPS with the OPT package:] 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 "Section 2.4"_Section_start.html#start_4 of the manual. Type "Make.py -h" for help. 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. [Run with the OPT package from the command line:] As in the lines above, use the "-sf opt" "command-line switch"_Section_start.html#start_7, which will automatically append "opt" to styles that support it. [Or run with the OPT package by editing an input script:] Use the "suffix opt"_suffix.html command, or you can explicitly add an "opt" suffix to individual styles in your input script, e.g. pair_style lj/cut/opt 2.5 :pre [Speed-ups to expect:] You should see a reduction in the "Pair time" value printed at the end of a run. On most machines for reasonable problem sizes, it will be a 5 to 20% savings. [Guidelines for best performance:] Just try out an OPT pair style to see how it performs. [Restrictions:] None.