Skip to content

Commit 07e53f7

Browse files
authored
Merge pull request #723 from jeffriley/docsfixes
Changes to online documentation for issues #695 and #680
2 parents f35975f + 815a1e7 commit 07e53f7

File tree

3 files changed

+38
-11
lines changed

3 files changed

+38
-11
lines changed

docs/online-docs/pages/User guide/Program options/program-options-ranges.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ where `range-specifier` is defined as:
3232
`start` and `increment` must be the same data type as option-name. |br|
3333
`count` must be a positive integer value.
3434

35+
There should be no spaces inside the brackets ([]). Spaces on the command line are interpreted as argument delimiters
36+
by the shell parser before passing the command-line arguments to the COMPAS executable, so if spaces are present inside
37+
the brackets the shell parser breaks the range specification into multiple command-line arguments.
38+
3539
To specify a range of values for the ``--metallicity`` option, a user, if running COMPAS from the command line
3640
and with no grid file, would type any of the following::
3741

@@ -51,3 +55,9 @@ type::
5155
./COMPAS --metallicity [0.0001,10,0.0013] --common-envelope-alpha [0.1,5,0.2]
5256

5357
and COMPAS would evolve a grid of 50 binaries using the 10 metallicity values and 5 common envelope alpha values.
58+
59+
Note that when a range is, or ranges are, specified on the command line, the ``--number-of-systems`` command-line option is ignored.
60+
This is to avoid multiple systems with identical initial values being evolved. Ranges and sets can be mixed with grid files, and
61+
in that case ranges and sets specified on the command line will be played out for each grid file line.
62+
63+

docs/online-docs/pages/User guide/Program options/program-options-sets.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ where `set-specifier` is defined as:
2828

2929
`set-identifier` is mandatory for `set-specifier`. |br|
3030
`value`:sub:`i` must be the same data type as `option-name`.
31+
32+
There should be no spaces inside the brackets ([]). Spaces on the command line are interpreted as argument delimiters
33+
by the shell parser before passing the command-line arguments to the COMPAS executable, so if spaces are present inside
34+
the brackets the shell parser breaks the set specification into multiple command-line arguments.
3135

3236
Valid values for boolean options are {1|0, TRUE|FALSE, YES|NO, ON|OFF}, and all set values must be of
3337
the same type (i.e. all 1|0, or all YES|NO etc.).
@@ -44,3 +48,9 @@ command line and with no grid file, would type any of the following::
4448

4549
In each of the examples above the user has specified, by the use of the `set-specifier`, that three binary stars
4650
should be evolved, using the eccentricity distributions ’THERMALISED’, ’FIXED’, and ’FLAT’.
51+
52+
Note that when a set is, or sets are, specified on the command line, the ``--number-of-systems`` command-line option is ignored.
53+
This is to avoid multiple systems with identical initial values being evolved. Ranges and sets can be mixed with grid files, and
54+
in that case ranges and sets specified on the command line will be played out for each grid file line.
55+
56+

docs/online-docs/pages/User guide/Running COMPAS/running-via-docker-running.rst

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ To run COMPAS via a ``pythonSubmit.py`` file, type::
1313
docker run \
1414
--rm \
1515
-it \
16+
-v $(pwd)/compas-input:/app/COMPAS/config \
1617
-v $(pwd)/compas-logs:/app/COMPAS/logs \
1718
-v $(pwd)/pythonSubmit.py:/app/starts/pythonSubmit.py \
1819
-e COMPAS_EXECUTABLE_PATH=/app/COMPAS/bin/COMPAS \
20+
-e COMPAS_INPUT_DIR_PATH=/app/COMPAS/config \
1921
-e COMPAS_LOGS_OUTPUT_DIR_PATH=/app/COMPAS/logs \
2022
teamcompas/compas \
2123
python3 /app/starts/pythonSubmit.py
@@ -35,8 +37,9 @@ short for [-i and -t] - provides an interactive terminal\ [#f2]_.
3537
**-v <path-on-host>:<path-in-container>** |br|
3638
mount ``<path-on-host>`` to ``<path-in-container>``\ [#f3]_. |br|
3739

38-
This time we not only want to get the output from COMPAS on the host machine, we also want to supply a ``pythonSubmit.py`` to the
39-
container from the host machine.
40+
This time we not only want to read the COMPAS input files (i.e. grid file and/or logfile-definitions file) on the
41+
host from the container, and get the output from COMPAS in the container onto the host machine, we also want to
42+
supply a ``pythonSubmit.py`` to the container from the host machine.
4043

4144
**-e VAR_NAME=value** |br|
4245
set the environment variable ``VAR_VAME`` to `value`\ [#f4]_.
@@ -53,13 +56,14 @@ via the command line
5356

5457
To run the COMPAS executable from the command line (i.e. without ``pythonSubmit.py``), type::
5558

56-
docker run \
57-
--rm \
58-
-it \
59-
-v $(pwd)/compas-logs:/app/COMPAS/logs \
60-
teamcompas/compas \
61-
bin/COMPAS \
62-
--number-of-systems=5 \
59+
docker run \
60+
--rm \
61+
-it \
62+
-v $(pwd)/compas-input:/app/COMPAS/config \
63+
-v $(pwd)/compas-logs:/app/COMPAS/logs \
64+
teamcompas/compas \
65+
bin/COMPAS \
66+
--number-of-systems=5 \
6367
--output-path=/app/COMPAS/logs
6468

6569

@@ -77,7 +81,9 @@ short for [-i and -t] - provides an interactive terminal\ [#f2]_.
7781
**-v <path-on-host>:<path-in-container>** |br|
7882
mount ``<path-on-host>`` to ``<path-in-container>``\ [#f3]_. |br|
7983

80-
In this instance, make it so `$(pwd)/compas-logs` on my machine is the same as `/app/COMPAS/logs` inside the container.
84+
In this instance, make it so |br|
85+
`$(pwd)/compas-input` on my machine is the same as `/app/COMPAS/config` inside the container. |br|
86+
`$(pwd)/compas-logs` on my machine is the same as `/app/COMPAS/logs` inside the container.
8187

8288
**teamcompas/compas** |br|
8389
the image to run.
@@ -102,7 +108,7 @@ environment, and are non-breaking changes (i.e. benign to other environments).
102108
``COMPAS_EXECUTABLE_PATH`` specifies where ``pythonSubmit.py`` looks for the COMPAS executable. This override exists purely for
103109
ease-of-use from the command line.
104110

105-
`COMPAS_LOGS_OUTPUT_DIR_PATH` specifies where COMPAS output log filess are created. The override exists because the mounted directory
111+
`COMPAS_LOGS_OUTPUT_DIR_PATH` specifies where COMPAS output log files are created. The override exists because the mounted directory
106112
(option `-v`) is created before COMPAS runs. COMPAS sees that the directory where it's supposed to put logs already exists, so it
107113
creates a different (i.e. non-mapped) directory for the output log files.
108114

@@ -143,3 +149,4 @@ to get the container id of interest, then type::
143149
.. [#f5] https://docs.docker.com/engine/reference/run/
144150
.. [#f6] https://docs.docker.com/engine/reference/run/#detached--d
145151
152+

0 commit comments

Comments
 (0)