Salome HOME
openmpi: compilation script update to be compliant with openmpi-4.x
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 7 Mar 2023 15:03:20 +0000 (16:03 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Tue, 7 Mar 2023 15:03:20 +0000 (16:03 +0100)
products/compil_scripts/openmpi.sh

index 73fd89b5d3d7d87f50c451555d7381e60b0761ac..13f52394f67c901d94d9b5798eba70c51fa06c1d 100755 (executable)
@@ -4,36 +4,46 @@ echo "##########################################################################
 echo "OpenMPI" $VERSION
 echo "##########################################################################"
 
-
-
-# Attention la variable $PYTHOSTARTUP pose problem -> unset.
-# Si erreur au make install -> environement "polluĂ©"
+rm -rf $BUILD_DIR
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+
+cp -r $SOURCE_DIR/* .
+
+if [ -f autogen.pl ]; then
+    echo
+    echo "*** autoreconf -i"
+    chmod +x autogen.pl
+    ./autogen.pl
+    if [ $? -ne 0 ]
+    then
+        echo "ERROR on autogen.pl"
+        exit 1
+    fi
+fi
 
 echo
 echo "*** configure"
-$SOURCE_DIR/configure --prefix=$PRODUCT_INSTALL
-if [ $? -ne 0 ]
-then
+$BUILD_DIR/configure --prefix=$PRODUCT_INSTALL
+if [ $? -ne 0 ]; then
     echo "ERROR on configure"
-    exit 1
+    exit 2
 fi
 
 echo
 echo "*** make" $MAKE_OPTIONS
 make $MAKE_OPTIONS
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
     echo "ERROR on make"
-    exit 2
+    exit 3
 fi
 
 echo
 echo "*** make install"
 make install
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
     echo "ERROR on make install"
-    exit 3
+    exit 4
 fi
 
 echo