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