Re: Simple blcr API usage?

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Wed Aug 01 2007 - 13:57:17 PDT

  • Next message: Paul H. Hargrove: "Re: API for checkpoint"
    Neal Becker wrote:
    > My blcr usage looks like this:
    >
    >   if (rename (name.c_str(), oldname.c_str()) != 0 and errno != ENOENT)
    >     die ("rename failed");
    >   cr_request_file (name.c_str());
    >   cr_enter_cs(id);
    >   cr_leave_cs(id);
    >   if (remove (oldname.c_str()) != 0 and errno != ENOENT)
    >     die ("remove failed");
    >
    > I don't see any API docs.  The only example I can find is cr_checkpoint.c, 
    > which seems rather different than the above.
    >
    > Is my code 'reasonable'?  Can you suggest improvement?
    >   
    
    Neal,
    
      Your usage is "reasonable" and correct.  It reflects the only way that 
    we exposed to users in versions of BLCR prior to the 0.6.0 betas.  The 
    enter/leave pair was a (mis)use of another feature and was needed to 
    block for completion of the checkpoint.  Your second e-mail (I'll reply 
    to separately) reflects a newer, more flexible, way that was introduced 
    for 0.6.0.  It is because our APIs are still changing that we don't have 
    much in the way of documentation.  You should look at the comments in 
    the file libcr.h, as we've tried to at least document the purpose and 
    semantics of all the "public" interfaces in libcr.  Real documentation 
    if one of the requirements for an eventual 1.0.0 release of BLCR.
      As for improvements, look to my reply to your second message on this 
    topic.
    
    -Paul
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 
    HPC Research Department                   Tel: +1-510-495-2352
    Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
    

  • Next message: Paul H. Hargrove: "Re: API for checkpoint"