Cytnx icon indicating copy to clipboard operation
Cytnx copied to clipboard

Remove Svd not accurate warning

Open jeffry1829 opened this issue 2 years ago • 1 comments

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

jeffry1829 avatar Aug 18 '23 03:08 jeffry1829

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

hunghaoti avatar Aug 18 '23 08:08 hunghaoti