git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@16053 f3b2605a-c512-4ea7-a41b...
[lammps.git] / doc / src / accelerate_opt.txt
blob704321ca07fdaaa8b62da2d3047c2cb5c479d11d
1 "Previous Section"_Section_packages.html - "LAMMPS WWW Site"_lws -
2 "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
4 :link(lws,http://lammps.sandia.gov)
5 :link(ld,Manual.html)
6 :link(lc,Section_commands.html#comm)
8 :line
10 "Return to Section accelerate overview"_Section_accelerate.html
12 5.3.5 OPT package :h5
14 The OPT package was developed by James Fischer (High Performance
15 Technologies), David Richie, and Vincent Natoli (Stone Ridge
16 Technologies).  It contains a handful of pair styles whose compute()
17 methods were rewritten in C++ templated form to reduce the overhead
18 due to if tests and other conditional code.
20 Here is a quick overview of how to use the OPT package.  More details
21 follow.
23 make yes-opt
24 make mpi                               # build with the OPT package
25 Make.py -v -p opt -o mpi -a file mpi   # or one-line build via Make.py :pre
27 lmp_mpi -sf opt -in in.script                # run in serial
28 mpirun -np 4 lmp_mpi -sf opt -in in.script   # run in parallel :pre
30 [Required hardware/software:]
32 None.
34 [Building LAMMPS with the OPT package:]
36 The lines above illustrate how to build LAMMPS with the OPT package in
37 two steps, using the "make" command.  Or how to do it with one command
38 via the src/Make.py script, described in "Section
39 2.4"_Section_start.html#start_4 of the manual.  Type "Make.py -h" for
40 help.
42 Note that if you use an Intel compiler to build with the OPT package,
43 the CCFLAGS setting in your Makefile.machine must include "-restrict".
44 The Make.py command will add this automatically.
46 [Run with the OPT package from the command line:]
48 As in the lines above, use the "-sf opt" "command-line
49 switch"_Section_start.html#start_7, which will automatically append
50 "opt" to styles that support it.
52 [Or run with the OPT package by editing an input script:]
54 Use the "suffix opt"_suffix.html command, or you can explicitly add an
55 "opt" suffix to individual styles in your input script, e.g.
57 pair_style lj/cut/opt 2.5 :pre
59 [Speed-ups to expect:]
61 You should see a reduction in the "Pair time" value printed at the end
62 of a run.  On most machines for reasonable problem sizes, it will be a
63 5 to 20% savings.
65 [Guidelines for best performance:]
67 Just try out an OPT pair style to see how it performs.
69 [Restrictions:]
71 None.