New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for StructuredGrid files #18
Conversation
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
So this mistake sometimes occurs in CI and sometimes not, even when we cleanup the files altogether. I don't like this at all... |
Can you try fixing it? It seems to me like a very specific error, not related to floating point truncation. |
I have no clue where to start. Seems that the files written to disc sometimes have a different size. Not having a local machine that reproduces this error does not help.. |
Note that the main branch is also failing now |
@sloede: Whereas CI is fine now, the error remains weird and occurs when reading compressed data back from a file here: raw = data_array.vtk_file.appended_data
HeaderType = header_type(data_array.vtk_file)
if is_compressed(data_array)
# If data is stored compressed, the first four integers of type `header_type` are the header and
# the fourth value contains the number of bytes to read
first = data_array.offset + 1
last = data_array.offset + 4 * sizeof(HeaderType)
header = Int.(reinterpret(HeaderType, raw[first:last]))
n_bytes = header[4]
first = data_array.offset + 4 * sizeof(HeaderType) + 1
last = first + n_bytes - 1
uncompressed = transcode(ZlibDecompressor, raw[first:last])
else
...
end in some cases, the length of the Are there perhaps changes in the upstream packages that could cause this? |
Thanks for investigating the issue. Do you know why the error now disappeared? And did it only occur in cases where the file in question was generated on-the-fly or also in cases where an existing vtk file is used?
I believe we had a similar issue before - @andrewwinters5000 do you still remember where and when this occurred? I do not remember what we did back then to resolve it, but I recall that we had a similar issue of files being "truncated" by the zip/unzip mechanism. |
I also vaguely remember some spurious issues like these. If I remember correctly, they had some stochastic part, i.e., they were not triggered every time - maybe depending on the GitHub runners etc.? Some parts may have been specific to Windows or so... |
No, if you look at the various CI's of yesterday, it sometimes appears and sometimes not (on different systems)
I believe it is only with cases where the file was generated on-the-fly.
|
OK. Since the error seems to have disappeared, once the last remaining issues are resolved, we can merge this. |
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
so we now have 1 failed CI and 2 that passed, with the only thing that changed being: @show data_array data_array.vtk_file.xml_file and removing: # Start with a clean environment: remove example file directory if it exists
isdir(TEST_EXAMPLES_DIR) && rm(TEST_EXAMPLES_DIR, recursive=true)
mkpath(TEST_EXAMPLES_DIR) It seems to be rather stochastic and I have no idea where to look. |
That's also what I remember from similar issues earlier - it's stochastic and when it fails, it's on Windows.
Sounds good to me. Thanks a lot for your contributions! |
This PR adds support for
StructuredGrid
(*.vts
) files as well as their parallel counterpartsPStructuredGrid
(*.pvts
)