all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 6eb657bfb8c3a157df32793a94bbb534ea3b4ea6 56793 bytes (raw)
name: gnu/packages/patches/openfoam-org-10-cleanup.patch 	 # note: path name is non-authoritative(*)

   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
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
 
From a1958c27fd69c20916065e848c9526a29192590e Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:15:22 +0100
Subject: [PATCH 01/13] chore: fix CGAL and Boost dependencies

---
 etc/config.sh/CGAL | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL
index 0fec802a0..d80278bcb 100644
--- a/etc/config.sh/CGAL
+++ b/etc/config.sh/CGAL
@@ -39,22 +39,7 @@
 #
 #------------------------------------------------------------------------------
 
-boost_version=boost-system
-#boost_version=boost-1.55.0
-#boost_version=boost-1.72.0
-
-cgal_version=cgal-system
-#cgal_version=CGAL-4.10
-#cgal_version=CGAL-5.0.2
-
-if [ "$boost_version" != "boost-system" ]
-then
-    export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/$boost_version
-fi
-
-if [ "$cgal_version" != "cgal-system" ]
-then
-    export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/$cgal_version
-fi
+export CGAL_ARCH_PATH=$CGAL_ROOT
+export BOOST_ARCH_PATH=$BOOST_ROOT
 
 #------------------------------------------------------------------------------
-- 
2.38.1


From 06a6f8587daf3e81d3b55c3b47e1606de5a3d1d2 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:15:44 +0100
Subject: [PATCH 02/13] chore: fix gperftools dependecy

---
 etc/config.sh/gperftools | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/etc/config.sh/gperftools b/etc/config.sh/gperftools
index f9cdb8533..41aea7802 100644
--- a/etc/config.sh/gperftools
+++ b/etc/config.sh/gperftools
@@ -29,13 +29,6 @@
 #
 #------------------------------------------------------------------------------
 
-version=svn
-gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
-
-GPERFTOOLS_VERSION=gperftools-$version
-GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION
-
-export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH
-export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH
+export GPERFTOOLS_ARCH_PATH=$GPERFTOOLS_ROOT
 
 #------------------------------------------------------------------------------
-- 
2.38.1


From ca42aa17d1a9cf75dd197886351012d8d52b7b54 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:16:13 +0100
Subject: [PATCH 03/13] chore: fix metis dependency

---
 etc/config.sh/metis | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/etc/config.sh/metis b/etc/config.sh/metis
index 40ef6aa0f..d04d5ea32 100644
--- a/etc/config.sh/metis
+++ b/etc/config.sh/metis
@@ -34,7 +34,7 @@
 #
 #------------------------------------------------------------------------------
 
-export METIS_VERSION=metis-5.1.0
-export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$METIS_VERSION
+export METIS_VERSION=metis-$METISVERSION
+export METIS_ARCH_PATH=$METIS_ROOT
 
 #------------------------------------------------------------------------------
-- 
2.38.1


From 6c4801f8274391c2926ee6792dc3f8fbd3d67c73 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:17:08 +0100
Subject: [PATCH 04/13] chore: fix mpi dependency

---
 etc/config.sh/mpi                             | 233 +-----------------
 .../decompose/ptscotchDecomp/Make/options     |   2 +-
 2 files changed, 11 insertions(+), 224 deletions(-)

diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi
index b368cc51a..79efff92d 100644
--- a/etc/config.sh/mpi
+++ b/etc/config.sh/mpi
@@ -30,234 +30,21 @@
 #
 #------------------------------------------------------------------------------
 
-unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN
+export FOAM_MPI=openmpi-$OPENMPIVERSION
+# Optional configuration tweaks:
+_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/openmpi`
 
-case "$WM_MPLIB" in
-SYSTEMOPENMPI)
-    # Use the system installed openmpi, get library directory via mpicc
-    export FOAM_MPI=openmpi-system
+export MPI_ARCH_PATH=$OPENMPI_ROOT
 
-    # Undefine OPAL_PREFIX if set to one of the paths on foamOldDirs
-    if [ -z "$($foamClean "$OPAL_PREFIX" "$foamOldDirs")" ]
-    then
-        unset OPAL_PREFIX
-    fi
+# Tell OpenMPI where to find its install directory
+export OPAL_PREFIX=$MPI_ARCH_PATH
 
-    libDir=`mpicc --showme:link | sed -e 's/.*-L\([^ ]*\).*/\1/'`
+_foamAddPath    $MPI_ARCH_PATH/bin
 
-    # Bit of a hack: strip off 'lib' and hope this is the path to openmpi
-    # include files and libraries.
-    export MPI_ARCH_PATH="${libDir%/*}"
+# 64-bit on OpenSuSE 12.1 uses lib64 others use lib
+_foamAddLib     $MPI_ARCH_PATH/lib
 
-    _foamAddLib     $libDir
-    unset libDir
-    ;;
-
-OPENMPI)
-    export FOAM_MPI=openmpi-2.1.1
-    # Optional configuration tweaks:
-    _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/openmpi`
-
-    export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
-
-    # Tell OpenMPI where to find its install directory
-    export OPAL_PREFIX=$MPI_ARCH_PATH
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddMan     $MPI_ARCH_PATH/share/man
-    ;;
-
-SYSTEMMPI)
-    export FOAM_MPI=mpi-system
-
-    if [ -z "$MPI_ROOT" ]
-    then
-        echo 1>&2
-        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
-        echo "    Please set the environment variable MPI_ROOT to point to" \
-             " the base folder for the system MPI in use." 1>&2
-        echo "    Example:" 1>&2
-        echo 1>&2
-        echo "        export MPI_ROOT=/opt/mpi" 1>&2
-        echo 1>&2
-    else
-        export MPI_ARCH_PATH=$MPI_ROOT
-
-        if [ -z "$MPI_ARCH_FLAGS" ]
-        then
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
-            echo "    MPI_ARCH_FLAGS is not set. Example:" 1>&2
-            echo 1>&2
-            echo "        export MPI_ARCH_FLAGS=\"-DOMPI_SKIP_MPICXX\"" 1>&2
-            echo 1>&2
-        fi
-
-        if [ -z "$MPI_ARCH_INC" ]
-        then
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
-            echo "    MPI_ARCH_INC is not set. Example:" 1>&2
-            echo 1>&2
-            echo "        export MPI_ARCH_INC=\"-isystem \$MPI_ROOT/include\"" 1>&2
-            echo 1>&2
-        fi
-
-        if [ -z "$MPI_ARCH_LIBS" ]
-        then
-            echo 1>&2
-            echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
-            echo "    MPI_ARCH_LIBS is not set. Example:" 1>&2
-            echo 1>&2
-            echo "        export MPI_ARCH_LIBS=\"-L\$MPI_ROOT/lib -lmpi\"" 1>&2
-            echo 1>&2
-        fi
-    fi
-    ;;
-
-MPICH)
-    export FOAM_MPI=mpich2-1.1.1p1
-    export MPI_HOME=$WM_THIRD_PARTY_DIR/$FOAM_MPI
-    export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddMan     $MPI_ARCH_PATH/share/man
-    ;;
-
-MPICH-GM)
-    export FOAM_MPI=mpich-gm
-    export MPI_ARCH_PATH=/opt/mpi
-    export MPICH_PATH=$MPI_ARCH_PATH
-    export GM_LIB_PATH=/opt/gm/lib64
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-
-    # 64-bit on OpenSuSE 12.1 uses lib64 others use lib
-    _foamAddLib     $MPI_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
-    _foamAddLib     $MPI_ARCH_PATH/lib
-
-    _foamAddLib     $GM_LIB_PATH
-    ;;
-
-MV2MPI)
-    export FOAM_MPI=mvapich2
-    libDir=`mpicc -show -cc= | sed -e 's/.*-L\([^ ]*\).*/\1/'`
-    export MPI_ARCH_PATH="${libDir%/*}"
-    _foamAddLib $libDir
-    unset libDir
-    ;;
-
-HPMPI)
-    export FOAM_MPI=hpmpi
-    export MPI_HOME=/opt/hpmpi
-    export MPI_ARCH_PATH=$MPI_HOME
-
-    _foamAddPath $MPI_ARCH_PATH/bin
-
-    case `uname -m` in
-    i686)
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_ia32
-        ;;
-
-    x86_64)
-        _foamAddLib $MPI_ARCH_PATH/lib/linux_amd64
-        ;;
-    *)
-        echo Unknown processor type `uname -m` 1>&2
-        ;;
-    esac
-    ;;
-
-MPI)
-    export FOAM_MPI=mpi
-    export MPI_ARCH_PATH=/opt/mpi
-    ;;
-
-FJMPI)
-    export FOAM_MPI=fjmpi
-    export MPI_ARCH_PATH=/opt/FJSVmpi2
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib/sparcv9
-    _foamAddLib     /opt/FSUNf90/lib/sparcv9
-    _foamAddLib     /opt/FJSVpnidt/lib
-    ;;
-
-QSMPI)
-    export FOAM_MPI=qsmpi
-    export MPI_ARCH_PATH=/usr/lib/mpi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib
-    ;;
-
-SGIMPI)
-    # No trailing slash
-    [ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
-
-    export FOAM_MPI="${MPI_ROOT##*/}"
-    export MPI_ARCH_PATH=$MPI_ROOT
-
-    if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
-    then
-        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
-        echo "    MPI_ROOT not a valid mpt installation directory or ending" \
-             " in a '/'." 1>&2
-        echo "    Please set MPI_ROOT to the mpt installation directory." 1>&2
-        echo "    MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
-    fi
-
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using SGI MPT:" 1>&2
-        echo "    MPI_ROOT : $MPI_ROOT" 1>&2
-        echo "    FOAM_MPI : $FOAM_MPI" 1>&2
-    fi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin
-    _foamAddLib     $MPI_ARCH_PATH/lib
-    ;;
-
-INTELMPI)
-    # No trailing slash
-    [ "${MPI_ROOT%/}" = "${MPI_ROOT}" ] || MPI_ROOT="${MPI_ROOT%/}"
-
-    export FOAM_MPI="${MPI_ROOT##*/}"
-    export MPI_ARCH_PATH=$MPI_ROOT
-
-    if [ ! -d "$MPI_ROOT" -o -z "$MPI_ARCH_PATH" ]
-    then
-        echo "Warning in $WM_PROJECT_DIR/etc/config.sh/settings:" 1>&2
-        echo "    MPI_ROOT not a valid mpt installation directory or ending" \
-             " in a '/'." 1>&2
-        echo "    Please set MPI_ROOT to the mpt installation directory." 1>&2
-        echo "    MPI_ROOT currently set to '$MPI_ROOT'" 1>&2
-    fi
-
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using INTEL MPI:" 1>&2
-        echo "    MPI_ROOT : $MPI_ROOT" 1>&2
-        echo "    FOAM_MPI : $FOAM_MPI" 1>&2
-    fi
-
-    _foamAddPath    $MPI_ARCH_PATH/bin64
-    _foamAddLib     $MPI_ARCH_PATH/lib/release
-    ;;
-*)
-    export FOAM_MPI=dummy
-    ;;
-esac
+_foamAddMan     $MPI_ARCH_PATH/share/man
 
 # Add (non-dummy) MPI implementation
 # Dummy MPI already added to LD_LIBRARY_PATH and has no external libraries
diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options
index 2af0fddac..00eb03bff 100644
--- a/src/parallel/decompose/ptscotchDecomp/Make/options
+++ b/src/parallel/decompose/ptscotchDecomp/Make/options
@@ -10,7 +10,7 @@ EXE_INC = \
 
 LIB_LIBS = \
     -L$(SCOTCH_ARCH_PATH)/lib \
-    -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) \
+    -L$(MPI_ARCH_PATH)/lib \
     -lptscotch \
     -lptscotcherrexit \
     -lscotch \
-- 
2.38.1


From 6eef353c56ee4086389f4631cc83f24d34a1587c Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:19:45 +0100
Subject: [PATCH 05/13] chore: fix scotch dependency

---
 etc/config.sh/scotch                               | 4 ++--
 src/parallel/decompose/ptscotchDecomp/Make/options | 1 -
 src/parallel/decompose/scotchDecomp/Make/options   | 2 --
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/etc/config.sh/scotch b/etc/config.sh/scotch
index a345a2d00..39266deda 100644
--- a/etc/config.sh/scotch
+++ b/etc/config.sh/scotch
@@ -37,7 +37,7 @@
 #
 #------------------------------------------------------------------------------
 
-export SCOTCH_VERSION=scotch_6.0.9
-export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION
+export SCOTCH_VERSION=scotch_$PT_SCOTCH32VERSION
+export SCOTCH_ARCH_PATH=$PT_SCOTCH32_ROOT
 
 #------------------------------------------------------------------------------
diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options
index 00eb03bff..993f9f2aa 100644
--- a/src/parallel/decompose/ptscotchDecomp/Make/options
+++ b/src/parallel/decompose/ptscotchDecomp/Make/options
@@ -5,7 +5,6 @@ EXE_INC = \
     -I$(FOAM_SRC)/Pstream/mpi/lnInclude \
     -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \
     -I$(SCOTCH_ARCH_PATH)/include \
-    -I/usr/include/scotch \
     -I../decompositionMethods/lnInclude
 
 LIB_LIBS = \
diff --git a/src/parallel/decompose/scotchDecomp/Make/options b/src/parallel/decompose/scotchDecomp/Make/options
index 038f88d5f..f57b8ee14 100644
--- a/src/parallel/decompose/scotchDecomp/Make/options
+++ b/src/parallel/decompose/scotchDecomp/Make/options
@@ -6,12 +6,10 @@
 EXE_INC = \
     $(PFLAGS) $(PINC) \
     -I$(SCOTCH_ARCH_PATH)/include \
-    -I/usr/include/scotch \
     -I../decompositionMethods/lnInclude
 
 LIB_LIBS = \
     -L$(SCOTCH_ARCH_PATH)/lib \
-    -L$(FOAM_EXT_LIBBIN) \
     -lscotch \
     -lscotcherrexit \
     -lrt
-- 
2.38.1


From 564e1c51f496666e057c28a6c3eb4512e9adf8b4 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:20:49 +0100
Subject: [PATCH 06/13] chore: fix GMP and MPFR dependency

---
 etc/config.sh/settings   | 3 +++
 wmake/rules/General/CGAL | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/etc/config.sh/settings b/etc/config.sh/settings
index d48896bac..3067d4608 100644
--- a/etc/config.sh/settings
+++ b/etc/config.sh/settings
@@ -290,6 +290,9 @@ OpenFOAM | ThirdParty)
     ;;
 system)
     # Use system compiler
+    # Use system GMP and MPFR packages
+    export GMP_ARCH_PATH=$GMP_ROOT
+    export MPFR_ARCH_PATH=$MPFR_ROOT
     ;;
 *)
     echo "Warn: WM_COMPILER_TYPE='$WM_COMPILER_TYPE' is unsupported" 1>&2
diff --git a/wmake/rules/General/CGAL b/wmake/rules/General/CGAL
index 4c574c283..1c6d3b55d 100644
--- a/wmake/rules/General/CGAL
+++ b/wmake/rules/General/CGAL
@@ -8,7 +8,7 @@ CGAL_INC = \
     $(if $(CGAL_ARCH_PATH),-I$(CGAL_ARCH_PATH)/include,-I/usr/include)
 
 CGAL_LIBS = \
-    $(if $(GMP_ARCH_PATH),-L$(GMP_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH),) \
+    $(if $(GMP_ARCH_PATH),-L$(GMP_ARCH_PATH)/lib,) \
     -lgmp \
-    $(if $(MPFR_ARCH_PATH),-L$(MPFR_ARCH_PATH)/lib$(WM_COMPILER_LIB_ARCH),) \
+    $(if $(MPFR_ARCH_PATH),-L$(MPFR_ARCH_PATH)/lib,) \
     -lmpfr
-- 
2.38.1


From 579f94cfac2867d9875b2254d122e465ccc5d6b0 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:21:32 +0100
Subject: [PATCH 07/13] build: add LDFLAGS environment variable to compile step

---
 wmake/rules/linux64Gcc/c++ | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++
index 9ba6ce377..3ced6c9fb 100644
--- a/wmake/rules/linux64Gcc/c++
+++ b/wmake/rules/linux64Gcc/c++
@@ -22,8 +22,8 @@ cpptoo      = $(Ctoo)
 
 LINK_LIBS   = $(c++DBUG)
 
-LINKLIBSO   = $(CC) $(c++FLAGS) -fuse-ld=bfd -shared \
+LINKLIBSO   = $(CC) $(c++FLAGS) $(LDFLAGS) -fuse-ld=bfd -shared \
               -Xlinker --add-needed -Xlinker --no-as-needed
 
-LINKEXE     = $(CC) $(c++FLAGS) -fuse-ld=bfd \
+LINKEXE     = $(CC) $(c++FLAGS) $(LDFLAGS) -fuse-ld=bfd \
               -Xlinker --add-needed -Xlinker --no-as-needed
-- 
2.38.1


From e5007b8b65c459c256dcb1700453ba608bc111fe Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:22:25 +0100
Subject: [PATCH 08/13] fix: wrong symbolic link path

---
 tutorials/mesh/snappyHexMesh/iglooWithFridges | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tutorials/mesh/snappyHexMesh/iglooWithFridges b/tutorials/mesh/snappyHexMesh/iglooWithFridges
index 3d18de2c2..ef42b45b3 120000
--- a/tutorials/mesh/snappyHexMesh/iglooWithFridges
+++ b/tutorials/mesh/snappyHexMesh/iglooWithFridges
@@ -1 +1 @@
-../../heatTransfer/buoyantSimpleFoam/iglooWithFridges
\ No newline at end of file
+../../heatTransfer/buoyantFoam/iglooWithFridges
\ No newline at end of file
-- 
2.38.1


From 448f3b83c782c6f28a8b028793f10a178e10db73 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:23:47 +0100
Subject: [PATCH 09/13] chore: fix gnuplot dependency

