diff --git a/doc/src/Build_extras.txt b/doc/src/Build_extras.txt index 6ed54c0334d79a6d3897c34587a730877827c6ba..9f640aee7860a2a9055850233ceb78f7d031bf58 100644 --- a/doc/src/Build_extras.txt +++ b/doc/src/Build_extras.txt @@ -380,9 +380,13 @@ file. MESSAGE package :h4,link(message) +This package can optionally include support for messaging via sockets, +using the open-source "ZeroMQ library"_http://zeromq.org, which must +be installed on your system. + [CMake build]: -No additional settings are needed besides "-D PKG_MESSAGE=yes". +-D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes [Traditional make]: @@ -398,8 +402,8 @@ make lib-message args="-s" # build as serial lib with no ZMQ support The build should produce two files: lib/message/cslib/src/libmessage.a and lib/message/Makefile.lammps. The latter is copied from an -existing Makefile.lammps.* and has settings to link with the -open-source ZMQ library if requested in the build. +existing Makefile.lammps.* and has settings to link with the ZeroMQ +library if requested in the build. :line diff --git a/doc/src/Howto_client_server.txt b/doc/src/Howto_client_server.txt index 73d67bbffb7f1953913929d07d7646dd906e241d..ce9bbc07638584ffbfc64e4ac2e5ed29e95b56c9 100644 --- a/doc/src/Howto_client_server.txt +++ b/doc/src/Howto_client_server.txt @@ -40,7 +40,7 @@ package"_Packages_details.html#PKG-MESSAGE which implements several commands that enable LAMMPS to act as a client or server, as discussed below. The MESSAGE package also wraps a client/server library called CSlib which enables two codes to exchange messages in different ways, -either via files, a socket, or MPI. The CSlib is provided with LAMMPS +either via files, sockets, or MPI. The CSlib is provided with LAMMPS in the lib/message dir. The CSlib has its own "website"_http://cslib.sandia.gov with documentation and test programs. diff --git a/doc/src/fix_client_md.txt b/doc/src/fix_client_md.txt index 53cd7c36c22ca73a0447e1fd348d00d2f9054f3a..1712e1615ef44e35668be23e277284ddc0d7a67d 100644 --- a/doc/src/fix_client_md.txt +++ b/doc/src/fix_client_md.txt @@ -2,7 +2,7 @@ :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lc,Commands_all.html) :line @@ -25,11 +25,11 @@ This fix style enables LAMMPS to run as a "client" code and communicate each timestep with a separate "server" code to perform an MD simulation together. -"This section"_Section_howto.html#howto_29 gives an overview of -client/server coupling of LAMMPS with another code where one code is -the "client" and sends request messages to a "server" code. The -server responds to each request with a reply message. This enables -the two codes to work in tandem to perform a simulation. +The "Howto client/server"_Howto_client_server.html doc page gives an +overview of client/server coupling of LAMMPS with another code where +one code is the "client" and sends request messages to a "server" +code. The server responds to each request with a reply message. This +enables the two codes to work in tandem to perform a simulation. When using this fix, LAMMPS (as the client code) passes the current coordinates of all particles to the server code each timestep, which @@ -80,9 +80,9 @@ virial as part of "thermodynamic output"_thermo_style.html. The default is {virial yes} This fix computes a global scalar which can be accessed by various -"output commands"_Section_howto.html#howto_15. The scalar is the -potential energy discussed above. The scalar value calculated by this -fix is "extensive". +"output commands"_Howto_output.html. The scalar is the potential +energy discussed above. The scalar value calculated by this fix is +"extensive". No parameter of this fix can be used with the {start/stop} keywords of the "run"_run.html command. This fix is not invoked during "energy @@ -91,8 +91,8 @@ minimization"_minimize.html. [Restrictions:] This fix is part of the MESSAGE package. It is only enabled if LAMMPS -was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. +was built with that package. See the "Build +package"_Build_package.html doc page for more info. A script that uses this command must also use the "message"_message.html command to setup the messaging protocol with diff --git a/doc/src/message.txt b/doc/src/message.txt index bbea48f0f1f52dbbd00d6dad344557b9f3559cc4..6c84f3135c58185d0854b2728a0a15d78a2015a4 100644 --- a/doc/src/message.txt +++ b/doc/src/message.txt @@ -2,7 +2,7 @@ :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lc,Command_all.html) :line @@ -44,11 +44,11 @@ message server md mpi/two tmp.couple :pre Establish a messaging protocol between LAMMPS and another code for the purpose of client/server coupling. -"This section"_Section_howto.html#howto_29 gives an overview of -client/server coupling of LAMMPS with another code where one code is -the "client" and sends request messages to a "server" code. The -server responds to each request with a reply message. This enables -the two codes to work in tandem to perform a simulation. +The "Howto client/server"_Howto_client_server.html doc page gives an +overview of client/server coupling of LAMMPS with another code where +one code is the "client" and sends request messages to a "server" +code. The server responds to each request with a reply message. This +enables the two codes to work in tandem to perform a simulation. :line @@ -82,9 +82,12 @@ The filename can include a path. Both codes must be able to access the path/file in a common filesystem. For mode {zmq}, the 2 codes communicate via a socket on the server -code's machine. The client specifies an IP address (IPv4 format) or -the DNS name of the machine the server code is running on, followed by -a 4-digit port ID for the socket, separated by a colon. E.g. +code's machine. Support for socket messaging is provided by the +open-source "ZeroMQ library"_http://zeromq.org, which must be +installed on your system. The client specifies an IP address (IPv4 +format) or the DNS name of the machine the server code is running on, +followed by a 4-digit port ID for the socket, separated by a colon. +E.g. localhost:5555 # client and server running on same machine 192.168.1.1:5555 # server is 192.168.1.1 @@ -106,8 +109,8 @@ mpirun -np 2 lmp_mpi -mpi 2 -in in.client -log log.client : -np 4 othercode args mpirun -np 2 othercode args : -np 4 lmp_mpi -mpi 2 -in in.server # LAMMPS is server :pre Note the use of the "-mpi P" command-line argument with LAMMPS. See -the "command-line args"_Section_start.html#start_6 doc page for -further explanation. +the "command-line args"_Run_options.html doc page for further +explanation. For mode {mpi/two}, the 2 codes communicate via MPI, but are launched be 2 separate mpirun commands. The specified {filename} argument is a @@ -149,8 +152,8 @@ fix client or server command. [Restrictions:] This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. +LAMMPS was built with that package. See the "Build +package"_Build_package.html doc page for more info. [Related commands:] diff --git a/doc/src/server.txt b/doc/src/server.txt index ba6daa7fcfd633cd1fe27e1ab8238ca3b5f82a8c..86fb68d012963be87b30b169c1bf1554c78cfecb 100644 --- a/doc/src/server.txt +++ b/doc/src/server.txt @@ -2,7 +2,7 @@ :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lc,Commands_all.html) :line @@ -26,11 +26,11 @@ message back to the client. The specified {protocol} determines the format and content of messages LAMMPS expects to receive and how it responds. -"This section"_Section_howto.html#howto_29 gives an overview of -client/server coupling of LAMMPS with another code where one code is -the "client" and sends request messages to a "server" code. The -server responds to each request with a reply message. This enables -the two codes to work in tandem to perform a simulation. +The "Howto client/server"_Howto_client_server.html doc page gives an +overview of client/server coupling of LAMMPS with another code where +one code is the "client" and sends request messages to a "server" +code. The server responds to each request with a reply message. This +enables the two codes to work in tandem to perform a simulation. When this command is invoked, LAMMPS will run in server mode in an endless loop, waiting for messages from the client code. The client @@ -57,8 +57,8 @@ mc"_server_mc.html doc page for details on the protocol. [Restrictions:] This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. +LAMMPS was built with that package. See the "Build +package"_Build_package.html doc page for more info. A script that uses this command must also use the "message"_message.html command to setup the messaging protocol with diff --git a/doc/src/server_mc.txt b/doc/src/server_mc.txt index fba969d9cefeb723243113a0e3bc4657a26a1dc1..3c658187da772b8c8feb86db64828458c5fe64da 100644 --- a/doc/src/server_mc.txt +++ b/doc/src/server_mc.txt @@ -2,7 +2,7 @@ :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lc,Commands_all.html) :line @@ -25,11 +25,11 @@ expect messages from a separate "client" code that match the {mc} protocol for format and content explained below. For each message LAMMPS receives it will send a message back to the client. -"This section"_Section_howto.html#howto_29 gives an overview of -client/server coupling of LAMMPS with another code where one code is -the "client" and sends request messages to a "server" code. The -server responds to each request with a reply message. This enables -the two codes to work in tandem to perform a simulation. +The "Howto client/server"_Howto_client_server.html doc page gives an +overview of client/server coupling of LAMMPS with another code where +one code is the "client" and sends request messages to a "server" +code. The server responds to each request with a reply message. This +enables the two codes to work in tandem to perform a simulation. When this command is invoked, LAMMPS will run in server mode in an endless loop, waiting for messages from the client code. The client @@ -101,8 +101,12 @@ cs->send(RUN,0) # msgID = 5 with no fields [Restrictions:] This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. +LAMMPS was built with that package. See the "Build +package"_Build_package.html doc page for more info. + +A script that uses this command must also use the +"message"_message.html command to setup the messaging protocol with +the other client code. [Related commands:] diff --git a/doc/src/server_md.txt b/doc/src/server_md.txt index 8c5d83bfb8efcbe77e76770a3cfaab6167f6fd2e..4fe605f7a5ed7489a6c5786fd801c5e6da6fa0cc 100644 --- a/doc/src/server_md.txt +++ b/doc/src/server_md.txt @@ -2,7 +2,7 @@ :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) -:link(lc,Section_commands.html#comm) +:link(lc,Commands_all.html) :line @@ -25,11 +25,11 @@ expect messages from a separate "client" code that match the {md} protocol for format and content explained below. For each message LAMMPS receives it will send a message back to the client. -"This section"_Section_howto.html#howto_29 gives an overview of -client/server coupling of LAMMPS with another code where one code is -the "client" and sends request messages to a "server" code. The -server responds to each request with a reply message. This enables -the two codes to work in tandem to perform a simulation. +The "Howto client/server"_Howto_client_server.html doc page gives an +overview of client/server coupling of LAMMPS with another code where +one code is the "client" and sends request messages to a "server" +code. The server responds to each request with a reply message. This +enables the two codes to work in tandem to perform a simulation. When this command is invoked, LAMMPS will run in server mode in an endless loop, waiting for messages from the client code. The client @@ -111,8 +111,8 @@ cs->pack(VIRIAL,6,virial) # global virial tensor (6-vector) :pre [Restrictions:] This command is part of the MESSAGE package. It is only enabled if -LAMMPS was built with that package. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. +LAMMPS was built with that package. See the "Build +package"_Build_package.html doc page for more info. [Related commands:] diff --git a/examples/message/README b/examples/message/README index 63055177a445b6502e73bfa5f127de54794a0756..617a4249a5ba94ea3b163c9bae829e3f430c3de4 100644 --- a/examples/message/README +++ b/examples/message/README @@ -11,9 +11,10 @@ LAMMPS as the server, e.g. a quantum code computing quantum forces, so that ab initio MD could be performed. See an example of the latter in examples/COUPLE/lammps_vasp. -See the MESSAGE package (doc/Section_messages.html#MESSAGE) -and Section_howto.html#howto10 for more details on how -client/server coupling works in LAMMPS. +See the doc pages for the "MESSAGE package" +(Package_details.html#PKG-MESSAGE) and "Howto client/server" +(Howto_client_server.html) for more details on how client/server +coupling works in LAMMPS. --------------