Browse Source

fix some bugs, debug in progress

Corentin Salingue 12 years ago
parent
commit
03ef97c890

+ 5 - 0
configure.ac

@@ -1487,6 +1487,11 @@ AC_MSG_RESULT($maximplementations)
 AC_DEFINE_UNQUOTED(STARPU_MAXIMPLEMENTATIONS, [$maximplementations],
 		[maximum number of implementations])
 
+AC_LANG_PUSH([C++])
+AC_CHECK_HEADERS([leveldb/db.h], [AC_DEFINE([STARPU_HAVE_LEVELDB_H], [1], [Define to 1 if you have the <leveldb/db.h> header file.])])
+STARPU_HAVE_LIBRARY(LEVELDB, [leveldb])
+AC_LANG_POP([C++])
+
 ###############################################################################
 #                                                                             #
 #                                    MPI                                      #

+ 1 - 1
src/Makefile.am

@@ -52,7 +52,7 @@ lib_LTLIBRARIES = libstarpu-@STARPU_EFFECTIVE_VERSION@.la
 libstarpu_@STARPU_EFFECTIVE_VERSION@_la_CPPFLAGS = -I$(top_srcdir)/include/ $(STARPU_RCCE_CPPFLAGS) -DBUILDING_STARPU
 
 libstarpu_@STARPU_EFFECTIVE_VERSION@_la_CFLAGS = $(GLOBAL_AM_CFLAGS) $(HWLOC_CFLAGS) $(STARPU_CUDA_CPPFLAGS) $(STARPU_OPENCL_CPPFLAGS) $(STARPU_COI_CPPFLAGS) $(STARPU_RCCE_CFLAGS) $(FXT_CFLAGS)
-libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = -lm $(HWLOC_LIBS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_RCCE_LDFLAGS) $(FXT_LIBS) $(STARPU_GLPK_LDFLAGS)
+libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LIBADD = -lm $(HWLOC_LIBS) $(STARPU_OPENCL_LDFLAGS) $(STARPU_CUDA_LDFLAGS) $(STARPU_COI_LDFLAGS) $(STARPU_RCCE_LDFLAGS) $(FXT_LIBS) $(STARPU_GLPK_LDFLAGS) $(STARPU_LEVELDB_LDFLAGS)
 libstarpu_@STARPU_EFFECTIVE_VERSION@_la_LDFLAGS = $(ldflags) $(FXT_LDFLAGS) -no-undefined									\
   -version-info $(libstarpu_so_version)
 

+ 9 - 0
src/core/disk.h

@@ -23,6 +23,11 @@
 #define STARPU_DISK_ALL 1
 #define STARPU_DISK_NO_RECLAIM 2
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /* interface to manipulate memory disk */
 void * _starpu_disk_alloc (unsigned node, size_t size);
 
@@ -54,4 +59,8 @@ int _starpu_get_disk_flag(unsigned node);
 
 void _starpu_disk_unregister(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __DISK_H__ */

+ 1 - 3
src/core/disk_ops/disk_leveldb.cpp

@@ -203,11 +203,9 @@ starpu_leveldb_plug (void *parameter)
 
 	leveldb::DB* db;
 	leveldb::Options options;
-	options.create_if_missing = true;
 	try {
 		options.error_if_exists = true;
 		leveldb::Status status = leveldb::DB::Open(options, (char *) parameter, &db);
-		STARPU_ASSERT_MSG(status.ok(), "StarPU leveldb plug failed !");
 		tmp->created = true;
 	}
 	catch(...)
@@ -218,7 +216,7 @@ starpu_leveldb_plug (void *parameter)
 		tmp->created = false;
 	}
 	tmp->db = db;
-
+	
 	return (void *) tmp;	
 }
 

+ 10 - 0
src/core/perfmodel/perfmodel.h

@@ -24,6 +24,11 @@
 #include <core/task_bundle.h>
 #include <stdio.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 struct _starpu_perfmodel_list
 {
 	struct _starpu_perfmodel_list *next;
@@ -72,4 +77,9 @@ int *_starpu_get_opencl_affinity_vector(unsigned gpuid);
 
 void _starpu_save_bandwidth_and_latency_disk(double bandwidth_write, double bandwidth_read, 
 					    double latency_write, double latency_read, unsigned node);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif // __PERFMODEL_H__

+ 10 - 0
src/datawizard/copy_driver.h

@@ -37,6 +37,11 @@
 #include <starpu_opencl.h>
 #endif
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 struct _starpu_data_request;
 struct _starpu_data_replicate;
 
@@ -101,4 +106,9 @@ int _starpu_driver_copy_data_1_to_1(starpu_data_handle_t handle,
 
 unsigned _starpu_driver_test_request_completion(struct _starpu_async_channel *async_channel);
 void _starpu_driver_wait_request_completion(struct _starpu_async_channel *async_channel);
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif // __COPY_DRIVER_H__

+ 9 - 0
src/datawizard/memory_manager.h

@@ -19,6 +19,11 @@
 
 #include <starpu.h>
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /**
  * Initialises the memory manager
  */
@@ -56,4 +61,8 @@ void _starpu_memory_manager_deallocate_size(size_t size, unsigned node);
 
 int _starpu_memory_manager_test_allocate_size_(size_t size, unsigned node);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* __MEMORY_MANAGER_H__ */