Describe the bug
For all-zero matrix, its dplasmaFrobeniusNorm calculated by dplasma_dlange is -nan.
To Reproduce
Steps to reproduce the behavior:
- Initialize a all-zero matrix
- Calculate its FrobeniusNorm: dplasma_dlange( parsec, dplasmaFrobeniusNorm, A);
Expected behavior
The result should be 0 instead of -nan.
Bug Location
When a new tile is considered during the Frobenius norm calculation, its norm is compared with scale and divided (the smaller value divided by the larger one). In this way, 0/0 division occurs when all the tile is 0.