sst-core icon indicating copy to clipboard operation
sst-core copied to clipboard

--num_threads option should be --num-threads

Open pdbj opened this issue 2 years ago • 1 comments

--num_threads option is the only option which uses underscore _ instead of dash - to separate words.

Even the error message in Config::setNumThreads uses dash

An option -num-threads should be provided. (Keep num_threads for backwards compatibility)

pdbj avatar Aug 12 '22 21:08 pdbj

Diff to fix this:

diff --git a/src/sst/core/config.cc b/src/sst/core/config.cc
index 63939421..68be8397 100644
--- a/src/sst/core/config.cc
+++ b/src/sst/core/config.cc
@@ -798,7 +798,9 @@ static const struct sstLongOpts_s sstOptions[] = {
         "verbose", 'v', "level", "Verbosity level to determine what information about core runtime is printed",
         &ConfigHelper::incrVerbose, &ConfigHelper::setVerbosity, true),
     DEF_ARG(
-        "num_threads", 'n', "NUM", "Number of parallel threads to use per rank", &ConfigHelper::setNumThreads, true),
+        "num-threads", 'n', "NUM", "Number of parallel threads to use per rank", &ConfigHelper::setNumThreads, true),
+    DEF_ARG(
+        "num_threads", 'n', "NUM", "[DEPRECATED] Obsolete synonym for --num-threads.", &ConfigHelper::setNumThreads, true),
     DEF_ARG(
         "sdl-file", 0, "FILE",
         "Specify SST Configuration file.  Note: this is most often done by just specifying the file without an option.",

pdbj avatar Aug 12 '22 21:08 pdbj