This is a good strategy for understanding the logic :-). Let me make it a bit more complicated ;-):
ORIG_CWD = Whereever we did the initial dmtcp_checkpoint. This is also the place where the ckpt images will be written. OPEN_PATH = String passed to open() OPEN_REL = path relative to ORIG_CWD OPEN_CWD = working directory at the time of open(). ABS_PATH = Absolute path of the file. This won't change during the run but may change after restart. So we should be computing it during the checkpoint-phase only. CKPT_CWD = working directory at checkpoint time. RST_CWD = working directory at restart time. During ckpt: - Look at ABS_PATH. During restore: - If OPEN_REL is valid, use it. - If OPEN_REL is not valid, try ABS_PATH Now the question is whether we should totally ignore the CKPT_CWD and OPEN_CWD or not. I would say, it should be safe to ignore both. Is this a safe assumption or you see any caveats? Kapil On Thu, Mar 14, 2013 at 11:21 AM, Louie, Joshua D <[email protected]> wrote: > Hi Kapil, > > So do you have the ability the know following: > - Absolute path at time of opening the file = ABS_FILE > - Absolute path at the time of checkpointing = ABS_CKPT > - Absolute path when restoring = ABS_RESTORE > > If we know all these, then when we should probably have logic like the > following: > During checkpointing: > - Look for the ABS_FILE > During restore: > - Determine whether file is relative (e.g. strstr(ABS_FILE, ABS_CKPT) != > NULL) > - If yes, then check for the file in relation to ABS_RESTORE > - If no or relative files does not exist, then check for the file as > ASB_FILE > > Of course, there's a few things I don't know here. What is the ABS_CKPT? I'm > making an assumption that it's actually the directory where the coordinator > was launched, and that was where my top level script/app was run from, and > that all relative paths are beneath the launch directory. > > Joshua Louie ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Dmtcp-forum mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dmtcp-forum
