Merge pull request #1788 from atgeirr/fix-missing-openmp

Let make_lodsmry also work without OpenMP.
This commit is contained in:
Atgeirr Flø Rasmussen 2020-05-14 19:11:51 +02:00 committed by GitHub
commit 7cff27c801
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();