File tree 8 files changed +33
-8
lines changed
8 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 2
2
set -eu
3
3
export PATH=/bin:$PATH
4
4
5
+ if [ -f utils.sh ]; then
6
+ source utils.sh
7
+ fi
8
+
5
9
if [[ $mpi == " openmpi" ]]; then
6
10
export OMPI_MCA_plm=isolated
7
11
export OMPI_MCA_rmaps_base_oversubscribe=yes
@@ -30,8 +34,7 @@ cmake .. -G "Ninja" \
30
34
-DVTK_GROUP_ENABLE_Web:STRING=NO \
31
35
-DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT}
32
36
33
- CORES=$( echo " ${CPU_COUNT:- 2} / 2" | bc)
34
- ninja install -v -j $CORES
37
+ ninja install -v -j $CPU_COUNT
35
38
36
39
# VTK 9.1 now places libs in lib64 when installed on linux, linking to the "expected" location of lib
37
40
if [[ $( uname) == Linux ]]; then
Original file line number Diff line number Diff line change
1
+ ../mpich/utils.sh
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ if [ -z $PETSC_DIR ]; then
10
10
exit 1
11
11
fi
12
12
13
+ if [ -f utils.sh ]; then
14
+ source utils.sh
15
+ fi
16
+
13
17
function sed_replace(){
14
18
if [ ` uname` = " Darwin" ]; then
15
19
sed -i ' ' -e " s|${BUILD_PREFIX} |${PREFIX} |g" $PREFIX /libmesh/bin/libmesh-config
@@ -79,8 +83,7 @@ LIBMESH_DIR=${PREFIX}/libmesh \
79
83
--with-vtk-include=${BUILD_PREFIX} /libmesh-vtk/include/vtk-${SHORT_VTK_NAME} \
80
84
$*
81
85
82
- CORES=$( echo " ${CPU_COUNT:- 2} / 2" | bc)
83
- make -j $CORES
86
+ make -j $CPU_COUNT
84
87
make install
85
88
sed_replace
86
89
Original file line number Diff line number Diff line change
1
+ ../mpich/utils.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -eu
3
- printf " \n\n\n\n` env` \n\n\n\n"
4
3
export PATH=/bin:$PATH
5
-
6
4
export FCFLAGS=" $FFLAGS "
7
5
export CC=$( basename " $CC " )
8
6
export CXX=$( basename " $CXX " )
9
7
export FC=$( basename " $FC " )
10
8
9
+ if [ -f utils.sh ]; then
10
+ source utils.sh
11
+ fi
12
+
11
13
if [[ $HOST == arm64-apple-darwin20.0.0 ]]; then
12
14
# use Conda-Forge's Arm64 config.guess and config.sub, see
13
15
# https://conda-forge.org/blog/posts/2020-10-29-macos-arm64/
92
94
CFLAGS=" ${CTUNING} " CXXFLAGS=" ${CTUNING} " FFLAGS=" ${FTUNING} " LDFLAGS=" ${LDFLAGS} " \
93
95
FCFLAGS=" ${FTUNING} " F90FLAGS=" " F77FLAGS=" " \
94
96
${OPTIONS}
95
- CORES= $( echo " ${ CPU_COUNT:- 2} / 2 " | bc )
96
- make -j $CORES
97
+ printf " Building with $ CPU_COUNT cores...\n "
98
+ make -j $CPU_COUNT
97
99
make install
98
100
99
101
# Set MPICH environment variables for those that need it, and set CXXFLAGS using our ACTIVATION_CXXFLAGS variable
Original file line number Diff line number Diff line change
1
+ # establish cores, or reasonable default
2
+ if [ -z " $CPU_COUNT " ]; then
3
+ if [ ` uname` == " Darwin" ]; then
4
+ CPU_COUNT=$( echo " $( sysctl -n hw.ncpu) / 2" | bc)
5
+ elif [ ` which nproc` ]; then
6
+ CPU_COUNT=$( echo ` nproc` / 2 | bc)
7
+ else
8
+ CPU_COUNT=4
9
+ fi
10
+ fi
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export CC=$(basename "$CC")
9
9
export CXX=$( basename " $CXX " )
10
10
export FC=$( basename " $FC " )
11
11
12
+ if [ -f utils.sh ]; then
13
+ source utils.sh
14
+ fi
15
+
12
16
# feed-stock recommendation
13
17
# scrub debug-prefix-map args, which cause problems in pkg-config
14
18
export CFLAGS=$( echo ${CFLAGS:- } | sed -E ' s@\-fdebug\-prefix\-map[^ ]*@@g' )
Original file line number Diff line number Diff line change
1
+ ../mpich/utils.sh
You can’t perform that action at this time.
0 commit comments