Description
AS the title says, when for example pcheevr is called in single precision, rwork(1) should contain the optimal size
* RWORK (local workspace/output) REAL array,
* dimension (LRWORK)
* On return, RWORK(1) contains the optimal amount of
* workspace required for efficient execution.
However the value is obtained from integer to real conversion
https://github.com/Reference-ScaLAPACK/scalapack/blob/master/SRC/pcheevr.f#L592
which gives rounding error for integers bigger than 10^6
If the rounded value is subsequently used in input for phceevr (after conversion back to integer), this may give an error.
See here the comment in a pull request of our code (and the following discussion):
yambo-code/yambo#117 (comment)
To fix this, it would be needed to change the above mentioned line (and other lines across the library) to a rounding procedure which always selects the closest bigger real number, e.g. rounding always done in excess.