Cytnx
Cytnx copied to clipboard
Remove Svd not accurate warning
It's very annoying to have something like
# Cytnx warning occur at void cytnx::linalg_internal::cuSvd_internal_d(const boost::intrusive_ptr<cytnx::Storage_base>&, boost::intrusive_ptr<cytnx::Storage_base>&, boost::intrusive_ptr<cytnx::Storage_base>&, boost::intrusive_ptr<cytnx::Storage_base>&, const cytnx::cytnx_int64&, const cytnx::cytnx_int64&)
# warning: Warning: Singular values approach zero, SVD may not be accurate, err_sigma = 2.220400E-09
# file : /home/petjelinux/Cytnx/src/linalg/linalg_internal_gpu/cuSvd_internal.cu (320)
filled the whole screen.
We might need a way to inform the user, but not annoying them
I think in the future we could design the logging level for library such as: ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF and user can set it as the environment variable.
Another way is adding the 'verbose' argument in function like in Lanczos:
https://github.com/Cytnx-dev/Cytnx/blob/dev-master/include/linalg.hpp#L2213-L2249