16 char const*
const num_threads_env = std::getenv(
"OGS_ASM_THREADS");
23 if (std::strlen(num_threads_env) == 0)
25 OGS_FATAL(
"The environment variable OGS_ASM_THREADS is set but empty.");
28 std::string num_threads_str{num_threads_env};
31 std::istringstream num_threads_iss{num_threads_str};
34 num_threads_iss >> num_threads;
38 OGS_FATAL(
"Error parsing OGS_ASM_THREADS (= \"{}\").", num_threads_env);
41 if (!num_threads_iss.eof())
44 "Error parsing OGS_ASM_THREADS (= \"{}\"): not read entirely, the "
45 "remainder is \"{}\"",
47 num_threads_iss.str().substr(num_threads_iss.tellg()));
53 "You asked (via OGS_ASM_THREADS) to assemble with {} < 1 thread.",