---
 applications/test/Distribution2/createGraphs                | 2 +-
 .../test/rigidBodyDynamics/Test-rigidBodyDynamics.C         | 2 +-
 bin/foamMonitor                                             | 4 ++--
 bin/tools/HookFunctions                                     | 2 +-
 etc/bashrc                                                  | 2 ++
 .../graph/writers/gnuplotGraph/gnuplotGraph.H               | 2 +-
 src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H  | 2 +-
 .../waterAndIsopropanolEvaporation/Allrun                   | 2 +-
 .../interfaceComposition/waterEvaporation/Allrun            | 2 +-
 .../populationBalance/binaryBreakup/validation/createGraphs | 4 ++--
 .../populationBalance/breakup/validation/createGraphs       | 4 ++--
 .../populationBalance/coalescence/validation/createGraphs   | 4 ++--
 .../populationBalance/drift/validation/createGraphs         | 4 ++--
 .../isothermalGrowth/validation/createGraphs                | 4 ++--
 .../populationBalance/negativeDrift/validation/createGraphs | 4 ++--
 .../validation/createGraphs                                 | 4 ++--
 .../multiphaseEulerFoam/thermal/waterEvaporation/Allrun     | 2 +-
 tutorials/combustion/chemFoam/gri/validation/createGraph    | 4 ++--
 tutorials/combustion/chemFoam/h2/validation/createGraph     | 4 ++--
 tutorials/combustion/chemFoam/ic8h18/validation/createGraph | 4 ++--
 .../combustion/chemFoam/ic8h18_TDAC/validation/createGraph  | 4 ++--
 tutorials/combustion/chemFoam/nc7h16/validation/createGraph | 4 ++--
 .../rhoPimpleFoam/laminar/helmholtzResonance/Allrun         | 2 +-
 .../buoyantFoam/buoyantCavity/validation/createGraphs       | 6 +++---
 .../boundaryFoam/boundaryWallFunctionsProfile/Allrun        | 4 ++--
 .../incompressible/pimpleFoam/RAS/ballValve/createGraphs    | 4 ++--
 .../pimpleFoam/laminar/nonConformalChannel/Allrun           | 2 +-
 .../laminar/planarPoiseuille/validation/createGraph         | 4 ++--
 .../incompressible/simpleFoam/T3A/validation/createGraphs   | 4 ++--
 .../simpleFoam/roomResidenceTime/validation/Allrun          | 2 +-
 .../RAS/Grossetete/validation/createGraphs                  | 4 ++--
 .../RAS/bubblePipe/validation/createGraphs                  | 6 +++---
 .../RAS/pipeBend/validation/createGraphs                    | 6 +++---
 .../RAS/wallBoiling/validation/createGraphs                 | 4 ++--
 .../RAS/wallBoilingIATE/validation/createGraphs             | 4 ++--
 .../RAS/wallBoilingPolydisperse/validation/createGraphs     | 4 ++--
 .../validation/createGraphs                                 | 4 ++--
 .../laminar/titaniaSynthesis/validation/createGraphs        | 6 +++---
 .../laminar/titaniaSynthesisSurface/validation/createGraphs | 6 +++---
 39 files changed, 72 insertions(+), 70 deletions(-)

diff --git a/applications/test/Distribution2/createGraphs b/applications/test/Distribution2/createGraphs
index bbcb522f0..58b9c0388 100755
--- a/applications/test/Distribution2/createGraphs
+++ b/applications/test/Distribution2/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,15"
     set output 'comparison.eps'
     set multiplot layout 2, 1
diff --git a/applications/test/rigidBodyDynamics/Test-rigidBodyDynamics.C b/applications/test/rigidBodyDynamics/Test-rigidBodyDynamics.C
index c13edfe73..1b2dbe689 100644
--- a/applications/test/rigidBodyDynamics/Test-rigidBodyDynamics.C
+++ b/applications/test/rigidBodyDynamics/Test-rigidBodyDynamics.C
@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
     }
     dataFile<< endl;
     animationFile
-        << "#!/usr/bin/env gnuplot" << endl << endl
+        << "$GNUPLOT" << endl << endl
         << "$data << end" << endl;
 
     // Run the RBD simulation
diff --git a/bin/foamMonitor b/bin/foamMonitor
index 32b62d792..def3d902a 100755
--- a/bin/foamMonitor
+++ b/bin/foamMonitor
@@ -98,7 +98,7 @@ title="Data Monitoring"
 size=""
 gpterminal='x11 1 font "helvetica,17" linewidth 1.5 persist noraise'
 
-command -v gnuplot >/dev/null 2>&1 || error "Gnuplot not installed"
+command -v $GNUPLOT >/dev/null 2>&1 || error "Gnuplot not installed"
 
 # parse options
 while [ "$#" -gt 0 ]
@@ -197,7 +197,7 @@ done
 plotFileFooter >> "$gp_file"
 
 touch "$file"
-gnuplot "$gp_file" &
+$GNUPLOT "$gp_file" &
 pid=$!
 
 while true
diff --git a/bin/tools/HookFunctions b/bin/tools/HookFunctions
index 47af55043..193e4fc03 100644
--- a/bin/tools/HookFunctions
+++ b/bin/tools/HookFunctions
@@ -391,7 +391,7 @@ checkBanner() # scope, files...
                         errorMessages+=("$file")
                     fi
                     ;;
-                (''|awk|csh|gnuplot|sed|sh)
+                (''|awk|csh|$GNUPLOT|sed|sh)
                     if ! git show $scopeShow"$file" | pcregrep -q -M "$scriptBanner"
                     then
                         ((++errorCount))
diff --git a/etc/bashrc b/etc/bashrc
index 663993951..c93e47974 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -229,3 +229,5 @@ unset cleaned foamClean foamOldDirs
 [ "$BASH" ] && . $WM_PROJECT_DIR/etc/config.sh/bash_completion
 
 #------------------------------------------------------------------------------
+
+export GNUPLOT=gnuplot
diff --git a/src/randomProcesses/graph/writers/gnuplotGraph/gnuplotGraph.H b/src/randomProcesses/graph/writers/gnuplotGraph/gnuplotGraph.H
index 9c2df4377..95d940285 100644
--- a/src/randomProcesses/graph/writers/gnuplotGraph/gnuplotGraph.H
+++ b/src/randomProcesses/graph/writers/gnuplotGraph/gnuplotGraph.H
@@ -54,7 +54,7 @@ class gnuplotGraph
 public:
 
     //- Runtime type information
-    TypeName("gnuplot");
+    TypeName("$GNUPLOT");
 
     //- FileName extension  for this graph format
     static const word ext_;
diff --git a/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H
index b8e031085..f358f869d 100644
--- a/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H
+++ b/src/sampling/sampledSet/writers/gnuplot/gnuplotSetWriter.H
@@ -53,7 +53,7 @@ class gnuplotSetWriter
 public:
 
     //- Runtime type information
-    TypeName("gnuplot");
+    TypeName("$GNUPLOT");
 
 
     // Constructors
diff --git a/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterAndIsopropanolEvaporation/Allrun b/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterAndIsopropanolEvaporation/Allrun
index 9dfacf68e..19e8a825a 100755
--- a/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterAndIsopropanolEvaporation/Allrun
+++ b/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterAndIsopropanolEvaporation/Allrun
@@ -31,7 +31,7 @@ do
     done
 done
 
-gnuplot << EOF
+$GNUPLOT << EOF
 
 set terminal eps enhanced size 5.83,8.27
 set output 'postProcessing.eps'
