Skip to content

add src/mat/tests/ex84.c reproducing bug in MatLoad_Dense_HDF5()

Stefano Zampini requested to merge stefanozampini/fix-matmat-dense into main

I have just created this MR to keep track of the recent bug posted on petsc-users and provide the reproducer. The HDF5 reader is not loading the matrix properly. This is off main, can be rebased onto release when finished. The user matrix is here, needs PETSC compiled with complex numbers to be loaded

[szampini@localhost tests]$ mpiexec -n 1 ./ex84  -f sample_data.h5 -hdf5_name dmatrix -view_mat binary:sample_data.dat
Data matrix norms: 460.275 7.10227 50.5381
Autocorrelation matrix norms: 1312.01 1312.01 1047.29
[szampini@localhost tests]$ mpiexec -n 1 ./ex84  -f sample_data.dat
Data matrix norms: 460.275 7.10227 50.5381
Autocorrelation matrix norms: 1312.01 1312.01 1047.29
[szampini@localhost tests]$ mpiexec -n 2 ./ex84  -f sample_data.h5 -hdf5_name dmatrix
Data matrix norms: 414.35 6.56091 50.5381
Autocorrelation matrix norms: 1353.52 1353.52 1006.35
[szampini@localhost tests]$ mpiexec -n 2 ./ex84  -f sample_data.dat
Data matrix norms: 460.275 7.10227 50.5381
Autocorrelation matrix norms: 1312.01 1312.01 1047.29
Edited by Vaclav Hapla

Merge request reports