git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13222 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -86,8 +86,7 @@ this is a library file that ends in ".so", not ".a".
|
|||||||
</P>
|
</P>
|
||||||
<P>From the src directory, type
|
<P>From the src directory, type
|
||||||
</P>
|
</P>
|
||||||
<PRE>make makeshlib
|
<PRE>make foo mode=shlib
|
||||||
make -f Makefile.shlib foo
|
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>where foo is the machine target name, such as linux or g++ or serial.
|
<P>where foo is the machine target name, such as linux or g++ or serial.
|
||||||
This should create the file liblammps_foo.so in the src directory, as
|
This should create the file liblammps_foo.so in the src directory, as
|
||||||
|
|||||||
@ -82,8 +82,7 @@ this is a library file that ends in ".so", not ".a".
|
|||||||
|
|
||||||
From the src directory, type
|
From the src directory, type
|
||||||
|
|
||||||
make makeshlib
|
make foo mode=shlib :pre
|
||||||
make -f Makefile.shlib foo :pre
|
|
||||||
|
|
||||||
where foo is the machine target name, such as linux or g++ or serial.
|
where foo is the machine target name, such as linux or g++ or serial.
|
||||||
This should create the file liblammps_foo.so in the src directory, as
|
This should create the file liblammps_foo.so in the src directory, as
|
||||||
|
|||||||
@ -1048,50 +1048,44 @@ more info on wrapping and running LAMMPS from Python.
|
|||||||
</H5>
|
</H5>
|
||||||
<P>To build LAMMPS as a static library (*.a file on Linux), type
|
<P>To build LAMMPS as a static library (*.a file on Linux), type
|
||||||
</P>
|
</P>
|
||||||
<PRE>make makelib
|
<PRE>make foo mode=lib
|
||||||
make -f Makefile.lib foo
|
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>where foo is the machine name. This kind of library is typically used
|
<P>where foo is the machine name. This kind of library is typically used
|
||||||
to statically link a driver application to LAMMPS, so that you can
|
to statically link a driver application to LAMMPS, so that you can
|
||||||
insure all dependencies are satisfied at compile time. Note that
|
insure all dependencies are satisfied at compile time. This will use
|
||||||
inclusion or exclusion of any desired optional packages should be done
|
the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The build
|
||||||
before typing "make makelib". The first "make" command will create a
|
will create the file liblammps_foo.a which another application can
|
||||||
current Makefile.lib with all the file names in your src dir. The
|
link to. It will also create a soft link liblammps.a, which will
|
||||||
second "make" command will use it to build LAMMPS as a static library,
|
point to the most recently built static library.
|
||||||
using the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The
|
|
||||||
build will create the file liblammps_foo.a which another application can
|
|
||||||
link to.
|
|
||||||
</P>
|
</P>
|
||||||
<H5><B>Shared library:</B>
|
<H5><B>Shared library:</B>
|
||||||
</H5>
|
</H5>
|
||||||
<P>To build LAMMPS as a shared library (*.so file on Linux), which can be
|
<P>To build LAMMPS as a shared library (*.so file on Linux), which can be
|
||||||
dynamically loaded, e.g. from Python, type
|
dynamically loaded, e.g. from Python, type
|
||||||
</P>
|
</P>
|
||||||
<PRE>make makeshlib
|
<PRE>make foo mode=shlib
|
||||||
make -f Makefile.shlib foo
|
|
||||||
</PRE>
|
</PRE>
|
||||||
<P>where foo is the machine name. This kind of library is required when
|
<P>where foo is the machine name. This kind of library is required when
|
||||||
wrapping LAMMPS with Python; see <A HREF = "Section_python.html">Section_python</A>
|
wrapping LAMMPS with Python; see <A HREF = "Section_python.html">Section_python</A>
|
||||||
for details. Again, note that inclusion or exclusion of any desired
|
for details. This will use the SHFLAGS and SHLIBFLAGS settings in
|
||||||
optional packages should be done before typing "make makelib". The
|
src/MAKE/Makefile.foo and perform the build in the directory
|
||||||
first "make" command will create a current Makefile.shlib with all the
|
Obj_shared_foo. This is so that each file can be compiled with the
|
||||||
file names in your src dir. The second "make" command will use it to
|
-fPIC flag which is required for inclusion in a shared library. The
|
||||||
build LAMMPS as a shared library, using the SHFLAGS and SHLIBFLAGS
|
build will create the file liblammps_foo.so which another application
|
||||||
settings in src/MAKE/Makefile.foo. The build will create the file
|
can link to dyamically. It will also create a soft link liblammps.so,
|
||||||
liblammps_foo.so which another application can link to dyamically. It
|
which will point to the most recently built shared library. This is
|
||||||
will also create a soft link liblammps.so, which the Python wrapper uses
|
the file the Python wrapper loads by default.
|
||||||
by default.
|
|
||||||
</P>
|
</P>
|
||||||
<P>Note that for a shared library to be usable by a calling program, all
|
<P>Note that for a shared library to be usable by a calling program, all
|
||||||
the auxiliary libraries it depends on must also exist as shared
|
the auxiliary libraries it depends on must also exist as shared
|
||||||
libraries. This will be the case for libraries included with LAMMPS,
|
libraries. This will be the case for libraries included with LAMMPS,
|
||||||
such as the dummy MPI library in src/STUBS or any package libraries in
|
such as the dummy MPI library in src/STUBS or any package libraries in
|
||||||
lib/packges, since they are always built as shared libraries with the
|
lib/packages, since they are always built as shared libraries using
|
||||||
-fPIC switch. However, if a library like MPI or FFTW does not exist
|
the -fPIC switch. However, if a library like MPI or FFTW does not
|
||||||
as a shared library, the second make command will generate an error.
|
exist as a shared library, the shared library build will generate an
|
||||||
This means you will need to install a shared library version of the
|
error. This means you will need to install a shared library version
|
||||||
package. The build instructions for the library should tell you how
|
of the auxiliary library. The build instructions for the library
|
||||||
to do this.
|
should tell you how to do this.
|
||||||
</P>
|
</P>
|
||||||
<P>As an example, here is how to build and install the <A HREF = "http://www-unix.mcs.anl.gov/mpi">MPICH
|
<P>As an example, here is how to build and install the <A HREF = "http://www-unix.mcs.anl.gov/mpi">MPICH
|
||||||
library</A>, a popular open-source version of MPI, distributed by
|
library</A>, a popular open-source version of MPI, distributed by
|
||||||
|
|||||||
@ -1040,50 +1040,44 @@ more info on wrapping and running LAMMPS from Python.
|
|||||||
|
|
||||||
To build LAMMPS as a static library (*.a file on Linux), type
|
To build LAMMPS as a static library (*.a file on Linux), type
|
||||||
|
|
||||||
make makelib
|
make foo mode=lib :pre
|
||||||
make -f Makefile.lib foo :pre
|
|
||||||
|
|
||||||
where foo is the machine name. This kind of library is typically used
|
where foo is the machine name. This kind of library is typically used
|
||||||
to statically link a driver application to LAMMPS, so that you can
|
to statically link a driver application to LAMMPS, so that you can
|
||||||
insure all dependencies are satisfied at compile time. Note that
|
insure all dependencies are satisfied at compile time. This will use
|
||||||
inclusion or exclusion of any desired optional packages should be done
|
the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The build
|
||||||
before typing "make makelib". The first "make" command will create a
|
will create the file liblammps_foo.a which another application can
|
||||||
current Makefile.lib with all the file names in your src dir. The
|
link to. It will also create a soft link liblammps.a, which will
|
||||||
second "make" command will use it to build LAMMPS as a static library,
|
point to the most recently built static library.
|
||||||
using the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The
|
|
||||||
build will create the file liblammps_foo.a which another application can
|
|
||||||
link to.
|
|
||||||
|
|
||||||
[Shared library:] :h5
|
[Shared library:] :h5
|
||||||
|
|
||||||
To build LAMMPS as a shared library (*.so file on Linux), which can be
|
To build LAMMPS as a shared library (*.so file on Linux), which can be
|
||||||
dynamically loaded, e.g. from Python, type
|
dynamically loaded, e.g. from Python, type
|
||||||
|
|
||||||
make makeshlib
|
make foo mode=shlib :pre
|
||||||
make -f Makefile.shlib foo :pre
|
|
||||||
|
|
||||||
where foo is the machine name. This kind of library is required when
|
where foo is the machine name. This kind of library is required when
|
||||||
wrapping LAMMPS with Python; see "Section_python"_Section_python.html
|
wrapping LAMMPS with Python; see "Section_python"_Section_python.html
|
||||||
for details. Again, note that inclusion or exclusion of any desired
|
for details. This will use the SHFLAGS and SHLIBFLAGS settings in
|
||||||
optional packages should be done before typing "make makelib". The
|
src/MAKE/Makefile.foo and perform the build in the directory
|
||||||
first "make" command will create a current Makefile.shlib with all the
|
Obj_shared_foo. This is so that each file can be compiled with the
|
||||||
file names in your src dir. The second "make" command will use it to
|
-fPIC flag which is required for inclusion in a shared library. The
|
||||||
build LAMMPS as a shared library, using the SHFLAGS and SHLIBFLAGS
|
build will create the file liblammps_foo.so which another application
|
||||||
settings in src/MAKE/Makefile.foo. The build will create the file
|
can link to dyamically. It will also create a soft link liblammps.so,
|
||||||
liblammps_foo.so which another application can link to dyamically. It
|
which will point to the most recently built shared library. This is
|
||||||
will also create a soft link liblammps.so, which the Python wrapper uses
|
the file the Python wrapper loads by default.
|
||||||
by default.
|
|
||||||
|
|
||||||
Note that for a shared library to be usable by a calling program, all
|
Note that for a shared library to be usable by a calling program, all
|
||||||
the auxiliary libraries it depends on must also exist as shared
|
the auxiliary libraries it depends on must also exist as shared
|
||||||
libraries. This will be the case for libraries included with LAMMPS,
|
libraries. This will be the case for libraries included with LAMMPS,
|
||||||
such as the dummy MPI library in src/STUBS or any package libraries in
|
such as the dummy MPI library in src/STUBS or any package libraries in
|
||||||
lib/packges, since they are always built as shared libraries with the
|
lib/packages, since they are always built as shared libraries using
|
||||||
-fPIC switch. However, if a library like MPI or FFTW does not exist
|
the -fPIC switch. However, if a library like MPI or FFTW does not
|
||||||
as a shared library, the second make command will generate an error.
|
exist as a shared library, the shared library build will generate an
|
||||||
This means you will need to install a shared library version of the
|
error. This means you will need to install a shared library version
|
||||||
package. The build instructions for the library should tell you how
|
of the auxiliary library. The build instructions for the library
|
||||||
to do this.
|
should tell you how to do this.
|
||||||
|
|
||||||
As an example, here is how to build and install the "MPICH
|
As an example, here is how to build and install the "MPICH
|
||||||
library"_mpich, a popular open-source version of MPI, distributed by
|
library"_mpich, a popular open-source version of MPI, distributed by
|
||||||
|
|||||||
@ -147,7 +147,7 @@ since it evaluates another variable when it is invoked.
|
|||||||
<P>IMPORTANT NOTE: When a variable command is encountered in the input
|
<P>IMPORTANT NOTE: When a variable command is encountered in the input
|
||||||
script and the variable name has already been specified, the command
|
script and the variable name has already been specified, the command
|
||||||
is ignored. This means variables can NOT be re-defined in an input
|
is ignored. This means variables can NOT be re-defined in an input
|
||||||
script (with 2 exceptions, read further). This is to allow an input
|
script (with two exceptions, read further). This is to allow an input
|
||||||
script to be processed multiple times without resetting the variables;
|
script to be processed multiple times without resetting the variables;
|
||||||
see the <A HREF = "jump.html">jump</A> or <A HREF = "include.html">include</A> commands. It also
|
see the <A HREF = "jump.html">jump</A> or <A HREF = "include.html">include</A> commands. It also
|
||||||
means that using the <A HREF = "Section_start.html#start_7">command-line switch</A>
|
means that using the <A HREF = "Section_start.html#start_7">command-line switch</A>
|
||||||
|
|||||||
@ -141,7 +141,7 @@ since it evaluates another variable when it is invoked.
|
|||||||
IMPORTANT NOTE: When a variable command is encountered in the input
|
IMPORTANT NOTE: When a variable command is encountered in the input
|
||||||
script and the variable name has already been specified, the command
|
script and the variable name has already been specified, the command
|
||||||
is ignored. This means variables can NOT be re-defined in an input
|
is ignored. This means variables can NOT be re-defined in an input
|
||||||
script (with 2 exceptions, read further). This is to allow an input
|
script (with two exceptions, read further). This is to allow an input
|
||||||
script to be processed multiple times without resetting the variables;
|
script to be processed multiple times without resetting the variables;
|
||||||
see the "jump"_jump.html or "include"_include.html commands. It also
|
see the "jump"_jump.html or "include"_include.html commands. It also
|
||||||
means that using the "command-line switch"_Section_start.html#start_7
|
means that using the "command-line switch"_Section_start.html#start_7
|
||||||
|
|||||||
Reference in New Issue
Block a user