소스 검색

configure.ac: add option --with-mpiexec

Nathalie Furmento 14 년 전
부모
커밋
49f380be4d
4개의 변경된 파일27개의 추가작업 그리고 10개의 파일을 삭제
  1. 24 7
      configure.ac
  2. 1 1
      mpi/Makefile.am
  3. 1 1
      mpi/starpu_mpi_insert_task.c
  4. 1 1
      src/drivers/opencl/driver_opencl.c

+ 24 - 7
configure.ac

@@ -815,19 +815,36 @@ if test x$enable_mpi_check = xno ; then
 fi
 
 # Check if mpiexec is available
-mpiexec=$(dirname $mpicc_path)/mpiexec
-if test ! -x $mpiexec ; then
-    mpiexec=""
-    running_mpi_check=no
+AC_ARG_WITH(mpiexec, [AS_HELP_STRING([--with-mpiexec[=<path to mpiexec>]],
+			[Path of mpiexec])],
+	[
+		if test x$withval = xyes; then
+			AC_MSG_ERROR(--with-mpiexec must be given a pathname)
+		else
+			mpiexec_path=$withval
+		fi
+	],
+	[
+		# nothing was specified: default value is used
+		AC_PATH_PROG(mpiexec_path, $(dirname $mpicc_path)/mpiexec, [no], [])
+	])
+
+AC_MSG_CHECKING(whether mpiexec is available)
+AC_MSG_RESULT($mpiexec_path)
+
+# We test if MPIEXEC exists
+if test ! -x $mpiexec_path; then
+	#MPIEXEC does not exists or is not executable
+	AC_MSG_RESULT(The mpiexec script is not valid)
+        running_mpi_check=no 
+        mpiexec_path=""
 fi
 
 AM_CONDITIONAL(STARPU_MPI_CHECK, test x$running_mpi_check = xyes)
 if test x$use_mpi = xyes; then
-        AC_MSG_CHECKING(whether mpiexec is available)
-        AC_MSG_RESULT($mpiexec)
         AC_MSG_CHECKING(whether MPI tests should be run)
         AC_MSG_RESULT($running_mpi_check)
-	AC_SUBST(MPIEXEC,$mpiexec)
+	AC_SUBST(MPIEXEC,$mpiexec_path)
 fi
 
 AC_MSG_CHECKING(whether the StarPU MPI library should be generated)

+ 1 - 1
mpi/Makefile.am

@@ -57,7 +57,7 @@ NVCCFLAGS += -I$(top_srcdir)/include/ -I$(top_builddir)/include $(HWLOC_CFLAGS)
 endif
 
 AM_CFLAGS = $(HWLOC_CFLAGS)
-LIBS = $(top_builddir)/src/libstarpu.la  $(HWLOC_LIBS) @LIBS@
+LIBS = $(top_builddir)/src/libstarpu.la $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/mpi/ -I$(top_srcdir)/src/  -I$(top_srcdir)/examples/ -I$(top_builddir)/src -I$(top_builddir)/include
 
 lib_LTLIBRARIES = libstarpumpi.la

+ 1 - 1
mpi/starpu_mpi_insert_task.c

@@ -25,7 +25,7 @@
 #include <common/htable32.h>
 #include <util/starpu_insert_task_utils.h>
 
-//#define STARPU_MPI_VERBOSE	1
+#define STARPU_MPI_VERBOSE	1
 #include <starpu_mpi_private.h>
 
 /* Whether we are allowed to keep copies of remote data. Does not work

+ 1 - 1
src/drivers/opencl/driver_opencl.c

@@ -291,7 +291,7 @@ void _starpu_opencl_init(void)
         if (!init_done) {
                 cl_platform_id platform_id[STARPU_OPENCL_PLATFORM_MAX];
                 cl_uint nb_platforms;
-                cl_device_type device_type = CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR;
+                cl_device_type device_type = CL_DEVICE_TYPE_CPU;//CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR;
                 cl_int err;
                 unsigned int i;