Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--num_threads option should be --num-threads #871

Closed
pdbj opened this issue Aug 12, 2022 · 1 comment
Closed

--num_threads option should be --num-threads #871

pdbj opened this issue Aug 12, 2022 · 1 comment

Comments

@pdbj
Copy link

pdbj commented Aug 12, 2022

--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
Copy link
Author

pdbj commented Aug 12, 2022

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.",

feldergast added a commit to feldergast/sst-core that referenced this issue Oct 6, 2022
- Change command line option --num_threads to --num_threads.  Fixes sstsimulator#871
- Fix setting of threads in the Python input file.  Fixes sstsimulator#872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant