Merge pull request #1788 from atgeirr/fix-missing-openmp
Let make_lodsmry also work without OpenMP.
This commit is contained in:
commit
7cff27c801
@ -20,10 +20,13 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <getopt.h>
|
||||
#include <omp.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if HAVE_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
#include <opm/io/eclipse/ESmry.hpp>
|
||||
#include <opm/io/eclipse/EclUtil.hpp>
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
@ -64,6 +67,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
int argOffset = optind;
|
||||
|
||||
#if HAVE_OPENMP
|
||||
int available_threads = omp_get_max_threads();
|
||||
|
||||
if (max_threads < 0)
|
||||
@ -75,6 +79,7 @@ int main(int argc, char **argv) {
|
||||
max_threads = argc-argOffset;
|
||||
|
||||
omp_set_num_threads(max_threads);
|
||||
#endif
|
||||
|
||||
auto lap0 = std::chrono::system_clock::now();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user