diff --git a/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterEvaporation/Allrun b/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterEvaporation/Allrun
index 9641b9c49..377009f46 100755
--- a/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterEvaporation/Allrun
+++ b/test/multiphase/multiphaseEulerFoam/interfaceComposition/waterEvaporation/Allrun
@@ -64,7 +64,7 @@ do
     done
 done
 
-gnuplot << EOF
+$GNUPLOT << EOF
 
 set terminal eps enhanced size 5.83,8.27
 set output 'postProcessing.eps'
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/binaryBreakup/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/binaryBreakup/validation/createGraphs
index 673b293c7..7bfee48c3 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/binaryBreakup/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/binaryBreakup/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../numberDensity.eps'
     set decimalsign '.'
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/breakup/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/breakup/validation/createGraphs
index 673b293c7..7bfee48c3 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/breakup/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/breakup/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../numberDensity.eps'
     set decimalsign '.'
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/coalescence/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/coalescence/validation/createGraphs
index 2f9808388..fba7ed5f7 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/coalescence/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/coalescence/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../numberDensity.eps'
     set decimalsign '.'
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/drift/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/drift/validation/createGraphs
index ddb779992..b0c11ad36 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/drift/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/drift/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../numberDensity.eps'
     set decimalsign '.'
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/isothermalGrowth/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/isothermalGrowth/validation/createGraphs
index 843ccf677..923932605 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/isothermalGrowth/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/isothermalGrowth/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../d.air_y.eps'
 
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/negativeDrift/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/negativeDrift/validation/createGraphs
index bae86a939..6047f55d3 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/negativeDrift/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/negativeDrift/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../numberDensity.eps'
     set decimalsign '.'
diff --git a/test/multiphase/multiphaseEulerFoam/populationBalance/simultaneousCoalescenceAndBreakup/validation/createGraphs b/test/multiphase/multiphaseEulerFoam/populationBalance/simultaneousCoalescenceAndBreakup/validation/createGraphs
index da0e70401..7840728f5 100755
--- a/test/multiphase/multiphaseEulerFoam/populationBalance/simultaneousCoalescenceAndBreakup/validation/createGraphs
+++ b/test/multiphase/multiphaseEulerFoam/populationBalance/simultaneousCoalescenceAndBreakup/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output '../probabilityDensity.eps'
     set decimalsign '.'
diff --git a/test/multiphase/multiphaseEulerFoam/thermal/waterEvaporation/Allrun b/test/multiphase/multiphaseEulerFoam/thermal/waterEvaporation/Allrun
index 432ac9f2b..3a789aef0 100755
--- a/test/multiphase/multiphaseEulerFoam/thermal/waterEvaporation/Allrun
+++ b/test/multiphase/multiphaseEulerFoam/thermal/waterEvaporation/Allrun
@@ -38,7 +38,7 @@ do
     done
 done
 
-gnuplot << EOF
+$GNUPLOT << EOF
 
 set terminal eps enhanced size 5.83,8.27
 set output 'postProcessing.eps'
diff --git a/tutorials/combustion/chemFoam/gri/validation/createGraph b/tutorials/combustion/chemFoam/gri/validation/createGraph
index d0fb9cc01..f3a350f24 100755
--- a/tutorials/combustion/chemFoam/gri/validation/createGraph
+++ b/tutorials/combustion/chemFoam/gri/validation/createGraph
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helveicta,20"
     set output "OF_vs_CHEMKINII.eps"
     set xlabel "Time / [s]" font "Helveicta,24"
diff --git a/tutorials/combustion/chemFoam/h2/validation/createGraph b/tutorials/combustion/chemFoam/h2/validation/createGraph
index bbb36218f..0fc008261 100755
--- a/tutorials/combustion/chemFoam/h2/validation/createGraph
+++ b/tutorials/combustion/chemFoam/h2/validation/createGraph
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output "OF_vs_CHEMKINII.eps"
     set xlabel "Time / [s]" font "Helvetica,24"
diff --git a/tutorials/combustion/chemFoam/ic8h18/validation/createGraph b/tutorials/combustion/chemFoam/ic8h18/validation/createGraph
index 4606eac7d..43af24856 100755
--- a/tutorials/combustion/chemFoam/ic8h18/validation/createGraph
+++ b/tutorials/combustion/chemFoam/ic8h18/validation/createGraph
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output "OF_vs_CHEMKINII.eps"
     set xlabel "Time / [s]" font "Helvetica,24"
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
index 901919282..218212998 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/createGraph
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output "OF_vs_CHEMKINII.eps"
     set xlabel "Time / [s]" font "Helvetica,24"
diff --git a/tutorials/combustion/chemFoam/nc7h16/validation/createGraph b/tutorials/combustion/chemFoam/nc7h16/validation/createGraph
index b2f8a4d94..ad074b8e2 100755
--- a/tutorials/combustion/chemFoam/nc7h16/validation/createGraph
+++ b/tutorials/combustion/chemFoam/nc7h16/validation/createGraph
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output "OF_vs_CHEMKINII.eps"
     set xlabel "Time / [s]" font "Helvetica,24"
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
index 6557c1075..5219a3efb 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
@@ -31,7 +31,7 @@ run resolved
 run modelled
 
 # Plot a comparison of the pressure in the neck
-cat << EOF | gnuplot -persist
+cat << EOF | $GNUPLOT -persist
 
 set terminal postscript eps size 5,4 enhanced color
 
diff --git a/tutorials/heatTransfer/buoyantFoam/buoyantCavity/validation/createGraphs b/tutorials/heatTransfer/buoyantFoam/buoyantCavity/validation/createGraphs
index 625b87946..ba4cf4670 100755
--- a/tutorials/heatTransfer/buoyantFoam/buoyantCavity/validation/createGraphs
+++ b/tutorials/heatTransfer/buoyantFoam/buoyantCavity/validation/createGraphs
@@ -42,7 +42,7 @@ createEpsT()
     OF=$2
     EXPT=$3
 
-    gnuplot<<EOF
+    $GNUPLOT<<EOF
     set terminal postscript eps color enhanced
     set output "OF_vs_EXPT_T$i.eps"
     set xlabel "Channel width, x / [m]"
@@ -66,7 +66,7 @@ createEpsU()
     OF=$2
     EXPT=$3
 
-    gnuplot<<EOF
+    $GNUPLOT<<EOF
     set terminal postscript eps color enhanced
     set output "OF_vs_EXPT_U$i.eps"
     set xlabel "Channel width, x / [m]"
