0

I am reading about checkpointing. Base on what I have read up now, there are 2 main checkpointing:

  • System-level checkpointing (SLC) – core-dump style snapshots of computations

  • Application-level checkpointing (ALC)– programs are self-checkpointing and self-restarting

I am interested to implement in C a checkpoint recovery algorithm in a function level. I am wondering if I can consider this inside "Application-Level" category.

Second of all, is there an available open-source library for that.

I put here a simple adding function as an example:

adding(int a0, int a1, int b0, int b1, int* res0, int* res1)

Here is the algorithm strategy:

Store on buffer (a0, a1, b0, b1, res0, res1)
adding(int a0, int a1, int b0, int b1, int* res0, int* res1)
while (error_flag <> 0) && (trial < 10)
   Error_flag = 0;
   Trial ++;
   Get (a0, a1, b0, b1, res0, res1) from buffer;
   adding(int a0, int a1, int b0, int b1, int* res0, int* res1);
If (error_flag == 0)
   Unstore (a0, a1, b0, b1, res0, res1) on buf
Else error_message and stop program

Is there a way to write "Storing" section (first Line) in a general format. How about if the function gets different arguments types.

user2090491
  • 568
  • 2
  • 5
  • 15
  • "I am wondering if I can consider this inside "Application-Level" category" -- well yes, if it's not system-level checkpointing then it's application-level checkpointing. The implementation details in the latter case don't impact that. – John Bollinger Apr 22 '16 at 14:20
  • Requests for third-party library recommendations are off-topic here. – John Bollinger Apr 22 '16 at 14:21
  • @JohnBollinger thanks for your comment. My third question is how I can implement in general function to store functions variable (adding or any other). – user2090491 Apr 22 '16 at 14:24
  • Your third question is at best unclear, and it is likely too broad. There are many strategies you could use to persist the argument values for later recall, with varying advantages, disadvantages, generality, and portability. None of them is a portable, single, general function serving this particular purpose. – John Bollinger Apr 22 '16 at 16:09

0 Answers0