[feat] Set number of threads via env variable OMP_NUM_THREADS.
This commit is contained in:
parent
5f333fcb77
commit
4692a246d5
@ -85,6 +85,11 @@ double run_bench(const bench_input &input, const std::string &output_file) {
|
|||||||
|
|
||||||
tug::Simulation<TugType> sim(grid, boundary);
|
tug::Simulation<TugType> sim(grid, boundary);
|
||||||
|
|
||||||
|
if (const char *out = std::getenv("OMP_NUM_THREADS")) {
|
||||||
|
int ompNumThreads = std::stoi(out, NULL);
|
||||||
|
sim.setNumberThreads(ompNumThreads);
|
||||||
|
}
|
||||||
|
|
||||||
sim.setTimestep(input.timestep);
|
sim.setTimestep(input.timestep);
|
||||||
sim.setIterations(input.iterations);
|
sim.setIterations(input.iterations);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user