@@ -86,7 +86,7 @@ EOF
 echo "createGraphs:"
 
 # test if gnuplot exists on the system
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" >&2
     exit 1
diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
index 98d5a8635..4ff7fa9e9 100755
--- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
+++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun
@@ -37,7 +37,7 @@ done
 
 # create validation plot
 # test if gnuplot exists on the system
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
@@ -46,7 +46,7 @@ fi
 graphName="OF_vs_ANALYTICAL.eps"
 
 echo "Creating graph of u+ vs y+ to $graphName"
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced
     set output "$graphName"
     set grid
diff --git a/tutorials/incompressible/pimpleFoam/RAS/ballValve/createGraphs b/tutorials/incompressible/pimpleFoam/RAS/ballValve/createGraphs
index 57e466f77..9f078e6d3 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/ballValve/createGraphs
+++ b/tutorials/incompressible/pimpleFoam/RAS/ballValve/createGraphs
@@ -6,7 +6,7 @@ inletFlowRate=postProcessing/inletFlowRate/0/surfaceFieldValue.dat
 lowerOutletFlowRate=postProcessing/lowerOutletFlowRate/0/surfaceFieldValue.dat
 upperOutletFlowRate=postProcessing/upperOutletFlowRate/0/surfaceFieldValue.dat
 
-gnuplot << EOF
+$GNUPLOT << EOF
 set terminal postscript eps color enhanced
 set output "flowRate.eps"
 set xlabel "Time (s)"
@@ -19,7 +19,7 @@ plot \
     us 1:(\$2+\$4) w l t "Total Outlet"
 EOF
 
-gnuplot << EOF
+$GNUPLOT << EOF
 set terminal postscript eps color enhanced
 set output "error.eps"
 set xlabel "Time (s)"
diff --git a/tutorials/incompressible/pimpleFoam/laminar/nonConformalChannel/Allrun b/tutorials/incompressible/pimpleFoam/laminar/nonConformalChannel/Allrun
index 970f45e67..e9524165e 100755
--- a/tutorials/incompressible/pimpleFoam/laminar/nonConformalChannel/Allrun
+++ b/tutorials/incompressible/pimpleFoam/laminar/nonConformalChannel/Allrun
@@ -33,7 +33,7 @@ outletFlowRateAMI=postProcessing/outletFlowRate.AMI/0/surfaceFieldValue.dat
 inletFlowRateNonConformalCyclic=postProcessing/inletFlowRate.nonConformalCyclic/0/surfaceFieldValue.dat
 outletFlowRateNonConformalCyclic=postProcessing/outletFlowRate.nonConformalCyclic/0/surfaceFieldValue.dat
 
-gnuplot << EOF
+$GNUPLOT << EOF
 set terminal postscript eps color enhanced
 set output "error.eps"
 set xlabel "Time (s)"
diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
index 53fee3647..06df26399 100755
--- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
+++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph
@@ -3,13 +3,13 @@
 tail -n +4 ../postProcessing/probes/0/U  | \
     tr -s " " | tr -d '(' | cut -d " " -f1-2 > ../Numerical.dat
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced "Helvetica,20"
     set output "planarPoiseuille.eps"
     set xlabel "Time / [s]" font "Helvetica,24"
diff --git a/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs b/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs
index e7a91615f..71b8d5f27 100755
--- a/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs
+++ b/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo "gnuplot not found - skipping graph creation" >&2
     exit 1
@@ -8,7 +8,7 @@ fi
 
 time=$(foamListTimes -case .. -latestTime)
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set term post enhanced color solid linewidth 2.0 20
     set out "graphs.eps"
     set encoding utf8
diff --git a/tutorials/incompressible/simpleFoam/roomResidenceTime/validation/Allrun b/tutorials/incompressible/simpleFoam/roomResidenceTime/validation/Allrun
index 9bf0240c8..914728a93 100755
--- a/tutorials/incompressible/simpleFoam/roomResidenceTime/validation/Allrun
+++ b/tutorials/incompressible/simpleFoam/roomResidenceTime/validation/Allrun
@@ -32,6 +32,6 @@ done < "ageValues"
 paste positionsZ ageDimless2 > Pos2_OF
 
 # ------ Plot the results
-gnuplot plot*
+$GNUPLOT plot*
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/Grossetete/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/Grossetete/validation/createGraphs
index 69e308bbf..e768b6c84 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/Grossetete/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/Grossetete/validation/createGraphs
@@ -1,12 +1,12 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
 fi
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
     set output '../void_fraction.eps'
 
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/bubblePipe/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/bubblePipe/validation/createGraphs
index 354f3bbc1..7251cd4f8 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/bubblePipe/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/bubblePipe/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -10,7 +10,7 @@ time=$(foamListTimes -case .. -latestTime)
 
 graphFile=../postProcessing/graph/$time/line.xy
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
 
     set output '../void_fraction.eps'
@@ -34,7 +34,7 @@ EOF
 injectionFile=../postProcessing/probabilityDensity.injection/$time/probabilityDensity.injection.xy
 outletFile=../postProcessing/probabilityDensity.outlet/$time/probabilityDensity.outlet.xy
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
 
     set output '../volumeDensity.eps'
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/pipeBend/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/pipeBend/validation/createGraphs
index 87f35b9ac..495a70746 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/pipeBend/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/pipeBend/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -15,7 +15,7 @@ afterBend7D=../postProcessing/probabilityDensity.afterBend_7d/$time/probabilityD
 afterBend9D=../postProcessing/probabilityDensity.afterBend_9d/$time/probabilityDensity.afterBend_9d.xy
 layerAverage=../postProcessing/graphCrossSection/$time/layerAverage.xy
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
 
     set output '../volumeDensity.eps'
