Skip to content

Commit

Permalink
Added some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Apr 26, 2024
1 parent 68093b1 commit dc46535
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 6 additions & 1 deletion docs/src/distributed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ client becomes a significant overhead for the calculation. UNIX-domain
sockets create a special file in the local file system, that serves as a
rendezvous point between server and clients, and are uniquely identified
by the name of the file itself, that can be specified in the “address”
tag of in the xml input file and in the input of the client.
tag of in the xml input file and in the input of the client. By default
this file is created based on the address tag, with a `/tmp/ipi_` prefix.
This can be overridden setting the “sockets_prefix” attribute for the
:ref:`simulation` tag in the input file, or on the command-line using the
`-S` option. Note that several clients do not support changing the default
prefix.

Unfortunately, UNIX sockets do not allow one to run i-PI and the clients
on different computers, which limits greatly their utility when one
Expand Down
2 changes: 1 addition & 1 deletion ipi/inputs/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class InputSimulation(Input):
{
"dtype": str,
"default": "/tmp/ipi_",
"help": "A prefix prepended to all Unix-domain sockets.",
"help": "A prefix prepended to the `address` value to form the UNIX-domain socket location.",
},
),
}
Expand Down
7 changes: 5 additions & 2 deletions ipi/utils/inputvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,12 +829,15 @@ def help_rst(self, name="", indent="", level=0, stop_level=None, standalone=True
# For classes such as InputCell, self._default is not the value,
# instead it is an object that is stored, putting the default value in
# self.value. For this reason we print out self.value at this stage,
# and not self._default
# and not self._default. We also escape underscores that might appear
# in the default string value.
rstr += (
"\n"
+ indent
+ "*default*: "
+ self.pprint(self.value, indent=indent, latex=False)
+ self.pprint(self.value, indent=indent, latex=False).replace(
"_", r"\_"
)
+ "\n"
)

Expand Down

0 comments on commit dc46535

Please sign in to comment.