starpu_mpi_ft.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2013-2020 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #ifndef FT_STARPU_STARPU_MPI_FT_H
  17. #define FT_STARPU_STARPU_MPI_FT_H
  18. #ifdef __cplusplus
  19. extern "C"
  20. {
  21. #endif
  22. struct _starpu_mpi_checkpoint_template;
  23. typedef struct _starpu_mpi_checkpoint_template* starpu_mpi_checkpoint_template_t;
  24. /**
  25. * Registers a checkpoint template \p cp_template with the given arguments.
  26. * It is then ready to use with ::starpu_mpi_submit_checkpoint_template during the program execution.
  27. * A unique checkpoint id \p cp_id is requested from the user in order to
  28. * match with a corresponding ::starpu_mpi_init_from_checkpoint.
  29. *
  30. * The arguments following the cp_template and the checkpoint_id can be of the following types:
  31. * <ul>
  32. * <li> ::STARPU_R followed by a data handle and the backup rank;
  33. * <li> ::STARPU_DATA_ARRAY followed by an array of data handles,
  34. * its number of elements and a backup rank;
  35. * <li> ::STARPU_VALUE followed by a pointer to the unregistered value,
  36. * its size in bytes, a unique tag (as the ones given for data handle registering)
  37. * and the function giving the back up rank of the rank argument : int(backup_of)(int) .
  38. * <li> The argument list must be ended by the value 0.
  39. * </ul>
  40. */
  41. int starpu_mpi_checkpoint_template_register(starpu_mpi_checkpoint_template_t* cp_template, int cp_id, ...);
  42. int starpu_mpi_checkpoint_template_create(starpu_mpi_checkpoint_template_t* cp_template, int cp_id);
  43. int starpu_mpi_checkpoint_template_add_entry(starpu_mpi_checkpoint_template_t* cp_template, ...);
  44. int starpu_mpi_checkpoint_template_freeze(starpu_mpi_checkpoint_template_t* cp_template);
  45. int starpu_mpi_submit_checkpoint_template(starpu_mpi_checkpoint_template_t cp_template);
  46. int starpu_mpi_ft_turn_on(void);
  47. int starpu_mpi_ft_turn_off(void);
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif //FT_STARPU_STARPU_MPI_FT_H