/* * StarPU * Copyright (C) Université Bordeaux 1, CNRS 2008-2010 (see AUTHORS file) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License in COPYING.LGPL for more details. */ #include #include #include #include #include #include #include //#define STARPU_MPI_VERBOSE 1 #include /* Whether we are allowed to keep copies of remote data. Does not work * yet: the sender has to know whether the receiver has it, keeping it * in an array indexed by node numbers. */ //#define MPI_CACHE #ifdef MPI_CACHE static struct starpu_htbl32_node_s **sent_data = NULL; static struct starpu_htbl32_node_s **received_data = NULL; static void _starpu_mpi_task_init(int nb_nodes) { int i; _STARPU_MPI_DEBUG("Initialising hash table for cache\n"); sent_data = malloc(nb_nodes * sizeof(struct starpu_htbl32_node_s *)); for(i=0 ; i