forked from hpc/mpifileutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildme
executable file
·54 lines (44 loc) · 1.31 KB
/
buildme
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
#!/bin/bash
. /usr/local/tools/dotkit/init.sh
use mvapich2-gnu-2.2
set -x
mpifileutils=mpifileutils-0.7
topdir=`pwd`
installdir=$topdir/install
if [ ! -f ${mpifileutils}.tar.gz ] ; then
wget https://github.com/hpc/mpifileutils/releases/download/v0.7/${mpifileutils}.tar.gz
fi
rm -rf ${mpifileutils}
tar -zxf ${mpifileutils}.tar.gz
pushd ${mpifileutils}
# if EA is set to true then add configure option
EA=false
build_type=""
export CC=mpicc
if $EA ; then
# build line option required if building for EA systems
build_type="--build=powerpc64le-redhat-linux-gnu"
export CC=mpigcc
export CXX=mpig++
fi
export PKG_CONFIG_PATH="${installdir}/lib/pkgconfig"
# TODO: avoid this step
# necessary so configure test of dtcmp links with MPI
# hack to get things to build after common library
export CFLAGS="-g -O0 -I${topdir}/src/common -DDCOPY_USE_XATTRS"
export LDFLAGS="-Wl,-rpath,${topdir}/install/lib -L${topdir}/install/lib -lcircle"
./configure \
$build_type \
--enable-lustre \
--enable-experimental \
--prefix=$installdir \
--disable-silent-rules \
--with-dtcmp=$installdir && \
make uninstall && \
make VERBOSE=1 && \
make VERBOSE=1 install
if [ $? -ne 0 ] ; then
echo "failed to configure, build, or install mpiFileUtils"
exit 1
fi
popd