Re: file appending related

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Thu Mar 24 2005 - 09:45:26 PST

  • Next message: Jeff Squyres: "BLCR problem on RHAS"
    Your observation is correct - we have a bug here.  We are seeking to the 
    correct location, but not truncating the file back to its original 
    length.  The O_APPEND flag is causing the write to seek back to the end 
    of the file.  I have created a bug report for this issue, which can be 
    viewed at:
    
    http://upc-bugs.lbl.gov/bugzilla/show_bug.cgi?id=1032
    
    If you create a bugzilla account (New Account link at bottom of the bug 
    page) then you can add comments to the bug, and/or add your e-mail to 
    the CC list if  you wish to receive e-mail when the bug report is updated.
    
    -Paul
    
    rmingming wrote:
    
    >Hi,
    >
    >I open a file with "append" mode, when i cr_checkpoint and cr_restart
    >the process, the output of the program really appends to the output file.
    >but i think it should write to the position which it was checkpointed.
    >
    >my test program is the file_counting.c with modifying:
    > fp = fopen(filename, "w");
    >to:
    > fp = fopen(filename, "a");
    >
    >when i cr_restart the context file, output file looks like:
    >
    >***************************
    >...
    >Count = 15
    >Count = 16
    >Count = 17---------cr_checkpoint
    >Count = 18
    >Count = 19
    >Count = 17 --------cr_restart
    >Count = 18
    >Count = 19
    >....
    >****************************
    >
    >but i think the right way is not like this.
    >
    >
    >  
    >
    
    -- 
    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: Jeff Squyres: "BLCR problem on RHAS"