Skip to content

Commit 16a01d5

Browse files
committed
add --help to the script and docs
1 parent 8d16e3e commit 16a01d5

2 files changed

Lines changed: 41 additions & 40 deletions

File tree

bin/sifdecoder

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,51 @@
66
# This version September 28th, 2025
77

88
display_short_help() {
9-
echo ' Use: sifdecoder [-A architecture] [-sp] [-qp] [-h] [-c] [-f] [-b]'
10-
echo ' [-a j] [-p package] [-s size] [-o j] [-m] [-st j]'
11-
echo ' [-show] [-param name=value[,name=value...]]'
9+
echo ' Use: sifdecoder [-A architecture] [-sp] [-qp] [-h,--help] [-c] [-f]'
10+
echo ' [-b] [-a j] [-p package] [-s size] [-o j] [-m]'
11+
echo ' [-st j] [-show] [-param name=value[,name=value...]]'
1212
echo ' [-force] probname[.SIF]'
1313
}
1414

1515
display_long_help() {
1616
display_short_help
1717
echo "where options:"
18-
echo " -A : specify the architecture. (Default: use $MYARCH)"
19-
echo " -h : print this help and stop execution"
20-
echo " -o : 0 for silent mode, 1 for brief description"
21-
echo " of the stages executed. (Default: -o 0)"
22-
echo " -m : check for memory leaks using valgrind"
23-
echo " -f : use automatic differentiation in Forward mode"
24-
echo " -b : use automatic differentiation in Backward mode"
25-
echo " -a : 1 use the older HSL automatic differentiation "
26-
echo " package AD01"
27-
echo " 2 use the newer HSL automatic differentiation "
28-
echo " package AD02"
29-
echo " (Default: -a 2)"
30-
echo " -p : decode for a particular package"
31-
echo " 1=LANCELOT, 2=BARIA, 3=CUTEst (default)"
32-
echo " -c : check derivatives for errors using finite"
33-
echo " differences (default: do not check)"
34-
echo " -s : rough size of problem for array initialization"
35-
echo " 0=debug, 1=small, 2=medium, 3=large (default)"
36-
echo " -sp : decode problem in single precision (default: double)"
37-
echo " -qp : decode problem in quadruple precision (default: double)"
38-
echo " -st : starting point vector to be used"
39-
echo " (Default: -st 1)"
40-
echo " -show : displays possible parameter settings for"
41-
echo " probname[.SIF]. Other options are ignored"
42-
echo " -param : cast probname[.SIF] against explicit parameter"
43-
echo " settings. Several parameter settings may be"
44-
echo " given as a comma-separated list following"
45-
echo " -param or using several -param flags."
46-
echo " Use -show to view possible settings."
47-
echo " -force : forces setting of a parameter to the given value"
48-
echo " even if this value is not specified in the file."
49-
echo " This option should be used with care."
50-
echo " (Default: do not enforce)."
18+
echo " -A : specify the architecture. (Default: use $MYARCH)"
19+
echo " -h,--help : print this help and stop execution"
20+
echo " -o : 0 for silent mode, 1 for brief description"
21+
echo " of the stages executed. (Default: -o 0)"
22+
echo " -m : check for memory leaks using valgrind"
23+
echo " -f : use automatic differentiation in Forward mode"
24+
echo " -b : use automatic differentiation in Backward mode"
25+
echo " -a : 1 use the older HSL automatic differentiation "
26+
echo " package AD01"
27+
echo " 2 use the newer HSL automatic differentiation "
28+
echo " package AD02"
29+
echo " (Default: -a 2)"
30+
echo " -p : decode for a particular package"
31+
echo " 1=LANCELOT, 2=BARIA, 3=CUTEst (default)"
32+
echo " -c : check derivatives for errors using finite"
33+
echo " differences (default: do not check)"
34+
echo " -s : rough size of problem for array initialization"
35+
echo " 0=debug, 1=small, 2=medium, 3=large (default)"
36+
echo " -sp : decode problem in single precision (default: double)"
37+
echo " -qp : decode problem in quadruple precision"
38+
echo " : (default: double)"
39+
echo " -st : starting point vector to be used"
40+
echo " (Default: -st 1)"
41+
echo " -show : displays possible parameter settings for"
42+
echo " probname[.SIF]. Other options are ignored"
43+
echo " -param : cast probname[.SIF] against explicit parameter"
44+
echo " settings. Several parameter settings may be"
45+
echo " given as a comma-separated list following"
46+
echo " -param or using several -param flags."
47+
echo " Use -show to view possible settings."
48+
echo " -force : forces setting of a parameter to the given value"
49+
echo " even if this value is not specified in the file."
50+
echo " This option should be used with care."
51+
echo " (Default: do not enforce)."
5152
echo ""
52-
echo " probname probname.SIF is the name of the file containing"
53+
echo " probname probname.SIF is the name of the file containing"
5354
echo " the SIF file for the problem of interest."
5455
}
5556

man/man1/sifdecoder.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.SH NAME
44
sifdecoder \- SIF-decoding script.
55
.SH SYNOPSIS
6-
\fBsifdecoder\fP [\-A \fIarch\fP] [\-sp] [\-qp] [\-h] [\-o \fI0|1\fP] [-m]
7-
[\-f] [\-b] [\-a \fI1|2\fP]
6+
\fBsifdecoder\fP [\-A \fIarch\fP] [\-sp] [\-qp] [\-h, \-\-help] [\-o \fI0|1\fP]
7+
[-m] [\-f] [\-b] [\-a \fI1|2\fP]
88
[\-p \fI1|2|3\fP]
99
[\-s \fI0|1|2|3\fP]
1010
[\-st \fI1|2|3\fP]
@@ -39,7 +39,7 @@ decode the problem for use with the double precision tools.
3939
Decode the problem for use with the quadruple precision tools. The default is to
4040
decode the problem for use with the double precision tools.
4141
.TP
42-
.B \-h
42+
.B \-h, \-\-help
4343
Print a short help message.
4444
.TP
4545
.BI \-o " 0|1"

0 commit comments

Comments
 (0)