@@ -31,7 +31,7 @@ gnuplot<<EOF
          "$afterBend9D" u (\$1*1e6):(\$2) w histeps lw 3 lc rgb 'blue' t 'After bend: 9D'
 EOF
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
 
     set output '../crossSectionAverageDiameter.eps'
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoiling/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoiling/validation/createGraphs
index a33e21dec..21ae8273c 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoiling/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoiling/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -9,7 +9,7 @@ fi
 graphFile=$(foamListTimes -latestTime)/line.xy
 surfaceFile=$(cd postProcessing/inflow && ls -1tr */* | tail -n 1)
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
 
     set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
     set output "./validation/$(basename "$PWD").eps"
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingIATE/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingIATE/validation/createGraphs
index dcfceca79..d1ae68f9c 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingIATE/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingIATE/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -9,7 +9,7 @@ fi
 graphFile=$(foamListTimes -latestTime)/line.xy
 surfaceFile=$(cd postProcessing/inflow && ls -1tr */* | tail -n 1)
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
 
     set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
     set output "./validation/$(basename "$PWD").eps"
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperse/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperse/validation/createGraphs
index dcfceca79..d1ae68f9c 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperse/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperse/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -9,7 +9,7 @@ fi
 graphFile=$(foamListTimes -latestTime)/line.xy
 surfaceFile=$(cd postProcessing/inflow && ls -1tr */* | tail -n 1)
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
 
     set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
     set output "./validation/$(basename "$PWD").eps"
diff --git a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperseTwoGroups/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperseTwoGroups/validation/createGraphs
index 82a2a0364..0e4870fdb 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperseTwoGroups/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/RAS/wallBoilingPolydisperseTwoGroups/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -9,7 +9,7 @@ fi
 graphFile=$(foamListTimes -latestTime)/line.xy
 surfaceFile=$(cd postProcessing/inflow && ls -1tr */* | tail -n 1)
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
 
     set terminal postscript eps size 8,9 color enhanced font "Helvetica,20"
     set output "./validation/$(basename "$PWD").eps"
diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesis/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesis/validation/createGraphs
index e93c7d850..16094a6a1 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesis/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesis/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -10,7 +10,7 @@ time=$(foamListTimes -case .. -latestTime)
 
 graphFile=../postProcessing/graph/$time/line.xy
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
     set output '../species.eps'
 
@@ -29,7 +29,7 @@ EOF
 
 resultFile=../postProcessing/numberDensity/$time/numberDensity.xy
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
     set output '../sizeDistribution.eps'
 
diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/validation/createGraphs b/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/validation/createGraphs
index e93c7d850..d9c4b668c 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/validation/createGraphs
+++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface/validation/createGraphs
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-if ! which gnuplot > /dev/null 2>&1
+if ! which $GNUPLOT > /dev/null 2>&1
 then
     echo 'gnuplot not found - skipping graph creation' >&2
     exit 1
@@ -10,7 +10,7 @@ time=$(foamListTimes -case .. -latestTime)
 
 graphFile=../postProcessing/graph/$time/line.xy
 
-gnuplot<<EOF
+$GNUPLOTt<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
     set output '../species.eps'
 
@@ -29,7 +29,7 @@ EOF
 
 resultFile=../postProcessing/numberDensity/$time/numberDensity.xy
 
-gnuplot<<EOF
+$GNUPLOT<<EOF
     set terminal postscript eps color enhanced font "Helvetica,20"
     set output '../sizeDistribution.eps'
 
-- 
2.38.1


From 384e1ace9024d375cb3de593598bc155270491af Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Wed, 30 Nov 2022 14:14:53 +0100
Subject: [PATCH 10/13] chore: fix paraview dependency

---
 bin/paraFoam           |   9 +--
 etc/config.sh/paraview | 142 +++++------------------------------------
 2 files changed, 18 insertions(+), 133 deletions(-)

