瀏覽代碼

We can disable StarPU-MPI when using MPI Master Slave + warn when both are activated

Corentin Salingue 8 年之前
父節點
當前提交
abd20a4c8e
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      configure.ac

+ 6 - 1
configure.ac

@@ -1847,7 +1847,7 @@ AC_MSG_RESULT($mpicxx_path)
 AC_SUBST(MPICXX, $mpicxx_path)
 AC_SUBST(MPICXX, $mpicxx_path)
 
 
 
 
-if test x$use_mpi = xyes -a x$enable_mpi = xyes; then
+if test x$use_mpi = xyes -a \( x$enable_mpi = xyes -o x$use_mpi_master_slave = xyes \) ; then
     cc_or_mpicc=$mpicc_path
     cc_or_mpicc=$mpicc_path
         # For some reason, libtool uses gcc instead of mpicc when linking
         # For some reason, libtool uses gcc instead of mpicc when linking
         # libstarpumpi.
         # libstarpumpi.
@@ -1946,6 +1946,11 @@ else
     build_mpi_master_slave=no
     build_mpi_master_slave=no
 fi
 fi
 
 
+#Warn users that they cannot use both at the same time
+if test x$build_mpi_master_slave = xyes -a x$enable_mpi = xyes; then
+    AC_MSG_WARN(StarPU-MPI and MPI Master-Slave cannot be used at the same time !)
+fi
+
 if test x$build_mpi_master_slave = xyes; then
 if test x$build_mpi_master_slave = xyes; then
     AC_DEFINE(STARPU_USE_MPI_MASTER_SLAVE, [1], [MPI Master Slave support is enabled])
     AC_DEFINE(STARPU_USE_MPI_MASTER_SLAVE, [1], [MPI Master Slave support is enabled])
     CC=$mpicc_path    
     CC=$mpicc_path