sddspseudoinverse error

Moderators: michael_borland, soliday

Hwang, Ji-Gwang
Posts: 42
Joined: 21 Jan 2010, 02:27

sddspseudoinverse error

Post by Hwang, Ji-Gwang » 22 Oct 2020, 08:51

Hello. There is an error in the sddspseudoinverse while I am trying to execute an example of "DATuneScan" with the recent version sdds-toolkit on the Windows machine. It works fine with the old-version sdds-toolkit.

soliday
Posts: 413
Joined: 28 May 2008, 09:15

Re: sddspseudoinverse error

Post by soliday » 22 Oct 2020, 08:53

I will take a look. I think I know what happened.

soliday
Posts: 413
Joined: 28 May 2008, 09:15

Re: sddspseudoinverse error

Post by soliday » 22 Oct 2020, 12:14

There is a new version posted for Windows. I had linked to the Intel MKL libraries that use 64bit array indexing which is incompatible with some of our other code. For now, I changed it to use the Intel MKL libraries that use 32bit array indexing.

Hwang, Ji-Gwang
Posts: 42
Joined: 21 Jan 2010, 02:27

Re: sddspseudoinverse error

Post by Hwang, Ji-Gwang » 23 Oct 2020, 04:35

Thanks! It works well.

Slava
Posts: 5
Joined: 03 Nov 2025, 04:07

Re: sddspseudoinverse error

Post by Slava » 21 Dec 2025, 11:09

Hello. There is an error in the sddspseudoinverse on the Windows 10 with the newest versions of Elegant and SDDS. When I tried to use sddspseudoinverse I've got messages:

Code: Select all

Compiled with package Intel MKL

Intel MKL ERROR: Parameter 8 was incorrect on entry to DGBBRDM.

Intel MKL ERROR: Parameter 5 was incorrect on entry to DGESDD.

Intel MKL ERROR: Parameter 8 was incorrect on entry to DGBBRDM.

Intel MKL ERROR: Parameter 5 was incorrect on entry to DGESDD.
Error (sddspseudoinverse): Error: no non-zero singular values found, unable to find the inverse response matrix.
I supposed that a problem may be in data type. I tried to use different data types (float, long, long64) but it has no effect. Moreover I can not obtained "double" data type. When I tried to use sddsprocess with -cast=column,C1,C,double the new column C1 had float data type.

Do you have any ideas about it?
Sincerely yours, Vyacheslav

soliday
Posts: 413
Joined: 28 May 2008, 09:15

Re: sddspseudoinverse error

Post by soliday » 22 Dec 2025, 18:24

I think I have found and fixed the problem. Can you download https://ops.aps.anl.gov/downloads/SDDS_ ... 4-TEST.msi
and tell me if this solves your problem? If it does, I will change the official release for Windows.

Thanks,
--Bob Soliday

Slava
Posts: 5
Joined: 03 Nov 2025, 04:07

Re: sddspseudoinverse error

Post by Slava » 23 Dec 2025, 12:36

Dear Bob, thanks a lot for your reply. This SDDS Toolkit release now works well. Results are coincide with that are from MtLab. Unfortunately I did not find information concerns parameter list. What do Tikhonovalpha and Tikhonovbeta parameters mean? Are they Tikhonov_relative_alpha and Tikhonov_n from &correct command? Does special entry for sddpseudoinverse exist that can change NumberOfSingularValuesUsed parameter?
Sincerely yours, Vyacheslav

soliday
Posts: 413
Joined: 28 May 2008, 09:15

Re: sddspseudoinverse error

Post by soliday » 23 Dec 2025, 12:42

I will direct your question to Mike Borland. He is lead author, I mostly just help handle releases and ports to the various operating systems.

Slava
Posts: 5
Joined: 03 Nov 2025, 04:07

Re: sddspseudoinverse error

Post by Slava » 23 Dec 2025, 14:55

Dear Bob,
when I continued my playing with sddspseudoinverse I faced with the next strange behaviour of the code.
If I use matrix prepared in other program and then make table data in sdds format via csv2sdds command and finally call sddspseudoinverse the result differs from that is obtained with MtLab. I attached input matrix and the result of the sddspseudoinverse as well as the result from MtLab (look at the picture).
Can you explain what is happened?
Attachments
InverseM_expected.jpg
test.rar
(1.57 KiB) Downloaded 33 times
Sincerely yours, Vyacheslav

soliday
Posts: 413
Joined: 28 May 2008, 09:15

Re: sddspseudoinverse error

Post by soliday » 06 Jan 2026, 17:48

Try this:
sddspseudoinverse matrix.sdds matrix.inv.sdds -ascii -minimumSingularValueRatio=1.7763568394002505e-15 -economy

I was able to reproduce MATLAB's pinv output with this command on Linux. I haven't tried it yet on Windows.
minimumSingularValueRatio = max(m,n) * eps = 8 * 2.220446049250313e-16

eps is “machine epsilon”: the size of the smallest relative change that double‑precision floating point (IEEE‑754 double) can reliably represent around 1.0

MATLAB pinv(A) computes the Moore–Penrose pseudoinverse using an SVD and a specific default rule for deciding which singular values are “effectively zero” in finite‑precision arithmetic. sddspseudoinverse also uses an SVD, but it will only match MATLAB if you make it use the same cutoff rule and avoid extra filtering features.

Without the -minimumSingularValueRatio=<max(m,n)*eps> option, sddspseudoinverse may keep and invert singular values that MATLAB would discard.

Post Reply