Browse Source

/test/nmad : remove tests that were renamed/splitted between 1.1 and trunk.

Guillaume Beauchamp 8 years ago
parent
commit
b64765cf90
2 changed files with 0 additions and 262 deletions
  1. 0 112
      nmad/tests/comm.c
  2. 0 150
      nmad/tests/insert_task_cache.c

+ 0 - 112
nmad/tests/comm.c

@@ -1,112 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2015  Centre National de la Recherche Scientifique
- *
- * 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
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * StarPU 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 <starpu_mpi.h>
-#include <math.h>
-#include "helper.h"
-#include <starpu_mpi_cache.h>
-
-void func_cpu(void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
-{
-	int *value = (int *)STARPU_VARIABLE_GET_PTR(descr[0]);
-	FPRINTF_MPI(stderr, "Executing codelet with value %d\n", *value);
-	*value = *value * 2;
-}
-
-struct starpu_codelet mycodelet =
-{
-	.cpu_funcs = {func_cpu},
-	.nbuffers = 1,
-	.modes = {STARPU_RW}
-};
-
-int main(int argc, char **argv)
-{
-	int size;
-	int color;
-	MPI_Comm newcomm;
-	int rank, newrank;
-	int ret;
-	unsigned val = 42;
-	starpu_data_handle_t data;
-
-        MPI_Init(&argc, &argv);
-        MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-        MPI_Comm_size(MPI_COMM_WORLD, &size);
-
-        if (size < 4)
-        {
-                if (rank == 0)
-                        FPRINTF(stderr, "We need at least 4 processes.\n");
-
-                MPI_Finalize();
-                return STARPU_TEST_SKIPPED;
-        }
-
-	color = rank%2;
-	MPI_Comm_split(MPI_COMM_WORLD, color, rank, &newcomm);
-	MPI_Comm_rank(newcomm, &newrank);
-	FPRINTF_MPI(stderr, "[%d] color %d\n", newrank, color);
-
-        ret = starpu_init(NULL);
-        STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
-        ret = starpu_mpi_init(NULL, NULL, 0);
-        STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_init");
-        STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_init");
-
-	if (newrank == 0)
-	{
-		val = rank+1;
-		starpu_variable_data_register(&data, 0, (uintptr_t)&val, sizeof(val));
-	}
-	else
-		starpu_variable_data_register(&data, -1, (uintptr_t)NULL, sizeof(unsigned));
-	starpu_mpi_data_register_comm(data, 42, 0, newcomm);
-	FPRINTF_MPI(stderr, "[%d] Registering data %p with tag %d and node %d\n", newrank, data, 42, 0);
-
-	if (newrank == 0)
-	{
-		FPRINTF_MPI(stderr, "[%d] sending %d\n", newrank, rank);
-		MPI_Send(&rank, 1, MPI_INT, 1, 10, newcomm);
-		starpu_mpi_send(data, 1, 42, newcomm);
-	}
-	else
-	{
-		int x;
-		MPI_Recv(&x, 1, MPI_INT, 0, 10, newcomm, NULL);
-		FPRINTF_MPI(stderr, "[%d] received %d\n", newrank, x);
-		starpu_mpi_recv(data, 0, 42, newcomm, NULL);
-	}
-
-	starpu_mpi_insert_task(newcomm, &mycodelet,
-			       STARPU_RW, data,
-			       STARPU_EXECUTE_ON_NODE, 1,
-			       0);
-
-	FPRINTF_MPI(stderr, "Waiting ...\n");
-	starpu_task_wait_for_all();
-
-	starpu_data_unregister(data);
-	if (newrank == 0)
-	{
-		FPRINTF_MPI(stderr, "[%d] new value %u\n", newrank, val);
-	}
-
-	starpu_mpi_shutdown();
-	starpu_shutdown();
-        MPI_Finalize();
-	return 0;
-}

+ 0 - 150
nmad/tests/insert_task_cache.c

@@ -1,150 +0,0 @@
-/* StarPU --- Runtime system for heterogeneous multicore architectures.
- *
- * Copyright (C) 2011, 2012, 2013, 2015  Centre National de la Recherche Scientifique
- *
- * 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
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * StarPU 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 <common/config.h>
-#include <starpu.h>
-#include <starpu_mpi.h>
-#include <math.h>
-#include "helper.h"
-
-#if !defined(STARPU_HAVE_SETENV)
-#warning setenv is not defined. Skipping test
-int main(int argc, char **argv)
-{
-	return STARPU_TEST_SKIPPED;
-}
-#else
-
-void func_cpu(STARPU_ATTRIBUTE_UNUSED void *descr[], STARPU_ATTRIBUTE_UNUSED void *_args)
-{
-}
-
-struct starpu_codelet mycodelet =
-{
-	.cpu_funcs = {func_cpu},
-	.nbuffers = 2,
-	.modes = {STARPU_RW, STARPU_R}
-};
-
-#define N     1000
-
-/* Returns the MPI node number where data indexes index is */
-int my_distrib(int x)
-{
-	return x;
-}
-
-void test_cache(int rank, int size, char *enabled, size_t *comm_amount)
-{
-	int i;
-	int ret;
-	unsigned v[2][N];
-	starpu_data_handle_t data_handles[2];
-
-	setenv("STARPU_MPI_CACHE", enabled, 1);
-
-	ret = starpu_init(NULL);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
-	ret = starpu_mpi_init(NULL, NULL, 0);
-	STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_init");
-
-	for(i = 0; i < 2; i++)
-	{
-		int mpi_rank = my_distrib(i);
-		if (mpi_rank == rank)
-		{
-			//FPRINTF(stderr, "[%d] Owning data[%d][%d]\n", rank, x, y);
-			starpu_vector_data_register(&data_handles[i], 0, (uintptr_t)&(v[i]), N, sizeof(unsigned));
-		}
-		else
-		{
-			/* I don't own that index, but will need it for my computations */
-			//FPRINTF(stderr, "[%d] Neighbour of data[%d][%d]\n", rank, x, y);
-			starpu_vector_data_register(&data_handles[i], -1, (uintptr_t)NULL, N, sizeof(unsigned));
-		}
-		starpu_mpi_data_register(data_handles[i], i, mpi_rank);
-	}
-
-	for(i = 0; i < 5; i++)
-	{
-		ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[0], STARPU_R, data_handles[1], 0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
-	}
-
-	for(i = 0; i < 5; i++)
-	{
-		ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[1], STARPU_R, data_handles[0], 0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
-	}
-
-	for(i = 0; i < 5; i++)
-	{
-		starpu_mpi_cache_flush(MPI_COMM_WORLD, data_handles[0]);
-	}
-
-	for(i = 0; i < 5; i++)
-	{
-		ret = starpu_mpi_insert_task(MPI_COMM_WORLD, &mycodelet, STARPU_RW, data_handles[1], STARPU_R, data_handles[0], 0);
-		STARPU_CHECK_RETURN_VALUE(ret, "starpu_mpi_insert_task");
-	}
-
-	starpu_task_wait_for_all();
-
-	for(i = 0; i < 2; i++)
-	{
-		starpu_data_unregister(data_handles[i]);
-	}
-
-	starpu_mpi_comm_amounts_retrieve(comm_amount);
-	starpu_mpi_shutdown();
-	starpu_shutdown();
-}
-
-int main(int argc, char **argv)
-{
-	int dst, rank, size;
-	int result=0;
-	size_t *comm_amount_with_cache;
-	size_t *comm_amount_without_cache;
-
-	MPI_Init(&argc, &argv);
-	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-	MPI_Comm_size(MPI_COMM_WORLD, &size);
-
-	setenv("STARPU_COMM_STATS", "1", 1);
-
-	comm_amount_with_cache = malloc(size * sizeof(size_t));
-	comm_amount_without_cache = malloc(size * sizeof(size_t));
-
-	test_cache(rank, size, "0", comm_amount_with_cache);
-	test_cache(rank, size, "1", comm_amount_without_cache);
-
-	if (rank == 0 || rank == 1)
-	{
-		dst = (rank == 0) ? 1 : 0;
-		result = (comm_amount_with_cache[dst] == comm_amount_without_cache[dst] * 5);
-		fprintf(stderr, "Communication cache mechanism is %sworking\n", result?"":"NOT ");
-	}
-	else
-		result = 1;
-
-	free(comm_amount_without_cache);
-	free(comm_amount_with_cache);
-
-	MPI_Finalize();
-	return !result;
-}
-#endif