Browse Source

Windows 10 fixes for OpenMP

master
Trevor Irons 2 years ago
parent
commit
54cf400173

+ 4
- 3
CMake/SuperBuild.cmake View File

@@ -24,7 +24,7 @@ else()
24 24
 
25 25
     ExternalProject_Add(YAML_CPP
26 26
         GIT_REPOSITORY  "https://github.com/jbeder/yaml-cpp.git" 
27
-        GIT_TAG  "yaml-cpp-0.6.2"  # "master" 
27
+        GIT_TAG  "yaml-cpp-0.6.3"  # "master" 
28 28
         UPDATE_COMMAND ""
29 29
         PATCH_COMMAND ""
30 30
         PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
@@ -77,9 +77,10 @@ if (LEMMA_PYTHON3_BINDINGS)
77 77
         message( STATUS "pybind11 was found" )
78 78
     else()
79 79
         message( STATUS "pybind11 was NOT found, please build or remove LEMMA_PYTHON3_BINDINGS" )
80
-	    ExternalProject_Add(pybind11
80
+	    find_package(PythonLibs 3.0 REQUIRED)
81
+        ExternalProject_Add(pybind11
81 82
 		    GIT_REPOSITORY "https://github.com/pybind/pybind11.git"
82
-		    GIT_TAG "v2.3.0" #"master"
83
+		    GIT_TAG "v2.4.3" # "master" #"v2.4.3" #"master"
83 84
 		    UPDATE_COMMAND ""
84 85
 		    PATCH_COMMAND ""
85 86
     	    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/pybind11

+ 2
- 1
CMakeLists.txt View File

@@ -247,7 +247,8 @@ if (LEMMA_USE_BOOST)
247 247
 endif()
248 248
 
249 249
 if (LEMMA_PYTHON3_BINDINGS)
250
-    find_package(PythonLibs 3.0 REQUIRED)
250
+    #find_package(PythonLibs 3.0 REQUIRED)
251
+    #find_package(pythoninterp REQUIRED)
251 252
     find_package(pybind11 REQUIRED)
252 253
     #    find_package(Boost 1.64.0   REQUIRED COMPONENTS system python3 numpy3)
253 254
     # Is this OK for portability of non-python libraries

+ 3
- 3
Modules/FDEM1D/src/EMEarth1D.cpp View File

@@ -280,7 +280,7 @@ namespace Lemma {
280 280
                     for (int irec=0; irec<Receivers->GetNumberOfPoints(); ++irec) {
281 281
                         if (!Receivers->GetMask(irec)) {
282 282
                             AntCopy->ApproximateWithElectricDipoles(Receivers->GetLocation(irec));
283
-                            for (unsigned int idip=0; idip<AntCopy->GetNumberOfDipoles(); ++idip) {
283
+                            for (int idip=0; idip < static_cast<int>(AntCopy->GetNumberOfDipoles()); ++idip) {
284 284
                                 auto tDipole = AntCopy->GetDipoleSource(idip);
285 285
                                 //#ifdef LEMMAUSEOMP
286 286
                                 //#pragma omp for schedule(static, 1)
@@ -318,7 +318,7 @@ namespace Lemma {
318 318
                             #pragma omp for schedule(static, 1)
319 319
                             #endif
320 320
                             for (int ifreq=0; ifreq<Antenna->GetNumberOfFrequencies(); ++ifreq) {
321
-                                for (unsigned int idip=0; idip<Antenna->GetNumberOfDipoles(); ++idip) {
321
+                                for (int idip=0; idip< static_cast<int>(Antenna->GetNumberOfDipoles()); ++idip) {
322 322
                                     auto tDipole = Antenna->GetDipoleSource(idip);
323 323
                                     // Propogation constant in free space
324 324
                                     Real wavef   = tDipole->GetAngularFrequency(ifreq) *
@@ -354,7 +354,7 @@ namespace Lemma {
354 354
                                 #ifdef LEMMAUSEOMP
355 355
                                 #pragma omp for schedule(static, 1)
356 356
                                 #endif
357
-                                for (unsigned int idip=0; idip<Antenna->GetNumberOfDipoles(); ++idip) {
357
+                                for (int idip=0; idip<static_cast<int>(Antenna->GetNumberOfDipoles()); ++idip) {
358 358
                                     //#pragma omp critical
359 359
                                     //{
360 360
                                     //cout << "idip=" << idip << "\tthread num=" << omp_get_thread_num() << '\n';

+ 1
- 0
Modules/LemmaCore/src/ProgressBar.cpp View File

@@ -2,6 +2,7 @@
2 2
 #include <iostream>
3 3
 #include <iomanip>
4 4
 #include <sstream>
5
+#include <algorithm> 
5 6
 
6 7
 #define LENGTH_OF_PROGRESS_BAR 55
7 8
 #define PERCENTAGE_BIN_SIZE (100.0/LENGTH_OF_PROGRESS_BAR)

Loading…
Cancel
Save