Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#675 LFS support for 32bit Windows [maybe]

Version 5
pending-accepted
nobody
Windows (8)
5
2014-07-03
2014-04-25
Ethan Merritt
No

The code in datafile.c now supports LFS (data files larger than 2GB) using ftello()/fseeko() if available. Autoconf sorts this out for us on linux. I think this patch should make it work on Windows also, but I can't test it myself. It may be necessary to add -DHAVE_FTELLO to the compile flags.

1 Attachments

Discussion

1 2 > >> (Page 1 of 2)
  • Build itself was successful. However, I did not test of LFS.
    It will grateful for me that you show me sample codes to generate and test the LFS.

     
  • Ethan Merritt
    Ethan Merritt
    2014-04-26

    Find some large binary file. I used a 4.3 GB *.iso dvd image. It doesn't matter what is in the file.

    In gnuplot:

    datafile = "path-to-large-file"
    splot datafile binary record=100000 skip=20001000003*4 u 1:2:3 with dots

    If it is working you will see a plot. Of course the position of the dots does not mean anything because the file is not a real structured data file.

    If it is not working you will get an error message.
    The messages that gnuplot prints are
    "Number of bytes to skip must be positive integer"
    "Data file read error"
    I guess you could also get an error message from Windows rather than from gnuplot.

     
  • [bugs:#1381]> I have made a further change in syscfg.h that may allow Windows 32bit to use data files larger than 2 GB. If you would like to test, it is in Patch #675

    gnuplot> cd 'E:\Work'
    gnuplot> ! dir Work.7z
    Volume in drive E is HD-LBU2
    Volume Serial Number is B832-6B3C

    Directory of E:\Work

    2014/04/27 08:19 7,284,006,928 Work.7z
    1 File(s) 7,284,006,928 bytes
    0 Dir(s) 887,706,599,424 bytes free
    gnuplot> datafile = 'Work.7z'
    gnuplot> splot datafile binary record=100000 skip=20001000003*4 u 1:2:3 with s
    ^
    warning: integer overflow; changing to floating point
    ^
    Number of bytes to skip must be positive integer

    _________

    I seemss that the work does not work well.

     

    Related

    Bugs: #1381

  • I forgot to mention the plot.

    In the operation of previous post, nothing is plotted.

     
  • Ethan Merritt
    Ethan Merritt
    2014-04-27

    Please try again with the compiler flag

    CFLAGS += -D_FILE_OFFSET_BITS=64

     
  • gnuplot> datafile = 'Work.7z'
    gnuplot> splot datafile binary record=100000 skip=20001000003*4 u 1:2:3 with dots
    ^
    warning: integer overflow; changing to floating point
    Data file read error

    This is reasonable that the default integer bytes are 4 for win32.
    So I executed:
    gnuplot> splot datafile binary record=100000 skip=200010003*4 u 1:2:3 with dots

    The splot was done without problem. So the patch seem to be successful to allow Windows 32bit to use data files larger than 2 GB.

     
  • Ethan Merritt
    Ethan Merritt
    2014-04-27

    gnuplot> splot datafile binary record=100000 skip=20001000003*4 u 1:2:3 with dots
    ^
    warning: integer overflow; changing to floating point

    That is expected. It means that the skip value is bigger than 2GB, which is what we are trying to test.

    Data file read error

    But that means the read to a location beyond 2GB did not work.

    Thank you for testing.

    I'll have to leave it to someone else to debug why it doesn't work, but at least we know the patch does not hurt normal file handling.

     
    • labels: --> Windows
    • Group: --> Version 5
     
    • status: open --> pending-accepted
     
  • Ethan, both MinGW and MSVC do define off_t. To avoid side effects on system include files, I move the defines to datafile.h.

    The use of this is still some somewhat limited, since on 32bit builds the skip option is limited to 32bits.

     
1 2 > >> (Page 1 of 2)