StackThreads/MP: version 0.77 User's Guide
Any StackThreads/MP program accepts the following command line
arguments. A shorter synonym is provided for commonly used ones. These
command line arguments are effective only when you do not write your own
main function but write st_main.
--n_workers P, or -nw P : specifies
the number of processors by P.
--stack_size S, or -ss S : specifies
the stack size of an OS-thread by S. S is either an integer, or
an integer followed by a k or m, which says the number
should be interpreted as kilobytes and megabytes, respectively. For
example, -ss 4m sets a stack size to 4 megabytes.
--print_toplevel_worker_stat, or -ps : prints
a simple statistics after a run. It prints statistics like how many
threads were created and how many blocking occurred.
--time_profile, or -tp : profiles processor
status and generates log files. The file names begin with 00stprof by
default. This can be changed by --time_profile_filename below.
--time_profile_filename N : specifies the prefix of log
files by N. For example, --time_profile_filename my_important_logs generate files of names
my_important_logs.xx.yy where xx and yy are
numbers.
--time_profile_resolution S : specifies the
resolution of the profile. S is the length of a period in
microseconds. Each period is represented by a state in which a processor
spends its longest time during that period.
--time_profile_buffer_size N : specifies the
size of in-memory buffer size of each processor. N is the number of
entries in the log file. Longer the N is, each processor can
tolerate a long profiling run without saving the log into a secondary
storage.
These command line arguments are removed from the command line before
entering st_main and only remaining arguments are passed to
st_main. For example, when you write:
./fib -nw 10 30 -ps
{ "./fib" "30" }
parameter argc.