default_MPI :
{
- cmake_options : "-DMEDCOUPLING_ENABLE_PYTHON=ON -DMEDCOUPLING_ENABLE_PARTITIONER=OFF -DMEDCOUPLING_ENABLE_RENUMBER=ON -DMEDCOUPLING_PARTITIONER_METIS=OFF -DMEDCOUPLING_PARTITIONER_SCOTCH=ON -DMEDCOUPLING_PARTITIONER_PARMETIS=ON -DMEDCOUPLING_MICROMED=OFF -DMEDCOUPLING_USE_MPI=ON -DSALOME_USE_MPI=ON -DMEDCOUPLING_USE_64BIT_IDS=ON -DCMAKE_CXX_COMPILER=${MPI_ROOT_DIR}/bin/mpicxx -DCMAKE_CC_COMPILER=${MPI_ROOT_DIR}/bin/mpicc"
+ cmake_options : "-DMEDCOUPLING_ENABLE_PYTHON=ON -DMEDCOUPLING_ENABLE_PARTITIONER=OFF -DMEDCOUPLING_ENABLE_RENUMBER=ON -DMEDCOUPLING_PARTITIONER_METIS=OFF -DMEDCOUPLING_PARTITIONER_SCOTCH=ON -DMEDCOUPLING_PARTITIONER_PARMETIS=ON -DMEDCOUPLING_MICROMED=OFF -DMEDCOUPLING_USE_MPI=ON -DSALOME_USE_MPI=ON -DMEDCOUPLING_USE_64BIT_IDS=ON"
depend : [
"boost",
"cppunit",
default_32BIT_IDS_MPI :
{
- cmake_options : "-DMEDCOUPLING_ENABLE_PYTHON=ON -DMEDCOUPLING_ENABLE_PARTITIONER=OFF -DMEDCOUPLING_ENABLE_RENUMBER=ON -DMEDCOUPLING_PARTITIONER_METIS=OFF -DMEDCOUPLING_PARTITIONER_SCOTCH=ON -DMEDCOUPLING_PARTITIONER_PARMETIS=ON -DMEDCOUPLING_MICROMED=OFF -DMEDCOUPLING_USE_MPI=ON -DSALOME_USE_MPI=ON -DMEDCOUPLING_USE_64BIT_IDS=OFF -DCMAKE_CXX_COMPILER=${MPI_ROOT_DIR}/bin/mpicxx -DCMAKE_CC_COMPILER=${MPI_ROOT_DIR}/bin/mpicc"
+ cmake_options : "-DMEDCOUPLING_ENABLE_PYTHON=ON -DMEDCOUPLING_ENABLE_PARTITIONER=OFF -DMEDCOUPLING_ENABLE_RENUMBER=ON -DMEDCOUPLING_PARTITIONER_METIS=OFF -DMEDCOUPLING_PARTITIONER_SCOTCH=ON -DMEDCOUPLING_PARTITIONER_PARMETIS=ON -DMEDCOUPLING_MICROMED=OFF -DMEDCOUPLING_USE_MPI=ON -DSALOME_USE_MPI=ON -DMEDCOUPLING_USE_64BIT_IDS=OFF"
depend : [
"boost",
"cppunit",
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
else
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=OFF"
CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
else
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=OFF"
CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
else
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=OFF"
CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=ON"
CMAKE_OPTIONS+=" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON"
else
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
else
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=OFF"
CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=`which g++`"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP=ON"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_FiltersParallelMPI=YES"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=ON"
CMAKE_OPTIONS+=" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON"
else
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI4PY_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=ON"
# OP 11/04/2018 Option not used
# CMAKE_OPTIONS+=" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=ON"
# OP 11/04/2018 Option not used
# CMAKE_OPTIONS+=" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=ON"
# OP 11/04/2018 Option not used
# CMAKE_OPTIONS+=" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS+=" -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
CMAKE_OPTIONS+=" -DPARAVIEW_ENABLE_CATALYST:BOOL=ON"
# OP 11/04/2018 Option not used
# CMAKE_OPTIONS+=" -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP=ON"
elif [ -n "$VTK_SMP_IMPLEMENTATION_TYPE" ]
then
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP=ON"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_FiltersParallelMPI=YES"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP=ON"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_FiltersParallelMPI=YES"
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_MODULE_ENABLE_VTK_ParallelMPI=YES"
if [ -n "$SAT_HPC" ]
then
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPARAVIEW_USE_MPI:BOOL=ON"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP -DVTKm_ENABLE_OPENMP=ON"
elif [ -n "$VTK_SMP_IMPLEMENTATION_TYPE" ]
then
CMAKE_OPTIONS+=" -DPython_EXECUTABLE=${PYTHONBIN}"
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-if [ $VERSION == "V9_6_0" ]
-then
+if [ $VERSION == "V9_6_0" ]; then
# GUI was ported after 9.6.0
CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=OFF"
# following variables are automatically detected in environment after 9.6.0
CMAKE_OPTIONS+=" -DCOREFLOWS_WITH_GUI=ON"
fi
-if [ -n "$SAT_HPC" ]
-then
- if [ $VERSION == "V9_6_0" ]
- then
+if [ -n "$SAT_HPC" ]; then
+ if [ $VERSION == "V9_6_0" ] && [ -n "$MPI_ROOT_DIR" ]; then
# following variable is automatically detected in environment after 9.6.0
CMAKE_OPTIONS+=" -DMPI_HOME=${MPI_ROOT_DIR}"
fi
CMAKE_OPTIONS+=" -DMPI_ROOT_DIR=${MPI_ROOT_DIR}"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
CMAKE_OPTIONS+=" -DSOLVERLAB_WITH_MPI=ON"
- if [ -n "$MPI4PY_ROOT_DIR" ]
- then
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
+ fi
+ if [ -n "$MPI4PY_ROOT_DIR" ]; then
CMAKE_OPTIONS+=" -DMPI4PY_ROOT_DIR:PATH=${MPI4PY_ROOT_DIR}"
else
echo "WARNING: mpi4py environment variable not detected"
echo
echo "*** cmake "$CMAKE_OPTIONS
cmake $CMAKE_OPTIONS $SOURCE_DIR
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on cmake"
exit 1
fi
echo
echo "*** make" $MAKE_OPTIONS
make $MAKE_OPTIONS
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make"
exit 2
fi
echo
echo "*** make doc install"
make docCDMATH docCoreFlows install
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make install"
exit 3
fi
then
echo "HPC mode, activate -DHDF5_NEEDS_MPI:BOOL=ON option"
CMAKE_OPTIONS+=" -DHDF5_NEEDS_MPI:BOOL=ON"
- CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpic++"
- CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_ROOT_DIR}/bin/mpicc"
+ if [ -n "$MPI_ROOT_DIR" ]; then
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=$(which mpic++)"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=$(which mpicc)"
+ fi
fi
echo
echo "Cminpack " $VERSION
echo "##########################################################################"
-if [ -n "$MPI_ROOT_DIR" ]
-then
+CMAKE_OPTIONS=""
+
+if [-n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
- export CC=${MPI_ROOT_DIR}/bin/mpicc
- export CXX=${MPI_ROOT_DIR}/bin/mpicxx
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
fi
-CMAKE_OPTIONS=""
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
CMAKE_OPTIONS+=" -DUSE_BLAS=ON"
CMAKE_OPTIONS+=" -DUSE_FPIC=ON"
CMAKE_OPTIONS+=" -DBUILD_EXAMPLES=OFF"
-###CMAKE_OPTIONS+=" -DBUILD_SHARED_LIBS=ON"
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
# strangely on CentOS 8 - CMake fails to find CBLAS include directory
if [[ $DIST_NAME == "CO" && $DIST_VERSION == "8" && $APPLICATION_NAME =~ native && -d /usr/include/cblas ]]; then
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --enable-parallel"
# export FC=mpif90
# export CXX=mpicxx
-# export CC=${MPI_ROOT_DIR}/bin/mpiCC
+# export CC=mpiCC
else
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --enable-threadsafe"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --enable-cxx" # not compatible with --enable-parallel
echo "netcdf" $VERSION
echo "##########################################################################"
-if [ -n "$MPI_ROOT_DIR" ]
-then
+CMAKE_OPTIONS=""
+if [ -n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
- export CC=${MPI_ROOT_DIR}/bin/mpicc
- export CXX=${MPI_ROOT_DIR}/bin/mpicxx
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
fi
-CMAKE_OPTIONS=""
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
CMAKE_OPTIONS+=" -DENABLE_NETCDF_4=ON"
CMAKE_OPTIONS+=" -DENABLE_DAP=ON"
echo "openturns" $VERSION
echo "##########################################################################"
-if [ -n "$MPI_ROOT_DIR" ]
-then
+CMAKE_OPTIONS=""
+if [-n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
- export CC=${MPI_ROOT_DIR}/bin/mpicc
- export CXX=${MPI_ROOT_DIR}/bin/mpicxx
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
fi
-
-CMAKE_OPTIONS=""
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}"
echo
echo "*** cmake" $CMAKE_OPTIONS
cmake $CMAKE_OPTIONS $SOURCE_DIR
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on cmake"
exit 1
fi
echo
echo "*** make" $MAKE_OPTIONS
make $MAKE_OPTIONS
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make"
exit 2
fi
echo
echo "*** make install"
make install
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make install"
exit 3
fi
echo
echo "*** check installation"
-if [ -d "${PRODUCT_INSTALL}/lib64" ]
-then
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib
rmdir ${PRODUCT_INSTALL}/lib64
fi
export LD_LIBRARY_PATH=${PRODUCT_INSTALL}/lib:${LD_LIBRARY_PATH}
chmod +x ${SOURCE_DIR}/python/test/t_features.py
${SOURCE_DIR}/python/test/t_features.py
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR testing Openturns features...."
exit 4
fi
export PYTHONPATH=$(pwd):$PYTHONPATH
export PYTHONPATH=${PRODUCT_INSTALL}/lib/python${PYTHON_VERSION:0:3}/site-packages:$PYTHONPATH
-if [ -n "$MPI_ROOT_DIR" ]
-then
+CMAKE_OPTIONS=""
+if [-n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
- export CC=${MPI_ROOT_DIR}/bin/mpicc
- export CXX=${MPI_ROOT_DIR}/bin/mpicxx
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
fi
-CMAKE_OPTIONS=""
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}"
echo "openturns" $VERSION
echo "##########################################################################"
-if [ -n "$MPI_ROOT_DIR" ]
-then
+CMAKE_OPTIONS=""
+if [-n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "WARNING: setting CC and CXX environment variables and target MPI wrapper"
- export CC=${MPI_ROOT_DIR}/bin/mpicc
- export CXX=${MPI_ROOT_DIR}/bin/mpicxx
+ CMAKE_OPTIONS+=" -DCMAKE_CXX_COMPILER:STRING=${MPI_CXX_COMPILER}"
+ CMAKE_OPTIONS+=" -DCMAKE_C_COMPILER:STRING=${MPI_C_COMPILER}"
fi
-CMAKE_OPTIONS=""
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}"
CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE:STRING=Release"
CMAKE_OPTIONS+=" -DPYTHON_EXECUTABLE=${PYTHONBIN}"
echo
echo "*** cmake" $CMAKE_OPTIONS
cmake $CMAKE_OPTIONS $SOURCE_DIR
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on cmake"
exit 1
fi
echo
echo "*** make" $MAKE_OPTIONS
make $MAKE_OPTIONS
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make"
exit 2
fi
echo
echo "*** make install"
make install
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make install"
exit 3
fi
echo
echo "*** check installation"
-if [ -d "${PRODUCT_INSTALL}/lib64" ]
-then
+if [ -d "${PRODUCT_INSTALL}/lib64" ]; then
mv ${PRODUCT_INSTALL}/lib64/* ${PRODUCT_INSTALL}/lib
rmdir ${PRODUCT_INSTALL}/lib64
fi
export LD_LIBRARY_PATH=${PRODUCT_INSTALL}/lib:${LD_LIBRARY_PATH}
chmod +x ${SOURCE_DIR}/python/test/t_features.py
${SOURCE_DIR}/python/test/t_features.py
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR testing Openturns features...."
exit 4
fi
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --download-metis=ext/metis-5.1.0-p10.tar.gz"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --with-debugging=0" # by default Petsc is build in debug mode
echo
-if [ -n "${MPI_ROOT_DIR}" ]
-then
+if [-n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "*** configure with mpi"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --download-hypre=ext/hypre-2.20.0.tar.gz"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --download-parms=ext/parms-3.2-p5.tar.gz"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --download-slepc=ext/slepc-3.14.0"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --with-debugging=0" # by default Petsc is build in debug mode
echo
-if [ -n "${MPI_ROOT_DIR}" ]
-then
+if [-n "$SAT_HPC" ] && [ -n "$MPI_ROOT_DIR" ]; then
echo "*** configure with mpi"
CONFIGURE_FLAGS=$CONFIGURE_FLAGS" --download-hypre=ext/hypre-2.20.0"
./configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}
./configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS}
fi
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on configure"
exit 1
fi
echo
echo "*** make" $MAKE_OPTIONS
make $MAKE_OPTIONS
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make"
exit 2
fi
-# CentOS 6 automatically set PETSC_ARCH to arch-linux2-c-debug : remove arch specification
-# MAKE_OPTIONS=$MAKE_OPTIONS" PETSC_ARCH=arch-linux-c-debug"
-
echo
echo "*** make install"
make $MAKE_OPTIONS install
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "ERROR on make install"
exit 3
fi
env.set('MPI_ROOT_DIR', prereq_dir)
env.set('OPENMPIDIR', prereq_dir)
env.set('MPI_ROOT', prereq_dir)
+ env.set('MPI_C_COMPILER', os.path.join(mpibin_dir,'mpicc'))
+ env.set('MPI_CXX_COMPILER', os.path.join(mpibin_dir,'mpicxx'))
env.set('MPI_C_FOUND', os.path.join(prereq_dir,'lib','libmpi.so'))
env.prepend('PATH', mpibin_dir)
env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir,'lib'))