Public bug reported: Octave produces erroneous output for even slightly large matrix-vector multiplications:
$ octave GNU Octave, version 8.4.0 ... octave:1> c = rand( 120 ); x = rand( 120, 1 ); ( c * x ) - ( c * x ) ans = -19.442 -23.669 -21.009 -24.441 1. The above result is erroneous. The correct answer is a column vector of all zeros. 2. octave:3> c = rand( 110 ); x = rand( 110, 1 ); ( c * x ) - ( c * x ) produces the correct answer. 3. $ export OMP_NUM_THREADS=1; octave octave:1> c = rand( 120 ); x = rand( 120, 1 ); ( c * x ) - ( c * x ) ans = 0 0 ... produces the correct answer. This suggests multi-threading may be responsible. The BLAS version is: octave:1> version( "-blas" ) ans = Intel(R) Math Kernel Library Version 2020.0.4 Product Build 20200917 for Intel(R) 64 architecture applications 4. The present bug occurs in a computer with "13th Gen Intel(R) Core(TM) i9-13900K" CPU. It does not occur in another machine with "Intel(R) Core(TM) i9-14900K", with the same Ubuntu and octave versions. Thank you for your kind attention to this bug report. Mahesh ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: octave 8.4.0-1build5 ProcVersionSignature: Ubuntu 6.8.0-55.57-generic 6.8.12 Uname: Linux 6.8.0-55-generic x86_64 ApportVersion: 2.28.1-0ubuntu3.5 Architecture: amd64 CasperMD5CheckResult: pass Date: Tue Mar 18 14:59:53 2025 InstallationDate: Installed on 2024-02-15 (397 days ago) InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.2) SourcePackage: octave UpgradeStatus: Upgraded to noble on 2024-09-20 (179 days ago) ** Affects: octave (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug noble ** Attachment added: "apport.octave.wbp4g3px.apport" https://bugs.launchpad.net/bugs/2103502/+attachment/5865445/+files/apport.octave.wbp4g3px.apport -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2103502 Title: Erroneous result from matrix-vector multiplication To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/octave/+bug/2103502/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs