Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
0384ef89
Commit
0384ef89
authored
6 years ago
by
Steve Plimpton
Browse files
Options
Downloads
Patches
Plain Diff
more tweaks to client/server doc pages
parent
25907c85
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/Howto_client_server.txt
+2
-2
2 additions, 2 deletions
doc/src/Howto_client_server.txt
doc/src/server_mc.txt
+3
-3
3 additions, 3 deletions
doc/src/server_mc.txt
doc/src/server_md.txt
+9
-7
9 additions, 7 deletions
doc/src/server_md.txt
with
14 additions
and
12 deletions
doc/src/Howto_client_server.txt
+
2
−
2
View file @
0384ef89
...
...
@@ -61,7 +61,7 @@ client or server.
"message"_message.html
"fix client md"_fix_client_md.html = LAMMPS is a client for running MD
"server md"_server_md.html = LAMMPS is a server for computing MD forces
"server mc"_server_mc.html = LAMMPS is a server for computing a Monte Carlo energy
"server mc"_server_mc.html = LAMMPS is a server for computing a Monte Carlo energy
:ul
The server doc files give details of the message protocols
for data that is exchanged bewteen the client and server.
...
...
@@ -119,7 +119,7 @@ For message exchange in {mpi/one} mode:
Launch both codes in a single mpirun command:
mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server
mpirun -np 2 lmp_mpi -mpicolor 0 -in in.message.client -log log.client : -np 4 lmp_mpi -mpicolor 1 -in in.message.server -log log.server
:pre
The two -np values determine how many procs the client and the server
run on.
...
...
This diff is collapsed.
Click to expand it.
doc/src/server_mc.txt
+
3
−
3
View file @
0384ef89
...
...
@@ -63,7 +63,7 @@ See the src/MESSAGE/server_mc.cpp file for details on how LAMMPS uses
these messages. See the examples/COUPLE/lammmps_mc/mc.cpp file for an
example of how an MC driver code can use these messages.
Let
NATOMS=1, EINIT=2, DISPLACE=3, ACCEPT=4, RUN=5.
Define
NATOMS=1, EINIT=2, DISPLACE=3, ACCEPT=4, RUN=5.
[Client sends one of these kinds of message]:
...
...
@@ -93,9 +93,9 @@ cs->pack(2,3*natoms,x) # 2nd field = 3N coords of Natoms :pre
cs->send(DISPLACE,1) # msgID = 3 with 1 field
cs->pack_double(1,poteng) # 1st field = new potential energy of system :pre
cs->send(ACCEPT,0) # msgID = 4 with no fields
cs->send(ACCEPT,0) # msgID = 4 with no fields
:pre
cs->send(RUN,0) # msgID = 5 with no fields
cs->send(RUN,0) # msgID = 5 with no fields
:pre
:line
...
...
This diff is collapsed.
Click to expand it.
doc/src/server_md.txt
+
9
−
7
View file @
0384ef89
...
...
@@ -51,9 +51,9 @@ can complete the timestep. This command could also be used with a
client code that performs energy minimization, using the server to
compute forces and energy each iteration of its minimizer.
When using the "fix client/md" command, LAMMPS (as
the client code)
does the timestepping and receives needed energy,
forces, and pressure
values from the server code.
When using the "fix client/md"
_fix_client_md.html
command, LAMMPS (as
the client code)
does the timestepping and receives needed energy,
forces, and pressure
values from the server code.
The format and content of the exchanged messages are explained here in
a conceptual sense. Python-style pseudo code for the library calls to
...
...
@@ -69,9 +69,11 @@ a quantum code (VASP) can use use these messages.
The following pseudo-code uses these values, defined as enums.
enum{SETUP=1,STEP};
enum{DIM=1,PERIODICITY,ORIGIN,BOX,NATOMS,NTYPES,TYPES,COORDS,UNITS,CHARGE};
enum{FORCES=1,ENERGY,PRESSURE,ERROR}; :pre
Define:
SETUP=1, STEP=2
DIM=1, PERIODICITY=2, ORIGIN=3, BOX=4, NATOMS=5, NTYPES=6, TYPES=7, COORDS=8, UNITS-9, CHARGE=10
FORCES=1, ENERGY=2, PRESSURE=3, ERROR=4 :pre
[Client sends 2 kinds of messages]:
...
...
@@ -98,7 +100,7 @@ cs->send(STEP,nfields) # msgID with nfields :pre
cs->pack(COORDS,3*natoms,x) # vector of 3N atom coords
cs->pack(ORIGIN,3,origin) # lower-left corner of simulation box
cs->pack(BOX,9,box) # 3 edge vectors of simulation box
cs->pack(BOX,9,box) # 3 edge vectors of simulation box
:pre
[Server replies to either kind of message]:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment