Przeglądaj źródła

Fix missing rdynamic for examples

Samuel Thibault 9 lat temu
rodzic
commit
7101e4f860
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1 1
      examples/Makefile.am
  2. 1 0
      src/drivers/mic/driver_mic_common.c

+ 1 - 1
examples/Makefile.am

@@ -21,7 +21,7 @@ AM_CFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STAR
 AM_CXXFLAGS = $(MAGMA_CFLAGS) $(HWLOC_CFLAGS) -Wall $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS)
 LIBS = $(top_builddir)/src/@LIBSTARPU_LINK@ $(MAGMA_LIBS) $(HWLOC_LIBS) @LIBS@
 AM_CPPFLAGS = -I$(top_srcdir)/include/ -I$(top_srcdir)/examples/ -I$(top_builddir)/include
-AM_LDFLAGS = $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
+AM_LDFLAGS = @STARPU_EXPORT_DYNAMIC@ $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_SCIF_LDFLAGS)
 
 SUBDIRS = stencil
 

+ 1 - 0
src/drivers/mic/driver_mic_common.c

@@ -106,6 +106,7 @@ void _starpu_mic_common_connect(scif_epd_t *endpoint, uint16_t remote_node, COIP
 			/* Check whether it's still alive */
 			res = COIProcessGetFunctionHandles(process, 1, &main_name, &func);
 			STARPU_ASSERT_MSG(res != COI_PROCESS_DIED, "process died on MIC %d", remote_node-1);
+			STARPU_ASSERT_MSG(res != COI_DOES_NOT_EXIST, "MIC program does not expose the 'main' function, please link it with -rdynamic or -export-dynamic");
 			if (res != COI_SUCCESS)
 				STARPU_MIC_SRC_REPORT_COI_ERROR(res);
 		}