Merge remote-tracking branch 'lammps-ro/master' into lammps-icms
#Resolved Conflicts: # doc/Manual.txt # src/MAKE/MACHINES/Makefile.mingw32-cross # src/MAKE/MACHINES/Makefile.mingw32-cross-mpi # src/MAKE/MACHINES/Makefile.mingw64-cross # src/MAKE/MACHINES/Makefile.mingw64-cross-mpi # src/MAKE/MINE/Makefile.g++ # src/MAKE/Makefile.mpi # src/MAKE/Makefile.serial # src/Make.py # src/Makefile
BIN
doc/JPG/tutorial_branch.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
doc/JPG/tutorial_fork.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
doc/JPG/tutorial_https_block.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
doc/JPG/tutorial_merged.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
doc/JPG/tutorial_pull_request2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
doc/JPG/tutorial_pull_request3.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
doc/JPG/tutorial_pull_request4.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
doc/JPG/tutorial_pull_request_feature_branch1.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
@ -135,7 +135,7 @@
|
|||||||
<H1></H1><div class="section" id="lammps-documentation">
|
<H1></H1><div class="section" id="lammps-documentation">
|
||||||
<h1>LAMMPS-ICMS Documentation<a class="headerlink" href="#lammps-documentation" title="Permalink to this headline">¶</a></h1>
|
<h1>LAMMPS-ICMS Documentation<a class="headerlink" href="#lammps-documentation" title="Permalink to this headline">¶</a></h1>
|
||||||
<div class="section" id="mar-2016-version">
|
<div class="section" id="mar-2016-version">
|
||||||
<h2>1 Mar 2016 version<a class="headerlink" href="#mar-2016-version" title="Permalink to this headline">¶</a></h2>
|
<h2>10 Mar 2016 version<a class="headerlink" href="#mar-2016-version" title="Permalink to this headline">¶</a></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="version-info">
|
<div class="section" id="version-info">
|
||||||
<h2>Version info:<a class="headerlink" href="#version-info" title="Permalink to this headline">¶</a></h2>
|
<h2>Version info:<a class="headerlink" href="#version-info" title="Permalink to this headline">¶</a></h2>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<!-- HTML_ONLY -->
|
<!-- HTML_ONLY -->
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE>LAMMPS-ICMS Users Manual</TITLE>
|
<TITLE>LAMMPS-ICMS Users Manual</TITLE>
|
||||||
<META NAME="docnumber" CONTENT="1 Mar 2016 version">
|
<META NAME="docnumber" CONTENT="10 Mar 2016 version">
|
||||||
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
|
||||||
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
|
||||||
</HEAD>
|
</HEAD>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<H1></H1>
|
<H1></H1>
|
||||||
|
|
||||||
LAMMPS-ICMS Documentation :c,h3
|
LAMMPS-ICMS Documentation :c,h3
|
||||||
1 Mar 2016 version :c,h4
|
10 Mar 2016 version :c,h4
|
||||||
|
|
||||||
Version info: :h4
|
Version info: :h4
|
||||||
|
|
||||||
|
|||||||
@ -1059,18 +1059,20 @@ then be accessed by variables) was discussed
|
|||||||
<span id="mod-15"></span><h2>10.15. Submitting new features for inclusion in LAMMPS<a class="headerlink" href="#submitting-new-features-for-inclusion-in-lammps" title="Permalink to this headline">¶</a></h2>
|
<span id="mod-15"></span><h2>10.15. Submitting new features for inclusion in LAMMPS<a class="headerlink" href="#submitting-new-features-for-inclusion-in-lammps" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>We encourage users to submit new features to <a class="reference external" href="http://lammps.sandia.gov/authors.html">the developers</a> that they add to
|
<p>We encourage users to submit new features to <a class="reference external" href="http://lammps.sandia.gov/authors.html">the developers</a> that they add to
|
||||||
LAMMPS, especially if you think they will be of interest to other
|
LAMMPS, especially if you think they will be of interest to other
|
||||||
users. If they are broadly useful we may add them as core files to
|
users. The preferred way to do this is via GitHub. Once you have
|
||||||
LAMMPS or as part of a <a class="reference internal" href="Section_start.html#start-3"><span>standard package</span></a>.
|
prepared the content described below, see <code class="xref doc docutils literal"><span class="pre">this</span> <span class="pre">tutorial</span></code> for instructions on how to submit
|
||||||
Else we will add them as a user-contributed file or package. Examples
|
your changes or new files.</p>
|
||||||
of user packages are in src sub-directories that start with USER. The
|
<p>If the new features/files are broadly useful we may add them as core
|
||||||
USER-MISC package is simply a collection of (mostly) unrelated single
|
files to LAMMPS or as part of a <a class="reference internal" href="Section_start.html#start-3"><span>standard package</span></a>. Else we will add them as a
|
||||||
files, which is the simplest way to have your contribution quickly
|
user-contributed file or package. Examples of user packages are in
|
||||||
added to the LAMMPS distribution. You can see a list of the both
|
src sub-directories that start with USER. The USER-MISC package is
|
||||||
standard and user packages by typing “make package” in the LAMMPS src
|
simply a collection of (mostly) unrelated single files, which is the
|
||||||
directory.</p>
|
simplest way to have your contribution quickly added to the LAMMPS
|
||||||
<p>Note that by providing us the files to release, you are agreeing to
|
distribution. You can see a list of the both standard and user
|
||||||
make them open-source, i.e. we can release them under the terms of the
|
packages by typing “make package” in the LAMMPS src directory.</p>
|
||||||
GPL, used as a license for the rest of LAMMPS. See <a class="reference internal" href="Section_intro.html#intro-4"><span>Section 1.4</span></a> for details.</p>
|
<p>Note that by providing us files to release, you are agreeing to make
|
||||||
|
them open-source, i.e. we can release them under the terms of the GPL,
|
||||||
|
used as a license for the rest of LAMMPS. See <a class="reference internal" href="Section_intro.html#intro-4"><span>Section 1.4</span></a> for details.</p>
|
||||||
<p>With user packages and files, all we are really providing (aside from
|
<p>With user packages and files, all we are really providing (aside from
|
||||||
the fame and fortune that accompanies having your name in the source
|
the fame and fortune that accompanies having your name in the source
|
||||||
code and on the <a class="reference external" href="http://lammps.sandia.gov/authors.html">Authors page</a>
|
code and on the <a class="reference external" href="http://lammps.sandia.gov/authors.html">Authors page</a>
|
||||||
|
|||||||
@ -624,19 +624,24 @@ then be accessed by variables) was discussed
|
|||||||
We encourage users to submit new features to "the
|
We encourage users to submit new features to "the
|
||||||
developers"_http://lammps.sandia.gov/authors.html that they add to
|
developers"_http://lammps.sandia.gov/authors.html that they add to
|
||||||
LAMMPS, especially if you think they will be of interest to other
|
LAMMPS, especially if you think they will be of interest to other
|
||||||
users. If they are broadly useful we may add them as core files to
|
users. The preferred way to do this is via GitHub. Once you have
|
||||||
LAMMPS or as part of a "standard package"_Section_start.html#start_3.
|
prepared the content described below, see "this
|
||||||
Else we will add them as a user-contributed file or package. Examples
|
tutorial"_doc/tutorial_github.html for instructions on how to submit
|
||||||
of user packages are in src sub-directories that start with USER. The
|
your changes or new files.
|
||||||
USER-MISC package is simply a collection of (mostly) unrelated single
|
|
||||||
files, which is the simplest way to have your contribution quickly
|
|
||||||
added to the LAMMPS distribution. You can see a list of the both
|
|
||||||
standard and user packages by typing "make package" in the LAMMPS src
|
|
||||||
directory.
|
|
||||||
|
|
||||||
Note that by providing us the files to release, you are agreeing to
|
If the new features/files are broadly useful we may add them as core
|
||||||
make them open-source, i.e. we can release them under the terms of the
|
files to LAMMPS or as part of a "standard
|
||||||
GPL, used as a license for the rest of LAMMPS. See "Section
|
package"_Section_start.html#start_3. Else we will add them as a
|
||||||
|
user-contributed file or package. Examples of user packages are in
|
||||||
|
src sub-directories that start with USER. The USER-MISC package is
|
||||||
|
simply a collection of (mostly) unrelated single files, which is the
|
||||||
|
simplest way to have your contribution quickly added to the LAMMPS
|
||||||
|
distribution. You can see a list of the both standard and user
|
||||||
|
packages by typing "make package" in the LAMMPS src directory.
|
||||||
|
|
||||||
|
Note that by providing us files to release, you are agreeing to make
|
||||||
|
them open-source, i.e. we can release them under the terms of the GPL,
|
||||||
|
used as a license for the rest of LAMMPS. See "Section
|
||||||
1.4"_Section_intro.html#intro_4 for details.
|
1.4"_Section_intro.html#intro_4 for details.
|
||||||
|
|
||||||
With user packages and files, all we are really providing (aside from
|
With user packages and files, all we are really providing (aside from
|
||||||
|
|||||||
BIN
doc/_images/tutorial_branch.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
doc/_images/tutorial_fork.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
doc/_images/tutorial_https_block.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
doc/_images/tutorial_merged.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
doc/_images/tutorial_pull_request2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
doc/_images/tutorial_pull_request3.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
doc/_images/tutorial_pull_request4.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
doc/_images/tutorial_pull_request_feature_branch1.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
@ -844,19 +844,22 @@ Submitting new features for inclusion in LAMMPS
|
|||||||
|
|
||||||
We encourage users to submit new features to `the developers <http://lammps.sandia.gov/authors.html>`_ that they add to
|
We encourage users to submit new features to `the developers <http://lammps.sandia.gov/authors.html>`_ that they add to
|
||||||
LAMMPS, especially if you think they will be of interest to other
|
LAMMPS, especially if you think they will be of interest to other
|
||||||
users. If they are broadly useful we may add them as core files to
|
users. The preferred way to do this is via GitHub. Once you have
|
||||||
LAMMPS or as part of a :ref:`standard package <start_3>`.
|
prepared the content described below, see :doc:`this tutorial <doc/tutorial_github>` for instructions on how to submit
|
||||||
Else we will add them as a user-contributed file or package. Examples
|
your changes or new files.
|
||||||
of user packages are in src sub-directories that start with USER. The
|
|
||||||
USER-MISC package is simply a collection of (mostly) unrelated single
|
|
||||||
files, which is the simplest way to have your contribution quickly
|
|
||||||
added to the LAMMPS distribution. You can see a list of the both
|
|
||||||
standard and user packages by typing "make package" in the LAMMPS src
|
|
||||||
directory.
|
|
||||||
|
|
||||||
Note that by providing us the files to release, you are agreeing to
|
If the new features/files are broadly useful we may add them as core
|
||||||
make them open-source, i.e. we can release them under the terms of the
|
files to LAMMPS or as part of a :ref:`standard package <start_3>`. Else we will add them as a
|
||||||
GPL, used as a license for the rest of LAMMPS. See :ref:`Section 1.4 <intro_4>` for details.
|
user-contributed file or package. Examples of user packages are in
|
||||||
|
src sub-directories that start with USER. The USER-MISC package is
|
||||||
|
simply a collection of (mostly) unrelated single files, which is the
|
||||||
|
simplest way to have your contribution quickly added to the LAMMPS
|
||||||
|
distribution. You can see a list of the both standard and user
|
||||||
|
packages by typing "make package" in the LAMMPS src directory.
|
||||||
|
|
||||||
|
Note that by providing us files to release, you are agreeing to make
|
||||||
|
them open-source, i.e. we can release them under the terms of the GPL,
|
||||||
|
used as a license for the rest of LAMMPS. See :ref:`Section 1.4 <intro_4>` for details.
|
||||||
|
|
||||||
With user packages and files, all we are really providing (aside from
|
With user packages and files, all we are really providing (aside from
|
||||||
the fame and fortune that accompanies having your name in the source
|
the fame and fortune that accompanies having your name in the source
|
||||||
|
|||||||
@ -36,9 +36,9 @@ Syntax
|
|||||||
itype = atom type (1-N) to assign to this basis atom
|
itype = atom type (1-N) to assign to this basis atom
|
||||||
*remap* value = *yes* or *no*
|
*remap* value = *yes* or *no*
|
||||||
*var* value = name = variable name to evaluate for test of atom creation
|
*var* value = name = variable name to evaluate for test of atom creation
|
||||||
*set* values = dim vname
|
*set* values = dim name
|
||||||
dim = *x* or *y* or *z*
|
dim = *x* or *y* or *z*
|
||||||
name = name of variable to set with x,y,z atom position
|
name = name of variable to set with x, y, or z atom position
|
||||||
*rotate* values = Rx Ry Rz theta
|
*rotate* values = Rx Ry Rz theta
|
||||||
Rx,Ry,Rz = rotation vector for single molecule
|
Rx,Ry,Rz = rotation vector for single molecule
|
||||||
theta = rotation angle for single molecule (degrees)
|
theta = rotation angle for single molecule (degrees)
|
||||||
@ -203,16 +203,17 @@ box, it will mapped back into the box, assuming the relevant
|
|||||||
dimensions are periodic. If it is set to *no*, no remapping is done
|
dimensions are periodic. If it is set to *no*, no remapping is done
|
||||||
and no particle is created if its position is outside the box.
|
and no particle is created if its position is outside the box.
|
||||||
|
|
||||||
The *var* and *set* keywords can be used to provide a criterion for
|
The *var* and *set* keywords can be used together to provide a
|
||||||
accepting or rejecting the addition of an individual atom, based on
|
criterion for accepting or rejecting the addition of an individual
|
||||||
its coordinates. The *vname* specified for the *var* keyword is the
|
atom, based on its coordinates. The *name* specified for the *var*
|
||||||
name of an :doc:`equal-style variable <variable>` which should evaluate
|
keyword is the name of an :doc:`equal-style variable <variable>` which
|
||||||
to a zero or non-zero value based on one or two or three variables
|
should evaluate to a zero or non-zero value based on one or two or
|
||||||
which will store the x, y, or z coordinates of an atom (one variable
|
three variables which will store the x, y, or z coordinates of an atom
|
||||||
per coordinate). These other variables must be :doc:`equal-style variables <variable>` defined in the input script, but their
|
(one variable per coordinate). If used, these other variables must be
|
||||||
formula can by anything. The *set* keyword is used to identify the
|
:doc:`equal-style variables <variable>` defined in the input script, but
|
||||||
names of these other variables, one variable for the x-coordinate of a
|
their formula can by anything. The *set* keyword is used to identify
|
||||||
created atom, one for y, and one for z.
|
the names of these other variables, one variable for the x-coordinate
|
||||||
|
of a created atom, one for y, and one for z.
|
||||||
|
|
||||||
When an atom is created, its x, y, or z coordinates override the
|
When an atom is created, its x, y, or z coordinates override the
|
||||||
formula for any *set* variable that is defined. The *var* variable is
|
formula for any *set* variable that is defined. The *var* variable is
|
||||||
|
|||||||
@ -159,9 +159,9 @@
|
|||||||
itype = atom type (1-N) to assign to this basis atom
|
itype = atom type (1-N) to assign to this basis atom
|
||||||
<em>remap</em> value = <em>yes</em> or <em>no</em>
|
<em>remap</em> value = <em>yes</em> or <em>no</em>
|
||||||
<em>var</em> value = name = variable name to evaluate for test of atom creation
|
<em>var</em> value = name = variable name to evaluate for test of atom creation
|
||||||
<em>set</em> values = dim vname
|
<em>set</em> values = dim name
|
||||||
dim = <em>x</em> or <em>y</em> or <em>z</em>
|
dim = <em>x</em> or <em>y</em> or <em>z</em>
|
||||||
name = name of variable to set with x,y,z atom position
|
name = name of variable to set with x, y, or z atom position
|
||||||
<em>rotate</em> values = Rx Ry Rz theta
|
<em>rotate</em> values = Rx Ry Rz theta
|
||||||
Rx,Ry,Rz = rotation vector for single molecule
|
Rx,Ry,Rz = rotation vector for single molecule
|
||||||
theta = rotation angle for single molecule (degrees)
|
theta = rotation angle for single molecule (degrees)
|
||||||
@ -303,16 +303,17 @@ to <em>yes</em>, then if the specified position is outside the simulation
|
|||||||
box, it will mapped back into the box, assuming the relevant
|
box, it will mapped back into the box, assuming the relevant
|
||||||
dimensions are periodic. If it is set to <em>no</em>, no remapping is done
|
dimensions are periodic. If it is set to <em>no</em>, no remapping is done
|
||||||
and no particle is created if its position is outside the box.</p>
|
and no particle is created if its position is outside the box.</p>
|
||||||
<p>The <em>var</em> and <em>set</em> keywords can be used to provide a criterion for
|
<p>The <em>var</em> and <em>set</em> keywords can be used together to provide a
|
||||||
accepting or rejecting the addition of an individual atom, based on
|
criterion for accepting or rejecting the addition of an individual
|
||||||
its coordinates. The <em>vname</em> specified for the <em>var</em> keyword is the
|
atom, based on its coordinates. The <em>name</em> specified for the <em>var</em>
|
||||||
name of an <a class="reference internal" href="variable.html"><em>equal-style variable</em></a> which should evaluate
|
keyword is the name of an <a class="reference internal" href="variable.html"><em>equal-style variable</em></a> which
|
||||||
to a zero or non-zero value based on one or two or three variables
|
should evaluate to a zero or non-zero value based on one or two or
|
||||||
which will store the x, y, or z coordinates of an atom (one variable
|
three variables which will store the x, y, or z coordinates of an atom
|
||||||
per coordinate). These other variables must be <a class="reference internal" href="variable.html"><em>equal-style variables</em></a> defined in the input script, but their
|
(one variable per coordinate). If used, these other variables must be
|
||||||
formula can by anything. The <em>set</em> keyword is used to identify the
|
<a class="reference internal" href="variable.html"><em>equal-style variables</em></a> defined in the input script, but
|
||||||
names of these other variables, one variable for the x-coordinate of a
|
their formula can by anything. The <em>set</em> keyword is used to identify
|
||||||
created atom, one for y, and one for z.</p>
|
the names of these other variables, one variable for the x-coordinate
|
||||||
|
of a created atom, one for y, and one for z.</p>
|
||||||
<p>When an atom is created, its x, y, or z coordinates override the
|
<p>When an atom is created, its x, y, or z coordinates override the
|
||||||
formula for any <em>set</em> variable that is defined. The <em>var</em> variable is
|
formula for any <em>set</em> variable that is defined. The <em>var</em> variable is
|
||||||
then evaluated. If the returned value is 0.0, the atom is not
|
then evaluated. If the returned value is 0.0, the atom is not
|
||||||
|
|||||||
@ -33,9 +33,9 @@ keyword = {mol} or {basis} or {remap} or {var} or {set} or {units} :l
|
|||||||
itype = atom type (1-N) to assign to this basis atom
|
itype = atom type (1-N) to assign to this basis atom
|
||||||
{remap} value = {yes} or {no}
|
{remap} value = {yes} or {no}
|
||||||
{var} value = name = variable name to evaluate for test of atom creation
|
{var} value = name = variable name to evaluate for test of atom creation
|
||||||
{set} values = dim vname
|
{set} values = dim name
|
||||||
dim = {x} or {y} or {z}
|
dim = {x} or {y} or {z}
|
||||||
name = name of variable to set with x,y,z atom position
|
name = name of variable to set with x, y, or z atom position
|
||||||
{rotate} values = Rx Ry Rz theta
|
{rotate} values = Rx Ry Rz theta
|
||||||
Rx,Ry,Rz = rotation vector for single molecule
|
Rx,Ry,Rz = rotation vector for single molecule
|
||||||
theta = rotation angle for single molecule (degrees)
|
theta = rotation angle for single molecule (degrees)
|
||||||
@ -188,17 +188,17 @@ box, it will mapped back into the box, assuming the relevant
|
|||||||
dimensions are periodic. If it is set to {no}, no remapping is done
|
dimensions are periodic. If it is set to {no}, no remapping is done
|
||||||
and no particle is created if its position is outside the box.
|
and no particle is created if its position is outside the box.
|
||||||
|
|
||||||
The {var} and {set} keywords can be used to provide a criterion for
|
The {var} and {set} keywords can be used together to provide a
|
||||||
accepting or rejecting the addition of an individual atom, based on
|
criterion for accepting or rejecting the addition of an individual
|
||||||
its coordinates. The {vname} specified for the {var} keyword is the
|
atom, based on its coordinates. The {name} specified for the {var}
|
||||||
name of an "equal-style variable"_variable.html which should evaluate
|
keyword is the name of an "equal-style variable"_variable.html which
|
||||||
to a zero or non-zero value based on one or two or three variables
|
should evaluate to a zero or non-zero value based on one or two or
|
||||||
which will store the x, y, or z coordinates of an atom (one variable
|
three variables which will store the x, y, or z coordinates of an atom
|
||||||
per coordinate). These other variables must be "equal-style
|
(one variable per coordinate). If used, these other variables must be
|
||||||
variables"_variable.html defined in the input script, but their
|
"equal-style variables"_variable.html defined in the input script, but
|
||||||
formula can by anything. The {set} keyword is used to identify the
|
their formula can by anything. The {set} keyword is used to identify
|
||||||
names of these other variables, one variable for the x-coordinate of a
|
the names of these other variables, one variable for the x-coordinate
|
||||||
created atom, one for y, and one for z.
|
of a created atom, one for y, and one for z.
|
||||||
|
|
||||||
When an atom is created, its x, y, or z coordinates override the
|
When an atom is created, its x, y, or z coordinates override the
|
||||||
formula for any {set} variable that is defined. The {var} variable is
|
formula for any {set} variable that is defined. The {var} variable is
|
||||||
|
|||||||
362
doc/tutorial_github.html
Normal file
@ -0,0 +1,362 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
||||||
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<title>LAMMPS GitHub tutorial — LAMMPS documentation</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="top" title="LAMMPS documentation" href="index.html"/>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="_static/js/modernizr.min.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
|
||||||
|
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="Manual.html" class="icon icon-home"> LAMMPS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div role="search">
|
||||||
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" />
|
||||||
|
<input type="hidden" name="check_keywords" value="yes" />
|
||||||
|
<input type="hidden" name="area" value="default" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance & scalability</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying & extending LAMMPS</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
|
||||||
|
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="Manual.html">LAMMPS</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content">
|
||||||
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href="Manual.html">Docs</a> »</li>
|
||||||
|
|
||||||
|
<li>LAMMPS GitHub tutorial</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
|
||||||
|
|
||||||
|
<a href="http://lammps.sandia.gov">Website</a>
|
||||||
|
<a href="Section_commands.html#comm">Commands</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div itemprop="articleBody">
|
||||||
|
|
||||||
|
<div class="section" id="lammps-github-tutorial">
|
||||||
|
<h1>LAMMPS GitHub tutorial<a class="headerlink" href="#lammps-github-tutorial" title="Permalink to this headline">¶</a></h1>
|
||||||
|
<div class="section" id="written-by-stefan-paquay">
|
||||||
|
<h2>written by Stefan Paquay<a class="headerlink" href="#written-by-stefan-paquay" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<hr class="docutils" />
|
||||||
|
<p>This document briefly describes how to use GitHub to merge changes
|
||||||
|
into LAMMPS using GitHub. It assumes that you are familiar with
|
||||||
|
git. You may want to have a look at the <a class="reference external" href="http://git-scm.com/book/">Git book</a> to reacquaint yourself.</p>
|
||||||
|
<hr class="docutils" />
|
||||||
|
<div class="section" id="making-an-account">
|
||||||
|
<h3>Making an account<a class="headerlink" href="#making-an-account" title="Permalink to this headline">¶</a></h3>
|
||||||
|
<p>First of all, you need a GitHub account. This is fairly simple, just
|
||||||
|
go to <a class="reference external" href="https://github.com">GitHub</a> and create an account by clicking
|
||||||
|
the <a href="#id1"><span class="problematic" id="id2">``</span></a>Sign up for GitHub’’ button. Once your account is created, you
|
||||||
|
can sign in by clicking the button in the top left and filling in your
|
||||||
|
username or e-mail address and password.</p>
|
||||||
|
</div>
|
||||||
|
<hr class="docutils" />
|
||||||
|
<div class="section" id="forking-the-repository">
|
||||||
|
<h3>Forking the repository<a class="headerlink" href="#forking-the-repository" title="Permalink to this headline">¶</a></h3>
|
||||||
|
<p>To get changes into LAMMPS, you need to first fork the repository. At
|
||||||
|
the time of writing, LAMMPS-ICMS is the preferred fork. Go to <a class="reference external" href="https://github.com/lammps/lammps">LAMMPS on GitHub</a> and make sure branch is
|
||||||
|
set to <a href="#id3"><span class="problematic" id="id4">``</span></a>lammps-icms’‘, see the figure below.</p>
|
||||||
|
<img alt="_images/tutorial_branch.png" class="align-center" src="_images/tutorial_branch.png" />
|
||||||
|
<p>Now, click on fork in the top right corner:</p>
|
||||||
|
<img alt="_images/tutorial_fork.png" class="align-center" src="_images/tutorial_fork.png" />
|
||||||
|
<p>This will create your own fork of the LAMMPS repository. You can make
|
||||||
|
changes in this fork and later file <em>pull requests</em> to allow the
|
||||||
|
upstream repository to merge changes from your own fork into the one
|
||||||
|
we just forked from. At the same time, you can set things up, so you
|
||||||
|
can include changes from upstream into your repository.</p>
|
||||||
|
</div>
|
||||||
|
<hr class="docutils" />
|
||||||
|
<div class="section" id="adding-changes-to-your-own-fork">
|
||||||
|
<h3>Adding changes to your own fork<a class="headerlink" href="#adding-changes-to-your-own-fork" title="Permalink to this headline">¶</a></h3>
|
||||||
|
<p>Before adding changes, it is better to first create a new branch that
|
||||||
|
will contain these changes, a so-called feature branch.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="feature-branches">
|
||||||
|
<h2>Feature branches<a class="headerlink" href="#feature-branches" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>Since LAMMPS is such a big project and most user contributions come in
|
||||||
|
small portions, the most ideal workflow for LAMMPS is the so-called
|
||||||
|
<a href="#id5"><span class="problematic" id="id6">``</span></a>Feature branch’’ workflow. It is explained in great detail here:
|
||||||
|
<a class="reference external" href="https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow">feature branch workflow</a>.</p>
|
||||||
|
<p>The idea is that every new feature for LAMMPS gets its own
|
||||||
|
branch. This way, it is fairly painless to incorporate new features
|
||||||
|
into the upstream repository. I will explain briefly here how to do
|
||||||
|
it. In this feature branch, I will add a USER-package.</p>
|
||||||
|
<p>I assume that git is installed on the local machine and you know how
|
||||||
|
to use a command line.</p>
|
||||||
|
<p>First of all, you need to clone your own fork of LAMMPS:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git clone https://github.com/<your user name>/lammps.git
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>You can find the proper url to the right of the “HTTPS” block, see figure.</p>
|
||||||
|
<img alt="_images/tutorial_https_block.png" class="align-center" src="_images/tutorial_https_block.png" />
|
||||||
|
<p>The above command copies (<a href="#id7"><span class="problematic" id="id8">``</span></a>clones’‘) the git repository to your local
|
||||||
|
machine. You can use this local clone to make changes and test them
|
||||||
|
without interfering with the repository on github. First, however, it
|
||||||
|
is recommended to make a new branch for a particular feature you would
|
||||||
|
like added to LAMMPS. In this example, I will try adding a new
|
||||||
|
USER-package called USER-MANIFOLD.</p>
|
||||||
|
<p>To create a new branch, run the following git command in your repository:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git checkout -b add-user-manifold
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The name of this new branch is “add-user-manifold” in my case. Just
|
||||||
|
name it after something that resembles the feature you want added to
|
||||||
|
LAMMPS.</p>
|
||||||
|
<p>Now that you’ve changed branches, you can edit the files as you see
|
||||||
|
fit, add new files, and commit as much as you would like. Just
|
||||||
|
remember that if halfway you decide to add another, unrelated feature,
|
||||||
|
you should switch branches!</p>
|
||||||
|
<p>After everything is done, add the files to the branch and commit them:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git add src/USER-MANIFOLD examples/USER/manifold/
|
||||||
|
$ git add doc/fix_nv*t,e*_manifold_rattle.txt
|
||||||
|
$ git add doc/fix_manifoldforce.txt doc/user_manifolds.txt
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>After the files are added, the change should be comitted:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git commit -m 'Added user-manifold package'
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>The “-m” switch is used to add a message to the commit. Use this to
|
||||||
|
indicate what type of change was commited.</p>
|
||||||
|
<p><em>“Do not use “git commit -a”. the -a flag will automatically include
|
||||||
|
*all</em> modified or new files. mercurial does that and it find it
|
||||||
|
hugely annoying and often leading to accidental commits of files you
|
||||||
|
don’t want. use git add, git rm, git mv for adding, removing,
|
||||||
|
renaming and then git commit to finalize the commit. personally, i
|
||||||
|
find it very convenient to use the bundled gui for commits, i.e. git
|
||||||
|
gui. typically, i will do git add and other operations, but then
|
||||||
|
verify and review them with git gui. git gui also allows to do
|
||||||
|
line-by-line unstaging and other convenient operations.”*</p>
|
||||||
|
<p>After the commit, the changes can be pushed to the same branch on GitHub:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git push
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>Git will ask you for your user name and password on GitHub if you have
|
||||||
|
not configured anything. If you correctly type your user name and
|
||||||
|
password, the change should be added to your fork on GitHub.</p>
|
||||||
|
<p>If you want to make really sure you push to the right repository
|
||||||
|
(which is good practice), you can provide it explicitly:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git push origin
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>or using an explicit URL:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git push git@github.com:Pakketeretet2/lammps.git
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>After that, you can file a new pull request based on this
|
||||||
|
branch. GitHub will now look like this:</p>
|
||||||
|
<img alt="_images/tutorial_pull_request_feature_branch1.png" class="align-center" src="_images/tutorial_pull_request_feature_branch1.png" />
|
||||||
|
<p>Make sure that the current branch is set to the correct one, which, in
|
||||||
|
this case, is “add-user-manifold”. Now click “New pull request”. If
|
||||||
|
done correctly, the only changes you will see are those that were made
|
||||||
|
on this branch, so in my case, I will see nothing related to
|
||||||
|
$mathrm*pair_dzugatov*.$</p>
|
||||||
|
<p>This will open up a new window that lists changes made to the
|
||||||
|
repository. If you are just adding new files, there is not much to do,
|
||||||
|
but I suppose merge conflicts are to be resolved here if there are
|
||||||
|
changes in existing files. If all changes can automatically be merged,
|
||||||
|
green text at the top will say so and you can click the “Create pull
|
||||||
|
request” button, see image.</p>
|
||||||
|
<img alt="_images/tutorial_pull_request2.png" class="align-center" src="_images/tutorial_pull_request2.png" />
|
||||||
|
<p>After this you have to specify a short title and a comment with
|
||||||
|
details about your pull request. I guess here you write what your
|
||||||
|
modifications do and why they should be incorporated upstream. After
|
||||||
|
that, click the “Create pull request” button, see image below.</p>
|
||||||
|
<img alt="_images/tutorial_pull_request3.png" class="align-center" src="_images/tutorial_pull_request3.png" />
|
||||||
|
<p>Now just write some nice comments, click “Comment”, and that is it. It
|
||||||
|
is now up to the maintainer(s) of the upstream repository to
|
||||||
|
incorporate the changes into the repository and to close the pull
|
||||||
|
request.</p>
|
||||||
|
<img alt="_images/tutorial_pull_request4.png" class="align-center" src="_images/tutorial_pull_request4.png" />
|
||||||
|
<hr class="docutils" />
|
||||||
|
<div class="section" id="additional-changes">
|
||||||
|
<h3>Additional changes<a class="headerlink" href="#additional-changes" title="Permalink to this headline">¶</a></h3>
|
||||||
|
<p>Before the pull request is accepted, any additional changes you push
|
||||||
|
into your repository will automatically become part of the pull
|
||||||
|
request.</p>
|
||||||
|
</div>
|
||||||
|
<hr class="docutils" />
|
||||||
|
<div class="section" id="after-a-merge">
|
||||||
|
<h3>After a merge<a class="headerlink" href="#after-a-merge" title="Permalink to this headline">¶</a></h3>
|
||||||
|
<p>When everything is fine the feature branch is merged into the LAMMPS
|
||||||
|
repositories:</p>
|
||||||
|
<img alt="_images/tutorial_merged.png" class="align-center" src="_images/tutorial_merged.png" />
|
||||||
|
<p>Now one question remains: What to do with the feature branch that got
|
||||||
|
merged into upstream?</p>
|
||||||
|
<p>It is in principle safe to delete them from your own fork. This helps
|
||||||
|
keep it a bit more tidy. Note that you first have to switch to another
|
||||||
|
branch!</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git checkout lammps-icms
|
||||||
|
$ git pull lammps-icms
|
||||||
|
$ git branch -d add-user-manifold
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
<p>If you do not pull first, it is not really a problem but git will warn
|
||||||
|
you at the next statement that you are deleting a local branch that
|
||||||
|
was not yet fully merged into HEAD. This is because git does not yet
|
||||||
|
know your branch just got merged into lammps-icms upstream. If you
|
||||||
|
first delete and then pull, everything should still be fine.</p>
|
||||||
|
<p>Finally, if you delete the branch locally, you might want to push this
|
||||||
|
to your remote(s) as well:</p>
|
||||||
|
<div class="highlight-python"><div class="highlight"><pre>$ git push origin :add-user-manifold
|
||||||
|
</pre></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<p>
|
||||||
|
© Copyright 2013 Sandia Corporation.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
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>.
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var DOCUMENTATION_OPTIONS = {
|
||||||
|
URL_ROOT:'./',
|
||||||
|
VERSION:'',
|
||||||
|
COLLAPSE_INDEX:false,
|
||||||
|
FILE_SUFFIX:'.html',
|
||||||
|
HAS_SOURCE: true
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||||
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
|
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
|
||||||
|
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
|
||||||
|
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="_static/js/theme.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(function () {
|
||||||
|
SphinxRtdTheme.StickyNav.enable();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
214
doc/tutorial_github.txt
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
"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
|
||||||
|
|
||||||
|
LAMMPS GitHub tutorial :h1
|
||||||
|
written by Stefan Paquay :h3
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
This document briefly describes how to use GitHub to merge changes
|
||||||
|
into LAMMPS using GitHub. It assumes that you are familiar with
|
||||||
|
git. You may want to have a look at the "Git
|
||||||
|
book"_http://git-scm.com/book/ to reacquaint yourself.
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
Making an account :h2
|
||||||
|
|
||||||
|
First of all, you need a GitHub account. This is fairly simple, just
|
||||||
|
go to "GitHub"_https://github.com and create an account by clicking
|
||||||
|
the ``Sign up for GitHub'' button. Once your account is created, you
|
||||||
|
can sign in by clicking the button in the top left and filling in your
|
||||||
|
username or e-mail address and password.
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
Forking the repository :h2
|
||||||
|
|
||||||
|
To get changes into LAMMPS, you need to first fork the repository. At
|
||||||
|
the time of writing, LAMMPS-ICMS is the preferred fork. Go to "LAMMPS
|
||||||
|
on GitHub"_https://github.com/lammps/lammps and make sure branch is
|
||||||
|
set to ``lammps-icms'', see the figure below.
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_branch.png)
|
||||||
|
|
||||||
|
Now, click on fork in the top right corner:
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_fork.png)
|
||||||
|
|
||||||
|
This will create your own fork of the LAMMPS repository. You can make
|
||||||
|
changes in this fork and later file {pull requests} to allow the
|
||||||
|
upstream repository to merge changes from your own fork into the one
|
||||||
|
we just forked from. At the same time, you can set things up, so you
|
||||||
|
can include changes from upstream into your repository.
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
Adding changes to your own fork :h2
|
||||||
|
|
||||||
|
Before adding changes, it is better to first create a new branch that
|
||||||
|
will contain these changes, a so-called feature branch.
|
||||||
|
|
||||||
|
Feature branches :h3
|
||||||
|
|
||||||
|
Since LAMMPS is such a big project and most user contributions come in
|
||||||
|
small portions, the most ideal workflow for LAMMPS is the so-called
|
||||||
|
``Feature branch'' workflow. It is explained in great detail here:
|
||||||
|
"feature branch
|
||||||
|
workflow"_https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow.
|
||||||
|
|
||||||
|
The idea is that every new feature for LAMMPS gets its own
|
||||||
|
branch. This way, it is fairly painless to incorporate new features
|
||||||
|
into the upstream repository. I will explain briefly here how to do
|
||||||
|
it. In this feature branch, I will add a USER-package.
|
||||||
|
|
||||||
|
I assume that git is installed on the local machine and you know how
|
||||||
|
to use a command line.
|
||||||
|
|
||||||
|
First of all, you need to clone your own fork of LAMMPS:
|
||||||
|
|
||||||
|
$ git clone https://github.com/<your user name>/lammps.git :pre
|
||||||
|
|
||||||
|
You can find the proper url to the right of the "HTTPS" block, see figure.
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_https_block.png)
|
||||||
|
|
||||||
|
The above command copies (``clones'') the git repository to your local
|
||||||
|
machine. You can use this local clone to make changes and test them
|
||||||
|
without interfering with the repository on github. First, however, it
|
||||||
|
is recommended to make a new branch for a particular feature you would
|
||||||
|
like added to LAMMPS. In this example, I will try adding a new
|
||||||
|
USER-package called USER-MANIFOLD.
|
||||||
|
|
||||||
|
To create a new branch, run the following git command in your repository:
|
||||||
|
|
||||||
|
$ git checkout -b add-user-manifold :pre
|
||||||
|
|
||||||
|
The name of this new branch is "add-user-manifold" in my case. Just
|
||||||
|
name it after something that resembles the feature you want added to
|
||||||
|
LAMMPS.
|
||||||
|
|
||||||
|
Now that you've changed branches, you can edit the files as you see
|
||||||
|
fit, add new files, and commit as much as you would like. Just
|
||||||
|
remember that if halfway you decide to add another, unrelated feature,
|
||||||
|
you should switch branches!
|
||||||
|
|
||||||
|
After everything is done, add the files to the branch and commit them:
|
||||||
|
|
||||||
|
$ git add src/USER-MANIFOLD examples/USER/manifold/
|
||||||
|
$ git add doc/fix_nv{t,e}_manifold_rattle.txt
|
||||||
|
$ git add doc/fix_manifoldforce.txt doc/user_manifolds.txt :pre
|
||||||
|
|
||||||
|
After the files are added, the change should be comitted:
|
||||||
|
|
||||||
|
$ git commit -m 'Added user-manifold package' :pre
|
||||||
|
|
||||||
|
The "-m" switch is used to add a message to the commit. Use this to
|
||||||
|
indicate what type of change was commited.
|
||||||
|
|
||||||
|
Wisdom by Axel: :h4
|
||||||
|
|
||||||
|
{"Do not use "git commit -a". the -a flag will automatically include
|
||||||
|
*all* modified or new files. mercurial does that and it find it
|
||||||
|
hugely annoying and often leading to accidental commits of files you
|
||||||
|
don't want. use git add, git rm, git mv for adding, removing,
|
||||||
|
renaming and then git commit to finalize the commit. personally, i
|
||||||
|
find it very convenient to use the bundled gui for commits, i.e. git
|
||||||
|
gui. typically, i will do git add and other operations, but then
|
||||||
|
verify and review them with git gui. git gui also allows to do
|
||||||
|
line-by-line unstaging and other convenient operations."}
|
||||||
|
|
||||||
|
After the commit, the changes can be pushed to the same branch on GitHub:
|
||||||
|
|
||||||
|
$ git push :pre
|
||||||
|
|
||||||
|
Git will ask you for your user name and password on GitHub if you have
|
||||||
|
not configured anything. If you correctly type your user name and
|
||||||
|
password, the change should be added to your fork on GitHub.
|
||||||
|
|
||||||
|
If you want to make really sure you push to the right repository
|
||||||
|
(which is good practice), you can provide it explicitly:
|
||||||
|
|
||||||
|
$ git push origin :pre
|
||||||
|
|
||||||
|
or using an explicit URL:
|
||||||
|
|
||||||
|
$ git push git@github.com:Pakketeretet2/lammps.git :pre
|
||||||
|
|
||||||
|
After that, you can file a new pull request based on this
|
||||||
|
branch. GitHub will now look like this:
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_pull_request_feature_branch1.png)
|
||||||
|
|
||||||
|
Make sure that the current branch is set to the correct one, which, in
|
||||||
|
this case, is "add-user-manifold". Now click "New pull request". If
|
||||||
|
done correctly, the only changes you will see are those that were made
|
||||||
|
on this branch, so in my case, I will see nothing related to
|
||||||
|
$\mathrm{pair\_dzugatov}.$
|
||||||
|
|
||||||
|
This will open up a new window that lists changes made to the
|
||||||
|
repository. If you are just adding new files, there is not much to do,
|
||||||
|
but I suppose merge conflicts are to be resolved here if there are
|
||||||
|
changes in existing files. If all changes can automatically be merged,
|
||||||
|
green text at the top will say so and you can click the "Create pull
|
||||||
|
request" button, see image.
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_pull_request2.png)
|
||||||
|
|
||||||
|
After this you have to specify a short title and a comment with
|
||||||
|
details about your pull request. I guess here you write what your
|
||||||
|
modifications do and why they should be incorporated upstream. After
|
||||||
|
that, click the "Create pull request" button, see image below.
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_pull_request3.png)
|
||||||
|
|
||||||
|
Now just write some nice comments, click "Comment", and that is it. It
|
||||||
|
is now up to the maintainer(s) of the upstream repository to
|
||||||
|
incorporate the changes into the repository and to close the pull
|
||||||
|
request.
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_pull_request4.png)
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
Additional changes :h2
|
||||||
|
|
||||||
|
Before the pull request is accepted, any additional changes you push
|
||||||
|
into your repository will automatically become part of the pull
|
||||||
|
request.
|
||||||
|
|
||||||
|
:line
|
||||||
|
|
||||||
|
After a merge :h2
|
||||||
|
|
||||||
|
When everything is fine the feature branch is merged into the LAMMPS
|
||||||
|
repositories:
|
||||||
|
|
||||||
|
:c,image(JPG/tutorial_merged.png)
|
||||||
|
|
||||||
|
Now one question remains: What to do with the feature branch that got
|
||||||
|
merged into upstream?
|
||||||
|
|
||||||
|
It is in principle safe to delete them from your own fork. This helps
|
||||||
|
keep it a bit more tidy. Note that you first have to switch to another
|
||||||
|
branch!
|
||||||
|
|
||||||
|
$ git checkout lammps-icms
|
||||||
|
$ git pull lammps-icms
|
||||||
|
$ git branch -d add-user-manifold :pre
|
||||||
|
|
||||||
|
If you do not pull first, it is not really a problem but git will warn
|
||||||
|
you at the next statement that you are deleting a local branch that
|
||||||
|
was not yet fully merged into HEAD. This is because git does not yet
|
||||||
|
know your branch just got merged into lammps-icms upstream. If you
|
||||||
|
first delete and then pull, everything should still be fine.
|
||||||
|
|
||||||
|
Finally, if you delete the branch locally, you might want to push this
|
||||||
|
to your remote(s) as well:
|
||||||
|
|
||||||
|
$ git push origin :add-user-manifold :pre
|
||||||
668
src/DEPEND/fastdep.c
Normal file
@ -0,0 +1,668 @@
|
|||||||
|
/* Fast dependency generator for LAMMPS
|
||||||
|
* (c) 2016 Axel Kohlmeyer <akohlmey@gmail.com>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
*
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the <organization> nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
const char version[] = "2.0";
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* utility functions
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
/* remove trailing path separators */
|
||||||
|
char *trim_path(char *path)
|
||||||
|
{
|
||||||
|
int last = strlen(path) - 1;
|
||||||
|
while ((path[last] == '/') || (path[last] == '\\'))
|
||||||
|
--last;
|
||||||
|
path[++last] = '\0';
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* test if a file exists */
|
||||||
|
int file_exists(const char *path)
|
||||||
|
{
|
||||||
|
#if defined(_WIN32)
|
||||||
|
struct _stat s;
|
||||||
|
|
||||||
|
if (path == NULL) return 0;
|
||||||
|
if (_stat(path,&s) != 0) return 0;
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
|
struct stat s;
|
||||||
|
|
||||||
|
if (path == NULL) return 0;
|
||||||
|
if (stat(path,&s) != 0) return 0;
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* simple integer square root */
|
||||||
|
static int isqrt(int n)
|
||||||
|
{
|
||||||
|
int b = 0;
|
||||||
|
|
||||||
|
while(n >= 0) {
|
||||||
|
n = n - b;
|
||||||
|
b = b + 1;
|
||||||
|
n = n - b;
|
||||||
|
}
|
||||||
|
return b - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* determine next available prime number */
|
||||||
|
static int next_prime(const int num)
|
||||||
|
{
|
||||||
|
int nprime, factor, root;
|
||||||
|
|
||||||
|
/* nprime has to be larger than num and odd */
|
||||||
|
nprime = num + (num & 1) + 1;
|
||||||
|
/* there is always a prime between n and 2n */
|
||||||
|
while (nprime < 2*num) {
|
||||||
|
/* brute force division test on odd factors up to sqrt(nprime) */
|
||||||
|
root = isqrt(nprime)+1;
|
||||||
|
for (factor = 3; factor < root; factor +=2) {
|
||||||
|
if (nprime % factor == 0) break;
|
||||||
|
}
|
||||||
|
/* if the loop didn't exit early, we have found a prime */
|
||||||
|
if (factor >= root) return nprime;
|
||||||
|
nprime += 2;
|
||||||
|
}
|
||||||
|
return nprime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FNV hash function */
|
||||||
|
static unsigned int hash_func(const void *key)
|
||||||
|
{
|
||||||
|
const unsigned char *p = key;
|
||||||
|
unsigned int h = 2166136261;
|
||||||
|
|
||||||
|
if (!p) return 0;
|
||||||
|
|
||||||
|
while (*p) {
|
||||||
|
h = (h * 16777619) ^ *p;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* structs for data structures
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
/* linked list */
|
||||||
|
|
||||||
|
typedef struct _llnode llnode_t;
|
||||||
|
struct _llnode {
|
||||||
|
const char *key;
|
||||||
|
llnode_t *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
llnode_t *head;
|
||||||
|
llnode_t *tail;
|
||||||
|
int count;
|
||||||
|
} llist_t;
|
||||||
|
|
||||||
|
/* set */
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
llnode_t *buckets;
|
||||||
|
int nbuckets;
|
||||||
|
int count;
|
||||||
|
} set_t;
|
||||||
|
|
||||||
|
/* map */
|
||||||
|
|
||||||
|
typedef struct _mapnode mapnode_t;
|
||||||
|
struct _mapnode {
|
||||||
|
const char *key;
|
||||||
|
set_t *val;
|
||||||
|
mapnode_t *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
mapnode_t *buckets;
|
||||||
|
int nbuckets;
|
||||||
|
int count;
|
||||||
|
} map_t;
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* linked list functions
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
/* allocate and intitialize linked list */
|
||||||
|
static llist_t *llist_init()
|
||||||
|
{
|
||||||
|
llist_t *ll;
|
||||||
|
ll = (llist_t *)malloc(sizeof(llist_t));
|
||||||
|
if (ll != NULL) {
|
||||||
|
ll->head = (llnode_t *)malloc(sizeof(llnode_t));
|
||||||
|
ll->head->next = NULL;
|
||||||
|
ll->head->key = NULL;
|
||||||
|
ll->tail = ll->head;
|
||||||
|
ll->count = 0;
|
||||||
|
}
|
||||||
|
return ll;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* destroy linked list and free all associated storage */
|
||||||
|
static void llist_free(llist_t *ll)
|
||||||
|
{
|
||||||
|
llnode_t *tmp;
|
||||||
|
if (ll == NULL) return;
|
||||||
|
|
||||||
|
while (ll->head->next) {
|
||||||
|
tmp = ll->head;
|
||||||
|
ll->head = ll->head->next;
|
||||||
|
free((void *)tmp->key);
|
||||||
|
free((void *)tmp);
|
||||||
|
}
|
||||||
|
free((void *)ll->head);
|
||||||
|
free((void *)ll);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* append an item to the end of the linked list */
|
||||||
|
static void llist_append(llist_t *ll, const char *key)
|
||||||
|
{
|
||||||
|
llnode_t *tmp;
|
||||||
|
if ((ll == NULL) || (key == NULL)) return;
|
||||||
|
|
||||||
|
ll->tail->key = strdup(key);
|
||||||
|
ll->count ++;
|
||||||
|
tmp = (llnode_t *)malloc(sizeof(llnode_t));
|
||||||
|
tmp->key = NULL;
|
||||||
|
tmp->next = NULL;
|
||||||
|
ll->tail->next = tmp;
|
||||||
|
ll->tail = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int llist_size(llist_t *ll)
|
||||||
|
{
|
||||||
|
if (ll) return ll->count;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void llist_print(llist_t *ll)
|
||||||
|
{
|
||||||
|
llnode_t *tmp;
|
||||||
|
if (ll == NULL) return;
|
||||||
|
tmp = ll->head;
|
||||||
|
|
||||||
|
if (tmp->next) {
|
||||||
|
fputs(tmp->key,stdout);
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (tmp->next) {
|
||||||
|
fputc(':',stdout);
|
||||||
|
fputs(tmp->key,stdout);
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
fputc('\n',stdout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* set functions
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
/* initialize empty set */
|
||||||
|
static set_t *set_init(int num)
|
||||||
|
{
|
||||||
|
set_t *s = (set_t *)malloc(sizeof(set_t));
|
||||||
|
|
||||||
|
s->nbuckets = next_prime(num);
|
||||||
|
s->buckets = malloc(s->nbuckets*sizeof(llnode_t));
|
||||||
|
memset(s->buckets,0,s->nbuckets*sizeof(llnode_t));
|
||||||
|
s->count = 0;
|
||||||
|
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* destroy a set and free the associated storage */
|
||||||
|
static void set_free(set_t *s)
|
||||||
|
{
|
||||||
|
llnode_t *tmp, *next;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!s) return;
|
||||||
|
for (i = 0; i < s->nbuckets; ++i) {
|
||||||
|
tmp = s->buckets + i;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
free((void *)tmp->key);
|
||||||
|
next = tmp->next->next;
|
||||||
|
tmp->key = tmp->next->key;
|
||||||
|
free((void *)tmp->next);
|
||||||
|
tmp->next = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free((void *)s->buckets);
|
||||||
|
free((void *)s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add an entry to the set */
|
||||||
|
static void set_add(set_t *s, const char *key)
|
||||||
|
{
|
||||||
|
llnode_t *tmp;
|
||||||
|
unsigned int idx;
|
||||||
|
|
||||||
|
if (!s) return;
|
||||||
|
|
||||||
|
idx = hash_func(key) % s->nbuckets;
|
||||||
|
tmp = s->buckets + idx;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
if (strcmp(tmp->key,key) == 0) return;
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
s->count ++;
|
||||||
|
tmp->key = strdup(key);
|
||||||
|
tmp->next = (llnode_t *)malloc(sizeof(llnode_t));
|
||||||
|
tmp = tmp->next;
|
||||||
|
tmp->key = NULL;
|
||||||
|
tmp->next = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* find an entry in the set */
|
||||||
|
static int set_find(set_t *s, const char *key)
|
||||||
|
{
|
||||||
|
llnode_t *tmp;
|
||||||
|
unsigned int idx;
|
||||||
|
|
||||||
|
if (!s) return 0;
|
||||||
|
|
||||||
|
idx = hash_func(key) % s->nbuckets;
|
||||||
|
tmp = s->buckets + idx;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
if (strcmp(tmp->key,key) == 0) return 1;
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int set_size(set_t *s)
|
||||||
|
{
|
||||||
|
if (s) return s->count;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* map functions
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
/* initialize empty map */
|
||||||
|
static map_t *map_init(int num)
|
||||||
|
{
|
||||||
|
map_t *m = (map_t *)malloc(sizeof(map_t));
|
||||||
|
if (!m) return NULL;
|
||||||
|
|
||||||
|
m->nbuckets = next_prime(num);
|
||||||
|
m->buckets = malloc(m->nbuckets*sizeof(mapnode_t));
|
||||||
|
memset(m->buckets,0,m->nbuckets*sizeof(mapnode_t));
|
||||||
|
m->count = 0;
|
||||||
|
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* destroy a map and free the associated storage */
|
||||||
|
static void map_free(map_t *m)
|
||||||
|
{
|
||||||
|
mapnode_t *tmp, *next;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!m) return;
|
||||||
|
for (i = 0; i < m->nbuckets; ++i) {
|
||||||
|
tmp = m->buckets + i;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
free((void *)tmp->key);
|
||||||
|
set_free(tmp->val);
|
||||||
|
next = tmp->next->next;
|
||||||
|
tmp->key = tmp->next->key;
|
||||||
|
tmp->val = tmp->next->val;
|
||||||
|
free((void *)tmp->next);
|
||||||
|
tmp->next = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free((void *)m->buckets);
|
||||||
|
free((void *)m);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add an entry to the map */
|
||||||
|
static void map_add(map_t *m, const char *key, const char *val)
|
||||||
|
{
|
||||||
|
mapnode_t *tmp;
|
||||||
|
unsigned int idx;
|
||||||
|
|
||||||
|
if (!m) return;
|
||||||
|
|
||||||
|
idx = hash_func(key) % m->nbuckets;
|
||||||
|
tmp = m->buckets + idx;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
if (strcmp(tmp->key,key) == 0) break;
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* add new entry to map */
|
||||||
|
if (tmp->next == NULL) {
|
||||||
|
m->count ++;
|
||||||
|
tmp->key = strdup(key);
|
||||||
|
tmp->val = set_init(50); /* XXX: chosen arbitrarily */
|
||||||
|
tmp->next = (mapnode_t *)malloc(sizeof(mapnode_t));
|
||||||
|
tmp->next->key = NULL;
|
||||||
|
tmp->next->val = NULL;
|
||||||
|
tmp->next->next = NULL;
|
||||||
|
}
|
||||||
|
set_add(tmp->val,val);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* return an entry in the map */
|
||||||
|
static set_t *map_find(map_t *m, const char *key)
|
||||||
|
{
|
||||||
|
mapnode_t *tmp;
|
||||||
|
unsigned int idx;
|
||||||
|
|
||||||
|
if (!m) return 0;
|
||||||
|
|
||||||
|
idx = hash_func(key) % m->nbuckets;
|
||||||
|
tmp = m->buckets + idx;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
if (strcmp(tmp->key,key) == 0) return tmp->val;
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int map_size(map_t *m)
|
||||||
|
{
|
||||||
|
if (m) return m->count;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
/* combine search for file across paths */
|
||||||
|
static void make_path(const char *file, llist_t *paths, char *buffer)
|
||||||
|
{
|
||||||
|
llnode_t *tmp;
|
||||||
|
const char *val;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
tmp = paths->head;
|
||||||
|
buffer[0] = '\0';
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
i = 0;
|
||||||
|
val = tmp->key;
|
||||||
|
|
||||||
|
while (*val) buffer[i++] = *val++;
|
||||||
|
#if defined(_WIN32)
|
||||||
|
buffer[i++] = '\\';
|
||||||
|
#else
|
||||||
|
buffer[i++] = '/';
|
||||||
|
#endif
|
||||||
|
val = file;
|
||||||
|
while (*val) buffer[i++] = *val++;
|
||||||
|
buffer[i] = '\0';
|
||||||
|
|
||||||
|
if (file_exists(buffer)) return;
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
buffer[0] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
static void find_includes(llnode_t *head, llist_t *todo, llist_t *paths,
|
||||||
|
set_t *incl, map_t *deps)
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
|
llnode_t *tmp;
|
||||||
|
char *buffer,*full,*ptr,*end;
|
||||||
|
const char *file;
|
||||||
|
|
||||||
|
buffer = (char *)malloc(4096);
|
||||||
|
full = (char *)malloc(4096);
|
||||||
|
|
||||||
|
tmp = head;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
file = tmp->key;
|
||||||
|
fp = fopen(file,"r");
|
||||||
|
if (fp == NULL) {
|
||||||
|
perror("Cannot read source");
|
||||||
|
fprintf(stderr,"For file: %s\n",file);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* read file line by line and look for #include "..." */
|
||||||
|
while (!feof(fp) && !ferror(fp)) {
|
||||||
|
if (fgets(buffer,4096,fp) == NULL) continue;
|
||||||
|
ptr = buffer;
|
||||||
|
while (*ptr == ' ' || *ptr == '\t') ++ptr;
|
||||||
|
if (*ptr != '#') continue;
|
||||||
|
while (*ptr == ' ' || *ptr == '\t') ++ptr;
|
||||||
|
if (*++ptr != 'i') continue;
|
||||||
|
if (*++ptr != 'n') continue;
|
||||||
|
if (*++ptr != 'c') continue;
|
||||||
|
if (*++ptr != 'l') continue;
|
||||||
|
if (*++ptr != 'u') continue;
|
||||||
|
if (*++ptr != 'd') continue;
|
||||||
|
if (*++ptr != 'e') continue;
|
||||||
|
++ptr;
|
||||||
|
while (*ptr == ' ' || *ptr == '\t') ++ptr;
|
||||||
|
if (*ptr != '"') continue;
|
||||||
|
++ptr;
|
||||||
|
end = ptr;
|
||||||
|
while (*end != '"') {
|
||||||
|
if (*end == '\0') {
|
||||||
|
fprintf(stderr,"Unmatched '\"': %s\n",buffer);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
++end;
|
||||||
|
}
|
||||||
|
*end = '\0';
|
||||||
|
|
||||||
|
/* get full path to include file */
|
||||||
|
make_path(ptr,paths,full);
|
||||||
|
/* skip, if not found or unreadable. */
|
||||||
|
if (full[0] == '\0') continue;
|
||||||
|
|
||||||
|
/* if this is a yet unknown include, add to the
|
||||||
|
* todo list, if append is enabled */
|
||||||
|
if (set_find(incl,full) == 0) {
|
||||||
|
set_add(incl,full);
|
||||||
|
llist_append(todo,full);
|
||||||
|
}
|
||||||
|
|
||||||
|
map_add(deps,file,full);
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
free(buffer);
|
||||||
|
free(full);
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
static void add_depend(const char *source, set_t *incl, map_t *deps)
|
||||||
|
{
|
||||||
|
set_t *mydeps;
|
||||||
|
llnode_t *tmp;
|
||||||
|
int i,num;
|
||||||
|
|
||||||
|
if (source == NULL) return;
|
||||||
|
|
||||||
|
mydeps = map_find(deps,source);
|
||||||
|
if (mydeps != NULL) {
|
||||||
|
num = mydeps->nbuckets;
|
||||||
|
|
||||||
|
for (i = 0; i < num; ++i) {
|
||||||
|
tmp = mydeps->buckets + i;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
if (set_find(incl,tmp->key) == 0) {
|
||||||
|
set_add(incl,tmp->key);
|
||||||
|
add_depend(tmp->key,incl,deps);
|
||||||
|
}
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
static void do_depend(llnode_t *head, map_t *deps)
|
||||||
|
{
|
||||||
|
llnode_t *tmp, *lnk;
|
||||||
|
set_t *incl;
|
||||||
|
const char *source;
|
||||||
|
char *target, *ptr;
|
||||||
|
int i,num;
|
||||||
|
|
||||||
|
tmp = head;
|
||||||
|
while (tmp->next != NULL) {
|
||||||
|
source = tmp->key;
|
||||||
|
target = strrchr(source,'/');
|
||||||
|
if (target == NULL) {
|
||||||
|
target = strdup(source);
|
||||||
|
} else {
|
||||||
|
target = strdup(target+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ptr = strrchr(target,'.');
|
||||||
|
if (ptr != NULL) {
|
||||||
|
ptr[1] = 'o';
|
||||||
|
ptr[2] = '\0';
|
||||||
|
}
|
||||||
|
fputs(target,stdout);
|
||||||
|
fputs(" : ",stdout);
|
||||||
|
fputs(source,stdout);
|
||||||
|
free((void *)target);
|
||||||
|
|
||||||
|
incl = set_init(50);
|
||||||
|
add_depend(source,incl,deps);
|
||||||
|
|
||||||
|
num = incl->nbuckets;
|
||||||
|
for (i = 0; i < num; ++i) {
|
||||||
|
lnk = incl->buckets + i;
|
||||||
|
while (lnk->next != NULL) {
|
||||||
|
fputc(' ',stdout);
|
||||||
|
fputs(lnk->key,stdout);
|
||||||
|
lnk = lnk->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fputc('\n',stdout);
|
||||||
|
set_free(incl);
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
llist_t *paths,*src,*todo;
|
||||||
|
set_t *incl;
|
||||||
|
map_t *deps;
|
||||||
|
|
||||||
|
if (argc < 2) {
|
||||||
|
fprintf(stderr,"FastDep v%s for LAMMPS\n"
|
||||||
|
"Usage: %s [-I <path> ...] -- <src1> [<src2> ...]\n",
|
||||||
|
version,argv[0]);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hash tables for all known included files and dependencies
|
||||||
|
* we guesstimate a little over 2x as many entries as sources. */
|
||||||
|
incl = set_init(2*argc);
|
||||||
|
deps = map_init(2*argc);
|
||||||
|
|
||||||
|
/* list of include search paths. prefixed by "." and "..". */
|
||||||
|
paths = llist_init();
|
||||||
|
llist_append(paths,".");
|
||||||
|
llist_append(paths,"..");
|
||||||
|
|
||||||
|
while (++argv, --argc > 0) {
|
||||||
|
if (strncmp(*argv, "-I", 2) == 0) {
|
||||||
|
if ((*argv)[2] != '\0') {
|
||||||
|
llist_append(paths,trim_path(*argv+2));
|
||||||
|
} else {
|
||||||
|
++argv;
|
||||||
|
--argc;
|
||||||
|
if (argc > 0) {
|
||||||
|
if (strcmp(*argv,"--") == 0) {
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
llist_append(paths,trim_path(*argv));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (strcmp(*argv,"--") == 0) {
|
||||||
|
break;
|
||||||
|
} // ignore all unrecognized arguments before '--'.
|
||||||
|
}
|
||||||
|
|
||||||
|
src = llist_init();
|
||||||
|
while (++argv, --argc > 0) {
|
||||||
|
llist_append(src,*argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* process files to look for includes */
|
||||||
|
todo = llist_init();
|
||||||
|
find_includes(src->head,todo,paths,incl,deps);
|
||||||
|
find_includes(todo->head,todo,paths,incl,deps);
|
||||||
|
llist_free(todo);
|
||||||
|
|
||||||
|
fprintf(stdout,"# FastDep v%s for LAMMPS\n",version);
|
||||||
|
fputs("# Search path: ",stdout);
|
||||||
|
llist_print(paths);
|
||||||
|
fprintf(stdout,"# % 5d sources\n# % 5d includes\n# % 5d depfiles\n",
|
||||||
|
llist_size(src),set_size(incl),map_size(deps));
|
||||||
|
|
||||||
|
set_free(incl);
|
||||||
|
do_depend(src->head,deps);
|
||||||
|
|
||||||
|
llist_free(src);
|
||||||
|
llist_free(paths);
|
||||||
|
map_free(deps);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local Variables:
|
||||||
|
* compile-command: "gcc -o fastdep.exe -Wall -g -O fastdep.c"
|
||||||
|
* c-basic-offset: 4
|
||||||
|
* End:
|
||||||
|
*/
|
||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -117,5 +117,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -52,5 +52,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -116,3 +116,10 @@ JPG_INC =
|
|||||||
JPG_PATH =
|
JPG_PATH =
|
||||||
JPG_LIB =
|
JPG_LIB =
|
||||||
|
|
||||||
|
depend : fastdep.exe $(SRC)
|
||||||
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -128,5 +128,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -114,5 +114,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -119,7 +119,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
@ -119,7 +119,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
@ -119,7 +119,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
@ -119,7 +119,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -131,5 +131,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -110,5 +110,10 @@ shlib: $(OBJ)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -114,5 +114,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -115,5 +115,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -114,5 +114,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -113,5 +113,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
120
src/MAKE/MINE/Makefile.auto
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
# auto = makefile auto-generated by Make.py
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# compiler/linker settings
|
||||||
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
|
CC = g++
|
||||||
|
CCFLAGS = -g -O3
|
||||||
|
SHFLAGS = -fPIC
|
||||||
|
DEPFLAGS = -M
|
||||||
|
|
||||||
|
LINK = g++
|
||||||
|
LINKFLAGS = -g -O
|
||||||
|
LIB =
|
||||||
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
|
SHLIBFLAGS = -shared
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# LAMMPS-specific settings, all OPTIONAL
|
||||||
|
# specify settings for LAMMPS features you will use
|
||||||
|
# if you change any -D setting, do full re-compile after "make clean"
|
||||||
|
|
||||||
|
# LAMMPS ifdef settings
|
||||||
|
# see possible settings in Section 2.2 (step 4) of manual
|
||||||
|
|
||||||
|
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_JPEG
|
||||||
|
|
||||||
|
# MPI library
|
||||||
|
# see discussion in Section 2.2 (step 5) of manual
|
||||||
|
# MPI wrapper compiler/linker can provide this info
|
||||||
|
# can point to dummy MPI library in src/STUBS as in Makefile.serial
|
||||||
|
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
|
||||||
|
# INC = path for mpi.h, MPI compiler settings
|
||||||
|
# PATH = path for MPI library
|
||||||
|
# LIB = name of MPI library
|
||||||
|
|
||||||
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/usr/local/include
|
||||||
|
MPI_PATH = -L/usr/local/lib
|
||||||
|
MPI_LIB = -lmpich -lmpl -lpthread
|
||||||
|
|
||||||
|
# FFT library
|
||||||
|
# see discussion in Section 2.2 (step 6) of manaul
|
||||||
|
# can be left blank to use provided KISS FFT library
|
||||||
|
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
|
||||||
|
# PATH = path for FFT library
|
||||||
|
# LIB = name of FFT library
|
||||||
|
|
||||||
|
FFT_INC = -DFFT_FFTW3
|
||||||
|
FFT_PATH =
|
||||||
|
FFT_LIB = -lfftw3
|
||||||
|
|
||||||
|
# JPEG and/or PNG library
|
||||||
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
|
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
|
||||||
|
# INC = path(s) for jpeglib.h and/or png.h
|
||||||
|
# PATH = path(s) for JPEG library and/or PNG library
|
||||||
|
# LIB = name(s) of JPEG library and/or PNG library
|
||||||
|
|
||||||
|
JPG_INC =
|
||||||
|
JPG_PATH =
|
||||||
|
JPG_LIB = -ljpeg
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# build rules and dependencies
|
||||||
|
# do not edit this section
|
||||||
|
|
||||||
|
include Makefile.package.settings
|
||||||
|
include Makefile.package
|
||||||
|
|
||||||
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
|
||||||
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
||||||
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
||||||
|
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
|
||||||
|
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
|
||||||
|
|
||||||
|
# Path to src files
|
||||||
|
|
||||||
|
vpath %.cpp ..
|
||||||
|
vpath %.h ..
|
||||||
|
|
||||||
|
# Link target
|
||||||
|
|
||||||
|
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
||||||
|
$(SIZE) $(EXE)
|
||||||
|
|
||||||
|
# Library targets
|
||||||
|
|
||||||
|
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
||||||
|
|
||||||
|
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
|
||||||
|
$(OBJ) $(EXTRA_LIB) $(LIB)
|
||||||
|
|
||||||
|
# Compilation rules
|
||||||
|
|
||||||
|
%.o:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
||||||
|
|
||||||
|
%.o:%.cu $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
# Individual dependencies
|
||||||
|
|
||||||
|
depend : fastdep.exe $(SRC)
|
||||||
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
@ -1,4 +1,4 @@
|
|||||||
# g++ = RedHat Linux box, g++4, MPICH2, FFTW
|
# g++ = g++ compiler, native MPICH w/out wrapper
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
@ -7,17 +7,17 @@ SHELL = /bin/sh
|
|||||||
# specify flags and libraries needed for your compiler
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
CC = g++
|
CC = g++
|
||||||
CCFLAGS = -g -O # -Wunused
|
CCFLAGS = -g -O3
|
||||||
SHFLAGS = -fPIC
|
SHFLAGS = -fPIC
|
||||||
DEPFLAGS = -M
|
DEPFLAGS = -M
|
||||||
|
|
||||||
LINK = g++
|
LINK = g++
|
||||||
LINKFLAGS = -g -O
|
LINKFLAGS = -g -O
|
||||||
LIB =
|
LIB =
|
||||||
ARCHIVE = ar
|
|
||||||
ARFLAGS = -rcsv
|
|
||||||
|
|
||||||
SIZE = size
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
SHLIBFLAGS = -shared
|
SHLIBFLAGS = -shared
|
||||||
KOKKOS_DEVICES = OpenMP
|
KOKKOS_DEVICES = OpenMP
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ LMP_INC = -DLAMMPS_GZIP -DLAMMPS_JPEG
|
|||||||
# PATH = path for MPI library
|
# PATH = path for MPI library
|
||||||
# LIB = name of MPI library
|
# LIB = name of MPI library
|
||||||
|
|
||||||
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/usr/local/include
|
||||||
MPI_PATH =
|
MPI_PATH = -L/usr/local/lib
|
||||||
MPI_LIB = -lmpich -lmpl -lpthread
|
MPI_LIB = -lmpich -lmpl -lpthread
|
||||||
|
|
||||||
# FFT library
|
# FFT library
|
||||||
@ -51,9 +51,9 @@ MPI_LIB = -lmpich -lmpl -lpthread
|
|||||||
# PATH = path for FFT library
|
# PATH = path for FFT library
|
||||||
# LIB = name of FFT library
|
# LIB = name of FFT library
|
||||||
|
|
||||||
FFT_INC = -DFFT_FFTW
|
FFT_INC = -DFFT_FFTW3
|
||||||
FFT_PATH =
|
FFT_PATH =
|
||||||
FFT_LIB = -lfftw
|
FFT_LIB = -lfftw3
|
||||||
|
|
||||||
# JPEG and/or PNG library
|
# JPEG and/or PNG library
|
||||||
# see discussion in Section 2.2 (step 7) of manual
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
@ -115,7 +115,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
120
src/MAKE/MINE/Makefile.icc
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
# icc = icc compiler, native MPICH w/out wrapper
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# compiler/linker settings
|
||||||
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
|
CC = icc
|
||||||
|
CCFLAGS = -g -O3 -restrict --std=c++11
|
||||||
|
SHFLAGS = -fPIC
|
||||||
|
DEPFLAGS = -M
|
||||||
|
|
||||||
|
LINK = icc
|
||||||
|
LINKFLAGS = -g -O --std=c++11
|
||||||
|
LIB =
|
||||||
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
|
SHLIBFLAGS = -shared
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# LAMMPS-specific settings, all OPTIONAL
|
||||||
|
# specify settings for LAMMPS features you will use
|
||||||
|
# if you change any -D setting, do full re-compile after "make clean"
|
||||||
|
|
||||||
|
# LAMMPS ifdef settings
|
||||||
|
# see possible settings in Section 2.2 (step 4) of manual
|
||||||
|
|
||||||
|
LMP_INC = -DLAMMPS_GZIP -DLAMMPS_JPEG
|
||||||
|
|
||||||
|
# MPI library
|
||||||
|
# see discussion in Section 2.2 (step 5) of manual
|
||||||
|
# MPI wrapper compiler/linker can provide this info
|
||||||
|
# can point to dummy MPI library in src/STUBS as in Makefile.serial
|
||||||
|
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
|
||||||
|
# INC = path for mpi.h, MPI compiler settings
|
||||||
|
# PATH = path for MPI library
|
||||||
|
# LIB = name of MPI library
|
||||||
|
|
||||||
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I/usr/local/include
|
||||||
|
MPI_PATH = -L/usr/local/lib
|
||||||
|
MPI_LIB = -lmpich -lmpl -lpthread
|
||||||
|
|
||||||
|
# FFT library
|
||||||
|
# see discussion in Section 2.2 (step 6) of manaul
|
||||||
|
# can be left blank to use provided KISS FFT library
|
||||||
|
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
|
||||||
|
# PATH = path for FFT library
|
||||||
|
# LIB = name of FFT library
|
||||||
|
|
||||||
|
FFT_INC = -DFFT_FFTW3
|
||||||
|
FFT_PATH =
|
||||||
|
FFT_LIB = -lfftw3
|
||||||
|
|
||||||
|
# JPEG and/or PNG library
|
||||||
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
|
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
|
||||||
|
# INC = path(s) for jpeglib.h and/or png.h
|
||||||
|
# PATH = path(s) for JPEG library and/or PNG library
|
||||||
|
# LIB = name(s) of JPEG library and/or PNG library
|
||||||
|
|
||||||
|
JPG_INC =
|
||||||
|
JPG_PATH =
|
||||||
|
JPG_LIB = -ljpeg
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# build rules and dependencies
|
||||||
|
# do not edit this section
|
||||||
|
|
||||||
|
include Makefile.package.settings
|
||||||
|
include Makefile.package
|
||||||
|
|
||||||
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
|
||||||
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
||||||
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
||||||
|
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
|
||||||
|
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
|
||||||
|
|
||||||
|
# Path to src files
|
||||||
|
|
||||||
|
vpath %.cpp ..
|
||||||
|
vpath %.h ..
|
||||||
|
|
||||||
|
# Link target
|
||||||
|
|
||||||
|
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
||||||
|
$(SIZE) $(EXE)
|
||||||
|
|
||||||
|
# Library targets
|
||||||
|
|
||||||
|
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
||||||
|
|
||||||
|
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
|
||||||
|
$(OBJ) $(EXTRA_LIB) $(LIB)
|
||||||
|
|
||||||
|
# Compilation rules
|
||||||
|
|
||||||
|
%.o:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
||||||
|
|
||||||
|
%.o:%.cu $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
# Individual dependencies
|
||||||
|
|
||||||
|
depend : fastdep.exe $(SRC)
|
||||||
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
121
src/MAKE/MINE/Makefile.openmpi_g++
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
# openmpi_g++ = g++ compiler, native OpenMPI w/out wrapper
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# compiler/linker settings
|
||||||
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
|
CC = g++
|
||||||
|
CCFLAGS = -g -O3
|
||||||
|
SHFLAGS = -fPIC
|
||||||
|
DEPFLAGS = -M
|
||||||
|
|
||||||
|
LINK = g++
|
||||||
|
LINKFLAGS = -g -O
|
||||||
|
LIB =
|
||||||
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
|
SHLIBFLAGS = -shared
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# LAMMPS-specific settings, all OPTIONAL
|
||||||
|
# specify settings for LAMMPS features you will use
|
||||||
|
# if you change any -D setting, do full re-compile after "make clean"
|
||||||
|
|
||||||
|
# LAMMPS ifdef settings
|
||||||
|
# see possible settings in Section 2.2 (step 4) of manual
|
||||||
|
|
||||||
|
LMP_INC = -DLAMMPS_GZIP
|
||||||
|
|
||||||
|
# MPI library
|
||||||
|
# see discussion in Section 2.2 (step 5) of manual
|
||||||
|
# MPI wrapper compiler/linker can provide this info
|
||||||
|
# can point to dummy MPI library in src/STUBS as in Makefile.serial
|
||||||
|
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
|
||||||
|
# INC = path for mpi.h, MPI compiler settings
|
||||||
|
# PATH = path for MPI library
|
||||||
|
# LIB = name of MPI library
|
||||||
|
|
||||||
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 \
|
||||||
|
-I/usr/local/openmpi/include
|
||||||
|
MPI_PATH = -L/usr/local/openmpi/lib
|
||||||
|
MPI_LIB = -lmpi -lmpi_cxx
|
||||||
|
|
||||||
|
# FFT library
|
||||||
|
# see discussion in Section 2.2 (step 6) of manaul
|
||||||
|
# can be left blank to use provided KISS FFT library
|
||||||
|
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
|
||||||
|
# PATH = path for FFT library
|
||||||
|
# LIB = name of FFT library
|
||||||
|
|
||||||
|
FFT_INC =
|
||||||
|
FFT_PATH =
|
||||||
|
FFT_LIB =
|
||||||
|
|
||||||
|
# JPEG and/or PNG library
|
||||||
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
|
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
|
||||||
|
# INC = path(s) for jpeglib.h and/or png.h
|
||||||
|
# PATH = path(s) for JPEG library and/or PNG library
|
||||||
|
# LIB = name(s) of JPEG library and/or PNG library
|
||||||
|
|
||||||
|
JPG_INC =
|
||||||
|
JPG_PATH =
|
||||||
|
JPG_LIB =
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# build rules and dependencies
|
||||||
|
# do not edit this section
|
||||||
|
|
||||||
|
include Makefile.package.settings
|
||||||
|
include Makefile.package
|
||||||
|
|
||||||
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
|
||||||
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
||||||
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
||||||
|
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
|
||||||
|
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
|
||||||
|
|
||||||
|
# Path to src files
|
||||||
|
|
||||||
|
vpath %.cpp ..
|
||||||
|
vpath %.h ..
|
||||||
|
|
||||||
|
# Link target
|
||||||
|
|
||||||
|
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
||||||
|
$(SIZE) $(EXE)
|
||||||
|
|
||||||
|
# Library targets
|
||||||
|
|
||||||
|
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
||||||
|
|
||||||
|
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
|
||||||
|
$(OBJ) $(EXTRA_LIB) $(LIB)
|
||||||
|
|
||||||
|
# Compilation rules
|
||||||
|
|
||||||
|
%.o:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
||||||
|
|
||||||
|
%.o:%.cu $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
# Individual dependencies
|
||||||
|
|
||||||
|
depend : fastdep.exe $(SRC)
|
||||||
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
121
src/MAKE/MINE/Makefile.openmpi_icc
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
# openmpi_icc = icc compiler, native OpenMPI w/out wrapper
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# compiler/linker settings
|
||||||
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
|
CC = icc
|
||||||
|
CCFLAGS = -g -O3
|
||||||
|
SHFLAGS = -fPIC
|
||||||
|
DEPFLAGS = -M
|
||||||
|
|
||||||
|
LINK = icc
|
||||||
|
LINKFLAGS = -g -O
|
||||||
|
LIB =
|
||||||
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
|
SHLIBFLAGS = -shared
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# LAMMPS-specific settings, all OPTIONAL
|
||||||
|
# specify settings for LAMMPS features you will use
|
||||||
|
# if you change any -D setting, do full re-compile after "make clean"
|
||||||
|
|
||||||
|
# LAMMPS ifdef settings
|
||||||
|
# see possible settings in Section 2.2 (step 4) of manual
|
||||||
|
|
||||||
|
LMP_INC = -DLAMMPS_GZIP
|
||||||
|
|
||||||
|
# MPI library
|
||||||
|
# see discussion in Section 2.2 (step 5) of manual
|
||||||
|
# MPI wrapper compiler/linker can provide this info
|
||||||
|
# can point to dummy MPI library in src/STUBS as in Makefile.serial
|
||||||
|
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
|
||||||
|
# INC = path for mpi.h, MPI compiler settings
|
||||||
|
# PATH = path for MPI library
|
||||||
|
# LIB = name of MPI library
|
||||||
|
|
||||||
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 \
|
||||||
|
-I/usr/local/openmpi/include
|
||||||
|
MPI_PATH = -L/usr/local/openmpi/lib
|
||||||
|
MPI_LIB = -lmpi -lmpi_cxx
|
||||||
|
|
||||||
|
# FFT library
|
||||||
|
# see discussion in Section 2.2 (step 6) of manaul
|
||||||
|
# can be left blank to use provided KISS FFT library
|
||||||
|
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
|
||||||
|
# PATH = path for FFT library
|
||||||
|
# LIB = name of FFT library
|
||||||
|
|
||||||
|
FFT_INC =
|
||||||
|
FFT_PATH =
|
||||||
|
FFT_LIB =
|
||||||
|
|
||||||
|
# JPEG and/or PNG library
|
||||||
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
|
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
|
||||||
|
# INC = path(s) for jpeglib.h and/or png.h
|
||||||
|
# PATH = path(s) for JPEG library and/or PNG library
|
||||||
|
# LIB = name(s) of JPEG library and/or PNG library
|
||||||
|
|
||||||
|
JPG_INC =
|
||||||
|
JPG_PATH =
|
||||||
|
JPG_LIB =
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# build rules and dependencies
|
||||||
|
# do not edit this section
|
||||||
|
|
||||||
|
include Makefile.package.settings
|
||||||
|
include Makefile.package
|
||||||
|
|
||||||
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
|
||||||
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
||||||
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
||||||
|
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
|
||||||
|
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
|
||||||
|
|
||||||
|
# Path to src files
|
||||||
|
|
||||||
|
vpath %.cpp ..
|
||||||
|
vpath %.h ..
|
||||||
|
|
||||||
|
# Link target
|
||||||
|
|
||||||
|
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
||||||
|
$(SIZE) $(EXE)
|
||||||
|
|
||||||
|
# Library targets
|
||||||
|
|
||||||
|
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
||||||
|
|
||||||
|
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
|
||||||
|
$(OBJ) $(EXTRA_LIB) $(LIB)
|
||||||
|
|
||||||
|
# Compilation rules
|
||||||
|
|
||||||
|
%.o:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
||||||
|
|
||||||
|
%.o:%.cu $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
# Individual dependencies
|
||||||
|
|
||||||
|
depend : fastdep.exe $(SRC)
|
||||||
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
@ -114,7 +114,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
115
src/MAKE/Makefile.mpi.old
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
# mpi = default MPI compiler, default MPI
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# compiler/linker settings
|
||||||
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
|
CC = mpicxx
|
||||||
|
CCFLAGS = -g -O3
|
||||||
|
SHFLAGS = -fPIC
|
||||||
|
DEPFLAGS = -M
|
||||||
|
|
||||||
|
LINK = mpicxx
|
||||||
|
LINKFLAGS = -g -O
|
||||||
|
LIB =
|
||||||
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
|
SHLIBFLAGS = -shared
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# LAMMPS-specific settings, all OPTIONAL
|
||||||
|
# specify settings for LAMMPS features you will use
|
||||||
|
# if you change any -D setting, do full re-compile after "make clean"
|
||||||
|
|
||||||
|
# LAMMPS ifdef settings
|
||||||
|
# see possible settings in Section 2.2 (step 4) of manual
|
||||||
|
|
||||||
|
LMP_INC = -DLAMMPS_GZIP
|
||||||
|
|
||||||
|
# MPI library
|
||||||
|
# see discussion in Section 2.2 (step 5) of manual
|
||||||
|
# MPI wrapper compiler/linker can provide this info
|
||||||
|
# can point to dummy MPI library in src/STUBS as in Makefile.serial
|
||||||
|
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
|
||||||
|
# INC = path for mpi.h, MPI compiler settings
|
||||||
|
# PATH = path for MPI library
|
||||||
|
# LIB = name of MPI library
|
||||||
|
|
||||||
|
MPI_INC = -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1
|
||||||
|
MPI_PATH =
|
||||||
|
MPI_LIB =
|
||||||
|
|
||||||
|
# FFT library
|
||||||
|
# see discussion in Section 2.2 (step 6) of manual
|
||||||
|
# can be left blank to use provided KISS FFT library
|
||||||
|
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
|
||||||
|
# PATH = path for FFT library
|
||||||
|
# LIB = name of FFT library
|
||||||
|
|
||||||
|
FFT_INC =
|
||||||
|
FFT_PATH =
|
||||||
|
FFT_LIB =
|
||||||
|
|
||||||
|
# JPEG and/or PNG library
|
||||||
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
|
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
|
||||||
|
# INC = path(s) for jpeglib.h and/or png.h
|
||||||
|
# PATH = path(s) for JPEG library and/or PNG library
|
||||||
|
# LIB = name(s) of JPEG library and/or PNG library
|
||||||
|
|
||||||
|
JPG_INC =
|
||||||
|
JPG_PATH =
|
||||||
|
JPG_LIB =
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# build rules and dependencies
|
||||||
|
# do not edit this section
|
||||||
|
|
||||||
|
include Makefile.package.settings
|
||||||
|
include Makefile.package
|
||||||
|
|
||||||
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
|
||||||
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
||||||
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
||||||
|
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
|
||||||
|
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
|
||||||
|
|
||||||
|
# Path to src files
|
||||||
|
|
||||||
|
vpath %.cpp ..
|
||||||
|
vpath %.h ..
|
||||||
|
|
||||||
|
# Link target
|
||||||
|
|
||||||
|
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
||||||
|
$(SIZE) $(EXE)
|
||||||
|
|
||||||
|
# Library targets
|
||||||
|
|
||||||
|
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
||||||
|
|
||||||
|
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
|
||||||
|
$(OBJ) $(EXTRA_LIB) $(LIB)
|
||||||
|
|
||||||
|
# Compilation rules
|
||||||
|
|
||||||
|
%.o:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
||||||
|
|
||||||
|
%.o:%.cu $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
# Individual dependencies
|
||||||
|
|
||||||
|
DEPENDS = $(OBJ:.o=.d)
|
||||||
|
sinclude $(DEPENDS)
|
||||||
@ -114,7 +114,7 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
depend : fastdep.exe $(SRC)
|
depend : fastdep.exe $(SRC)
|
||||||
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
fastdep.exe: ../../tools/fastdep.c
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
cc -O -o $@ $<
|
cc -O -o $@ $<
|
||||||
|
|
||||||
sinclude .depend
|
sinclude .depend
|
||||||
|
|||||||
115
src/MAKE/Makefile.serial.old
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
# serial = g++ compiler, no MPI, internal FFT
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# compiler/linker settings
|
||||||
|
# specify flags and libraries needed for your compiler
|
||||||
|
|
||||||
|
CC = g++
|
||||||
|
CCFLAGS = -g -O3
|
||||||
|
SHFLAGS = -fPIC
|
||||||
|
DEPFLAGS = -M
|
||||||
|
|
||||||
|
LINK = g++
|
||||||
|
LINKFLAGS = -g -O
|
||||||
|
LIB =
|
||||||
|
SIZE = size
|
||||||
|
|
||||||
|
ARCHIVE = ar
|
||||||
|
ARFLAGS = -rc
|
||||||
|
SHLIBFLAGS = -shared
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# LAMMPS-specific settings, all OPTIONAL
|
||||||
|
# specify settings for LAMMPS features you will use
|
||||||
|
# if you change any -D setting, do full re-compile after "make clean"
|
||||||
|
|
||||||
|
# LAMMPS ifdef settings
|
||||||
|
# see possible settings in Section 2.2 (step 4) of manual
|
||||||
|
|
||||||
|
LMP_INC = -DLAMMPS_GZIP
|
||||||
|
|
||||||
|
# MPI library
|
||||||
|
# see discussion in Section 2.2 (step 5) of manual
|
||||||
|
# MPI wrapper compiler/linker can provide this info
|
||||||
|
# can point to dummy MPI library in src/STUBS as in Makefile.serial
|
||||||
|
# use -D MPICH and OMPI settings in INC to avoid C++ lib conflicts
|
||||||
|
# INC = path for mpi.h, MPI compiler settings
|
||||||
|
# PATH = path for MPI library
|
||||||
|
# LIB = name of MPI library
|
||||||
|
|
||||||
|
MPI_INC = -I../STUBS
|
||||||
|
MPI_PATH = -L../STUBS
|
||||||
|
MPI_LIB = -lmpi_stubs
|
||||||
|
|
||||||
|
# FFT library
|
||||||
|
# see discussion in Section 2.2 (step 6) of manaul
|
||||||
|
# can be left blank to use provided KISS FFT library
|
||||||
|
# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings
|
||||||
|
# PATH = path for FFT library
|
||||||
|
# LIB = name of FFT library
|
||||||
|
|
||||||
|
FFT_INC =
|
||||||
|
FFT_PATH =
|
||||||
|
FFT_LIB =
|
||||||
|
|
||||||
|
# JPEG and/or PNG library
|
||||||
|
# see discussion in Section 2.2 (step 7) of manual
|
||||||
|
# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC
|
||||||
|
# INC = path(s) for jpeglib.h and/or png.h
|
||||||
|
# PATH = path(s) for JPEG library and/or PNG library
|
||||||
|
# LIB = name(s) of JPEG library and/or PNG library
|
||||||
|
|
||||||
|
JPG_INC =
|
||||||
|
JPG_PATH =
|
||||||
|
JPG_LIB =
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# build rules and dependencies
|
||||||
|
# do not edit this section
|
||||||
|
|
||||||
|
include Makefile.package.settings
|
||||||
|
include Makefile.package
|
||||||
|
|
||||||
|
EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(PKG_SYSINC)
|
||||||
|
EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(PKG_SYSPATH)
|
||||||
|
EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(PKG_SYSLIB)
|
||||||
|
EXTRA_CPP_DEPENDS = $(PKG_CPP_DEPENDS)
|
||||||
|
EXTRA_LINK_DEPENDS = $(PKG_LINK_DEPENDS)
|
||||||
|
|
||||||
|
# Path to src files
|
||||||
|
|
||||||
|
vpath %.cpp ..
|
||||||
|
vpath %.h ..
|
||||||
|
|
||||||
|
# Link target
|
||||||
|
|
||||||
|
$(EXE): $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE)
|
||||||
|
$(SIZE) $(EXE)
|
||||||
|
|
||||||
|
# Library targets
|
||||||
|
|
||||||
|
lib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ)
|
||||||
|
|
||||||
|
shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \
|
||||||
|
$(OBJ) $(EXTRA_LIB) $(LIB)
|
||||||
|
|
||||||
|
# Compilation rules
|
||||||
|
|
||||||
|
%.o:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
%.d:%.cpp $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@
|
||||||
|
|
||||||
|
%.o:%.cu $(EXTRA_CPP_DEPENDS)
|
||||||
|
$(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $<
|
||||||
|
|
||||||
|
# Individual dependencies
|
||||||
|
|
||||||
|
DEPENDS = $(OBJ:.o=.d)
|
||||||
|
sinclude $(DEPENDS)
|
||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -114,5 +114,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -114,5 +114,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -116,5 +116,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -113,5 +113,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -109,5 +109,10 @@ shlib: $(OBJ)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -112,5 +112,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
@ -111,5 +111,10 @@ shlib: $(OBJ) $(EXTRA_LINK_DEPENDS)
|
|||||||
|
|
||||||
# Individual dependencies
|
# Individual dependencies
|
||||||
|
|
||||||
DEPENDS = $(OBJ:.o=.d)
|
depend : fastdep.exe $(SRC)
|
||||||
sinclude $(DEPENDS)
|
@./fastdep.exe $(EXTRA_INC) -- $^ > .depend || exit 1
|
||||||
|
|
||||||
|
fastdep.exe: ../DEPEND/fastdep.c
|
||||||
|
cc -O -o $@ $<
|
||||||
|
|
||||||
|
sinclude .depend
|
||||||
|
|||||||
95
src/Make.py
@ -19,8 +19,8 @@ abbrevs = "adhjmoprsv"
|
|||||||
|
|
||||||
switchclasses = ("actions","dir","help","jmake","makefile",
|
switchclasses = ("actions","dir","help","jmake","makefile",
|
||||||
"output","packages","redo","settings","verbose")
|
"output","packages","redo","settings","verbose")
|
||||||
libclasses = ("atc","awpmd","colvars","cuda","gpu",
|
libclasses = ("atc","awpmd","colvars","cuda","gpu","h5md",
|
||||||
"meam","poems","qmmm","voronoi")
|
"meam","poems","python","qmmm","voronoi")
|
||||||
buildclasses = ("intel","kokkos")
|
buildclasses = ("intel","kokkos")
|
||||||
makeclasses = ("cc","mpi","fft","jpg","png")
|
makeclasses = ("cc","mpi","fft","jpg","png")
|
||||||
|
|
||||||
@ -577,8 +577,8 @@ Syntax: Make.py switch args ...
|
|||||||
-d (dir), -j (jmake), -m (makefile), -o (output),
|
-d (dir), -j (jmake), -m (makefile), -o (output),
|
||||||
-p (packages), -r (redo), -s (settings), -v (verbose)
|
-p (packages), -r (redo), -s (settings), -v (verbose)
|
||||||
switches for libs:
|
switches for libs:
|
||||||
-atc, -awpmd, -colvars, -cuda
|
-atc, -awpmd, -colvars, -cuda, -gpu, -h5md,
|
||||||
-gpu, -meam, -poems, -qmmm, -voronoi
|
-meam, -poems, -python, -qmmm, -voronoi
|
||||||
switches for build and makefile options:
|
switches for build and makefile options:
|
||||||
-intel, -kokkos, -cc, -mpi, -fft, -jpg, -png
|
-intel, -kokkos, -cc, -mpi, -fft, -jpg, -png
|
||||||
"""
|
"""
|
||||||
@ -652,7 +652,7 @@ class Packages:
|
|||||||
list of packages to install or uninstall in order specified
|
list of packages to install or uninstall in order specified
|
||||||
operates on set of packages currently installed
|
operates on set of packages currently installed
|
||||||
valid package names:
|
valid package names:
|
||||||
and LAMMPS standard or user package (type "make package" to see list)
|
any LAMMPS standard or user package (type "make package" to see list)
|
||||||
prefix by yes/no to install/uninstall (see abbrevs)
|
prefix by yes/no to install/uninstall (see abbrevs)
|
||||||
yes-molecule, yes-user-atc, no-molecule, no-user-atc
|
yes-molecule, yes-user-atc, no-molecule, no-user-atc
|
||||||
can use LAMMPS categories (type "make package" to see list)
|
can use LAMMPS categories (type "make package" to see list)
|
||||||
@ -1221,6 +1221,56 @@ class GPU:
|
|||||||
error("Unsuccessful build of lib/gpu library")
|
error("Unsuccessful build of lib/gpu library")
|
||||||
else: print "Created lib/gpu library"
|
else: print "Created lib/gpu library"
|
||||||
|
|
||||||
|
# H5MD lib
|
||||||
|
|
||||||
|
class H5MD:
|
||||||
|
def __init__(self,list):
|
||||||
|
self.inlist = copy.copy(list)
|
||||||
|
self.make = "h5cc"
|
||||||
|
self.lammpsflag = 0
|
||||||
|
|
||||||
|
def help(self):
|
||||||
|
return """
|
||||||
|
-h5md make=suffix lammps=suffix2
|
||||||
|
all args are optional and can be in any order
|
||||||
|
make = use Makefile.suffix (def = h5cc)
|
||||||
|
lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile)
|
||||||
|
"""
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
if self.inlist != None and len(self.inlist) == 0:
|
||||||
|
error("-h5md args are invalid")
|
||||||
|
for one in self.inlist:
|
||||||
|
words = one.split('=')
|
||||||
|
if len(words) != 2: error("-h5md args are invalid")
|
||||||
|
if words[0] == "make": self.make = words[1]
|
||||||
|
elif words[0] == "lammps":
|
||||||
|
self.lammps = words[1]
|
||||||
|
self.lammpsflag = 1
|
||||||
|
else: error("-h5md args are invalid")
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
libdir = dir.lib + "/h5md"
|
||||||
|
make = MakeReader("%s/Makefile.%s" % (libdir,self.make))
|
||||||
|
if self.lammpsflag:
|
||||||
|
make.setvar("EXTRAMAKE","Makefile.lammps.%s" % self.lammps)
|
||||||
|
make.write("%s/Makefile.auto" % libdir)
|
||||||
|
|
||||||
|
commands.getoutput("cd %s; make clean" % libdir)
|
||||||
|
str = "cd %s; make" % libdir
|
||||||
|
|
||||||
|
# if verbose, print output as build proceeds, else only print if fails
|
||||||
|
|
||||||
|
if verbose: subprocess.call(str,shell=True)
|
||||||
|
else:
|
||||||
|
try: subprocess.check_output(str,stderr=subprocess.STDOUT,shell=True)
|
||||||
|
except Exception as e: print e.output
|
||||||
|
|
||||||
|
if not os.path.isfile("%s/libch5md.a" % libdir) or \
|
||||||
|
not os.path.isfile("%s/Makefile.lammps" % libdir):
|
||||||
|
error("Unsuccessful build of lib/h5md library")
|
||||||
|
else: print "Created lib/h5md library"
|
||||||
|
|
||||||
# MEAM lib
|
# MEAM lib
|
||||||
|
|
||||||
class MEAM:
|
class MEAM:
|
||||||
@ -1323,6 +1373,41 @@ class POEMS:
|
|||||||
error("Unsuccessful build of lib/poems library")
|
error("Unsuccessful build of lib/poems library")
|
||||||
else: print "Created lib/poems library"
|
else: print "Created lib/poems library"
|
||||||
|
|
||||||
|
# PYTHON lib
|
||||||
|
|
||||||
|
class PYTHON:
|
||||||
|
def __init__(self,list):
|
||||||
|
self.inlist = copy.copy(list)
|
||||||
|
self.make = "g++"
|
||||||
|
self.lammpsflag = 0
|
||||||
|
|
||||||
|
def help(self):
|
||||||
|
return """
|
||||||
|
-python lammps=suffix
|
||||||
|
arg is optional, use Makefile.lammps if not specified
|
||||||
|
lammps = use Makefile.lammps.suffix
|
||||||
|
"""
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
if self.inlist != None and len(self.inlist) == 0:
|
||||||
|
error("-python args are invalid")
|
||||||
|
for one in self.inlist:
|
||||||
|
words = one.split('=')
|
||||||
|
if len(words) != 2: error("-python args are invalid")
|
||||||
|
if words[0] == "lammps":
|
||||||
|
self.lammps = words[1]
|
||||||
|
self.lammpsflag = 1
|
||||||
|
else: error("-python args are invalid")
|
||||||
|
|
||||||
|
def build(self):
|
||||||
|
libdir = dir.lib + "/python"
|
||||||
|
if self.lammpsflag:
|
||||||
|
commands.getoutput("cd %s; cp Makefile.lammps.%s Makefile.lammps" %
|
||||||
|
(libdir,self.lammps))
|
||||||
|
if not os.path.isfile("%s/Makefile.lammps.%s" % (libdir,self.lammps)):
|
||||||
|
error("Unsuccessful creation of lib/python/Makefile.lammps.%s file" % self.lammps)
|
||||||
|
else: print "Created lib/python/Makefile.lammps file"
|
||||||
|
|
||||||
# QMMM lib
|
# QMMM lib
|
||||||
|
|
||||||
class QMMM:
|
class QMMM:
|
||||||
|
|||||||
@ -146,7 +146,7 @@ help:
|
|||||||
@if [ ! -e Makefile.package.settings ]; \
|
@if [ ! -e Makefile.package.settings ]; \
|
||||||
then cp Makefile.package.settings.empty Makefile.package.settings; fi
|
then cp Makefile.package.settings.empty Makefile.package.settings; fi
|
||||||
@cp Makefile.package Makefile.package.settings $(objdir)
|
@cp Makefile.package Makefile.package.settings $(objdir)
|
||||||
@cd $(objdir); rm .depend; \
|
@cd $(objdir); rm -f .depend; \
|
||||||
$(MAKE) $(MFLAGS) "SRC = $(SRC)" "INC = $(INC)" depend || :
|
$(MAKE) $(MFLAGS) "SRC = $(SRC)" "INC = $(INC)" depend || :
|
||||||
ifeq ($(mode),exe)
|
ifeq ($(mode),exe)
|
||||||
@cd $(objdir); \
|
@cd $(objdir); \
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
#define LAMMPS_VERSION "1 Mar 2016"
|
#define LAMMPS_VERSION "10 Mar 2016"
|
||||||
|
|||||||