-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Mat_GetDir takes an infinite time to return values #157
Comments
@tbeu : any advice (workaround) to speed up reading of this file ? |
Can reproduce. Mat_GetDir is poorly implemented and leads to performance loss for structs/cells. |
Similar (?) thing here. Using matio 1.5.18 (current master) on windows in python (using ctypes). As it turns out, I have different versions of Visual Studio on my machine and on our CI server (thanks, VS Update...): When calling Mat_GetDir on my machine (using the newer compiler), everything works as expected. Some Unit tests that call Mat_GetDir work as expected. On the CI server on the other hand (same build script, same Unit test) the function starts an infinite loop. By building with Debug information (RelWithDebInfo) I could find out that this loop does not stop:
As I said, updating the MSVC compiler seems to solve this... |
@jnjaeschke I cannot image that the difference in behaviour is due to the difference in compiler version. Could you please provide your MAT file, too? |
Matio_issue_157_compiler_versions.zip @tbeu In the zip file you find the test file (I think it was created using matio a while ago) as well as a working matio DLL (RelWithDebInfo, built on my machine) and the not working matio DLL built with the older compiler, also in RelWithDebInfo. The binaries are x64 and built using CMake. I also noted a difference in file size (250kb <-> 251kb @ RelWithDebInfo, 159 <-> 162 kb @ Release), so there definitely is a difference... Edit: Can confirm it is not a compiler problem. CI is updated to 19.27.xxx and the problem still occurs. Also only using the file I uploaded in the zip file... other files seem to work. |
@jnjaeschke Your reported issue is different from the original issue reported by @Nelson-numerical-software. Whereas the original issue is a performance problem of large and nested structures (of v5 or v7.3 MAT files), your issue (of v4 MAT files) is more critical and can lead to undefined behaviour (such as infinite loops). Please confirm if 289c586 fixes your reported issue in your environments. I will need to release a new version afterwards in case of positive feedback. Thanks. |
@tbeu That fixed the issue. Thank you very much! |
Fixed by 274dfef. |
tested on windows matio 1.5.18
test_suites.zip
mat contains a struct 'B' with many others struct as field.
The text was updated successfully, but these errors were encountered: