Browse Source

merge trunk

Nathalie Furmento 10 years ago
parent
commit
75c5c178ae

+ 12 - 0
examples/lu/xlu_kernels.c

@@ -132,6 +132,8 @@ struct starpu_codelet cl22 =
 	.cuda_funcs = {STARPU_LU(cublas_u22), NULL},
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	CAN_EXECUTE
+#elif defined(STARPU_SIMGRID)
+	.cuda_funcs = {(void*)1, NULL},
 #endif
 	.nbuffers = 3,
 	.modes = {STARPU_R, STARPU_R, STARPU_RW},
@@ -218,6 +220,8 @@ struct starpu_codelet cl12 =
 	.cuda_funcs = {STARPU_LU(cublas_u12), NULL},
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	CAN_EXECUTE
+#elif defined(STARPU_SIMGRID)
+	.cuda_funcs = {(void*)1, NULL},
 #endif
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_RW},
@@ -302,6 +306,8 @@ struct starpu_codelet cl21 =
 	.cuda_funcs = {STARPU_LU(cublas_u21), NULL},
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	CAN_EXECUTE
+#elif defined(STARPU_SIMGRID)
+	.cuda_funcs = {(void*)1, NULL},
 #endif
 	.nbuffers = 2,
 	.modes = {STARPU_R, STARPU_RW},
@@ -402,6 +408,8 @@ struct starpu_codelet cl11 =
 #ifdef STARPU_USE_CUDA
 	.cuda_funcs = {STARPU_LU(cublas_u11), NULL},
 	CAN_EXECUTE
+#elif defined(STARPU_SIMGRID)
+	.cuda_funcs = {(void*)1, NULL},
 #endif
 	.nbuffers = 1,
 	.modes = {STARPU_RW},
@@ -543,6 +551,8 @@ struct starpu_codelet cl11_pivot =
 #ifdef STARPU_USE_CUDA
 	.cuda_funcs = {STARPU_LU(cublas_u11_pivot), NULL},
 	CAN_EXECUTE
+#elif defined(STARPU_SIMGRID)
+	.cuda_funcs = {(void*)1, NULL},
 #endif
 	.nbuffers = 1,
 	.modes = {STARPU_RW},
@@ -632,6 +642,8 @@ struct starpu_codelet cl_pivot =
 	.cuda_funcs = {STARPU_LU(cublas_pivot), NULL},
 	.cuda_flags = {STARPU_CUDA_ASYNC},
 	CAN_EXECUTE
+#elif defined(STARPU_SIMGRID)
+	.cuda_funcs = {(void*)1, NULL},
 #endif
 	.nbuffers = 1,
 	.modes = {STARPU_RW},

+ 7 - 0
include/starpu_config.h.in

@@ -15,6 +15,13 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+/*
+ * This is the public config.h file, installed along libstarpu.
+ *
+ * It should only contain the build-time #defines which have an effect on the
+ * API & ABI.
+ */
+
 #ifndef __STARPU_CONFIG_PUBLIC_H__
 #define __STARPU_CONFIG_PUBLIC_H__
 

+ 1 - 1
include/starpu_data_interfaces.h

@@ -113,7 +113,7 @@ struct starpu_data_interface_ops
 	uint32_t 	 (*footprint)			(starpu_data_handle_t handle);
 	int 		 (*compare)			(void *data_interface_a, void *data_interface_b);
 	void 		 (*display)			(starpu_data_handle_t handle, FILE *f);
-	ssize_t		 (*describe)			(void *data_interface, char *buf, size_t size);
+	starpu_ssize_t	 (*describe)			(void *data_interface, char *buf, size_t size);
 	enum starpu_data_interface_id interfaceid;
 	size_t interface_size;
 

+ 4 - 1
include/starpu_util.h

@@ -276,10 +276,13 @@ double starpu_timing_now(void);
 #ifdef _WIN32
 /* Try to fetch the system definition of timespec */
 #include <time.h>
+#if defined(__MINGW32__) || defined(__CYGWIN__)
+#include <sys/time.h>
+#endif
 #if !defined(_MSC_VER) || defined(BUILDING_STARPU)
 #include <pthread.h>
 #endif
-#ifndef _TIMESPEC_DEFINED
+#if !defined(_TIMESPEC_DEFINED) && !defined(HAVE_STRUCT_TIMESPEC)
 /* If it didn't get defined in the standard places, then define it ourself */
 #ifndef STARPU_TIMESPEC_DEFINED
 #define STARPU_TIMESPEC_DEFINED 1

+ 2 - 2
src/core/perfmodel/perfmodel_history.c

@@ -16,7 +16,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#if !defined(_WIN32) || defined(__MINGW__) || defined(__CYGWIN__)
+#if !defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
 #include <dirent.h>
 #include <sys/stat.h>
 #endif
