else
CONFIGURE_FLAGS+=" --download-mpi4py=ext/mpi4py-3.0.3.tar.gz"
fi
- echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}"
- if [ "$SAT_openmpi_IS_NATIVE" == "1" ]; then
+ if [ "$SAT_openmpi_IS_NATIVE" == "1" ] && [[ "DB UB" =~ "$DIST_NAME" ]]; then
CONFIGURE_FLAGS+=" --with-cc=${MPI_C_COMPILER}"
CONFIGURE_FLAGS+=" --with-cxx=${MPI_CXX_COMPILER}"
CONFIGURE_FLAGS+=" --with-fc=${MPI_FC_COMPILER}"
fi
+ echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}"
./configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}
else
echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS}"
env.prepend("PYTHONPATH",os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages'))
def set_nativ_env(env):
- import mpi4py
- MPI4PY_ROOT_DIR=os.path.join('/',*mpi4py.__path__[0].split('/')[:-1])
- env.set("MPI4PY_ROOT_DIR", MPI4PY_ROOT_DIR)
+ try:
+ import distro
+ if any(distribution in distro.name().lower() for distribution in ["rocky", "centos", "fedora"]) :
+ import openmpi.mpi4py as mpi4py
+ MPI4PY_ROOT_DIR=os.path.join('/',*mpi4py.__path__[0].split('/')[:-1])
+ env.set("MPI4PY_ROOT_DIR", MPI4PY_ROOT_DIR)
+ elif any(distribution in distro.name().lower() for distribution in ["debian", "ubuntu", "tuxedo os", "linux mint"]) :
+ import mpi4py
+ MPI4PY_ROOT_DIR=os.path.join('/',*mpi4py.__path__[0].split('/')[:-1])
+ env.set("MPI4PY_ROOT_DIR", MPI4PY_ROOT_DIR)
+ except:
+ import platform
+ if any(distribution in platform.linux_distribution()[0].lower() for distribution in ["rocky", "centos", "fedora"]) :
+ import openmpi.mpi4py as mpi4py
+ MPI4PY_ROOT_DIR=os.path.join('/',*mpi4py.__path__[0].split('/')[:-1])
+ env.set("MPI4PY_ROOT_DIR", MPI4PY_ROOT_DIR)