diff --git a/bin/paraFoam b/bin/paraFoam
index 78911fdce..91b2681e8 100755
--- a/bin/paraFoam
+++ b/bin/paraFoam
@@ -63,9 +63,9 @@ error() {
 pvExec () {
     if [ "$ParaView_GL" = mesa ]
     then
-        LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_LIB_DIR/mesa paraview "$@"
+        LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_LIB_DIR/mesa $PARAVIEW "$@"
     else
-        paraview "$@"
+        $PARAVIEW "$@"
     fi
 }
 
@@ -154,11 +154,6 @@ do
     esac
 done
 
-# Check that reader module has been built
-[ $requirePV -eq 1 ] && \
-    ! [ -f "$PV_PLUGIN_PATH/libPVFoamReader_SM.so" ] && \
-    noPVReader && exit 1
-
 # Check for --data=... argument
 hasDataArg()
 {
diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview
index 97826c1ca..daa2719e8 100644
--- a/etc/config.sh/paraview
+++ b/etc/config.sh/paraview
@@ -33,137 +33,27 @@
 #     are required for building plugins
 #------------------------------------------------------------------------------
 
-# Clean the PATH
-cleaned=$($WM_PROJECT_DIR/bin/foamCleanPath "$PATH" \
-        "$ParaView_DIR \
-         $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- \
-         $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-" \
-        ) \
-        && PATH="$cleaned"
-
-# Determine the cmake to be used. Take the most recent.
-unset CMAKE_HOME CMAKE_ROOT
-for cmake in $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake-*
-do
-    if [ -d $cmake ]
-    then
-        if [ -z $CMAKE_HOME ] || \
-            $WM_PROJECT_DIR/bin/tools/foamVersionCompare $CMAKE_HOME lt $cmake
-        then
-            export CMAKE_HOME=$cmake
-            export CMAKE_ROOT=$cmake
-        fi
-    fi
-done
-if [ -n $CMAKE_HOME ]
-then
-    export PATH=$cmake/bin:$PATH
-fi
-
 #- ParaView version, automatically determine major version
-#export ParaView_VERSION=4.0.1
-#export ParaView_VERSION=4.1.0
-#export ParaView_VERSION=4.3.1
-#export ParaView_VERSION=4.4.0
-#export ParaView_VERSION=5.0.0
-#export ParaView_VERSION=5.0.1
-#export ParaView_VERSION=5.4.0
-#export ParaView_VERSION=5.5.0
-export ParaView_VERSION=5.6.3
-export ParaView_MAJOR=detect
-
-#export ParaView_GL=system
-export ParaView_GL=mesa
-
-# Evaluate command-line parameters for ParaView
-_foamParaviewEval()
-{
-    while [ $# -gt 0 ]
-    do
-        case "$1" in
-        ParaView*=*)
-            # name=value  -> export name=value
-            eval "export $1"
-            ;;
-        esac
-        shift
-    done
-}
-
-# Evaluate command-line parameters
-_foamParaviewEval $@
-
-# Set MAJOR version to correspond to VERSION
-# ParaView_MAJOR is "<digits>.<digits>" from ParaView_VERSION
-case "$ParaView_VERSION" in
-"$ParaView_MAJOR".* )
-    # Version and major appear to correspond
-    ;;
-
-[0-9]*)
-    # Extract major from the version
-    ParaView_MAJOR=$(echo $ParaView_VERSION | \
-                   sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
-    ;;
-esac
-export ParaView_VERSION ParaView_MAJOR
+export ParaView_MAJOR=$(echo $PARAVIEWVERSION | sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/')
+export ParaView_VERSION=$ParaView_MAJOR
 
 # Set the binary and source directories
-export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/ParaView-$ParaView_VERSION
-paraviewSrcDir=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
-
-# Set paths if binaries or source are present
-if [ -d $ParaView_DIR -o -d $paraviewSrcDir ]
-then
-    export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR
-
-    paraviewArch=
-    if [ -d $ParaView_DIR/lib64 ]
-    then
-        paraviewArch=64
-    fi
-    paraviewLibSubDir=
-    if $WM_PROJECT_DIR/bin/tools/foamVersionCompare $ParaView_VERSION lt 5.5.0
-    then
-        paraviewLibSubDir=/paraview-$ParaView_MAJOR
-    fi
-    export ParaView_LIB_DIR=$ParaView_DIR/lib$paraviewArch$paraviewLibSubDir
+export ParaView_DIR=$PARAVIEW_ROOT
+export PARAVIEW=$ParaView_DIR/bin/paraview
 
-    export PATH=$ParaView_DIR/bin:$PATH
-    export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH
-    export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
+# Set paths
+export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR
+export ParaView_LIB_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR
+export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH
+export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
 
-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
-    then
-        echo "Using paraview"
-        echo "    ParaView_DIR         : $ParaView_DIR"
-        echo "    ParaView_LIB_DIR     : $ParaView_LIB_DIR"
-        echo "    ParaView_INCLUDE_DIR : $ParaView_INCLUDE_DIR"
-        echo "    PV_PLUGIN_PATH       : $PV_PLUGIN_PATH"
-    fi
-
-    # Add in python libraries if required
-    paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
-    if [ -r $paraviewPython ]
-    then
-        if [ "$PYTHONPATH" ]
-        then
-            export PYTHONPATH=$PYTHONPATH:$paraviewPython:$ParaView_LIB_DIR
-        else
-            export PYTHONPATH=$paraviewPython:$ParaView_LIB_DIR
-        fi
-    fi
-
-    # Alias paraview to launch with mesa if necessary
-    if [ "$ParaView_GL" = mesa ]
-    then
-        alias paraview='LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ParaView_LIB_DIR/mesa paraview'
-    fi
-else
-    unset PV_PLUGIN_PATH
+if [ "$FOAM_VERBOSE" -a "$PS1" ]
+then
+    echo "Using paraview"
+    echo "    ParaView_DIR         : $ParaView_DIR"
+    echo "    ParaView_LIB_DIR     : $ParaView_LIB_DIR"
+    echo "    ParaView_INCLUDE_DIR : $ParaView_INCLUDE_DIR"
+    echo "    PV_PLUGIN_PATH       : $PV_PLUGIN_PATH"
 fi
 
-unset _foamParaviewEval
-unset cleaned cmake paraviewInstDir paraviewPython
-
 #------------------------------------------------------------------------------
-- 
2.38.1


From 5d21c7dd6a8d7c136cd27d2fc3a6d9705adb9f61 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Tue, 20 Dec 2022 12:17:17 +0100
Subject: [PATCH 11/13] fix: add expand flag for foamDictionary call

---
 bin/tools/RunFunctions | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index 1a040df6a..fc2af43be 100644
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -41,12 +41,12 @@ isTest()
 
 getNumberOfProcessors()
 {
-    foamDictionary -entry numberOfSubdomains -value system/decomposeParDict
+    foamDictionary -entry numberOfSubdomains -value -expand system/decomposeParDict
 }
 
 getApplication()
 {
-    foamDictionary -entry application -value system/controlDict
+    foamDictionary -entry application -value -expand system/controlDict
 }
 
 runApplication()
-- 
2.38.1


From b85c08f749a4ceb1764d988b5b9d8c007e878358 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Sat, 24 Dec 2022 12:53:20 +0100
Subject: [PATCH 12/13] fix: wait for spawned child processes to finish

---
 test/IO/fileHandler/Allrun | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/IO/fileHandler/Allrun b/test/IO/fileHandler/Allrun
index bab6a20cf..ff1a94e2c 100755
--- a/test/IO/fileHandler/Allrun
+++ b/test/IO/fileHandler/Allrun
@@ -93,5 +93,7 @@ mkdir -p machineB/fileHandler
     -roots "(\"$d/machineA\" \"$d/machineB\" \"$d/machineB\")"
 )
 
+# wait for child processes to finish
+wait
 
 #------------------------------------------------------------------------------
-- 
2.38.1


From 79c2db679e3316a30e94ba219761d3a3a2fc7f00 Mon Sep 17 00:00:00 2001
From: Reza Housseini <reza.housseini@gmail.com>
Date: Sat, 24 Dec 2022 22:39:33 +0100
Subject: [PATCH 13/13] test: make tests more verbose

---
 tutorials/Allrun | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tutorials/Allrun b/tutorials/Allrun
index 8bd667576..17bf2c111 100755
--- a/tutorials/Allrun
+++ b/tutorials/Allrun
@@ -88,6 +88,9 @@ logReportDir()
     for log in `echo $logs | xargs ls -rt`
     do
         logReport $log >> ../testLoopReport || retVal=1
+	if [ "$retVal" -ne "0" ]; then
+	    echo `cat $log`
+	fi
     done
     echo "" >> ../testLoopReport
 
-- 
2.38.1


debug log:

solving 6eb657bfb8 ...
found 6eb657bfb8 in https://yhetil.org/guix/8e5d3188-53b7-d450-2b85-8921223c4d3b@gmail.com/

applying [1/1] https://yhetil.org/guix/8e5d3188-53b7-d450-2b85-8921223c4d3b@gmail.com/
diff --git a/gnu/packages/patches/openfoam-org-10-cleanup.patch b/gnu/packages/patches/openfoam-org-10-cleanup.patch
new file mode 100644
index 0000000000..6eb657bfb8

1:23: trailing whitespace.
 
1:43: trailing whitespace.
 
1:45: trailing whitespace.
-- 
1:65: trailing whitespace.
 
1:75: trailing whitespace.
 
Checking patch gnu/packages/patches/openfoam-org-10-cleanup.patch...
Applied patch gnu/packages/patches/openfoam-org-10-cleanup.patch cleanly.
warning: squelched 145 whitespace errors
warning: 150 lines add whitespace errors.

index at:
100644 6eb657bfb8c3a157df32793a94bbb534ea3b4ea6	gnu/packages/patches/openfoam-org-10-cleanup.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.