@@ -975,7 +975,7 @@ void starpu_perfmodel_directory(FILE *output)
  * the performance model files */
 int starpu_perfmodel_list(FILE *output)
 {
-#if !defined(_WIN32) || defined(__MINGW__) || defined(__CYGWIN__)
+#if !defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
         char path[256];
         DIR *dp;
         struct dirent *ep;

+ 2 - 3
src/dolib.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2012  Université de Bordeaux 1
+ * Copyright (C) 2010, 2012, 2014  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -18,8 +18,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <common/config.h>
-#ifdef HAVE_UNISTD_H
+#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
 #include <unistd.h>
 #endif
 

+ 1 - 2
src/drivers/cpu/driver_cpu.c

@@ -176,12 +176,11 @@ int _starpu_cpu_driver_init(struct _starpu_worker *cpu_worker)
 	snprintf(cpu_worker->name, sizeof(cpu_worker->name), "CPU %d", devid);
 	snprintf(cpu_worker->short_name, sizeof(cpu_worker->short_name), "CPU %d", devid);
 
-	cpu_worker->status = STATUS_UNKNOWN;
-
 	_STARPU_TRACE_WORKER_INIT_END(cpu_worker->workerid);
 
 	/* tell the main thread that we are ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&cpu_worker->mutex);
+	cpu_worker->status = STATUS_UNKNOWN;
 	cpu_worker->worker_is_initialized = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&cpu_worker->ready_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&cpu_worker->mutex);

+ 1 - 2
src/drivers/cuda/driver_cuda.c

@@ -539,8 +539,6 @@ int _starpu_cuda_driver_init(struct _starpu_worker_set *worker_set)
 	/* one more time to avoid hacks from third party lib :) */
 	_starpu_bind_thread_on_cpu(worker0->config, worker0->bindid);
 
-	worker0->status = STATUS_UNKNOWN;
-
 	float size = (float) global_mem[devid] / (1<<30);
 #ifdef STARPU_SIMGRID
 	const char *devname = "Simgrid";
@@ -572,6 +570,7 @@ int _starpu_cuda_driver_init(struct _starpu_worker_set *worker_set)
 
 	/* tell the main thread that this one is ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&worker0->mutex);
+	worker0->status = STATUS_UNKNOWN;
 	worker0->worker_is_initialized = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&worker0->ready_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&worker0->mutex);

+ 1 - 2
src/drivers/mic/driver_mic_source.c

@@ -533,8 +533,6 @@ void *_starpu_mic_src_worker(void *arg)
 		snprintf(worker->name, sizeof(worker->name), "MIC %d core %u", devid, i);
 	}
 
-	baseworker->status = STATUS_UNKNOWN;
-
 	for (i = 0; i < worker_set->nworkers; i++)
 	{
 		struct _starpu_worker *worker = &worker_set->workers[i];
@@ -543,6 +541,7 @@ void *_starpu_mic_src_worker(void *arg)
 
 	/* tell the main thread that this one is ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&worker_set->mutex);
+	baseworker->status = STATUS_UNKNOWN;
 	worker_set->set_is_initialized = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&worker_set->ready_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&worker_set->mutex);

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

@@ -584,7 +584,6 @@ int _starpu_opencl_driver_init(struct _starpu_worker *worker)
 
 	_starpu_malloc_init(worker->memory_node);
 
-	worker->status = STATUS_UNKNOWN;
 	float size = (float) global_mem[devid] / (1<<30);
 
 #ifdef STARPU_SIMGRID
@@ -605,6 +604,7 @@ int _starpu_opencl_driver_init(struct _starpu_worker *worker)
 
 	/* tell the main thread that this one is ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&worker->mutex);
+	worker->status = STATUS_UNKNOWN;
 	worker->worker_is_initialized = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&worker->ready_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&worker->mutex);

+ 1 - 2
src/drivers/scc/driver_scc_source.c

@@ -295,8 +295,6 @@ void *_starpu_scc_src_worker(void *arg)
 
 	_starpu_scc_src_init_context(subworkerid);
 
-	args->status = STATUS_UNKNOWN;
-
 	for (i = 0; i < config->topology.nmiccores[devid]; i++)
 	{
 		struct _starpu_worker *worker = &config->workers[baseworkerid+i];
@@ -307,6 +305,7 @@ void *_starpu_scc_src_worker(void *arg)
 
 	/* tell the main thread that this one is ready */
 	STARPU_PTHREAD_MUTEX_LOCK(&args->mutex);
+	args->status = STATUS_UNKNOWN;
 	args->worker_is_initialized = 1;
 	STARPU_PTHREAD_COND_SIGNAL(&args->ready_cond);
 	STARPU_PTHREAD_MUTEX_UNLOCK(&args->mutex);

+ 7 - 5
src/top/starpu_top_connection.c

@@ -15,14 +15,14 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
-#include <starpu_config.h>
-
-#ifdef __MINGW__
-#  include <w32api.h>
-#  define WINVER WindowsXP
+#ifdef __MINGW32__
+#  define WINVER 0x0501 /* WindowsXP, for getaddrinfo */
 #endif
 
+#include <starpu_config.h>
+
 #ifdef STARPU_HAVE_WINDOWS
+#  include <winsock2.h>
 #  include <ws2tcpip.h>
 #  include <io.h>
 #else
@@ -31,6 +31,8 @@
 #  include <netdb.h>
 #endif
 
+#include <starpu.h>
+
 #include <top/starpu_top_core.h>
 #include <top/starpu_top_connection.h>
 #include <top/starpu_top_message_queue.h>