|
@@ -53,23 +53,24 @@ int _starpu_mpi_checkpoint_template_register(starpu_mpi_checkpoint_template_t *c
|
|
|
|
|
|
|
|
|
LIST_TYPE(_starpu_mpi_checkpoint_template_tracking_inst,
|
|
|
- int cp_id;
|
|
|
- int cp_inst;
|
|
|
- starpu_mpi_checkpoint_template_t cp_template;
|
|
|
- int ack_msg_count;
|
|
|
- int valid:1;
|
|
|
+ int cp_id;
|
|
|
+ int cp_inst;
|
|
|
+ starpu_mpi_checkpoint_template_t cp_template;
|
|
|
+ int ack_msg_count;
|
|
|
+ int valid:1;
|
|
|
)
|
|
|
|
|
|
LIST_TYPE(_starpu_mpi_checkpoint_template_item,
|
|
|
- int type;
|
|
|
- void *ptr;
|
|
|
- int count;
|
|
|
- int backupped_by;
|
|
|
- int backup_of;
|
|
|
- starpu_mpi_tag_t tag;
|
|
|
+ enum starpu_data_access_mode type;
|
|
|
+ void *ptr;
|
|
|
+ size_t count;
|
|
|
+ int backupped_by;
|
|
|
+ int backup_of;
|
|
|
+ starpu_mpi_tag_t tag;
|
|
|
)
|
|
|
|
|
|
-struct _starpu_mpi_checkpoint_template {
|
|
|
+struct _starpu_mpi_checkpoint_template
|
|
|
+{
|
|
|
struct _starpu_mpi_checkpoint_template_item_list list;
|
|
|
int size;
|
|
|
int cp_template_id;
|
|
@@ -86,7 +87,8 @@ struct _starpu_mpi_checkpoint_template {
|
|
|
|
|
|
};
|
|
|
|
|
|
-static inline void _starpu_mpi_checkpoint_template_tracking_inst_init(struct _starpu_mpi_checkpoint_template_tracking_inst *tracking_inst){
|
|
|
+static inline void _starpu_mpi_checkpoint_template_tracking_inst_init(struct _starpu_mpi_checkpoint_template_tracking_inst *tracking_inst)
|
|
|
+{
|
|
|
tracking_inst->cp_template = NULL;
|
|
|
tracking_inst->cp_id = -1;
|
|
|
tracking_inst->cp_inst = -1;
|
|
@@ -111,56 +113,6 @@ static struct _starpu_mpi_checkpoint_template_tracking_inst* _starpu_mpi_checkpo
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-//static int checkpoint_template_add_future_inst(starpu_mpi_checkpoint_template_t cp_template, int instance)
|
|
|
-//{
|
|
|
-// struct _starpu_mpi_checkpoint_template_instance* item;
|
|
|
-// _STARPU_MPI_DEBUG(10, "I received an ack msg for a checkpoint instance I did not initiated yet(received:%d - current:%d). Let's remember it's already acknowledged.\n", instance, cp_template->cp_template_current_instance);
|
|
|
-// for (item=_starpu_mpi_checkpoint_template_instance_list_begin(&cp_template->future_inst_list) ;
|
|
|
-// item!=_starpu_mpi_checkpoint_template_instance_list_end(&cp_template->future_inst_list) ;
|
|
|
-// item=_starpu_mpi_checkpoint_template_instance_list_next(item))
|
|
|
-// {
|
|
|
-// if (item->instance == instance)
|
|
|
-// {
|
|
|
-// item->count++;
|
|
|
-// return item->count;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// _STARPU_MPI_DEBUG(10, "This instance is not yet registered, let's create it.\n");
|
|
|
-// item = _starpu_mpi_checkpoint_template_instance_new();
|
|
|
-// item->count = 1;
|
|
|
-// item->instance = instance;
|
|
|
-// _starpu_mpi_checkpoint_template_instance_list_push_back(&cp_template->future_inst_list, item);
|
|
|
-// return item->count;
|
|
|
-//}
|
|
|
-
|
|
|
-//static struct _starpu_mpi_checkpoint_template_tracking_inst* _starpu_mpi_checkpoint_template_check_validation_coherency(int cp_id, int cp_inst)
|
|
|
-//{
|
|
|
-// struct _starpu_mpi_checkpoint_template_tracking_inst* item;
|
|
|
-//
|
|
|
-// for (item =_starpu_mpi_checkpoint_template_tracking_inst_list_begin(&pending_tracking_list) ;
|
|
|
-// item!=_starpu_mpi_checkpoint_template_tracking_inst_list_end(&pending_tracking_list) ;
|
|
|
-// item =_starpu_mpi_checkpoint_template_tracking_inst_list_next(item))
|
|
|
-// {
|
|
|
-// if (item->valid)
|
|
|
-// {
|
|
|
-// if (!(item->cp_id == cp_id && item->cp_inst == cp_inst))
|
|
|
-// {
|
|
|
-// return item;
|
|
|
-// }
|
|
|
-// else
|
|
|
-// {
|
|
|
-// STARPU_ABORT_MSG("The checkpoint (id:%d - inst:%d) is already validated. This should not happen.\n", cp_id, cp_inst);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// else if (item->cp_id==cp_id && item->cp_inst==cp_inst)
|
|
|
-// {
|
|
|
-// return item;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return NULL;
|
|
|
-//}
|
|
|
-
|
|
|
static struct _starpu_mpi_checkpoint_template_tracking_inst* _starpu_mpi_checkpoint_template_check_validation_coherency(int cp_id, int cp_inst)
|
|
|
{
|
|
|
struct _starpu_mpi_checkpoint_template_tracking_inst* item;
|