Skip to content

Commit da5a732

Browse files
committed
docs: Document Configure options
1 parent 22e79aa commit da5a732

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

README.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,37 @@ or newer. The plug-ins are compiled against the header file `<slurm/spank.h>`.
3131
Fedora distributes this file in the `slurm-devel` RPM package [^DoUiD]. CMake is
3232
available via the `cmake` package.
3333

34+
Choose a `<build-dir>` to configure and build the plugin:
3435
```sh
35-
cmake -S . -B build # configure the project and choose a build dir
36-
cmake --build build # build the Singularity SPANK plug-in
37-
sudo cmake --install build # install the binary and configuration files
38-
# on older CMake: sudo cmake --build build --target install
36+
cmake -S <source-dir> -B <build-dir> # configure
37+
cmake --build <build-dir> # build the Singularity SPANK plug-in
38+
```
39+
40+
You may customize the configure phase further via the following CMake options:
41+
42+
CMake option | Default | Description
43+
---------------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------------
44+
`--install-prefix <install-dir>` | `/usr` | Equivalent to `-DCMAKE_INSTALL_PREFIX=<install-dir>`
45+
`-DINSTALL_PLUGSTACK_CONF=ON` | `OFF` | Whether to install a plugin config file
46+
`-DSLURM_SYSCONFDIR=...` | `/etc/slurm` | Slurm sysconfdir
47+
`-DSLURM_PLUGSTACK_CONF_D=...` | `${SLURM_SYSCONFDIR}/plugstack.conf.d` | Slurm plugstack conf dir
48+
`-DPLUGIN_DEFAULT_ARG=...` | `""` | Plugin default= arg`
49+
`-DPLUGIN_BIND_ARG=...` | `${SLURM_SYSCONFDIR},/var/spool/slurm,/var/run/munge` | Plugin bind= arg
50+
`-DPLUGIN_EXTRA_ARGS=...` | `""` | Plugin args= arg
51+
`-DSLURM_INCLUDE_DIR=...` | Detected by CMake, typically `/usr/include` | Slurm include dir passed to compiler via `-I` so `#include <slurm/spank.h>` resolves
52+
`-DCMAKE_INSTALL_LIBEXECDIR=...` | `libexec` on RHEL-based systems | FHS "internal binaries" directory
53+
54+
## Install
55+
56+
```sh
57+
[sudo] cmake --install <build-dir>
3958
```
4059

41-
By default the plug-in `singularity-exec.so` is installed to `/usr/lib64/slurm`.
60+
`sudo` is needed to install to system directories like `/usr`.
61+
62+
By default, installation directories are chosen to be FSH-compliant [^sSrfT] as
63+
implemented by the CMake "GNUInstallDirs" module [^dsfDS].
4264

43-
Restart `slurmd` in order to load the plug-in after installation.
4465

4566
## Configuration
4667

@@ -76,6 +97,9 @@ Option | Description
7697

7798
Passing `-DINSTALL_PLUGSTACK_CONF=ON` to the CMake configure command will automate the above configuration.
7899

100+
Restart `slurmd` in order to load the plug-in after installation and configuration.
101+
102+
79103
## Usage
80104

81105
The plugin adds following command-line options to `salloc`, `srun` and `sbatch`:
@@ -209,6 +233,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
209233
[^DoUiD]: Fedora Slurm RPM Package
210234
<https://src.fedoraproject.org/rpms/slurm>
211235

236+
[^sSrfT]: Filesystem Hierarchy Standard
237+
<https://refspecs.linuxfoundation.org/fhs.shtml>
238+
239+
[^dsfDS]: CMake "GNUInstallDirs" module
240+
<https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html>
241+
212242
[99]: singularity-exec.conf.in
213243
[98]: slurm-singularity-wrapper.sh
214244
[97]: containers.sh

0 commit comments

Comments
 (0)