-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
OpenFOAM-v2106.patch
887 lines (794 loc) · 32.1 KB
/
OpenFOAM-v2106.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
.../CGALTriangulation3DKernel.H | 5 +++
.../indexedVertex/indexedVertex.H | 3 ++
.../surfaceBooleanFeatures.C | 3 ++
bin/tools/RunFunctions | 4 ++
bin/tools/lib-dir | 8 ++--
etc/config.csh/functions | 8 +++-
etc/config.csh/mac/paraview | 13 ++++++
etc/config.csh/paraview | 21 ++++++++--
etc/config.csh/setup | 45 ++++++++++++++++++---
etc/config.csh/unset | 22 ++++++++--
etc/config.sh/CGAL | 4 +-
etc/config.sh/FFTW | 2 +-
etc/config.sh/adios2 | 4 +-
etc/config.sh/ccmio | 2 +-
etc/config.sh/functions | 3 +-
etc/config.sh/gperftools | 2 +-
etc/config.sh/hypre | 2 +-
etc/config.sh/kahip | 2 +-
etc/config.sh/mac/paraview | 18 +++++++++
etc/config.sh/metis | 2 +-
etc/config.sh/mgridgen | 4 +-
etc/config.sh/petsc | 2 +-
etc/config.sh/scotch | 2 +-
etc/config.sh/setup | 47 ++++++++++++++++++----
etc/config.sh/unset | 25 ++++++++++--
etc/config.sh/vtk | 10 ++---
src/renumber/SloanRenumber/SloanRenumber.C | 3 ++
wmake/rules/darwin64Clang/c | 2 +
wmake/rules/darwin64Clang/c++ | 2 +
wmake/rules/darwin64Clang/cgal | 5 +--
wmake/scripts/have_adios2 | 24 +++++------
wmake/scripts/have_mgridgen | 10 +++--
32 files changed, 239 insertions(+), 70 deletions(-)
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
index 277bd836..9dfe234d 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
@@ -35,6 +35,9 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-W#pragma-messages"
+
#include "CGAL/Delaunay_triangulation_3.h"
#ifdef CGAL_INEXACT
@@ -62,6 +65,8 @@ Description
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+#pragma clang diagnostic pop
+
#endif
// ************************************************************************* //
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
index 22271ebe..c53bb14c 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.H
@@ -40,7 +40,10 @@ SourceFiles
#ifndef indexedVertex_H
#define indexedVertex_H
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-W#pragma-messages"
#include "CGAL/Triangulation_3.h"
+#pragma clang diagnostic pop
#include "CGALTriangulation3DKernel.H"
#include "tensor.H"
#include "triad.H"
diff --git a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
index 174ae436..8ca5a13f 100644
--- a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
+++ b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
@@ -91,7 +91,10 @@ Description
#ifndef NO_CGAL
#include <CGAL/AABB_tree.h>
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-W#pragma-messages"
#include <CGAL/AABB_traits.h>
+#pragma clang diagnostic pop
#include <CGAL/AABB_face_graph_triangle_primitive.h>
#include "CGALIndexedPolyhedron.H"
#include "PolyhedronReader.H"
diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index 12077a00..09a6c91a 100644
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -19,6 +19,10 @@
#
#------------------------------------------------------------------------------
+# Work-around for cleared DYLD_LIBRARY_PATH variable
+[ -z "$DYLD_LIBRARY_PATH" -a -n "$FOAM_DYLD_LIBRARY_PATH" ] \
+ && export DYLD_LIBRARY_PATH="$FOAM_DYLD_LIBRARY_PATH"
+
# The normal locations
[ -n "$FOAM_TUTORIALS" ] || export FOAM_TUTORIALS="$WM_PROJECT_DIR"/tutorials
diff --git a/bin/tools/lib-dir b/bin/tools/lib-dir
index f423411f..38328167 100755
--- a/bin/tools/lib-dir
+++ b/bin/tools/lib-dir
@@ -162,10 +162,10 @@ then
printf "%s\n" "-L$resolved"
;;
csh-Darwin*)
- echo "setenv DYLD_LIBRARY_PATH $resolved:$DYLD_LIBRARY_PATH"
+ echo "setenv FOAM_DYLD_LIBRARY_PATH $resolved:$FOAM_DYLD_LIBRARY_PATH"
if [ -n "$verboseOutput" ]
then
- echo "setenv DYLD_LIBRARY_PATH $resolved:$DYLD_LIBRARY_PATH" 1>&2
+ echo "setenv FOAM_DYLD_LIBRARY_PATH $resolved:$FOAM_DYLD_LIBRARY_PATH" 1>&2
fi
;;
csh*)
@@ -176,10 +176,10 @@ then
fi
;;
sh-Darwin*)
- echo "DYLD_LIBRARY_PATH=$resolved:$DYLD_LIBRARY_PATH"
+ echo "FOAM_DYLD_LIBRARY_PATH=$resolved:$FOAM_DYLD_LIBRARY_PATH"
if [ -n "$verboseOutput" ]
then
- echo "DYLD_LIBRARY_PATH=$resolved:$DYLD_LIBRARY_PATH" 1>&2
+ echo "FOAM_DYLD_LIBRARY_PATH=$resolved:$FOAM_DYLD_LIBRARY_PATH" 1>&2
fi
;;
*)
diff --git a/etc/config.csh/functions b/etc/config.csh/functions
index c7cec4f0..fe450328 100644
--- a/etc/config.csh/functions
+++ b/etc/config.csh/functions
@@ -31,7 +31,7 @@ alias _foamAddMan 'setenv MANPATH \!*\:${MANPATH}'
# Special treatment for Darwin
# - DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH
if (`uname -s` == "Darwin") then
- alias _foamAddLib 'setenv DYLD_LIBRARY_PATH \!*\:${DYLD_LIBRARY_PATH}'
+ alias _foamAddLib 'setenv DYLD_LIBRARY_PATH \!*\:${DYLD_LIBRARY_PATH}; setenv FOAM_DYLD_LIBRARY_PATH \!*\:${FOAM_DYLD_LIBRARY_PATH}'
else
alias _foamAddLib 'setenv LD_LIBRARY_PATH \!*\:${LD_LIBRARY_PATH}'
endif
@@ -39,7 +39,11 @@ endif
# Prefix to LD_LIBRARY_PATH with additional checking
# $1 = base directory for 'lib' or 'lib64'
# $2 = fallback libname ('lib' or 'lib64')
-alias _foamAddLibAuto 'eval `$WM_PROJECT_DIR/bin/tools/lib-dir -csh \!*`'
+if (`uname -s` == "Darwin") then
+ alias _foamAddLibAuto 'eval `$WM_PROJECT_DIR/bin/tools/lib-dir -csh \!*`; setenv DYLD_LIBRARY_PATH "$FOAM_DYLD_LIBRARY_PATH"'
+else
+ alias _foamAddLibAuto 'eval `$WM_PROJECT_DIR/bin/tools/lib-dir -csh \!*`'
+endif
# Echo values when FOAM_VERBOSE is on, no-op otherwise
# Source an etc file, possibly with some verbosity
diff --git a/etc/config.csh/mac/paraview b/etc/config.csh/mac/paraview
new file mode 100644
index 00000000..53adbcca
--- /dev/null
+++ b/etc/config.csh/mac/paraview
@@ -0,0 +1,13 @@
+set _paraview = /Applications/[Pp][Aa][Rr][Aa][Vv][Ii][Ee][Ww]*.app
+if ( -d $_paraview ) then
+ if ( $?prompt ) echo Using $_paraview
+ alias paraview "$_paraview/Contents/MacOS/paraview"
+else
+ echo
+ echo "Please download binary Paraview release from"
+ echo "http://paraview.org and install it in /Applications"
+ echo "folder."
+ echo
+endif
+
+#----------------------------- vi: set ft=csh et: ----------------------------
diff --git a/etc/config.csh/paraview b/etc/config.csh/paraview
index b14625ff..c19a84e3 100644
--- a/etc/config.csh/paraview
+++ b/etc/config.csh/paraview
@@ -67,7 +67,12 @@ set archDir="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER"
# Clean path and library path
eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=PATH "$ParaView_DIR $archDir/ParaView- $archDir/qt-"`
-eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=LD_LIBRARY_PATH "$ParaView_DIR $archDir/ParaView- $archDir/qt-"`
+if ( $foamDarwin ) then
+ eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=FOAM_DYLD_LIBRARY_PATH "$ParaView_DIR $archDir/ParaView- $archDir/qt-"`
+ setenv DYLD_LIBRARY_PATH="$FOAM_DYLD_LIBRARY_PATH"
+else
+ eval `$WM_PROJECT_DIR/bin/foamCleanPath -csh-env=LD_LIBRARY_PATH "$ParaView_DIR $archDir/ParaView- $archDir/qt-"`
+endif
# Evaluate command-line parameters for ParaView
while ( $#argv > 0 )
@@ -168,7 +173,12 @@ default:
endsw
foreach libDir ("lib$WM_COMPILER_LIB_ARCH" "lib")
if ( -d "${qtDir}/${libDir}" ) then
- setenv LD_LIBRARY_PATH "${qtDir}/${libDir}:${LD_LIBRARY_PATH}"
+ if ( $foamDarwin ) then
+ setenv FOAM_DYLD_LIBRARY_PATH "${qtDir}/${libDir}:${FOAM_DYLD_LIBRARY_PATH}"
+ setenv DYLD_LIBRARY_PATH "${qtDir}/${libDir}:${DYLD_LIBRARY_PATH}"
+ else
+ setenv LD_LIBRARY_PATH "${qtDir}/${libDir}:${LD_LIBRARY_PATH}"
+ endif
break
endif
end
@@ -186,7 +196,12 @@ default:
set libDir="$pvLibDir" # Needs lib/paraview-X.X (not lib)
breaksw
endsw
- setenv LD_LIBRARY_PATH "${ParaView_DIR}/${libDir}:${LD_LIBRARY_PATH}"
+ if ( $foamDarwin ) then
+ setenv FOAM_DYLD_LIBRARY_PATH "${ParaView_DIR}/${libDir}:${FOAM_DYLD_LIBRARY_PATH}"
+ setenv DYLD_LIBRARY_PATH "${ParaView_DIR}/${libDir}:${DYLD_LIBRARY_PATH}"
+ else
+ setenv LD_LIBRARY_PATH "${ParaView_DIR}/${libDir}:${LD_LIBRARY_PATH}"
+ endif
break
endif
set pvLibDir="unknown"
diff --git a/etc/config.csh/setup b/etc/config.csh/setup
index a852c946..ce0ef4a1 100644
--- a/etc/config.csh/setup
+++ b/etc/config.csh/setup
@@ -26,6 +26,8 @@
#
#------------------------------------------------------------------------------
+@ foamDarwin = ( `uname -s` == "Darwin" )
+
# [FOAM_API] - The API level for the project
setenv FOAM_API `$WM_PROJECT_DIR/bin/foamEtcFile -show-api`
@@ -145,13 +147,34 @@ endif
# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Prevent local variables from shadowing setenv variables
-unset PATH MANPATH LD_LIBRARY_PATH DYLD_LIBRARY_PATH
+unset PATH MANPATH
+if ( $foamDarwin ) then
+ unset DYLD_LIBRARY_PATH FOAM_DYLD_LIBRARY_PATH
+else
+ unset LD_LIBRARY_PATH
+endif
+if ( $foamDarwin ) then
+ if (! $?DYLD_LIBRARY_PATH ) setenv DYLD_LIBRARY_PATH
+ if ( $?DYLD_LIBRARY_PATH ) then
+ # Initial value copy
+ setenv FOAM_DYLD_LIBRARY_PATH $DYLD_LIBRARY_PATH
+ else
+ setenv FOAM_DYLD_LIBRARY_PATH
+ endif
+else
+ if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH
+endif
if (! $?MANPATH ) setenv MANPATH
if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH
_foamClean PATH "$foamOldDirs"
_foamClean MANPATH "$foamOldDirs"
-_foamClean LD_LIBRARY_PATH "$foamOldDirs"
+if ( $foamDarwin ) then
+ _foamClean FOAM_DYLD_LIBRARY_PATH "$foamOldDirs"
+ setenv DYLD_LIBRARY_PATH $FOAM_DYLD_LIBRARY_PATH
+else
+ _foamClean LD_LIBRARY_PATH "$foamOldDirs"
+endif
# Setup for OpenFOAM compilation etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,8 +183,12 @@ _foamEtc -config settings
# Setup for third-party packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamEtc -config mpi
-_foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation
-_foamEtc -config vtk
+if ( $foamDarwin ) then
+ _foamEtc -config mac/paraview
+else
+ _foamEtc -config paraview -- "$FOAM_SETTINGS" # Pass through for evaluation
+ _foamEtc -config vtk
+endif
_foamEtc -config adios2
_foamEtc -config CGAL
_foamEtc -config FFTW
@@ -182,7 +209,12 @@ endif
_foamClean PATH
_foamClean MANPATH
-_foamClean LD_LIBRARY_PATH
+if ( $foamDarwin ) then
+ _foamClean FOAM_DYLD_LIBRARY_PATH
+ setenv DYLD_LIBRARY_PATH $FOAM_DYLD_LIBRARY_PATH
+else
+ _foamClean LD_LIBRARY_PATH
+endif
# Add trailing ':' for system manpages
if ( $?MANPATH ) then
@@ -197,6 +229,7 @@ endif
if ($?DYLD_LIBRARY_PATH) then
if ("${DYLD_LIBRARY_PATH}" == "") unsetenv DYLD_LIBRARY_PATH
endif
+unsetenv FOAM_DYLD_LIBRARY_PATH
# Cleanup temporary information
@@ -212,6 +245,6 @@ unalias _foamAddLib
unalias _foamAddLibAuto
# Variables (done as final statement for a clean exit code)
-unset cleaned foamOldDirs foundDir prefixDir
+unset cleaned foamOldDirs foundDir prefixDir foamDarwin
#------------------------------------------------------------------------------
diff --git a/etc/config.csh/unset b/etc/config.csh/unset
index 47f4b496..b0fcd814 100644
--- a/etc/config.csh/unset
+++ b/etc/config.csh/unset
@@ -19,6 +19,8 @@
#
#------------------------------------------------------------------------------
+@ foamDarwin = ( `uname -s` == "Darwin" )
+
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
unset foamClean
@@ -156,9 +158,17 @@ if ( $?foamClean ) then
eval `$foamClean -csh-env=PATH "$foamOldDirs"`
- if ($?LD_LIBRARY_PATH) then
- eval `$foamClean -csh-env=LD_LIBRARY_PATH "$foamOldDirs"`
- if ("${LD_LIBRARY_PATH}" == "") unsetenv LD_LIBRARY_PATH
+ if ( $foamDarwin ) then
+ if ($?DYLD_LIBRARY_PATH) then
+ eval `$foamClean -csh-env=FOAM_DYLD_LIBRARY_PATH "$foamOldDirs"`
+ setenv DYLD_LIBRARY_PATH $FOAM_DYLD_LIBRARY_PATH
+ if ( "${FOAM_DYLD_LIBRARY_PATH}" == "" ) unsetenv DYLD_LIBRARY_PATH
+ endif
+ else
+ if ($?LD_LIBRARY_PATH) then
+ eval `$foamClean -csh-env=LD_LIBRARY_PATH "$foamOldDirs"`
+ if ( "${LD_LIBRARY_PATH}" == "" ) unsetenv LD_LIBRARY_PATH
+ endif
endif
if ($?MANPATH) then
@@ -168,6 +178,9 @@ if ( $?foamClean ) then
endif
+if ( $foamDarwin ) then
+ unsetenv FOAM_DYLD_LIBRARY_PATH
+endif
#------------------------------------------------------------------------------
# Cleanup aliases
@@ -202,6 +215,7 @@ unalias uutil
unalias wmRefresh
unalias foamVersion
unalias foamPV
+if ( $foamDarwin ) unalias paraview
# Remove old completions, which look like:
# complete APPNAME 'p,*,`bash $WM_PROJECT_DIR/etc/ ...
@@ -214,6 +228,6 @@ endif
#------------------------------------------------------------------------------
# Intermediate variables (do as last for a clean exit code)
-unset cleaned foamClean foamOldDirs
+unset cleaned foamClean foamOldDirs foamDarwin
#------------------------------------------------------------------------------
diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL
index 98a8693b..531a5189 100644
--- a/etc/config.sh/CGAL
+++ b/etc/config.sh/CGAL
@@ -43,8 +43,8 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-boost_version=boost_1_66_0
-cgal_version=CGAL-4.12.2
+boost_version=boost-system
+cgal_version=CGAL-system
export BOOST_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version"
export CGAL_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version"
diff --git a/etc/config.sh/FFTW b/etc/config.sh/FFTW
index 65e16581..1ddd3bc6 100644
--- a/etc/config.sh/FFTW
+++ b/etc/config.sh/FFTW
@@ -35,7 +35,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-fftw_version=fftw-3.3.7
+fftw_version=fftw-system
export FFTW_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$fftw_version
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/adios2 b/etc/config.sh/adios2
index 4d2fd7e3..b025c2df 100644
--- a/etc/config.sh/adios2
+++ b/etc/config.sh/adios2
@@ -21,8 +21,8 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-adios2_version=ADIOS2-2.6.0
-export ADIOS2_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$adios2_version"
+adios2_version=ADIOS2-system
+export ADIOS2_ARCH_PATH="/usr/local/opt/adios2"
# END OF (NORMAL) USER EDITABLE PART
#------------------------------------------------------------------------------
diff --git a/etc/config.sh/ccmio b/etc/config.sh/ccmio
index 122bd43f..8f8f34e2 100644
--- a/etc/config.sh/ccmio
+++ b/etc/config.sh/ccmio
@@ -27,7 +27,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-ccmio_version=libccmio-2.6.1
+ccmio_version=libccmio-system
export CCMIO_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$ccmio_version
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/functions b/etc/config.sh/functions
index 5945ba8b..2ffbb8eb 100644
--- a/etc/config.sh/functions
+++ b/etc/config.sh/functions
@@ -147,7 +147,7 @@ then
# Prepend DYLD_LIBRARY_PATH
_foamAddLib()
{
- [ -n "$1" ] && export DYLD_LIBRARY_PATH="$1:$DYLD_LIBRARY_PATH"
+ [ -n "$1" ] && export FOAM_DYLD_LIBRARY_PATH="$1:$FOAM_DYLD_LIBRARY_PATH"
}
# Prepend to DYLD_LIBRARY_PATH with additional checking
@@ -155,6 +155,7 @@ then
_foamAddLibAuto()
{
eval "$("$WM_PROJECT_DIR"/bin/tools/lib-dir -sh "$@")";
+ export DYLD_LIBRARY_PATH=$FOAM_DYLD_LIBRARY_PATH
}
fi
diff --git a/etc/config.sh/gperftools b/etc/config.sh/gperftools
index ea58dc58..6812eb1e 100644
--- a/etc/config.sh/gperftools
+++ b/etc/config.sh/gperftools
@@ -37,7 +37,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-gperftools_version=gperftools-2.5
+gperftools_version=gperftools-none
GPERFTOOLS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$gperftools_version
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/hypre b/etc/config.sh/hypre
index e401b482..e98bd77f 100644
--- a/etc/config.sh/hypre
+++ b/etc/config.sh/hypre
@@ -27,7 +27,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-hypre_version=hypre-2.19.0
+hypre_version=hypre-system
export HYPRE_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$hypre_version"
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/kahip b/etc/config.sh/kahip
index 6eb38547..423575c7 100644
--- a/etc/config.sh/kahip
+++ b/etc/config.sh/kahip
@@ -37,7 +37,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-KAHIP_VERSION=kahip-2.12
+KAHIP_VERSION=kahip-system
export KAHIP_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$KAHIP_VERSION
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/mac/paraview b/etc/config.sh/mac/paraview
new file mode 100644
index 00000000..cc69c194
--- /dev/null
+++ b/etc/config.sh/mac/paraview
@@ -0,0 +1,18 @@
+_paraviews=(/Applications/[Pp][Aa][Rr][Aa][Vv][Ii][Ee][Ww]*.app)
+if test -d $_paraviews;
+then
+ [ "$FOAM_VERBOSE" -a "$PS1" ] && echo Using $_paraviews
+
+ paraview () {
+ local _paraviews=(/Applications/[Pp][Aa][Rr][Aa][Vv][Ii][Ee][Ww]*.app)
+ $_paraviews/Contents/MacOS/paraview "$@"
+ }
+
+ export -f paraview
+else
+ echo
+ echo "Please download binary Paraview release from"
+ echo "http://paraview.org and install it in /Applications"
+ echo "folder."
+ echo
+fi
diff --git a/etc/config.sh/metis b/etc/config.sh/metis
index ce42f62a..8a481a8f 100644
--- a/etc/config.sh/metis
+++ b/etc/config.sh/metis
@@ -34,7 +34,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-METIS_VERSION=metis-5.1.0
+METIS_VERSION=metis-system
export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$METIS_VERSION
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/mgridgen b/etc/config.sh/mgridgen
index 3ef0ce4a..06cc67ee 100644
--- a/etc/config.sh/mgridgen
+++ b/etc/config.sh/mgridgen
@@ -36,8 +36,8 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-MGRIDGEN_VERSION=ParMGridGen-1.0
-export MGRIDGEN_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$MGRIDGEN_VERSION
+MGRIDGEN_VERSION=ParMGridGen-system
+export MGRIDGEN_ARCH_PATH=/usr/local/opt/parmgridgen
# END OF (NORMAL) USER EDITABLE PART
#------------------------------------------------------------------------------
diff --git a/etc/config.sh/petsc b/etc/config.sh/petsc
index b7b08c26..3ab55b24 100644
--- a/etc/config.sh/petsc
+++ b/etc/config.sh/petsc
@@ -27,7 +27,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-petsc_version=petsc-3.15.0
+petsc_version=petsc-system
export PETSC_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$petsc_version"
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/scotch b/etc/config.sh/scotch
index 78a56d9d..6eeb8d48 100644
--- a/etc/config.sh/scotch
+++ b/etc/config.sh/scotch
@@ -33,7 +33,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-SCOTCH_VERSION=scotch_6.1.0
+SCOTCH_VERSION=scotch-system
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION
# END OF (NORMAL) USER EDITABLE PART
diff --git a/etc/config.sh/setup b/etc/config.sh/setup
index a5440df6..b046ed6e 100644
--- a/etc/config.sh/setup
+++ b/etc/config.sh/setup
@@ -26,6 +26,9 @@
#
#------------------------------------------------------------------------------
+isDarwin=0
+[ "$(uname -s)" = "Darwin" ] && isDarwin=1
+
# [FOAM_API] - The API level for the project
export FOAM_API=$("$WM_PROJECT_DIR/bin/foamEtcFile" -show-api)
@@ -183,10 +186,23 @@ fi
# Clean standard environment variables (PATH, MANPATH, LD_LIBRARY_PATH)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export PATH MANPATH LD_LIBRARY_PATH
+export PATH MANPATH
+if [ $isDarwin ]
+then
+ [ -n "$DYLD_LIBRARY_PATH" ] && FOAM_DYLD_LIBRARY_PATH=DYLD_LIBRARY_PATH
+ export DYLD_LIBRARY_PATH FOAM_DYLD_LIBRARY_PATH
+else
+ export LD_LIBRARY_PATH
+fi
_foamClean PATH "$foamOldDirs"
_foamClean MANPATH "$foamOldDirs"
-_foamClean LD_LIBRARY_PATH "$foamOldDirs"
+if [ $isDarwin ]
+then
+ _foamClean FOAM_DYLD_LIBRARY_PATH "$foamOldDirs"
+ DYLD_LIBRARY_PATH=$FOAM_DYLD_LIBRARY_PATH
+else
+ _foamClean LD_LIBRARY_PATH "$foamOldDirs"
+fi
# Setup for OpenFOAM compilation etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -195,8 +211,13 @@ _foamEtc -config settings
# Setup for third-party packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamEtc -config mpi
-_foamEtc -config paraview -- "$@" # Pass through for evaluation
-_foamEtc -config vtk
+if [ $isDarwin ]
+then
+ _foamEtc -config mac/paraview -- "$@" # Pass through for evaluation
+else
+ _foamEtc -config paraview -- "$@" # Pass through for evaluation
+ _foamEtc -config vtk
+fi
_foamEtc -config adios2
_foamEtc -config CGAL
_foamEtc -config scotch
@@ -217,11 +238,23 @@ fi
# Clean environment paths again. Only remove duplicates
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-export PATH MANPATH LD_LIBRARY_PATH
+export PATH MANPATH
+if [ $isDarwin ]
+then
+ export FOAM_DYLD_LIBRARY_PATH DYLD_LIBRARY_PATH
+else
+ export LD_LIBRARY_PATH
+fi
_foamClean PATH
_foamClean MANPATH
-_foamClean LD_LIBRARY_PATH
+if [ $isDarwin ]
+then
+ _foamClean FOAM_DYLD_LIBRARY_PATH
+ DYLD_LIBRARY_PATH="$FOAM_DYLD_LIBRARY_PATH"
+else
+ _foamClean LD_LIBRARY_PATH
+fi
# Add trailing ':' for system manpages
if [ -n "$MANPATH" ]
@@ -237,6 +270,6 @@ fi
. "$WM_PROJECT_DIR/etc/config.sh/functions"
# Variables (done as the last statement for a clean exit code)
-unset cleaned foamOldDirs foundDir prefixDir
+unset cleaned foamOldDirs foundDir prefixDir isDarwin
#------------------------------------------------------------------------------
diff --git a/etc/config.sh/unset b/etc/config.sh/unset
index 699f7052..952bbcf8 100644
--- a/etc/config.sh/unset
+++ b/etc/config.sh/unset
@@ -19,6 +19,9 @@
#
#------------------------------------------------------------------------------
+isDarwin=0
+[ "$(uname -s)" = "Darwin" ] && isDarwin=1
+
# Clean standard environment variables (PATH, LD_LIBRARY_PATH, MANPATH)
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
[ -f "$foamClean" -a -x "$foamClean" ] || unset foamClean
@@ -149,21 +152,35 @@ unset SCOTCH_ARCH_PATH
#------------------------------------------------------------------------------
# Cleanup environment
-# PATH, LD_LIBRARY_PATH, MANPATH
+# PATH, [DY]LD_LIBRARY_PATH, MANPATH
if [ -n "$foamClean" ]
then
eval "$($foamClean -sh-env=PATH $foamOldDirs)"
- eval "$($foamClean -sh-env=LD_LIBRARY_PATH $foamOldDirs)"
+ if [ $isDarwin ]
+ then
+ eval "$($foamClean -sh-env=FOAM_LD_LIBRARY_PATH $foamOldDirs)"
+ DYLD_LIBARARY_PATH="$FOAM_DYLD_LIBRARY_PATH"
+ else
+ eval "$($foamClean -sh-env=LD_LIBRARY_PATH $foamOldDirs)"
+ fi
eval "$($foamClean -sh-env=MANPATH $foamOldDirs)"
fi
-[ -n "$LD_LIBRARY_PATH" ] || unset LD_LIBRARY_PATH
+if [ $isDarwin ]
+then
+ [ -n "$DYLD_LIBRARY_PATH" ] || unset DYLD_LIBRARY_PATH
+ unset FOAM_DYLD_LIBRARY_PATH
+else
+ [ -n "$LD_LIBRARY_PATH" ] || unset LD_LIBRARY_PATH
+fi
[ -n "$MANPATH" ] || unset MANPATH
#------------------------------------------------------------------------------
# Cleanup aliases and functions
+[ $isDarwin ] && unset -f paraview 2>/dev/null
+
unalias wmSet 2>/dev/null
unalias wmInt32 2>/dev/null
unalias wmInt64 2>/dev/null
@@ -218,6 +235,6 @@ unset _of_complete_cache_
#------------------------------------------------------------------------------
# Intermediate variables (do as last for a clean exit code)
-unset cleaned foamClean foamOldDirs
+unset cleaned foamClean foamOldDirs isDarwin
#------------------------------------------------------------------------------
diff --git a/etc/config.sh/vtk b/etc/config.sh/vtk
index 312034f8..972e6564 100644
--- a/etc/config.sh/vtk
+++ b/etc/config.sh/vtk
@@ -34,13 +34,13 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
-vtk_version=VTK-8.2.0
-mesa_version=mesa-17.1.1
+vtk_version=VTK-system
+mesa_version=mesa-none
mesa_llvm=none
-export VTK_DIR="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$vtk_version"
-export MESA_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$mesa_version"
-export LLVM_ARCH_PATH="$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH/$mesa_llvm"
+export VTK_DIR=
+export MESA_ARCH_PATH=
+export LLVM_ARCH_PATH=
# Define paraview-mesa directory as required
unset ParaView_MESA_DIR
diff --git a/src/renumber/SloanRenumber/SloanRenumber.C b/src/renumber/SloanRenumber/SloanRenumber.C
index 374a4115..2c81edef 100644
--- a/src/renumber/SloanRenumber/SloanRenumber.C
+++ b/src/renumber/SloanRenumber/SloanRenumber.C
@@ -38,7 +38,10 @@ License
#include <vector>
#include <iostream>
#include <boost/graph/adjacency_list.hpp>
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-W#pragma-messages"
#include <boost/graph/sloan_ordering.hpp>
+#pragma clang diagnostic pop
#include <boost/graph/properties.hpp>
#include <boost/graph/bandwidth.hpp>
#include <boost/graph/profile.hpp>
diff --git a/wmake/rules/darwin64Clang/c b/wmake/rules/darwin64Clang/c
index 202efeb3..7a3e1948 100644
--- a/wmake/rules/darwin64Clang/c
+++ b/wmake/rules/darwin64Clang/c
@@ -1,5 +1,7 @@
include $(GENERAL_RULES)/Clang/c
+c = xcrun cc
+
cARCH = -m64 -ftrapping-math
# Compile option is non-mandatory, but must be non-empty
diff --git a/wmake/rules/darwin64Clang/c++ b/wmake/rules/darwin64Clang/c++
index 4908d100..707f3daf 100644
--- a/wmake/rules/darwin64Clang/c++
+++ b/wmake/rules/darwin64Clang/c++
@@ -1,5 +1,7 @@
include $(GENERAL_RULES)/Clang/c++
+CC = xcrun c++ -std=c++14
+
c++ARCH = -m64 -pthread -ftrapping-math
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)
diff --git a/wmake/rules/darwin64Clang/cgal b/wmake/rules/darwin64Clang/cgal
index b04e6b0c..c8ae8255 100644
--- a/wmake/rules/darwin64Clang/cgal
+++ b/wmake/rules/darwin64Clang/cgal
@@ -6,9 +6,6 @@ CGAL_INC = \
$(foreach dir,$(BOOST_INC_DIR),-I$(dir)) \
$(foreach dir,$(CGAL_INC_DIR),-I$(dir))
-CGAL_LIBS = \
- $(foreach dir,$(BOOST_LIB_DIR),-L$(dir)) \
- $(foreach dir,$(CGAL_LIB_DIR),-L$(dir)) \
- -lCGAL
+CGAL_LIBS = -lgmp -lmpfr
# ----------------------------------------------------------------------------
diff --git a/wmake/scripts/have_adios2 b/wmake/scripts/have_adios2
index 25491fe5..86f57260 100644
--- a/wmake/scripts/have_adios2
+++ b/wmake/scripts/have_adios2
@@ -72,13 +72,13 @@ INFORMATION
# -> HAVE_ADIOS2, ADIOS2_INC_DIR, ADIOS2_LIB_DIR
search_adios2()
{
- local warn # warn="==> skip adios2"
- local incName="adios2.h"
- local libName="libadios2"
- local libName2="libadios2_cxx11_mpi"
+ local warn="==> skip adios2"
+ local confName="adios2-config"
local prefix="${1:-system}"
local header library
+ local config cxxflags cxxlibs
+ echo $confName $prefix
# ----------------------------------
if isNone "$prefix"
@@ -87,25 +87,27 @@ search_adios2()
return 1
elif hasAbsdir "$prefix"
then
- header=$(findFirstFile "$prefix/include/$incName")
- library=$(findExtLib "$libName")
+ config="$prefix/bin/$confName"
+ cxxflags=$($config --cxx-flags)
+ cxxlibs=$($config -cxx-libs)
elif isSystem "$prefix"
then
- header=$(findSystemInclude -name="$incName")
- prefix=$(sysPrefix "$header")
+ config="$confName"
+ cxxflags=$($config --cxx-flags)
+ cxxlibs=$($config -cxx-libs)
else
unset prefix
fi
# ----------------------------------
# Header
- [ -n "$header" ] || {
+ [ -n "$cxxflags" ] || {
[ -n "$warn" ] && echo "$warn (no header)"
return 2
}
# Library
- [ -n "$library" ] \
+ [ -n "$cxxlibs" ] \
|| library=$(findLibrary -prefix="$prefix" -name="$libName") \
|| library=$(findLibrary -prefix="$prefix" -name="$libName2") \
|| {
@@ -118,8 +120,6 @@ search_adios2()
# OK
export HAVE_ADIOS2=true
export ADIOS2_ARCH_PATH="$prefix"
- export ADIOS2_INC_DIR="${header%/*}" # Basename
- export ADIOS2_LIB_DIR="${library%/*}" # Basename
}
diff --git a/wmake/scripts/have_mgridgen b/wmake/scripts/have_mgridgen
index 6c00f401..bc117bf9 100644
--- a/wmake/scripts/have_mgridgen
+++ b/wmake/scripts/have_mgridgen
@@ -105,11 +105,13 @@ search_mgridgen()
# Ensure consistent sizes with OpenFOAM and mgridgen header
# Extract typedef for idxtype, realtype
- label=$(sed -ne \
- 's/^.*typedef *\([^ ]*\) *idxtype.*/\1/ip' \
+ label=$(perl -n \
+ -e '/^.*typedef *([^ ]*) *idxtype.*/i or next;' \
+ -e 'print($1) if $1;' \
"$header")
- scalar=$(sed -ne \
- 's/^.*typedef *\([^ ]*\) *realtype.*/\1/ip' \
+ scalar=$(perl -n \
+ -e '/^.*typedef *([^ ]*) *realtype.*/i or next;' \
+ -e 'print($1) if $1;' \
"$header")
: "${label:=unknown}"