Skip to content

Commit 89ba1e0

Browse files
Joachim Gablerjgabler-hpc
Joachim Gabler
authored andcommitted
EH: CS-1257 in the MPI build scripts save the configure/make/make install log files into the installation directory
1 parent 4be62d3 commit 89ba1e0

File tree

3 files changed

+52
-14
lines changed

3 files changed

+52
-14
lines changed

source/dist/mpi/mpich/build.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,32 @@ wget $SOURCE_TGZ
4646
tar -xzf mpich-$VERSION.tar.gz
4747
cd mpich-$VERSION
4848

49+
# create the install directory
50+
mkdir -p $INSTALL_DIR
51+
if [ $? -ne 0 ]; then
52+
exit 1
53+
fi
54+
4955
# configure and build
5056
./configure $CONFIGURE_OPTIONS --prefix=$INSTALL_DIR 2>&1 | tee configure.log
51-
if [ $? -ne 0 ]; then
57+
exit_code=$?
58+
cp configure.log $INSTALL_DIR
59+
if [ $exit_code -ne 0 ]; then
5260
echo "configure failed"
5361
exit 1
5462
fi
63+
5564
make -j 4 2>&1 | tee make.log
56-
if [ $? -ne 0 ]; then
65+
exit_code=$?
66+
cp make.log $INSTALL_DIR
67+
if [ $exit_code -ne 0 ]; then
5768
echo "make failed"
5869
exit 1
5970
fi
6071
make install 2>&1 | tee make-install.log
61-
if [ $? -ne 0 ]; then
72+
exit_code=$?
73+
cp make-install.log $INSTALL_DIR
74+
if [ $exit_code -ne 0 ]; then
6275
echo "make install failed"
6376
exit 1
6477
fi
@@ -68,4 +81,4 @@ cd $BUILD_DIR
6881
rm -rf mpich-$VERSION
6982
rm -f mpich-$VERSION.tar.gz
7083

71-
exit 0
84+
exit 0

source/dist/mpi/mvapich/build.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --disable-fortran --disable-f77 --disable-
3333
# if C++ is not required - comment out if you need it
3434
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --disable-cxx"
3535
# just for testing without having a high speed network
36-
# @todo or ch4:ofi??
3736
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-device=ch3"
3837

3938
VERSION=$1
@@ -47,19 +46,32 @@ wget $SOURCE_TGZ
4746
tar -xzf mvapich-$VERSION.tar.gz
4847
cd mvapich-$VERSION
4948

49+
# create the install directory
50+
mkdir -p $INSTALL_DIR
51+
if [ $? -ne 0 ]; then
52+
exit 1
53+
fi
54+
5055
# configure and build
5156
./configure $CONFIGURE_OPTIONS --prefix=$INSTALL_DIR 2>&1 | tee configure.log
52-
if [ $? -ne 0 ]; then
57+
exit_code=$?
58+
cp configure.log $INSTALL_DIR
59+
if [ $exit_code -ne 0 ]; then
5360
echo "configure failed"
5461
exit 1
5562
fi
63+
5664
make -j 4 2>&1 | tee make.log
57-
if [ $? -ne 0 ]; then
65+
exit_code=$?
66+
cp make.log $INSTALL_DIR
67+
if [ $exit_code -ne 0 ]; then
5868
echo "make failed"
5969
exit 1
6070
fi
6171
make install 2>&1 | tee make-install.log
62-
if [ $? -ne 0 ]; then
72+
exit_code=$?
73+
cp make-install.log $INSTALL_DIR
74+
if [ $exit_code -ne 0 ]; then
6375
echo "make install failed"
6476
exit 1
6577
fi
@@ -69,4 +81,4 @@ cd $BUILD_DIR
6981
rm -rf mvapich-$VERSION
7082
rm -f mvapich-$VERSION.tar.gz
7183

72-
exit 0
84+
exit 0

source/dist/mpi/openmpi/build.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,32 @@ wget $SOURCE_TGZ
4949
tar -xzf openmpi-$VERSION.tar.gz
5050
cd openmpi-$VERSION
5151

52-
# configure and build
53-
./configure --prefix=$INSTALL_DIR 2>&1 | tee configure.log
52+
# create the install directory
53+
mkdir -p $INSTALL_DIR
5454
if [ $? -ne 0 ]; then
55+
exit 1
56+
fi
57+
58+
# configure and build
59+
./configure $CONFIGURE_OPTIONS --prefix=$INSTALL_DIR 2>&1 | tee configure.log
60+
exit_code=$?
61+
cp configure.log $INSTALL_DIR
62+
if [ $exit_code -ne 0 ]; then
5563
echo "configure failed"
5664
exit 1
5765
fi
66+
5867
make -j 4 2>&1 | tee make.log
59-
if [ $? -ne 0 ]; then
68+
exit_code=$?
69+
cp make.log $INSTALL_DIR
70+
if [ $exit_code -ne 0 ]; then
6071
echo "make failed"
6172
exit 1
6273
fi
6374
make install 2>&1 | tee make-install.log
64-
if [ $? -ne 0 ]; then
75+
exit_code=$?
76+
cp make-install.log $INSTALL_DIR
77+
if [ $exit_code -ne 0 ]; then
6578
echo "make install failed"
6679
exit 1
6780
fi
@@ -71,4 +84,4 @@ cd $BUILD_DIR
7184
rm -rf openmpi-$VERSION
7285
rm -f openmpi-$VERSION.tar.gz
7386

74-
exit 0
87+
exit 0

0 commit comments

Comments
 (0)