From 149dc5c9ce74f13a7ecfee48e2c7670aef095283 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Thu, 17 Mar 2016 08:11:32 -0700
Subject: [PATCH] Document compress option

Update srun and sbcast man pages and help messages for compression
  library argument.
---
 doc/man/man1/sbcast.1  |  7 +++++--
 doc/man/man1/srun.1    |  7 +++++--
 src/sbcast/opts.c      | 24 ++++++++++++------------
 src/srun/libsrun/opt.c |  4 +++-
 4 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/doc/man/man1/sbcast.1 b/doc/man/man1/sbcast.1
index bfaf95b3340..381cafe3ab6 100644
--- a/doc/man/man1/sbcast.1
+++ b/doc/man/man1/sbcast.1
@@ -1,4 +1,4 @@
-.TH sbcast "1" "Slurm Commands" "April 2015" "Slurm Commands"
+.TH sbcast "1" "Slurm Commands" "March 2016" "Slurm Commands"
 
 .SH "NAME"
 sbcast \- transmit a file to the nodes allocated to a Slurm job.
@@ -22,8 +22,11 @@ by file size, degree of parallelism, and network type.
 
 .SH "OPTIONS"
 .TP
-\fB\-C\fR, \fB\-\-compress\fR
+\fB\-C\fR [\fIlibrary\fR], \fB\-\-compress\fR[=\fIlibrary\fR]
 Compress the file being transmitted.
+The optional argument specifies the data compression library to be used.
+Supported values are "zlib" (default) and "lz4".
+Some compression libraries may be unavailable on some systems.
 .TP
 \fB\-f\fR, \fB\-\-force\fR
 If the destination file already exists, replace it.
diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1
index ad26c561dd5..8c9d7d3e14c 100644
--- a/doc/man/man1/srun.1
+++ b/doc/man/man1/srun.1
@@ -1,4 +1,4 @@
-.TH srun "1" "Slurm Commands" "January 2016" "Slurm Commands"
+.TH srun "1" "Slurm Commands" "March 2016" "Slurm Commands"
 
 .SH "NAME"
 srun \- Run parallel jobs
@@ -213,8 +213,11 @@ and "<job_id>.<step_id>.ckpt" for job steps.
 An arbitrary comment.
 
 .TP
-\fB\-\-compress\fR
+\fB\-\-compress\fR[=\fItype\fR]
 Compress file before sending it to compute hosts.
+The optional argument specifies the data compression library to be used.
+Supported values are "zlib" (default) and "lz4".
+Some compression libraries may be unavailable on some systems.
 For use with the \fB\-\-bcast\fR option.
 
 .TP
diff --git a/src/sbcast/opts.c b/src/sbcast/opts.c
index b7577432058..9c7bcb1015c 100644
--- a/src/sbcast/opts.c
+++ b/src/sbcast/opts.c
@@ -244,17 +244,17 @@ static void _help( void )
 {
 	printf ("\
 Usage: sbcast [OPTIONS] SOURCE DEST\n\
-  -C, --compress      compress the file being transmitted\n\
-  -f, --force         replace destination file as required\n\
-  -F, --fanout=num    specify message fanout\n\
-  -j, --jobid=#[.#]   specify job ID and optional step ID, unneeded if run\n\
-                      inside allocation\n\
-  -p, --preserve      preserve modes and times of source file\n\
-  -s, --size=num      block size in bytes (rounded off)\n\
-  -t, --timeout=secs  specify message timeout (seconds)\n\
-  -v, --verbose       provide detailed event logging\n\
-  -V, --version       print version information and exit\n\
+  -C, --compress[=lib] compress the file being transmitted\n\
+  -f, --force          replace destination file as required\n\
+  -F, --fanout=num     specify message fanout\n\
+  -j, --jobid=#[.#]    specify job ID and optional step ID, unneeded if run\n\
+                       inside allocation\n\
+  -p, --preserve       preserve modes and times of source file\n\
+  -s, --size=num       block size in bytes (rounded off)\n\
+  -t, --timeout=secs   specify message timeout (seconds)\n\
+  -v, --verbose        provide detailed event logging\n\
+  -V, --version        print version information and exit\n\
 \nHelp options:\n\
-  --help              show this help message\n\
-  --usage             display brief usage message\n");
+  --help               show this help message\n\
+  --usage              display brief usage message\n");
 }
diff --git a/src/srun/libsrun/opt.c b/src/srun/libsrun/opt.c
index 4dfc0471b4c..709a7d1f976 100644
--- a/src/srun/libsrun/opt.c
+++ b/src/srun/libsrun/opt.c
@@ -2723,7 +2723,8 @@ static void _usage(void)
 "            [--switches=max-switches{@max-time-to-wait}] [--reboot]\n"
 "            [--core-spec=cores] [--thread-spec=threads]\n"
 "            [--bb=burst_buffer_spec] [--bbf=burst_buffer_file]\n"
-"            [--acctg-freq=<datatype>=<interval>} [--bcast=<dest_path>]\n"
+"            [--bcast=<dest_path>] [--compress[=library]]\n"
+"            [--acctg-freq=<datatype>=<interval>]\n"
 "            [-w hosts...] [-x hosts...] executable [args...]\n");
 
 }
@@ -2750,6 +2751,7 @@ static void _help(void)
 "      --checkpoint-dir=dir    directory to store job step checkpoint image \n"
 "                              files\n"
 "      --comment=name          arbitrary comment\n"
+"      --compress[=library]    data compression library used with --bcast\n
 "      --cpu-freq=min[-max[:gov]] requested cpu frequency (and governor)\n"
 "  -d, --dependency=type:jobid defer job until condition on jobid is satisfied\n"
 "      --deadline=time         remove the job if no ending possible before\n"
-- 
GitLab