Re: Return from callback without invoking cr_checkpoint()

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Fri Jul 03 2009 - 15:29:12 PDT

  • Next message: Karthik Gopalakrishnan: "Re: Return from callback without invoking cr_checkpoint()"
    Karthik,
      If you return from the callback w/o calling cr_checkpoint(), then BLCR 
    will behave as if it was called as the last statement in your callback.  
    So, not calling cr_checkpoint() will allow the checkpoint request to 
    proceed normally.  If you want to prevent the checkpoint from being 
    taken, you may do so my calling cr_checkpoint() with an argument other 
    than CR_CHECKPOINT_READY, probably CR_CHECKPOINT_OMIT or 
    CR_CHECKPOINT_TEMP_FAILURE.  Quoting from libcr.h:
    > // Defined values for "flags" (mutually exclusive):
    > // CR_CHECKPOINT_READY (==0)
    > //      The normal case.
    > // CR_CHECKPOINT_OMIT
    > //      To continue the checkpoint, but exclude the current process.
    > //      Will also not run subsequent callbacks in the current group
    > //      (thread context, or signal context in this same thread).
    > // CR_CHECKPOINT_TEMP_FAILURE
    > // CR_CHECKPOINT_TEMP_FAILURE_CODE(error_code)
    > //      To abort the checkpoint and continue execution.
    > //      Will also not run subsequent callbacks in the current group
    > //      (thread context, or signal context in this same thread).
    > // CR_CHECKPOINT_PERM_FAILURE
    > // CR_CHECKPOINT_PERM_FAILURE_CODE(error_code)
    > //      To abort the checkpoint and kill all the processes involved in it.
    > //      Will also not run subsequent callbacks in the current group
    > //      (thread context, or signal context in this same thread).
    
    -Paul
    
    
    Karthik Gopalakrishnan wrote:
    > Hi Folks.
    >
    > I understand that cr_checkpoint() should be called *only* from the
    > callback function's context. However, is it mandatory to call
    > cr_checkpoint() every time the callback gets invoked?
    >
    > Say my callback got invoked because someone did a 'cr_checkpoint -p
    > <PID>' from the shell. If I want to ignore this checkpoint request,
    > can I simply return from the callback without invoking
    > cr_checkpoint(), or will this violate BLCR semantics?
    >
    > Thanks & Regards,
    > Karthik
    >   
    
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 Tel: +1-510-495-2352
    HPC Research Department                   Fax: +1-510-486-6900
    Lawrence Berkeley National Laboratory     
    

  • Next message: Karthik Gopalakrishnan: "Re: Return from callback without invoking cr_checkpoint()"