jacobseiler / densgrid Goto Github PK
View Code? Open in Web Editor NEWMy version of the densfield code
My version of the densfield code
Attempting to read a HDF5 array yields an invalid write error.
[jseiler@sstar001 densgrid]$ valgrind --leak-check=yes ./densgrid 128 /lustre/projects/p004_swin/bsmith/1.6Gpc/means/halo_1721673/dm_gadget/data/snapdir_000/snapshot_000 /lustre/
==20402== Memcheck, a memory error detector
==20402== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==20402== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==20402== Command: ./densgrid 128 /lustre/projects/p004_swin/bsmith/1.6Gpc/means/halo_1721673/dm_gadget/data/snapdir_000/snapshot_000 /lustre/
==20402==
==================================================
Running with a GridSize 128, input file base /lustre/projects/p004_swin/bsmith/1.6Gpc/means/halo_1721673/dm_gadget/data/snapdir_000/snapshot_000 and output file base /lustre/
==================================================
Reading header from file /lustre/projects/p004_swin/bsmith/1.6Gpc/means/halo_1721673/dm_gadget/data/snapdir_000/snapshot_000.0.hdf5
==20402== Invalid write of size 8
==20402== at 0x53A81DC: H5S_extent_get_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x53A824C: H5S_get_simple_extent_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x404509: read_attribute_int (io_hdf5.c:1153)
==20402== by 0x401675: read_header (io.c:30)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402== Address 0x57d9ee0 is 0 bytes inside a block of size 4 alloc'd
==20402== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==20402== by 0x4044BA: read_attribute_int (io_hdf5.c:1148)
==20402== by 0x401675: read_header (io.c:30)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402==
==20402== Invalid write of size 8
==20402== at 0x53A81DC: H5S_extent_get_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x53A824C: H5S_get_simple_extent_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x404509: read_attribute_int (io_hdf5.c:1153)
==20402== by 0x401696: read_header (io.c:31)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402== Address 0x585b3d0 is 0 bytes inside a block of size 4 alloc'd
==20402== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==20402== by 0x4044BA: read_attribute_int (io_hdf5.c:1148)
==20402== by 0x401696: read_header (io.c:31)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402== Address 0x585b3d0 is 0 bytes inside a block of size 4 alloc'd
==20402== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==20402== by 0x4044BA: read_attribute_int (io_hdf5.c:1148)
==20402== by 0x401696: read_header (io.c:31)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402==
==20402== Invalid write of size 8
==20402== at 0x53A81DC: H5S_extent_get_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x53A824C: H5S_get_simple_extent_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x404509: read_attribute_int (io_hdf5.c:1153)
==20402== by 0x4016B7: read_header (io.c:32)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402== Address 0x58dc4f0 is 0 bytes inside a block of size 4 alloc'd
==20402== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==20402== by 0x4044BA: read_attribute_int (io_hdf5.c:1148)
==20402== by 0x4016B7: read_header (io.c:32)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402==
==20402== Invalid write of size 8
==20402== at 0x53A81DC: H5S_extent_get_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x53A824C: H5S_get_simple_extent_dims (in /usr/local/x86_64/gnu/hdf5-1.8.9/lib/libhdf5.so.7.0.3)
==20402== by 0x403F5E: read_attribute_double (io_hdf5.c:1000)
==20402== by 0x4016FC: read_header (io.c:35)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402== Address 0x59df140 is 0 bytes inside a block of size 4 alloc'd
==20402== at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
==20402== by 0x403F0F: read_attribute_double (io_hdf5.c:995)
==20402== by 0x4016FC: read_header (io.c:35)
==20402== by 0x401921: get_numfiles (io.c:72)
==20402== by 0x4012BC: init (main.c:62)
==20402== by 0x4012F0: main (main.c:72)
==20402==
We are reading from 256 files
==20402==
==20402== HEAP SUMMARY:
==20402== in use at exit: 0 bytes in 0 blocks
==20402== total heap usage: 2,394 allocs, 2,394 frees, 75,235,044 bytes allocated
==20402==
==20402== All heap blocks were freed -- no leaks are possible
==20402==
==20402== For counts of detected and suppressed errors, rerun with: -v
==20402== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 8 from 6)
Note that this commit has this issue "fixed" by hard coding in a times by 6 (the size of the array) in the read_attribute
function.
The issue appears to be that the dimension of the array is not being properly read; it is reading the dimension as 1
instead of 6
. Since the array is 1x6
it seems to be reading the sizes incorrectly.
This will need to be addressed for when the particle information is properly read in.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.