#1358 For loop over large data file fails consistently

closed-fixed
nobody
None
5
2015-03-23
2014-03-20
Anonymous
No

For large files (>100,000 points) the animate script that is attached refuses to run. 'load animate' just fails, no window pops up. This does not happen for smaller numbers of datapoints (~80,000)

3 Attachments

Discussion

  • Ethan Merritt

    Ethan Merritt - 2014-03-21

    Nothing to do with file size or file handling.
    The script triggered an integer overflow in an overly clever test for the iteration loop end condition.
    Fixed in CVS for 4.6 and 5.0

    Work-around:
    replace this: do for [i=0:sph:num] { ... }
    with this: do for [j=0:sph/num] { i=j*num; ... }

     
    Last edit: Ethan Merritt 2014-03-21
  • Ethan Merritt

    Ethan Merritt - 2014-03-21
    • status: open --> pending-fixed
     
  • Paul La

    Paul La - 2014-03-21

    I tried the CVS version - there it is fixed for the files I posted, but I just tried an even bigger file (2 million data points - a galactic collision) and a similar issue exhibits. The animate script runs, it just does not go through the entire datafile. it stops at i=66000. Your workaround still works fine.

    [note the scaling in the animate script is wrong with this new sphere file- it won't look right when plotted, but you will get the idea of the issue]

    I don't seem to be allowed to upload such a large attachment (it's .bz2). Give me a moment while I upload it to my google drive

     
    Last edit: Paul La 2014-03-21
  • Paul La

    Paul La - 2014-03-21

    Please let me know if this link works for you: https://drive.google.com/file/d/0B5OxY8UvhgSwMmgwVm1TZTVESWc/edit?usp=sharing

    it is a .bz2 compressed file. You can get the text file with the command 'bunzip2 sphere.bz2' on any linux box. If you have windows perhaps winrar can do it.

     
    Last edit: Paul La 2014-03-21
  • Ethan Merritt

    Ethan Merritt - 2014-03-21

    You're quite right. The same fix was needed in another place.
    My fault for missing it.

    thanks
    
     
  • Paul La

    Paul La - 2014-03-21

    It's fixed now, excellent! I had been resorting to python's matplotlib which is super slow.

    Thanks for making gnuplot better!

     
  • Ethan Merritt

    Ethan Merritt - 2014-03-23
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks