File tree 3 files changed +52
-14
lines changed
3 files changed +52
-14
lines changed Original file line number Diff line number Diff line change @@ -46,19 +46,32 @@ wget $SOURCE_TGZ
46
46
tar -xzf mpich-$VERSION .tar.gz
47
47
cd mpich-$VERSION
48
48
49
+ # create the install directory
50
+ mkdir -p $INSTALL_DIR
51
+ if [ $? -ne 0 ]; then
52
+ exit 1
53
+ fi
54
+
49
55
# configure and build
50
56
./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
52
60
echo " configure failed"
53
61
exit 1
54
62
fi
63
+
55
64
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
57
68
echo " make failed"
58
69
exit 1
59
70
fi
60
71
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
62
75
echo " make install failed"
63
76
exit 1
64
77
fi
@@ -68,4 +81,4 @@ cd $BUILD_DIR
68
81
rm -rf mpich-$VERSION
69
82
rm -f mpich-$VERSION .tar.gz
70
83
71
- exit 0
84
+ exit 0
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --disable-fortran --disable-f77 --disable-
33
33
# if C++ is not required - comment out if you need it
34
34
CONFIGURE_OPTIONS=" $CONFIGURE_OPTIONS --disable-cxx"
35
35
# just for testing without having a high speed network
36
- # @todo or ch4:ofi??
37
36
CONFIGURE_OPTIONS=" $CONFIGURE_OPTIONS --with-device=ch3"
38
37
39
38
VERSION=$1
@@ -47,19 +46,32 @@ wget $SOURCE_TGZ
47
46
tar -xzf mvapich-$VERSION .tar.gz
48
47
cd mvapich-$VERSION
49
48
49
+ # create the install directory
50
+ mkdir -p $INSTALL_DIR
51
+ if [ $? -ne 0 ]; then
52
+ exit 1
53
+ fi
54
+
50
55
# configure and build
51
56
./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
53
60
echo " configure failed"
54
61
exit 1
55
62
fi
63
+
56
64
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
58
68
echo " make failed"
59
69
exit 1
60
70
fi
61
71
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
63
75
echo " make install failed"
64
76
exit 1
65
77
fi
@@ -69,4 +81,4 @@ cd $BUILD_DIR
69
81
rm -rf mvapich-$VERSION
70
82
rm -f mvapich-$VERSION .tar.gz
71
83
72
- exit 0
84
+ exit 0
Original file line number Diff line number Diff line change @@ -49,19 +49,32 @@ wget $SOURCE_TGZ
49
49
tar -xzf openmpi-$VERSION .tar.gz
50
50
cd openmpi-$VERSION
51
51
52
- # configure and build
53
- ./configure --prefix= $INSTALL_DIR 2>&1 | tee configure.log
52
+ # create the install directory
53
+ mkdir -p $INSTALL_DIR
54
54
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
55
63
echo " configure failed"
56
64
exit 1
57
65
fi
66
+
58
67
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
60
71
echo " make failed"
61
72
exit 1
62
73
fi
63
74
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
65
78
echo " make install failed"
66
79
exit 1
67
80
fi
@@ -71,4 +84,4 @@ cd $BUILD_DIR
71
84
rm -rf openmpi-$VERSION
72
85
rm -f openmpi-$VERSION .tar.gz
73
86
74
- exit 0
87
+ exit 0
You can’t perform that action at this time.
0 commit comments