mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-21 06:25:30 -04:00
Check for missing thread count argument for -s/--threads (#3940)
This commit is contained in:
parent
195dff6d1d
commit
beed56e6ee
1 changed files with 5 additions and 0 deletions
|
|
@ -300,6 +300,11 @@ int parse_command_line(int argc, char* argv[])
|
|||
settings::run_mode = RunMode::VOLUME;
|
||||
} else if (arg == "-s" || arg == "--threads") {
|
||||
// Read number of threads
|
||||
if (i + 1 >= argc) {
|
||||
std::string msg {"Number of threads not specified."};
|
||||
strcpy(openmc_err_msg, msg.c_str());
|
||||
return OPENMC_E_INVALID_ARGUMENT;
|
||||
}
|
||||
i += 1;
|
||||
|
||||
#ifdef _OPENMP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue