forked from OpenFOAM/ThirdParty-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Allwmake
executable file
·722 lines (612 loc) · 22.1 KB
/
Allwmake
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
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# 2014-02-20 blueCAPE Lda: Modifications for blueCFD-Core 2.3
# 2016-03-14 blueCAPE Lda: Modifications for blueCFD-Core 2.3-2
# 2016-07-22 blueCAPE Lda: Modifications for blueCFD-Core 2016-1
# 2016-202X FS Dynamics Portugal: Subsequent changes are tracked at:
# https://github.com/blueCFD/OpenFOAM-dev
#------------------------------------------------------------------------------
# License
# This file is a derivative work of OpenFOAM.
#
# OpenFOAM is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Modifications
# This file has been modified by blueCAPE's unofficial mingw patches for
# OpenFOAM.
# For more information about these patches, visit:
# http://bluecfd.com/Core
#
# Modifications made:
# - Derived from the patches for blueCFD 2.1 and 2.2.
# - Added capabilities for building the stubs for:
# Open-MPI, MPICH and MSMPI
# - Added capability for building Scotch for MinGW.
# - Added capability for building Metis for MinGW.
# - Added patches for TecIO and added back this build option.
#
# Script
# Allwmake
#
# Description
# Build script for ThirdParty
#
#------------------------------------------------------------------------------
# run from third-party directory only
cd ${0%/*} || exit 1
wmakeCheckPwd "$WM_THIRD_PARTY_DIR" || {
echo "Error: Current directory is not \$WM_THIRD_PARTY_DIR"
echo " The environment variables are inconsistent with the installation."
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error: FOAM_EXT_LIBBIN not set"
echo " Check the OpenFOAM entries in your dot-files and source them."
exit 1
}
. etc/tools/ThirdPartyFunctions
. etc/tools/makeExtraThirdPartyFunctions
#------------------------------------------------------------------------------
# export WM settings in a form that GNU configure recognizes
[ -n "$WM_CC" ] && export CC="$WM_CC"
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
[ -n "$WM_CFLAGS" ] && export CFLAGS="$WM_CFLAGS"
[ -n "$WM_CXXFLAGS" ] && export CXXFLAGS="$WM_CXXFLAGS"
[ -n "$WM_LDFLAGS" ] && export LDFLAGS="$WM_LDFLAGS"
echo
echo ========================================
echo Start ThirdParty Allwmake
echo ========================================
echo
#------------------------------------------------------------------------------
# Build 3rd-party software that is only relevant to MinGW builds
if isMinGW; then
./AllwmakeMinGWStackTrace
fi
echo ========================================
echo Build MPI libraries if required
echo
if isMinGW; then # MPI MinGW
./AllwmakeMinGWMPI
else # MPI linux
case "$WM_MPLIB" in
OPENMPI)
if [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.so ]
then
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
elif [ -r $MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH}/libmpi.a ]
then
echo " have $WM_MPLIB static library ($FOAM_MPI)"
else
(
set -x
cd "${MPI_ARCH_PATH##*/}" || exit 1 # change to openmpi-VERSION
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH
# start with GridEngine support,
# it can be built without external libraries
configOpt="--with-sge"
# Infiniband support
# if [ -d /usr/local/ofed -a -d /usr/local/ofed/lib64 ]
# then
# configOpt="$configOpt --with-openib=/usr/local/ofed"
# configOpt="$configOpt --with-openib-libdir=/usr/local/ofed/lib64"
# fi
./configure \
--prefix=$MPI_ARCH_PATH \
--disable-orterun-prefix-by-default \
--enable-shared --disable-static \
--enable-mpi-thread-multiple \
--libdir=$MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH} \
--enable-mpi-fortran=none \
--disable-mpi-profile \
$configOpt \
;
make -j $WM_NCOMPPROCS && make install
make distclean
)
fi
;;
MPICH)
if [ -r $MPI_ARCH_PATH/lib/libmpich.so ]
then
echo " have $WM_MPLIB shared library ($FOAM_MPI)"
elif [ -r $MPI_ARCH_PATH/lib/libmpich.a ]
then
echo " have $WM_MPLIB static library ($FOAM_MPI)"
else
(
set -x
cd $MPI_HOME || exit 1 # change to mpich-VERSION
[ -e Makefile ] && make distclean 2>/dev/null
rm -rf $MPI_ARCH_PATH
rm util/machines/machines.*
./configure \
--prefix=$MPI_ARCH_PATH \
--without-mpe \
--disable-f77 \
--disable-f90 \
--disable-f90modules \
--disable-mpedbg \
--disable-devdebug \
--disable-debug \
--enable-sharedlib=$MPI_ARCH_PATH/lib \
--with-device=ch_p4 \
;
# For MPICH2 below 1.5a1 uncomment this line and comment next
# make && make install
# For MPICH2 1.5a1 or above
make -j $WM_NCOMPPROCS && make install
make distclean
if [ -r $MPI_ARCH_PATH ]
then
cd $MPI_ARCH_PATH/bin
for file in *
do
sed s%$MPI_ARCH_PATH%'$MPI_ARCH_PATH'%g $file > temp.$$
mv temp.$$ $file
chmod 0755 $file
done
cd $MPI_ARCH_PATH/lib
if [ -r libmpich.so.1.0 ]
then
rm *.so
ln -s libmpich.so.1.0 libmpich.so
fi
fi
)
fi
;;
esac
echo
fi # MPI MinGW or Linux
#------------------------------------------------------------------------------
checkSystemLibrary()
{
libraryName=$1
includeName=$2
reportName=$3
if ! \
$CXX $LDFLAGS -shared --output=/tmp/$$ ${4:+"-L$4"} -l$libraryName \
> /dev/null 2>&1
then
rm /tmp/$$
echo -n " Error: A system installation of the $reportName library "
echo "(lib$libraryName.so) was not found"
exit 1
fi
rm /tmp/$$
if ! echo \#include \"$includeName.h\" | \
$CXX $CXXFLAGS ${5:+"-I$5"} -I"$MPI_ARCH_PATH"/include -xc++ -E - \
> /dev/null 2>&1
then
echo -n " Error: A system installation of $reportName headers "
echo "($includeName.h) was not found"
exit 1
fi
}
#------------------------------------------------------------------------------
# Scotch
# Scotch Makefile. Currently this is GCC specific.
scotchMakefile=../../etc/wmakeFiles/scotch/Makefile.inc.i686_pc_linux2.shlib-OpenFOAM
echo ========================================
case $SCOTCH_TYPE in
none)
echo "Scotch decomposition is disabled"
;;
system)
echo "The system installation of Scotch decomposition will be used"
checkSystemLibrary scotch scotch Scotch \
"$SCOTCH_LIB_DIR" "${SCOTCH_INCLUDE_DIR:-/usr/include/scotch}"
;;
OpenFOAM | ThirdParty)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.so ]
then
echo "ThirdParty installation of Scotch decomposition found"
echo " scotch header in $SCOTCH_ARCH_PATH/include"
echo " scotch libs in $FOAM_EXT_LIBBIN"
else
if [ -d "scotch_$SCOTCH_VERSION" ]
then
(
echo "Building a ThirdParty installation of Scotch decomposition"
set -x
cd scotch_$SCOTCH_VERSION/src || exit 1
prefixDIR=$SCOTCH_ARCH_PATH
libDIR=$FOAM_EXT_LIBBIN
mkdir -p $prefixDIR 2>/dev/null
mkdir -p $libDIR 2>/dev/null
configOpt="prefix=$prefixDIR libdir=$libDIR"
if [ -f $scotchMakefile ]
then
rm -f Makefile.inc
ln -s $scotchMakefile Makefile.inc
fi
[ -f Makefile.inc ] || {
echo " Error: scotch needs an appropriate Makefile.inc"
exit 1
}
# handle non-gcc compilers
unset configEnv
[ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC"
make realclean 2>/dev/null # for safety
make -j $WM_NCOMPPROCS $configEnv scotch \
&& make $configOpt install
# cleanup, could also remove Makefile.inc
make realclean 2>/dev/null
)
else
echo -n " Error: ThirdPaty sources for Scotch "
echo "(scotch_$SCOTCH_VERSION) were not found"
exit 1
fi
fi
# verify existence of scotch include
[ -f $SCOTCH_ARCH_PATH/include/scotch.h ] || {
echo
echo " WARNING: required include file 'scotch.h' not found!"
}
;;
MSYS2)
echo "The system installation of Scotch decomposition will be used"
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
checkSystemLibrary scotch scotch Scotch \
"$SCOTCH_ARCH_PATH/lib" "$SCOTCH_ARCH_PATH/include"
;;
blueCFDCore)
./AllwmakeMinGWScotch
;;
esac
echo
#------------------------------------------------------------------------------
# PT-Scotch if MPI (ThirdParty or system) is available
if [ "${FOAM_MPI:-dummy}" != dummy ]
then
echo ========================================
case $SCOTCH_TYPE in
none)
echo "PT-Scotch decomposition is disabled"
;;
system)
echo "The system installation of PT-Scotch decomposition will be used"
checkSystemLibrary ptscotch ptscotch PT-Scotch \
"$PTSCOTCH_LIB_DIR" "${PTSCOTCH_INCLUDE_DIR:-/usr/include/scotch}"
;;
OpenFOAM | ThirdParty)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotcherrexit.so ]
then
echo "ThirdParty installation of PT-Scotch decomposition found"
echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
else
if [ -d "scotch_$SCOTCH_VERSION" ]
then
(
echo "Building a ThirdParty installation of PT-Scotch decomposition"
set -x
cd scotch_$SCOTCH_VERSION/src || exit 1
prefixDIR=$SCOTCH_ARCH_PATH
libDIR=$FOAM_EXT_LIBBIN/$FOAM_MPI
incDIR=$SCOTCH_ARCH_PATH/include/$FOAM_MPI
mkdir -p $prefixDIR 2>/dev/null
mkdir -p $libDIR 2>/dev/null
configOpt="prefix=$prefixDIR libdir=$libDIR includedir=$incDIR"
if [ -f $scotchMakefile ]
then
rm -f Makefile.inc
ln -s $scotchMakefile Makefile.inc
fi
[ -f Makefile.inc ] || {
echo " Error: scotch needs an appropriate Makefile.inc"
exit 1
}
# handle non-gcc compilers
unset configEnv
[ "${WM_CC:-gcc}" != gcc ] && configEnv="CC=$WM_CC CCS=$WM_CC"
make realclean 2>/dev/null # for safety
make -j $WM_NCOMPPROCS $configEnv ptscotch \
&& make $configOpt install
# cleanup, could also remove Makefile.inc
make realclean 2>/dev/null
)
else
echo -n " Error: ThirdPaty sources for PT-Scotch "
echo "(scotch_$SCOTCH_VERSION) were not found"
exit 1
fi
fi
# Verify existence of PT-Scotch include
[ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h ] || {
echo
echo " WARNING: required include file 'ptscotch.h' not found!"
}
;;
MSYS2)
echo "The system installation of PT-Scotch decomposition will be used"
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/scotch)
checkSystemLibrary ptscotch ptscotch PT-Scotch \
"$SCOTCH_ARCH_PATH/lib" "$SCOTCH_ARCH_PATH/include"
;;
blueCFDCore)
#Skip, already done above
#./AllwmakeMinGWScotch
;;
esac
fi
echo
#------------------------------------------------------------------------------
# METIS
echo ========================================
case $METIS_TYPE in
none)
echo "METIS decomposition is disabled"
;;
system)
echo "The system installation of METIS decomposition will be used"
checkSystemLibrary metis metis METIS \
"$METIS_LIB_DIR" "$METIS_INCLUDE_DIR"
;;
OpenFOAM | ThirdParty)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
if [ -f $METIS_ARCH_PATH/include/metis.h \
-a -r $FOAM_EXT_LIBBIN/libmetis.so ]
then
echo "ThirdParty installation of METIS decomposition found"
echo " metis header in $METIS_ARCH_PATH/include"
echo " metis libs in $FOAM_EXT_LIBBIN"
else
if [ -d "metis-$METIS_VERSION" ]
then
(
echo "Building a ThirdParty installation of METIS decomposition"
set -x
cd metis-$METIS_VERSION || exit 1
# Change user settings automatically
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
include/metis.h
make config shared=1 prefix=$METIS_ARCH_PATH
make -j $WM_NCOMPPROCS install
cp $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
)
else
echo -n " Error: ThirdPaty sources for METIS "
echo "(metis-$METIS_VERSION) were not found"
exit 1
fi
fi
;;
MSYS2)
echo "The system installation of METIS decomposition will be used"
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
checkSystemLibrary metis metis METIS \
"$METIS_ARCH_PATH/lib" "$METIS_ARCH_PATH/include"
;;
blueCFDCore)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
if [ -f $METIS_ARCH_PATH/include/metis.h \
-a -r $FOAM_EXT_LIBBIN/libmetis.dll ]
then
echo "ThirdParty installation of METIS decomposition found"
echo " metis header in $METIS_ARCH_PATH/include"
echo " metis libs in $FOAM_EXT_LIBBIN"
echo
else
set -x
cd $METIS_VERSION || exit 1
if [ ! -e "mingw.patch.complete" ]; then
patch -p1 < $WM_THIRD_PARTY_DIR/etc/patches/patch_metis_5.1.0 && \
touch mingw.patch.complete
fi
if [ -d build ]
then
mv build build.$$
rm -rf build.$$ &
fi
[ ! -d build ] && mkdir build
if [ "$WM_PRECISION_OPTION" = "DP" ]
then
FLOAT_PRECISION=64
elif [ "$WM_PRECISION_OPTION" = "SP" ]
then
FLOAT_PRECISION=32
else
echo " Metis pre-configure error:"
echo " WM_PRECISION_OPTION is neither DP nor SP"
exit 1
fi
# Change user settings automatically
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
-e 's=\(#define REALTYPEWIDTH\).*=\1 '$FLOAT_PRECISION'=' \
include/metis.h
cd build
cmake \
-G "MSYS Makefiles" \
-DCMAKE_INSTALL_PREFIX=$METIS_ARCH_PATH \
-DCMAKE_BUILD_TYPE=Release \
-DSHARED=1 \
-DCMAKE_C_COMPILER=${WM_CC} \
-DGKLIB_PATH="../GKlib" \
-DCMAKE_C_FLAGS="$CFLAGS -DWIN${WM_ARCH_OPTION}" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -DWIN${WM_ARCH_OPTION}" \
$WM_THIRD_PARTY_DIR/$METIS_VERSION
make all install
cp $METIS_ARCH_PATH/lib/libmetis.dll* $FOAM_EXT_LIBBIN
cp $FOAM_EXT_LIBBIN/libmetis.dll.a $FOAM_EXT_LIBBIN/libmetis.a
#clean up afterwards
[ -d build ] && rm -rf build
set +x
fi
;;
esac
echo
#------------------------------------------------------------------------------
# ParMETIS
echo ========================================
case $PARMETIS_TYPE in
none)
echo "ParMETIS decomposition is disabled"
;;
system)
echo "The system installation of ParMETIS decomposition will be used"
checkSystemLibrary parmetis parmetis ParMETIS \
"$PARMETIS_LIB_DIR" "$PARMETIS_INCLUDE_DIR"
;;
OpenFOAM | ThirdParty)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/parMetis)
if [ -f $PARMETIS_ARCH_PATH/include/parmetis.h \
-a -r $FOAM_EXT_LIBBIN/libparmetis.so ]
then
echo "ThirdParty installation of ParMETIS decomposition found"
echo " parmetis header in $PARMETIS_ARCH_PATH/include"
echo " parmetis libs in $FOAM_EXT_LIBBIN"
else
echo "Building a ThirdParty installation of ParMETIS decomposition"
if [ -d "parmetis-$PARMETIS_VERSION" ]
then
(
set -x
cd parmetis-$PARMETIS_VERSION || exit 1
# Change user settings automatically
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
metis/include/metis.h
make config shared=1 prefix=$PARMETIS_ARCH_PATH
make -j $WM_NCOMPPROCS install
cp metis/include/metis.h $PARMETIS_ARCH_PATH/include
cp $PARMETIS_ARCH_PATH/lib/libparmetis.so $FOAM_EXT_LIBBIN
)
else
echo -n " Error: ThirdPaty sources for ParMETIS "
echo "(parmetis-$PARMETIS_VERSION) were not found"
exit 1
fi
fi
;;
MSYS2)
echo "The system installation of ParMETIS decomposition will be used"
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/parMetis)
checkSystemLibrary parmetis parmetis ParMETIS \
"$PARMETIS_ARCH_PATH/lib" "$PARMETIS_ARCH_PATH/include"
;;
blueCFDCore)
echo "WARNING: Building ParMETIS not currently implemented with blueCFD-Core."
;;
esac
echo
#------------------------------------------------------------------------------
echo ========================================
case $ZOLTAN_TYPE in
none)
echo "Zoltan decomposition is disabled"
;;
system)
echo "The system installation of Zoltan decomposition will be used"
checkSystemLibrary zoltan zoltan Zoltan \
"$ZOLTAN_LIB_DIR" "$ZOLTAN_INCLUDE_DIR"
;;
OpenFOAM | ThirdParty)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan)
if [ -f $ZOLTAN_ARCH_PATH/include/zoltan.h \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libzoltan.a ]
then
echo "ThirdParty installation of Zoltan decomposition found"
echo " Zoltan header in $ZOLTAN_ARCH_PATH/include"
echo " Zoltan libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
else
echo "Building a ThirdParty installation of Zoltan decomposition"
if [ -d "Zoltan-$ZOLTAN_VERSION" ]
then
(
set -x
cd Zoltan-$ZOLTAN_VERSION || exit 1
mkdir -p build
cd build
../configure \
--prefix=$ZOLTAN_ARCH_PATH \
--libdir=$FOAM_EXT_LIBBIN/$FOAM_MPI \
--with-mpi=$MPI_ARCH_PATH \
--with-mpi-compilers=no \
--with-mpi-libdir=$MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH} \
--disable-zoltan-cppdriver \
--with-ccflags=-fPIC --with-cxxflags=-fPIC
make everything
make install
)
else
echo -n " Error: ThirdPaty sources for Zoltan "
echo "(Zoltan-$ZOLTAN_VERSION) were not found"
exit 1
fi
fi
;;
MSYS2)
echo "Zoltan is not provided with MSYS2 (up to mid July 2024)."
exit 1
;;
blueCFDCore)
. $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/zoltan)
if [ -f $ZOLTAN_ARCH_PATH/include/zoltan.h \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libzoltan.a ]
then
echo "ThirdParty installation of Zoltan decomposition found"
echo " Zoltan header in $ZOLTAN_ARCH_PATH/include"
echo " Zoltan libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
else
echo "Building a ThirdParty installation of Zoltan decomposition"
if [ -d "Zoltan-$ZOLTAN_VERSION" ]
then
(
set -x
cd Zoltan-$ZOLTAN_VERSION || exit 1
mkdir -p build
cd build
../configure \
--prefix=$ZOLTAN_ARCH_PATH \
--libdir=$FOAM_EXT_LIBBIN/$FOAM_MPI \
--with-mpi=$MPI_ARCH_PATH \
--with-mpi-compilers=no \
--with-mpi-libdir=$MPI_ARCH_PATH/lib${WM_COMPILER_LIB_ARCH} \
--disable-zoltan-cppdriver \
--with-ccflags="$CFLAGS -DWIN${WM_ARCH_OPTION}" \
--with-cxxflags="$CXXFLAGS -DWIN${WM_ARCH_OPTION}"
make -j $WM_NCOMPPROCS everything
make install
)
else
echo -n " Error: ThirdPaty sources for Zoltan "
echo "(Zoltan-$ZOLTAN_VERSION) were not found"
exit 1
fi
fi
;;
esac
echo
#------------------------------------------------------------------------------
echo ========================================
echo Done ThirdParty Allwmake
echo ========================================
echo
#------------------------------------------------------------------------------