0s autopkgtest [18:00:00]: starting date and time: 2025-03-15 18:00:00+0000 0s autopkgtest [18:00:00]: git checkout: 325255d2 Merge branch 'pin-any-arch' into 'ubuntu/production' 0s autopkgtest [18:00:00]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.t74uj4g5/out --timeout-copy=6000 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:glibc --apt-upgrade r-cran-expm --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=glibc/2.41-1ubuntu2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@bos03-s390x-25.secgroup --name adt-plucky-s390x-r-cran-expm-20250315-175959-juju-7f2275-prod-proposed-migration-environment-20-0a0c87e5-2eae-4b4f-8051-fa612c7ce331 --image adt/ubuntu-plucky-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-proposed-migration-s390x -e TERM=linux -e ''"'"'http_proxy=http://squid.internal:3128'"'"'' -e ''"'"'https_proxy=http://squid.internal:3128'"'"'' -e ''"'"'no_proxy=127.0.0.1,127.0.1.1,login.ubuntu.com,localhost,localdomain,novalocal,internal,archive.ubuntu.com,ports.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,changelogs.ubuntu.com,keyserver.ubuntu.com,launchpadlibrarian.net,launchpadcontent.net,launchpad.net,10.24.0.0/24,keystone.ps5.canonical.com,objectstorage.prodstack5.canonical.com,radosgw.ps5.canonical.com'"'"'' --mirror=http://ftpmaster.internal/ubuntu/ 144s autopkgtest [18:02:23]: testbed dpkg architecture: s390x 144s autopkgtest [18:02:24]: testbed apt version: 2.9.33 144s autopkgtest [18:02:24]: @@@@@@@@@@@@@@@@@@@@ test bed setup 144s autopkgtest [18:02:24]: testbed release detected to be: None 145s autopkgtest [18:02:25]: updating testbed package index (apt update) 145s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 146s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 146s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 146s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 146s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 146s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 146s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 146s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [113 kB] 146s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x c-n-f Metadata [1824 B] 146s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x c-n-f Metadata [116 B] 146s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [320 kB] 147s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x c-n-f Metadata [13.4 kB] 147s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [3776 B] 147s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x c-n-f Metadata [240 B] 147s Fetched 1073 kB in 1s (723 kB/s) 147s Reading package lists... 148s Reading package lists... 148s Building dependency tree... 148s Reading state information... 149s Calculating upgrade... 149s Calculating upgrade... 149s The following packages were automatically installed and are no longer required: 149s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 149s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 149s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 149s linux-tools-6.11.0-8-generic 149s Use 'sudo apt autoremove' to remove them. 149s The following packages will be upgraded: 149s pinentry-curses python3-jinja2 strace 149s 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 149s Need to get 652 kB of archives. 149s After this operation, 27.6 kB of additional disk space will be used. 149s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x strace s390x 6.13+ds-1ubuntu1 [500 kB] 149s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x pinentry-curses s390x 1.3.1-2ubuntu3 [42.9 kB] 149s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 150s Fetched 652 kB in 1s (718 kB/s) 150s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81428 files and directories currently installed.) 150s Preparing to unpack .../strace_6.13+ds-1ubuntu1_s390x.deb ... 150s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 150s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_s390x.deb ... 150s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 150s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 150s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 150s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 150s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 150s Setting up strace (6.13+ds-1ubuntu1) ... 150s Processing triggers for man-db (2.13.0-1) ... 151s Reading package lists... 151s Building dependency tree... 151s Reading state information... 151s Solving dependencies... 151s The following packages will be REMOVED: 151s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 151s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 151s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 151s linux-tools-6.11.0-8-generic* 151s 0 upgraded, 0 newly installed, 9 to remove and 5 not upgraded. 151s After this operation, 167 MB disk space will be freed. 151s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81428 files and directories currently installed.) 151s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 151s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 151s Removing libpython3.12t64:s390x (3.12.9-1) ... 151s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 151s Removing libnsl2:s390x (1.3.0-3build3) ... 151s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 151s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 152s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 152s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 153s Processing triggers for libc-bin (2.41-1ubuntu1) ... 153s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56328 files and directories currently installed.) 153s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 153s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 153s autopkgtest [18:02:33]: upgrading testbed (apt dist-upgrade and autopurge) 153s Reading package lists... 153s Building dependency tree... 153s Reading state information... 154s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 155s Starting 2 pkgProblemResolver with broken count: 0 155s Done 155s Entering ResolveByKeep 155s 155s Calculating upgrade... 155s The following packages will be upgraded: 155s libc-bin libc-dev-bin libc6 libc6-dev locales 155s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 155s Need to get 9512 kB of archives. 155s After this operation, 8192 B of additional disk space will be used. 155s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6-dev s390x 2.41-1ubuntu2 [1678 kB] 156s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-dev-bin s390x 2.41-1ubuntu2 [24.3 kB] 156s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6 s390x 2.41-1ubuntu2 [2892 kB] 158s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-bin s390x 2.41-1ubuntu2 [671 kB] 158s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x locales all 2.41-1ubuntu2 [4246 kB] 162s Preconfiguring packages ... 162s Fetched 9512 kB in 7s (1273 kB/s) 162s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 162s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_s390x.deb ... 162s Unpacking libc6-dev:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 162s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_s390x.deb ... 162s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 162s Preparing to unpack .../libc6_2.41-1ubuntu2_s390x.deb ... 162s Unpacking libc6:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 162s Setting up libc6:s390x (2.41-1ubuntu2) ... 162s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 162s Preparing to unpack .../libc-bin_2.41-1ubuntu2_s390x.deb ... 162s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 162s Setting up libc-bin (2.41-1ubuntu2) ... 162s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 162s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 162s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 162s Setting up locales (2.41-1ubuntu2) ... 162s Generating locales (this might take a while)... 163s en_US.UTF-8... done 163s Generation complete. 163s Setting up libc-dev-bin (2.41-1ubuntu2) ... 163s Setting up libc6-dev:s390x (2.41-1ubuntu2) ... 164s Processing triggers for man-db (2.13.0-1) ... 164s Processing triggers for systemd (257.3-1ubuntu3) ... 165s Reading package lists... 165s Building dependency tree... 165s Reading state information... 165s Starting pkgProblemResolver with broken count: 0 165s Starting 2 pkgProblemResolver with broken count: 0 165s Done 165s Solving dependencies... 166s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 166s autopkgtest [18:02:46]: rebooting testbed after setup commands that affected boot 186s autopkgtest [18:03:06]: testbed running kernel: Linux 6.14.0-10-generic #10-Ubuntu SMP Wed Mar 12 14:53:49 UTC 2025 189s autopkgtest [18:03:09]: @@@@@@@@@@@@@@@@@@@@ apt-source r-cran-expm 190s Get:1 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (dsc) [2115 B] 190s Get:2 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (tar) [141 kB] 190s Get:3 http://ftpmaster.internal/ubuntu plucky/universe r-cran-expm 1.0-0-1 (diff) [3176 B] 191s gpgv: Signature made Mon Oct 7 04:29:42 2024 UTC 191s gpgv: using RSA key 73471499CC60ED9EEE805946C5BD6C8F2295D502 191s gpgv: issuer "plessy@debian.org" 191s gpgv: Can't check signature: No public key 191s dpkg-source: warning: cannot verify inline signature for ./r-cran-expm_1.0-0-1.dsc: no acceptable signature found 191s autopkgtest [18:03:11]: testing package r-cran-expm version 1.0-0-1 192s autopkgtest [18:03:12]: build not needed 195s autopkgtest [18:03:15]: test run-unit-test: preparing testbed 195s Reading package lists... 195s Building dependency tree... 195s Reading state information... 195s Starting pkgProblemResolver with broken count: 0 195s Starting 2 pkgProblemResolver with broken count: 0 195s Done 196s The following NEW packages will be installed: 196s fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono libblas3 196s libcairo2 libdatrie1 libdeflate0 libfontconfig1 libfreetype6 libgfortran5 196s libgomp1 libgraphite2-3 libharfbuzz0b libice6 libjbig0 libjpeg-turbo8 196s libjpeg8 liblapack3 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 196s libpaper-utils libpaper2 libpixman-1-0 libsharpyuv0 libsm6 libtcl8.6 196s libthai-data libthai0 libtiff6 libtk8.6 libwebp7 libxcb-render0 libxcb-shm0 196s libxft2 libxrender1 libxss1 libxt6t64 r-base-core r-cran-expm r-cran-gmp 196s r-cran-lattice r-cran-matrix r-cran-rcolorbrewer r-cran-rmpfr r-cran-sfsmisc 196s unzip x11-common xdg-utils zip 196s 0 upgraded, 51 newly installed, 0 to remove and 0 not upgraded. 196s Need to get 48.4 MB of archives. 196s After this operation, 94.7 MB of additional disk space will be used. 196s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libfreetype6 s390x 2.13.3+dfsg-1 [431 kB] 196s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 197s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 198s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig-config s390x 2.15.0-2ubuntu1 [37.5 kB] 198s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x libfontconfig1 s390x 2.15.0-2ubuntu1 [150 kB] 198s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig s390x 2.15.0-2ubuntu1 [191 kB] 198s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x libblas3 s390x 3.12.1-2 [252 kB] 198s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x libpixman-1-0 s390x 0.44.0-3 [201 kB] 198s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render0 s390x 1.17.0-2 [17.0 kB] 198s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shm0 s390x 1.17.0-2 [5862 B] 198s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libxrender1 s390x 1:0.9.10-1.1build1 [20.4 kB] 198s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libcairo2 s390x 1.18.2-2 [580 kB] 199s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x libdatrie1 s390x 0.2.13-3build1 [20.6 kB] 199s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate0 s390x 1.23-1 [46.1 kB] 199s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran5 s390x 15-20250222-0ubuntu1 [620 kB] 199s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 15-20250222-0ubuntu1 [152 kB] 200s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libgraphite2-3 s390x 1.3.14-2ubuntu1 [79.8 kB] 200s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x libharfbuzz0b s390x 10.2.0-1 [538 kB] 200s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x x11-common all 1:7.7+23ubuntu3 [21.7 kB] 200s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x libice6 s390x 2:1.1.1-1 [45.4 kB] 200s Get:21 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8 s390x 2.1.5-3ubuntu2 [147 kB] 200s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 200s Get:23 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 204s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x libthai-data all 0.1.29-2build1 [158 kB] 204s Get:25 http://ftpmaster.internal/ubuntu plucky/main s390x libthai0 s390x 0.1.29-2build1 [20.7 kB] 204s Get:26 http://ftpmaster.internal/ubuntu plucky/main s390x libpango-1.0-0 s390x 1.56.2-1 [253 kB] 204s Get:27 http://ftpmaster.internal/ubuntu plucky/main s390x libpangoft2-1.0-0 s390x 1.56.2-1 [50.2 kB] 204s Get:28 http://ftpmaster.internal/ubuntu plucky/main s390x libpangocairo-1.0-0 s390x 1.56.2-1 [28.2 kB] 204s Get:29 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper2 s390x 2.2.5-0.3 [17.2 kB] 204s Get:30 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper-utils s390x 2.2.5-0.3 [15.3 kB] 204s Get:31 http://ftpmaster.internal/ubuntu plucky/main s390x libsharpyuv0 s390x 1.5.0-0.1 [16.7 kB] 204s Get:32 http://ftpmaster.internal/ubuntu plucky/main s390x libsm6 s390x 2:1.2.4-1 [18.4 kB] 204s Get:33 http://ftpmaster.internal/ubuntu plucky/main s390x libtcl8.6 s390x 8.6.16+dfsg-1 [1034 kB] 205s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x libjbig0 s390x 2.1-6.1ubuntu2 [33.1 kB] 205s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x libwebp7 s390x 1.5.0-0.1 [210 kB] 206s Get:36 http://ftpmaster.internal/ubuntu plucky/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu4 [217 kB] 206s Get:37 http://ftpmaster.internal/ubuntu plucky/main s390x libxft2 s390x 2.3.6-1build1 [49.6 kB] 206s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x libxss1 s390x 1:1.2.3-1build3 [7396 B] 206s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x libtk8.6 s390x 8.6.16-1 [830 kB] 206s Get:40 http://ftpmaster.internal/ubuntu plucky/main s390x libxt6t64 s390x 1:1.2.1-1.2build1 [184 kB] 207s Get:41 http://ftpmaster.internal/ubuntu plucky/main s390x zip s390x 3.0-14ubuntu2 [187 kB] 207s Get:42 http://ftpmaster.internal/ubuntu plucky/main s390x unzip s390x 6.0-28ubuntu6 [186 kB] 207s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 207s Get:44 http://ftpmaster.internal/ubuntu plucky/universe s390x r-base-core s390x 4.4.3-1 [28.6 MB] 235s Get:45 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lattice s390x 0.22-6-1 [1340 kB] 236s Get:46 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-matrix s390x 1.7-3-1 [4449 kB] 240s Get:47 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-expm s390x 1.0-0-1 [229 kB] 240s Get:48 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-gmp s390x 0.7-5-1 [314 kB] 240s Get:49 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rcolorbrewer all 1.1-3-1build1 [55.4 kB] 240s Get:50 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rmpfr s390x 0.9-5-1 [1224 kB] 242s Get:51 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-sfsmisc all 1.1-20-1 [674 kB] 243s Preconfiguring packages ... 243s Fetched 48.4 MB in 47s (1036 kB/s) 243s Selecting previously unselected package libfreetype6:s390x. 243s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 243s Preparing to unpack .../00-libfreetype6_2.13.3+dfsg-1_s390x.deb ... 243s Unpacking libfreetype6:s390x (2.13.3+dfsg-1) ... 243s Selecting previously unselected package fonts-dejavu-mono. 243s Preparing to unpack .../01-fonts-dejavu-mono_2.37-8_all.deb ... 243s Unpacking fonts-dejavu-mono (2.37-8) ... 243s Selecting previously unselected package fonts-dejavu-core. 243s Preparing to unpack .../02-fonts-dejavu-core_2.37-8_all.deb ... 243s Unpacking fonts-dejavu-core (2.37-8) ... 243s Selecting previously unselected package fontconfig-config. 243s Preparing to unpack .../03-fontconfig-config_2.15.0-2ubuntu1_s390x.deb ... 243s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 243s Selecting previously unselected package libfontconfig1:s390x. 243s Preparing to unpack .../04-libfontconfig1_2.15.0-2ubuntu1_s390x.deb ... 243s Unpacking libfontconfig1:s390x (2.15.0-2ubuntu1) ... 243s Selecting previously unselected package fontconfig. 243s Preparing to unpack .../05-fontconfig_2.15.0-2ubuntu1_s390x.deb ... 243s Unpacking fontconfig (2.15.0-2ubuntu1) ... 243s Selecting previously unselected package libblas3:s390x. 243s Preparing to unpack .../06-libblas3_3.12.1-2_s390x.deb ... 243s Unpacking libblas3:s390x (3.12.1-2) ... 243s Selecting previously unselected package libpixman-1-0:s390x. 243s Preparing to unpack .../07-libpixman-1-0_0.44.0-3_s390x.deb ... 243s Unpacking libpixman-1-0:s390x (0.44.0-3) ... 243s Selecting previously unselected package libxcb-render0:s390x. 243s Preparing to unpack .../08-libxcb-render0_1.17.0-2_s390x.deb ... 243s Unpacking libxcb-render0:s390x (1.17.0-2) ... 243s Selecting previously unselected package libxcb-shm0:s390x. 243s Preparing to unpack .../09-libxcb-shm0_1.17.0-2_s390x.deb ... 243s Unpacking libxcb-shm0:s390x (1.17.0-2) ... 243s Selecting previously unselected package libxrender1:s390x. 243s Preparing to unpack .../10-libxrender1_1%3a0.9.10-1.1build1_s390x.deb ... 243s Unpacking libxrender1:s390x (1:0.9.10-1.1build1) ... 243s Selecting previously unselected package libcairo2:s390x. 243s Preparing to unpack .../11-libcairo2_1.18.2-2_s390x.deb ... 243s Unpacking libcairo2:s390x (1.18.2-2) ... 243s Selecting previously unselected package libdatrie1:s390x. 243s Preparing to unpack .../12-libdatrie1_0.2.13-3build1_s390x.deb ... 243s Unpacking libdatrie1:s390x (0.2.13-3build1) ... 243s Selecting previously unselected package libdeflate0:s390x. 243s Preparing to unpack .../13-libdeflate0_1.23-1_s390x.deb ... 243s Unpacking libdeflate0:s390x (1.23-1) ... 243s Selecting previously unselected package libgfortran5:s390x. 243s Preparing to unpack .../14-libgfortran5_15-20250222-0ubuntu1_s390x.deb ... 243s Unpacking libgfortran5:s390x (15-20250222-0ubuntu1) ... 243s Selecting previously unselected package libgomp1:s390x. 243s Preparing to unpack .../15-libgomp1_15-20250222-0ubuntu1_s390x.deb ... 243s Unpacking libgomp1:s390x (15-20250222-0ubuntu1) ... 243s Selecting previously unselected package libgraphite2-3:s390x. 243s Preparing to unpack .../16-libgraphite2-3_1.3.14-2ubuntu1_s390x.deb ... 243s Unpacking libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 243s Selecting previously unselected package libharfbuzz0b:s390x. 243s Preparing to unpack .../17-libharfbuzz0b_10.2.0-1_s390x.deb ... 243s Unpacking libharfbuzz0b:s390x (10.2.0-1) ... 243s Selecting previously unselected package x11-common. 243s Preparing to unpack .../18-x11-common_1%3a7.7+23ubuntu3_all.deb ... 243s Unpacking x11-common (1:7.7+23ubuntu3) ... 243s Selecting previously unselected package libice6:s390x. 243s Preparing to unpack .../19-libice6_2%3a1.1.1-1_s390x.deb ... 243s Unpacking libice6:s390x (2:1.1.1-1) ... 243s Selecting previously unselected package libjpeg-turbo8:s390x. 243s Preparing to unpack .../20-libjpeg-turbo8_2.1.5-3ubuntu2_s390x.deb ... 243s Unpacking libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 243s Selecting previously unselected package libjpeg8:s390x. 243s Preparing to unpack .../21-libjpeg8_8c-2ubuntu11_s390x.deb ... 243s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 243s Selecting previously unselected package liblapack3:s390x. 243s Preparing to unpack .../22-liblapack3_3.12.1-2_s390x.deb ... 243s Unpacking liblapack3:s390x (3.12.1-2) ... 243s Selecting previously unselected package libthai-data. 243s Preparing to unpack .../23-libthai-data_0.1.29-2build1_all.deb ... 243s Unpacking libthai-data (0.1.29-2build1) ... 243s Selecting previously unselected package libthai0:s390x. 243s Preparing to unpack .../24-libthai0_0.1.29-2build1_s390x.deb ... 243s Unpacking libthai0:s390x (0.1.29-2build1) ... 243s Selecting previously unselected package libpango-1.0-0:s390x. 243s Preparing to unpack .../25-libpango-1.0-0_1.56.2-1_s390x.deb ... 243s Unpacking libpango-1.0-0:s390x (1.56.2-1) ... 243s Selecting previously unselected package libpangoft2-1.0-0:s390x. 243s Preparing to unpack .../26-libpangoft2-1.0-0_1.56.2-1_s390x.deb ... 243s Unpacking libpangoft2-1.0-0:s390x (1.56.2-1) ... 243s Selecting previously unselected package libpangocairo-1.0-0:s390x. 243s Preparing to unpack .../27-libpangocairo-1.0-0_1.56.2-1_s390x.deb ... 243s Unpacking libpangocairo-1.0-0:s390x (1.56.2-1) ... 243s Selecting previously unselected package libpaper2:s390x. 243s Preparing to unpack .../28-libpaper2_2.2.5-0.3_s390x.deb ... 243s Unpacking libpaper2:s390x (2.2.5-0.3) ... 243s Selecting previously unselected package libpaper-utils. 243s Preparing to unpack .../29-libpaper-utils_2.2.5-0.3_s390x.deb ... 243s Unpacking libpaper-utils (2.2.5-0.3) ... 243s Selecting previously unselected package libsharpyuv0:s390x. 243s Preparing to unpack .../30-libsharpyuv0_1.5.0-0.1_s390x.deb ... 243s Unpacking libsharpyuv0:s390x (1.5.0-0.1) ... 243s Selecting previously unselected package libsm6:s390x. 243s Preparing to unpack .../31-libsm6_2%3a1.2.4-1_s390x.deb ... 243s Unpacking libsm6:s390x (2:1.2.4-1) ... 243s Selecting previously unselected package libtcl8.6:s390x. 243s Preparing to unpack .../32-libtcl8.6_8.6.16+dfsg-1_s390x.deb ... 243s Unpacking libtcl8.6:s390x (8.6.16+dfsg-1) ... 243s Selecting previously unselected package libjbig0:s390x. 243s Preparing to unpack .../33-libjbig0_2.1-6.1ubuntu2_s390x.deb ... 243s Unpacking libjbig0:s390x (2.1-6.1ubuntu2) ... 243s Selecting previously unselected package libwebp7:s390x. 243s Preparing to unpack .../34-libwebp7_1.5.0-0.1_s390x.deb ... 243s Unpacking libwebp7:s390x (1.5.0-0.1) ... 243s Selecting previously unselected package libtiff6:s390x. 243s Preparing to unpack .../35-libtiff6_4.5.1+git230720-4ubuntu4_s390x.deb ... 243s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 243s Selecting previously unselected package libxft2:s390x. 243s Preparing to unpack .../36-libxft2_2.3.6-1build1_s390x.deb ... 243s Unpacking libxft2:s390x (2.3.6-1build1) ... 243s Selecting previously unselected package libxss1:s390x. 243s Preparing to unpack .../37-libxss1_1%3a1.2.3-1build3_s390x.deb ... 243s Unpacking libxss1:s390x (1:1.2.3-1build3) ... 243s Selecting previously unselected package libtk8.6:s390x. 243s Preparing to unpack .../38-libtk8.6_8.6.16-1_s390x.deb ... 243s Unpacking libtk8.6:s390x (8.6.16-1) ... 244s Selecting previously unselected package libxt6t64:s390x. 244s Preparing to unpack .../39-libxt6t64_1%3a1.2.1-1.2build1_s390x.deb ... 244s Unpacking libxt6t64:s390x (1:1.2.1-1.2build1) ... 244s Selecting previously unselected package zip. 244s Preparing to unpack .../40-zip_3.0-14ubuntu2_s390x.deb ... 244s Unpacking zip (3.0-14ubuntu2) ... 244s Selecting previously unselected package unzip. 244s Preparing to unpack .../41-unzip_6.0-28ubuntu6_s390x.deb ... 244s Unpacking unzip (6.0-28ubuntu6) ... 244s Selecting previously unselected package xdg-utils. 244s Preparing to unpack .../42-xdg-utils_1.2.1-2ubuntu1_all.deb ... 244s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 244s Selecting previously unselected package r-base-core. 244s Preparing to unpack .../43-r-base-core_4.4.3-1_s390x.deb ... 244s Unpacking r-base-core (4.4.3-1) ... 244s Selecting previously unselected package r-cran-lattice. 244s Preparing to unpack .../44-r-cran-lattice_0.22-6-1_s390x.deb ... 244s Unpacking r-cran-lattice (0.22-6-1) ... 244s Selecting previously unselected package r-cran-matrix. 244s Preparing to unpack .../45-r-cran-matrix_1.7-3-1_s390x.deb ... 244s Unpacking r-cran-matrix (1.7-3-1) ... 244s Selecting previously unselected package r-cran-expm. 244s Preparing to unpack .../46-r-cran-expm_1.0-0-1_s390x.deb ... 244s Unpacking r-cran-expm (1.0-0-1) ... 244s Selecting previously unselected package r-cran-gmp. 244s Preparing to unpack .../47-r-cran-gmp_0.7-5-1_s390x.deb ... 244s Unpacking r-cran-gmp (0.7-5-1) ... 244s Selecting previously unselected package r-cran-rcolorbrewer. 244s Preparing to unpack .../48-r-cran-rcolorbrewer_1.1-3-1build1_all.deb ... 244s Unpacking r-cran-rcolorbrewer (1.1-3-1build1) ... 244s Selecting previously unselected package r-cran-rmpfr. 244s Preparing to unpack .../49-r-cran-rmpfr_0.9-5-1_s390x.deb ... 244s Unpacking r-cran-rmpfr (0.9-5-1) ... 244s Selecting previously unselected package r-cran-sfsmisc. 244s Preparing to unpack .../50-r-cran-sfsmisc_1.1-20-1_all.deb ... 244s Unpacking r-cran-sfsmisc (1.1-20-1) ... 244s Setting up libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 244s Setting up libpixman-1-0:s390x (0.44.0-3) ... 244s Setting up libsharpyuv0:s390x (1.5.0-0.1) ... 244s Setting up libxrender1:s390x (1:0.9.10-1.1build1) ... 244s Setting up libdatrie1:s390x (0.2.13-3build1) ... 244s Setting up libxcb-render0:s390x (1.17.0-2) ... 244s Setting up unzip (6.0-28ubuntu6) ... 244s Setting up x11-common (1:7.7+23ubuntu3) ... 244s Setting up libdeflate0:s390x (1.23-1) ... 244s Setting up libxcb-shm0:s390x (1.17.0-2) ... 244s Setting up libgomp1:s390x (15-20250222-0ubuntu1) ... 244s Setting up libjbig0:s390x (2.1-6.1ubuntu2) ... 244s Setting up zip (3.0-14ubuntu2) ... 244s Setting up libblas3:s390x (3.12.1-2) ... 244s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 244s Setting up libfreetype6:s390x (2.13.3+dfsg-1) ... 244s Setting up fonts-dejavu-mono (2.37-8) ... 244s Setting up libtcl8.6:s390x (8.6.16+dfsg-1) ... 244s Setting up fonts-dejavu-core (2.37-8) ... 244s Setting up libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 244s Setting up libgfortran5:s390x (15-20250222-0ubuntu1) ... 244s Setting up libwebp7:s390x (1.5.0-0.1) ... 244s Setting up libharfbuzz0b:s390x (10.2.0-1) ... 244s Setting up libthai-data (0.1.29-2build1) ... 244s Setting up libxss1:s390x (1:1.2.3-1build3) ... 244s Setting up libpaper2:s390x (2.2.5-0.3) ... 244s Setting up xdg-utils (1.2.1-2ubuntu1) ... 244s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 244s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 244s Setting up libice6:s390x (2:1.1.1-1) ... 244s Setting up liblapack3:s390x (3.12.1-2) ... 244s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 244s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 244s Setting up libpaper-utils (2.2.5-0.3) ... 244s Setting up libthai0:s390x (0.1.29-2build1) ... 244s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 244s Setting up libfontconfig1:s390x (2.15.0-2ubuntu1) ... 244s Setting up libsm6:s390x (2:1.2.4-1) ... 244s Setting up fontconfig (2.15.0-2ubuntu1) ... 246s Regenerating fonts cache... done. 246s Setting up libxft2:s390x (2.3.6-1build1) ... 246s Setting up libtk8.6:s390x (8.6.16-1) ... 246s Setting up libpango-1.0-0:s390x (1.56.2-1) ... 247s Setting up libcairo2:s390x (1.18.2-2) ... 247s Setting up libxt6t64:s390x (1:1.2.1-1.2build1) ... 247s Setting up libpangoft2-1.0-0:s390x (1.56.2-1) ... 247s Setting up libpangocairo-1.0-0:s390x (1.56.2-1) ... 247s Setting up r-base-core (4.4.3-1) ... 247s Creating config file /etc/R/Renviron with new version 247s Setting up r-cran-lattice (0.22-6-1) ... 247s Setting up r-cran-gmp (0.7-5-1) ... 247s Setting up r-cran-sfsmisc (1.1-20-1) ... 247s Setting up r-cran-rcolorbrewer (1.1-3-1build1) ... 247s Setting up r-cran-matrix (1.7-3-1) ... 247s Setting up r-cran-rmpfr (0.9-5-1) ... 247s Setting up r-cran-expm (1.0-0-1) ... 247s Processing triggers for install-info (7.1.1-1) ... 247s Processing triggers for libc-bin (2.41-1ubuntu2) ... 247s Processing triggers for man-db (2.13.0-1) ... 248s autopkgtest [18:04:08]: test run-unit-test: [----------------------- 249s 249s R version 4.4.3 (2025-02-28) -- "Trophy Case" 249s Copyright (C) 2025 The R Foundation for Statistical Computing 249s Platform: s390x-ibm-linux-gnu 249s 249s R is free software and comes with ABSOLUTELY NO WARRANTY. 249s You are welcome to redistribute it under certain conditions. 249s Type 'license()' or 'licence()' for distribution details. 249s 249s R is a collaborative project with many contributors. 249s Type 'contributors()' for more information and 249s 'citation()' on how to cite R or R packages in publications. 249s 249s Type 'demo()' for some demos, 'help()' for on-line help, or 249s 'help.start()' for an HTML browser interface to help. 249s Type 'q()' to quit R. 249s 249s > library(expm) 249s Loading required package: Matrix 250s > 250s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE)# relErr() 250s 250s Attaching package: ‘expm’ 250s 250s The following object is masked from ‘package:Matrix’: 250s 250s expm 250s 250s Loading required package: tools 250s > 250s > set.seed(101) 250s > for(n in c(1:5, 10:11, if(doExtras) 100:101 else 25)) { 250s + cat("n = ",n,"\n-----\n") 250s + for(i in seq_len(if(doExtras)10 else 3)) { 250s + A <- matrix(round(10*rnorm(n^2))/4, n,n) 250s + E <- matrix(rnorm(n^2, sd = 1e-3), n,n) 250s + F1 <- expmFrechet(A, E) 250s + F2 <- expmFrechet(A, E, "block") 250s + if(i == 1 && n < 9) print(F1) 250s + stopifnot(all.equal(F1, F2, tol = 6e-15 * n)) 250s + cat(sprintf("%5.2f ", relErr(F1 $ L, F2 $ L) * 2^52)) 250s + } 250s + cat(" * eps_C \n") 250s + } 250s n = 1 250s ----- 250s $expm 250s [,1] 250s [1,] 0.4723666 250s 250s $Lexpm 250s [,1] 250s [1,] 0.0002609645 250s 250s 0.00 0.00 0.00 * eps_C 250s n = 2 250s ----- 250s $expm 250s [,1] [,2] 250s [1,] 3.7943192 3.9860952 250s [2,] -0.4428995 0.2511234 250s 250s $Lexpm 250s [,1] [,2] 250s [1,] -0.000196749 0.0005570041 250s [2,] -0.001188989 -0.0019747694 250s 250s 1.22 2.16 1.08 * eps_C 250s n = 3 250s ----- 250s $expm 250s [,1] [,2] [,3] 250s [1,] -13.234401 -7.815106 -5.911481 250s [2,] 3.475001 -14.396109 -2.922287 250s [3,] -4.792555 -3.230410 -2.237135 250s 250s $Lexpm 250s [,1] [,2] [,3] 250s [1,] -0.006244373 0.03825617 0.006773883 250s [2,] -0.009314389 -0.01048467 -0.005528605 250s [3,] -0.003071235 0.01362774 0.002137511 250s 250s 4.24 5.40 9.86 * eps_C 250s n = 4 250s ----- 250s $expm 250s [,1] [,2] [,3] [,4] 250s [1,] 0.2707319 -0.1626405 -2.119235 -0.07861206 250s [2,] 2.0900646 -0.7912464 -14.169394 -0.17449996 250s [3,] 6.3895316 12.2833412 -18.789145 6.32147099 250s [4,] -2.2731287 -5.9125055 4.417767 -2.96095147 250s 250s $Lexpm 250s [,1] [,2] [,3] [,4] 250s [1,] 7.677032e-05 0.001682315 -0.0008184674 0.0009526274 250s [2,] -1.662466e-03 0.009155436 0.0057316462 0.0050790835 250s [3,] -4.184527e-03 -0.001231147 0.0132157465 0.0025368226 250s [4,] -4.704290e-04 0.000236295 0.0019512119 -0.0013450671 250s 250s 4.42 8.78 0.71 * eps_C 250s n = 5 250s ----- 250s $expm 250s [,1] [,2] [,3] [,4] [,5] 250s [1,] 28.89025 -7.887859 -5.470599 0.5944806 9.342582 250s [2,] 13.49317 -13.253465 34.703223 31.9553150 -3.493428 250s [3,] 77.39341 -41.002709 78.782028 79.2962299 5.522557 250s [4,] 32.49178 -16.213884 20.464336 23.6511224 4.510920 250s [5,] -41.22584 20.972736 -29.288624 -33.2428425 -5.776531 250s 250s $Lexpm 250s [,1] [,2] [,3] [,4] [,5] 250s [1,] 0.056099069 -0.036816360 0.09881220 0.086689105 -0.0230892952 250s [2,] -0.022878412 0.028215505 -0.04468039 -0.041094058 0.0005738551 250s [3,] 0.047797873 -0.004093659 0.09600680 0.079920949 -0.0371636943 250s [4,] 0.022749004 -0.006615176 0.04445098 0.036856490 -0.0189132368 250s [5,] 0.004190808 -0.010861707 -0.01759342 -0.008662979 0.0249103378 250s 250s 2.42 2.05 1.94 * eps_C 250s n = 10 250s ----- 250s 2.75 5.08 2.23 * eps_C 250s n = 11 250s ----- 250s 3.40 2.25 3.69 * eps_C 250s n = 25 250s ----- 250s 4.85 4.33 3.25 * eps_C 250s > 250s > cat('Time elapsed: ', proc.time(), '\n') # for "statistical reasons" 250s Time elapsed: 0.91 0.044 0.979 0 0.001 250s > 250s 250s R version 4.4.3 (2025-02-28) -- "Trophy Case" 250s Copyright (C) 2025 The R Foundation for Statistical Computing 250s Platform: s390x-ibm-linux-gnu 250s 250s R is free software and comes with ABSOLUTELY NO WARRANTY. 250s You are welcome to redistribute it under certain conditions. 250s Type 'license()' or 'licence()' for distribution details. 250s 250s R is a collaborative project with many contributors. 250s Type 'contributors()' for more information and 250s 'citation()' on how to cite R or R packages in publications. 250s 250s Type 'demo()' for some demos, 'help()' for on-line help, or 250s 'help.start()' for an HTML browser interface to help. 250s Type 'q()' to quit R. 250s 250s > library(expm) 250s Loading required package: Matrix 251s 251s Attaching package: ‘expm’ 251s 251s The following object is masked from ‘package:Matrix’: 251s 251s expm 251s 251s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE)## -> assertError()... 251s Loading required package: tools 251s > 251s > ## A matrix with 'Inf' 251s > mI <- rbind(0, c(-Inf, Inf, 0, 0), 0, 0) 251s > bal3 <- 251s + list(dB = dgebal(mI, "B"), # = default 251s + dP = dgebal(mI, "P"), 251s + dN = dgebal(mI, "N")) 251s > str(bal3) 251s Warning messages: 251s 1: In dgebal(mI, "B") : 'dgebal' is deprecated. 251s Use 'balance' instead. 251s See help("Deprecated") 251s 2: In dgebal(mI, "P") : 'dgebal' is deprecated. 251s Use 'balance' instead. 251s See help("Deprecated") 251s 3: In dgebal(mI, "N") : 'dgebal' is deprecated. 251s Use 'balance' instead. 251s See help("Deprecated") 251s List of 3 251s $ dB:List of 4 251s ..$ z : num [1:4, 1:4] Inf 0 0 0 -Inf ... 251s ..$ scale: num [1:4] 1 1 3 4 251s ..$ i1 : int 1 251s ..$ i2 : int 1 251s $ dP:List of 4 251s ..$ z : num [1:4, 1:4] Inf 0 0 0 -Inf ... 251s ..$ scale: num [1:4] 1 1 3 4 251s ..$ i1 : int 1 251s ..$ i2 : int 1 251s $ dN:List of 4 251s ..$ z : num [1:4, 1:4] 0 -Inf 0 0 0 ... 251s ..$ scale: num [1:4] 1 1 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 4 251s > stopifnot(identical(mI, bal3$dN$z), 251s Asserted error: R_dgebal(*, type="S"): Infinite matrix entry 251s + with(bal3, all.equal(dB, dP, tol=1e-14)), 251s + all.equal(bal3$dB$z, rbind(c(Inf,-Inf,0,0), 0,0,0), tol=1e-14), 251s + all.equal(bal3$dB$scale, c(1,1,3,4))) 251s > assertError(dgebal(mI, "S"), verbose=TRUE)# gave infinite loop 251s > 251s > 251s > 251s > ## Compare the two different "balance" pre-conditioning versions in Ward77: 251s > set.seed(1) 251s > mList <- lapply(integer(100), function(...) rSpMatrix(20, nnz=80)) 251s > re20 <- sapply(mList, function(M) 251s + relErr(expm(M, precond = "2bal"), 251s + expm(M, precond = "1bal"))) 251s > re20 ## ahh.: zero or ~ 1e-13 ... good 251s [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 251s [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 251s [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 251s > table(re20 == 0) 251s 251s TRUE 251s 100 251s > summary(re20[re20 != 0]) 251s Min. 1st Qu. Median Mean 3rd Qu. Max. 251s 251s > ## Pentium M (ubuntu) 251s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 251s > ## 2.593e-14 8.703e-14 1.282e-13 2.434e-13 4.177e-13 6.295e-13 251s > 251s > demo(balanceTst) #-> the function definition and the first few examples 251s 251s 251s demo(balanceTst) 251s ---- ~~~~~~~~~~ 251s 251s > balanceTst <- function(A) { 251s + 251s + ## Purpose: Consistency checking of balance() {was "dgebal()"} 251s + ## ---------------------------------------------------------------------- 251s + ## Arguments: a square matrix 251s + ## ---------------------------------------------------------------------- 251s + ## Author: Martin Maechler, 20 Feb 2008 and on 251s + 251s + n <- dim(A)[1] 251s + ## do *the* three calls and look at result 251s + P <- balance(A, "P") 251s + 251s + doPerm <- function(A, pp, i1, i2) { 251s + stopifnot(length(pp) == n, dim(A) == c(n,n), 251s + 1 <= i1, i1 <= i2, i2 <= n) 251s + A. <- A 251s + if(i2 < n) { ## The upper part 251s + for(i in n:(i2+1)) { # 'p2' in *reverse* order 251s + ## swap i <-> pp[i] both rows and columns 251s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 251s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 251s + } 251s + } 251s + if(i1 > 1) { ## The lower part 251s + for(i in 1:(i1-1)) { # 'p1' in *forward* order 251s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 251s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 251s + } 251s + } 251s + A. 251s + } 251s + 251s + checkPerm <- function(P, orig.A) { 251s + didPerm <- ((leftP <- (i1 <- P$i1) != 1L) | 251s + (rightP <- (i2 <- P$i2) != n)) 251s + if(didPerm) { ## *had* permutation -- now check my idea about it 251s + pp <- as.integer(P$scale) 251s + ## Permute A to become P$z : 251s + A. <- doPerm(orig.A, pp = pp, i1=i1, i2=i2) 251s + stopifnot(isTRUE(all.equal(A., P$z, tolerance = 1e-15))) 251s + 251s + ## Now the reverse: Use pp[] and permute A. "back to A": 251s + if(leftP) { ## The lower part 251s + for(i in (i1-1):1) { # 'p1' in *reverse* order 251s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 251s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 251s + } 251s + } 251s + if(rightP) { ## The upper part 251s + for(i in (i2+1):n) { # 'p2' in *forward* order 251s + ## swap i <-> pp[i] both rows and columns 251s + tt <- A.[,i]; A.[,i] <- A.[,pp[i]]; A.[,pp[i]] <- tt 251s + tt <- A.[i,]; A.[i,] <- A.[pp[i],]; A.[pp[i],] <- tt 251s + } 251s + } 251s + stopifnot(isTRUE(all.equal(A., orig.A, tolerance = 1e-15))) 251s + } 251s + } 251s + checkPerm(P, orig.A = A) 251s + 251s + S <- balance(P$z, "S")# "S" starting from result of "P" 251s + stopifnot(S$i1 == 1, S$i2 == n) 251s + 251s + ## Now check the scaling 251s + checkScal <- function (d, A1, A2) { 251s + stopifnot(length(d) == n, dim(A1) == dim(A2), dim(A2) == c(n,n)) 251s + 251s + ## A.scaled <- diag(1/d, n) \%*\% A1 \%*\% diag(d, n) 251s + ## more efficiently: 251s + A.scaled <- A1 * (rep(d, each = n) / d) 251s + stopifnot(isTRUE(all.equal(A2, A.scaled, tolerance = 1e-15))) 251s + ## Check the reverse: 251s + S.rescaled <- A2 * (d * rep(1/d, each = n)) 251s + stopifnot(isTRUE(all.equal(A1, S.rescaled, tolerance = 1e-15))) 251s + } 251s + checkScal(d = S$scale, A1 = P$z, A2 = S$z) 251s + 251s + B <- balance(A, "B")# "B" : B[oth] 251s + stopifnot(P$i1 == B$i1, P$i2 == B$i2) 251s + ## now check *both* permutation and scaling 251s + 251s + A.perm <- doPerm(A, pp = as.integer(B$scale), i1=B$i1, i2=B$i2) 251s + ## checkPerm(B, orig.A = A) 251s + 251s + dB <- B$scale 251s + dB[c(if(B$i1 > 1) 1:(B$i1-1), 251s + if(B$i2 < n) (B$i2+1):n)] <- 1 251s + checkScal(d = dB, A1 = A.perm, A2 = B$z) 251s + 251s + ## return 251s + list(P = P, S = S, B = B, Sz.eq.Bz = isTRUE(all.equal(S$z, B$z))) 251s + } 251s 251s > m4. <- rbind(c(-1,-2, 0, 0), 251s + c( 0, 0,10,11), 251s + c( 0, 0,12, 0), 251s + c( 0,13, 0, 0)) 251s 251s > op <- options(str = strOptions(vec.len = 12)) 251s 251s > str(b4. <- balanceTst(m4.)) 251s List of 4 251s $ P :List of 4 251s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 251s ..$ scale: num [1:4] 1 1 1 3 251s ..$ i1 : int 2 251s ..$ i2 : int 3 251s $ S :List of 4 251s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 251s ..$ scale: num [1:4] 1 1 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 4 251s $ B :List of 4 251s ..$ z : num [1:4, 1:4] -1 0 0 0 -2 0 13 0 0 11 0 0 0 10 0 12 251s ..$ scale: num [1:4] 1 1 1 3 251s ..$ i1 : int 2 251s ..$ i2 : int 3 251s $ Sz.eq.Bz: logi TRUE 251s 251s > with(b4., all.equal(P, B)) # TRUE (everywhere?) 251s [1] TRUE 251s 251s > ## better (?) example 251s > (m <- matrix(c(0,-1,0,-2,10, rep(0,11)), 4,4)) 251s [,1] [,2] [,3] [,4] 251s [1,] 0 10 0 0 251s [2,] -1 0 0 0 251s [3,] 0 0 0 0 251s [4,] -2 0 0 0 251s 251s > str(ba <- balanceTst(m)) 251s List of 4 251s $ P :List of 4 251s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 10 0 -2 -1 0 0 0 0 0 0 251s ..$ scale: num [1:4] 3 1 1 3 251s ..$ i1 : int 2 251s ..$ i2 : int 3 251s $ S :List of 4 251s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 2.5 0 -2 -4 0 0 0 0 0 0 251s ..$ scale: num [1:4] 1 0.25 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 4 251s $ B :List of 4 251s ..$ z : num [1:4, 1:4] 0 0 0 0 0 0 2.5 0 -2 -4 0 0 0 0 0 0 251s ..$ scale: num [1:4] 3 0.25 1 3 251s ..$ i1 : int 2 251s ..$ i2 : int 3 251s $ Sz.eq.Bz: logi TRUE 251s 251s > (eq <- with(ba, all.equal(S$z, B$z))) # TRUE now (everywhere?) 251s [1] TRUE 251s Warning message: 251s In dgebal(m4) : 'dgebal' is deprecated. 251s Use 'balance' instead. 251s See help("Deprecated") 251s Warning message: 251s In dgebal(m4) : 'dgebal' is deprecated. 251s Use 'balance' instead. 251s See help("Deprecated") 251s 251s > ba$Sz.eq.Bz # ditto 251s [1] TRUE 251s 251s > ## a non-empty ``less-balanced'' example --- 251s > 251s > m4 <- matrix(outer(2^(0:7),c(-1,1)), 4,4) 251s 251s > m4[lower.tri(m4)] <- 0 #--> upper triangular ==> will have many permutations 251s 251s > ## now permute it; so balance() will find the permutation 251s > p <- c(4,2:1,3); m4 <- m4[p,p] 251s 251s > m4 251s [,1] [,2] [,3] [,4] 251s [1,] 128 0 0 0 251s [2,] 32 -32 0 2 251s [3,] 16 -16 -1 1 251s [4,] 64 0 0 4 251s 251s > str(dm4 <- balanceTst(m4)) # much permutation! i1 = i2 = 1 ! 251s List of 4 251s $ P :List of 4 251s ..$ z : num [1:4, 1:4] -1 0 0 0 -16 -32 0 0 1 2 4 0 16 32 64 128 251s ..$ scale: num [1:4] 1 2 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 1 251s $ S :List of 4 251s ..$ z : num [1:4, 1:4] -1 0 0 0 -1 -32 0 0 0.25 8 4 0 1 32 16 128 251s ..$ scale: num [1:4] 16 1 4 1 251s ..$ i1 : int 1 251s ..$ i2 : int 4 251s $ B :List of 4 251s ..$ z : num [1:4, 1:4] -1 0 0 0 -16 -32 0 0 1 2 4 0 16 32 64 128 251s ..$ scale: num [1:4] 1 2 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 1 251s $ Sz.eq.Bz: logi FALSE 251s 251s > ##----------- Complex examples 251s > zba4 <- balanceTst(m4 + 3i * m4) 251s 251s > str(zba4) 251s List of 4 251s $ P :List of 4 251s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -16-48i -32-96i 0+0i 0+0i 1+3i ... 251s ..$ scale: num [1:4] 1 2 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 1 251s $ S :List of 4 251s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -1-3i -32-96i 0+0i 0+0i 0.25+0.75i ... 251s ..$ scale: num [1:4] 16 1 4 1 251s ..$ i1 : int 1 251s ..$ i2 : int 4 251s $ B :List of 4 251s ..$ z : cplx [1:4, 1:4] -1-3i 0+0i 0+0i 0+0i -16-48i -32-96i 0+0i 0+0i 1+3i ... 251s ..$ scale: num [1:4] 1 2 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 1 251s $ Sz.eq.Bz: logi FALSE 251s 251s > zba <- balanceTst(m*(1 + 1i)) 251s 251s > str(zba) 251s List of 4 251s $ P :List of 4 251s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 10+10i 0+0i -2-2i ... 251s ..$ scale: num [1:4] 3 1 1 3 251s ..$ i1 : int 2 251s ..$ i2 : int 3 251s $ S :List of 4 251s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 2.5+2.5i 0+0i -2-2i ... 251s ..$ scale: num [1:4] 1 0.25 1 1 251s ..$ i1 : int 1 251s ..$ i2 : int 4 251s $ B :List of 4 251s ..$ z : cplx [1:4, 1:4] 0+0i 0+0i 0+0i 0+0i 0+0i 0+0i 2.5+2.5i 0+0i -2-2i ... 251s ..$ scale: num [1:4] 3 0.25 1 3 251s ..$ i1 : int 2 251s ..$ i2 : int 3 251s $ Sz.eq.Bz: logi TRUE 251s 251s > stopifnot(exprs = { 251s + all.equal(ba$ S$z, Re(zba$ S$z)) 251s + all.equal(ba$ S$z, Im(zba$ S$z)) 251s + all.equal(dm4$ S$z, Re(zba4$ S$z)) 251s + all.equal(dm4$ S$z * 3, Im(zba4$ S$z)) 251s + }) 251s 251s > options(op) # revert 251s > ## ========== 251s > 251s > dm4. <- dgebal(m4) 251s > storage.mode(m4) <- "integer" 251s > stopifnot(identical(dm4., dgebal(m4))) 251s > 251s > expm(m) 251s [,1] [,2] [,3] [,4] 251s [1,] -0.999786073 -0.06540707 0 0 251s [2,] 0.006540707 -0.99978607 0 0 251s [3,] 0.000000000 0.00000000 1 0 251s [4,] 0.013081414 -3.99957215 0 1 251s > expm(m,"Pade") ## are different indeed {when bug still existed} 251s [,1] [,2] [,3] [,4] 251s [1,] -0.999786073 -0.06540707 0 0 251s [2,] 0.006540707 -0.99978607 0 0 251s [3,] 0.000000000 0.00000000 1 0 251s [4,] 0.013081414 -3.99957215 0 1 251s attr(,"accuracy") 251s [1] 1.160917e-14 251s > expm(m,"R_Pade")# same as Pade 251s [,1] [,2] [,3] [,4] 251s [1,] -0.999786073 -0.06540707 0 0 251s [2,] 0.006540707 -0.99978607 0 0 251s [3,] 0.000000000 0.00000000 1 0 251s [4,] 0.013081414 -3.99957215 0 1 251s > 251s > 251s > ## a non-empty ``non-balanced'' example --- 251s > 251s > expm.t.identity(m4, "Ward") 251s [1] TRUE 251s > 251s > m6 <- zeroTrace(matrix(outer(2^(-8:9),c(-1,1)), 6,6)); m6 251s [,1] [,2] [,3] [,4] [,5] [,6] 251s [1,] -75.2584635 -0.25000 -16.0000 0.00390625 0.25000 16.0000 251s [2,] -0.0078125 -75.75456 -32.0000 0.00781250 0.50000 32.0000 251s [3,] -0.0156250 -1.00000 -139.2546 0.01562500 1.00000 64.0000 251s [4,] -0.0312500 -2.00000 -128.0000 -75.22330729 2.00000 128.0000 251s [5,] -0.0625000 -4.00000 -256.0000 0.06250000 -71.25456 256.0000 251s [6,] -0.1250000 -8.00000 -512.0000 0.12500000 8.00000 436.7454 251s > m6[lower.tri(m6)] <- 0 ## plus one non-zero 251s > m6[4,2] <- 77 251s > p <- c(6,4,5,2:1,3); m6 <- m6[p,p] 251s > expm.t.identity(m6, "Ward") ## difference; indeed 251s [1] TRUE 251s > expm(m6) # is very different from 251s [,1] [,2] [,3] [,4] [,5] 251s [1,] 4.743903e+189 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 251s [2,] 1.235301e+189 2.158311e-33 7.038631e-32 1.285266e-31 0.000000e+00 251s [3,] 2.390628e+189 0.000000e+00 1.133807e-31 0.000000e+00 0.000000e+00 251s [4,] 2.653829e+188 1.627057e-37 7.493870e-34 1.271561e-33 0.000000e+00 251s [5,] 1.326905e+188 8.096068e-38 3.743330e-34 -4.016897e-34 2.068543e-33 251s [6,] 5.312842e+188 5.266261e-37 1.683517e-33 3.098706e-35 0.000000e+00 251s [,6] 251s [1,] 0.000000e+00 251s [2,] -6.346149e-32 251s [3,] 0.000000e+00 251s [4,] -6.406872e-34 251s [5,] -3.187638e-34 251s [6,] -1.529642e-35 251s > expm(m6,"R_Pade") 251s [,1] [,2] [,3] [,4] [,5] 251s [1,] 4.743903e+189 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 251s [2,] 1.235301e+189 2.158311e-33 7.038631e-32 1.285266e-31 0.000000e+00 251s [3,] 2.390628e+189 0.000000e+00 1.133807e-31 0.000000e+00 0.000000e+00 251s [4,] 2.653829e+188 1.627057e-37 7.493870e-34 1.271561e-33 0.000000e+00 251s [5,] 1.326905e+188 8.096068e-38 3.743330e-34 -4.016897e-34 2.068543e-33 251s [6,] 5.312842e+188 5.266261e-37 1.683517e-33 3.098706e-35 0.000000e+00 251s [,6] 251s [1,] 0.000000e+00 251s [2,] -6.346149e-32 251s [3,] 0.000000e+00 251s [4,] -6.406872e-34 251s [5,] -3.187638e-34 251s [6,] -1.529642e-35 251s > 251s > str(dm6 <- balanceTst(m6)) 251s List of 4 251s $ P :List of 4 251s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 251s ..$ scale: num [1:6] 3 1 1 1 3 1 251s ..$ i1 : int 2 251s ..$ i2 : int 4 251s $ S :List of 4 251s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 251s ..$ scale: num [1:6] 1 1 1 1 2 1 251s ..$ i1 : int 1 251s ..$ i2 : int 6 251s $ B :List of 4 251s ..$ z : num [1:6, 1:6] -75.3 0 0 0 0 ... 251s ..$ scale: num [1:6] 3 1 1 1 3 1 251s ..$ i1 : int 2 251s ..$ i2 : int 4 251s $ Sz.eq.Bz: logi FALSE 251s > ## Now, that's interesting: 251s > ## 251s > ## 1. 'S' scales *more* (2 .. 5) than just (2:4 == i1:i2) ! 251s > ## 251s > ## 2. 'B' has quite different scaling and it does (must!) obey rule 251s > ## scale i1:i2 only 251s > ## 251s > ## 3. 'B'(oth) is better than "P" and "S" separately: 251s > ## 251s > kappa(eigen(m6)$vectors)# 597.5588 251s [1] 597.5588 251s > kappa(eigen(dm6$P$z)$vectors)# 597.5588 251s [1] 597.5588 251s > kappa(eigen(dm6$S$z)$vectors)# 42.58396 251s [1] 621.5746 251s > kappa(eigen(dm6$B$z)$vectors)# 22.20266 251s [1] 597.5588 251s > 251s > 251s > ## An n=17 example where octave's expm() is wrong too 251s > m17 <- matrix(c(10,0, 0, 2, 3,-1, 0, 0, 0, 0, 0, 4, 0, 5, 0, 0,-2, 251s + 0, 0, 0, 0,-3, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 7, 0, 251s + 0, 0,10, 0, 0,-4, 9, 0, 0, 0,-5, 0,-6, 0, 0, 0, 0, 251s + 0, 0,-7, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0,11, 0, 251s + 0, 0, 0, 0, 0, 0,12, 0, 0, 0, 0, 0,-8, 0, 0, 0, 0, 251s + 0, 0,-9, 0, 0, 0, 0, 0, 0,-10,0,13,14,-11,-12,-13, 0, 251s + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251s + 0, 0, 0, 0, 0, 0, 0,10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251s + 0, 0, 0, 0, 0,-14,16,0,-10,0,17, 0, 0, 0, 0, 0, 0, 251s + 0, 0,-16,0, 0,18,19, 0, 0, 0, 0, 0, 0, 0,20, 0, 21, 251s + 22,0, 0, 0, 0, 0,-17,0, 0, 0,-10,-19,-20,0,0,0, 0, 251s + 0,-21,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251s + 0, 0, 0,23,24, 0,25,26, 0, 0,27,-22,0,28,-23,0,-24, 251s + 0,-25,0,29, 0, 0, 0, 0, 0, 0, 0,30,31, 0, 0, 0, 0, 251s + 0, 0,-26,32,0, 0, 0, 0, 0,-27,0,33,34, 0, 0, 0, 0, 251s + 0,-28,-29,0,0, 0,35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 251s + 0, 0, 0, 0, 0, 0,36,37, 0, 0, 0, 0, 0, 0, 0, 0,-10), 251s + 17, 17) 251s > str(dm17 <- balanceTst(m17)) 251s List of 4 251s $ P :List of 4 251s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 251s ..$ scale: num [1:17] 7 8 9 1 1 1 1 1 1 1 ... 251s ..$ i1 : int 4 251s ..$ i2 : int 16 251s $ S :List of 4 251s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 251s ..$ scale: num [1:17] 1 4 1 2 1 1 1 2 2 1 ... 251s ..$ i1 : int 1 251s ..$ i2 : int 17 251s $ B :List of 4 251s ..$ z : num [1:17, 1:17] 0 0 0 0 0 0 0 0 0 0 ... 251s ..$ scale: num [1:17] 7 8 9 2 2 1 1 2 2 1 ... 251s ..$ i1 : int 4 251s ..$ i2 : int 16 251s $ Sz.eq.Bz: logi FALSE 251s > sapply(dm17[1:3], `[[`, "scale") 251s P S B 251s [1,] 7 1.0 7 251s [2,] 8 4.0 8 251s [3,] 9 1.0 9 251s [4,] 1 2.0 2 251s [5,] 1 1.0 2 251s [6,] 1 1.0 1 251s [7,] 1 1.0 1 251s [8,] 1 2.0 2 251s [9,] 1 2.0 2 251s [10,] 1 1.0 1 251s [11,] 1 1.0 1 251s [12,] 1 2.0 2 251s [13,] 1 1.0 1 251s [14,] 1 1.0 1 251s [15,] 1 1.0 1 251s [16,] 1 1.0 1 251s [17,] 9 0.5 9 251s > 251s > ## The balancing was really rather harmful -- cond(V) *not* improved: 251s > condX <- function(x) kappa(x, exact=TRUE) 251s > condX(eigen(m17)$vectors)# 8.9e16 251s [1] 1.320065e+17 251s > condX(eigen(dm17$P$z)$vectors)# 1.37e17 251s [1] 1.36865e+17 251s > condX(eigen(dm17$S$z)$vectors)# 1.44e17 251s [1] 6.451363e+16 251s > condX(eigen(dm17$B$z)$vectors)# 1.43e17 (very slightly smaller) 251s [1] 1.437207e+17 251s > 251s 251s R version 4.4.3 (2025-02-28) -- "Trophy Case" 251s Copyright (C) 2025 The R Foundation for Statistical Computing 251s Platform: s390x-ibm-linux-gnu 251s 251s R is free software and comes with ABSOLUTELY NO WARRANTY. 251s You are welcome to redistribute it under certain conditions. 251s Type 'license()' or 'licence()' for distribution details. 251s 251s R is a collaborative project with many contributors. 251s Type 'contributors()' for more information and 251s 'citation()' on how to cite R or R packages in publications. 251s 251s Type 'demo()' for some demos, 'help()' for on-line help, or 251s 'help.start()' for an HTML browser interface to help. 251s Type 'q()' to quit R. 251s 251s > library(expm) 251s Loading required package: Matrix 252s 252s Attaching package: ‘expm’ 252s 252s > 252s > (sI <- sessionInfo()) 252s The following object is masked from ‘package:Matrix’: 252s 252s expm 252s 252s R version 4.4.3 (2025-02-28) 252s Platform: s390x-ibm-linux-gnu 252s Running under: Ubuntu Plucky Puffin (development branch) 252s 252s Matrix products: default 252s BLAS: /usr/lib/s390x-linux-gnu/blas/libblas.so.3.12.1 252s LAPACK: /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3.12.1; LAPACK version 3.12.0 252s 252s locale: 252s [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 252s [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 252s [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C 252s [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C 252s 252s time zone: Etc/UTC 252s tzcode source: system (glibc) 252s 252s attached base packages: 252s [1] stats graphics grDevices utils datasets methods base 252s 252s other attached packages: 252s [1] expm_1.0-0 Matrix_1.7-3 252s 252s loaded via a namespace (and not attached): 252s [1] compiler_4.4.3 grid_4.4.3 lattice_0.22-6 252s > packageDescription("Matrix") 252s Package: Matrix 252s Version: 1.7-3 252s VersionNote: do also bump src/version.h, inst/include/Matrix/version.h 252s Date: 2025-03-05 252s Priority: recommended 252s Title: Sparse and Dense Matrix Classes and Methods 252s Description: A rich hierarchy of sparse and dense matrix classes, 252s including general, symmetric, triangular, and diagonal matrices 252s with numeric, logical, or pattern entries. Efficient methods 252s for operating on such matrices, often wrapping the 'BLAS', 252s 'LAPACK', and 'SuiteSparse' libraries. 252s License: GPL (>= 2) | file LICENCE 252s URL: https://Matrix.R-forge.R-project.org 252s BugReports: https://R-forge.R-project.org/tracker/?atid=294&group_id=61 252s Contact: Matrix-authors@R-project.org 252s Authors@R: c(person("Douglas", "Bates", role = "aut", comment = c(ORCID 252s = "0000-0001-8316-9503")), person("Martin", "Maechler", role = 252s c("aut", "cre"), email = "mmaechler+Matrix@gmail.com", comment 252s = c(ORCID = "0000-0002-8685-9910")), person("Mikael", "Jagan", 252s role = "aut", comment = c(ORCID = "0000-0002-3542-2938")), 252s person("Timothy A.", "Davis", role = "ctb", comment = c(ORCID = 252s "0000-0001-7614-6899", "SuiteSparse libraries", "collaborators 252s listed in dir(system.file(\"doc\", \"SuiteSparse\", 252s package=\"Matrix\"), pattern=\"License\", full.names=TRUE, 252s recursive=TRUE)")), person("George", "Karypis", role = "ctb", 252s comment = c(ORCID = "0000-0003-2753-1437", "METIS library", 252s "Copyright: Regents of the University of Minnesota")), 252s person("Jason", "Riedy", role = "ctb", comment = c(ORCID = 252s "0000-0002-4345-4200", "GNU Octave's condest() and 252s onenormest()", "Copyright: Regents of the University of 252s California")), person("Jens", "Oehlschlägel", role = "ctb", 252s comment = "initial nearPD()"), person("R Core Team", role = 252s "ctb", comment = c(ROR = "02zz1nj61", "base R's matrix 252s implementation"))) 252s Depends: R (>= 4.4), methods 252s Imports: grDevices, graphics, grid, lattice, stats, utils 252s Suggests: MASS, datasets, sfsmisc, tools 252s Enhances: SparseM, graph 252s LazyData: no 252s LazyDataNote: not possible, since we use data/*.R and our S4 classes 252s BuildResaveData: no 252s Encoding: UTF-8 252s NeedsCompilation: yes 252s Packaged: 2025-03-05 09:59:22 UTC; maechler 252s Author: Douglas Bates [aut] (), 252s Martin Maechler [aut, cre] 252s (), Mikael Jagan [aut] 252s (), Timothy A. Davis 252s [ctb] (, SuiteSparse 252s libraries, collaborators listed in dir(system.file("doc", 252s "SuiteSparse", package="Matrix"), pattern="License", 252s full.names=TRUE, recursive=TRUE)), George Karypis [ctb] 252s (, METIS library, 252s Copyright: Regents of the University of Minnesota), Jason Riedy 252s [ctb] (, GNU Octave's 252s condest() and onenormest(), Copyright: Regents of the 252s University of California), Jens Oehlschlägel [ctb] (initial 252s nearPD()), R Core Team [ctb] (02zz1nj61, base R's matrix 252s implementation) 252s Maintainer: Martin Maechler 252s Repository: CRAN 252s Date/Publication: 2025-03-11 07:20:02 UTC 252s Built: R 4.4.3; s390x-ibm-linux-gnu; 'Tue, 11 Mar 2025 07:27:34 -0500'; 252s unix 252s 252s -- File: /usr/lib/R/library/Matrix/Meta/package.rds 252s > packageDescription("expm") 252s Package: expm 252s Type: Package 252s Title: Matrix Exponential, Log, 'etc' 252s Version: 1.0-0 252s Date: 2024-08-19 252s Authors@R: c(person("Martin", "Maechler", role=c("aut","cre"), 252s email="maechler@stat.math.ethz.ch", comment = c(ORCID = 252s "0000-0002-8685-9910")) , person("Christophe","Dutang", role = 252s "aut", comment = c(ORCID = "0000-0001-6732-1501")) , 252s person("Vincent", "Goulet", role = "aut", comment = c(ORCID = 252s "0000-0002-9315-5719")) , person("Douglas", "Bates", role = 252s "ctb", comment = "cosmetic clean up, in svn r42") , 252s person("David", "Firth", role = "ctb", comment = "expm(method= 252s \"PadeO\" and \"TaylorO\")") , person("Marina", "Shapira", role 252s = "ctb", comment = "expm(method= \"PadeO\" and \"TaylorO\")") , 252s person("Michael", "Stadelmann", role = "ctb", comment = 252s "\"Higham08*\" methods, see ?expm.Higham08...") ) 252s Contact: expm-developers@lists.R-forge.R-project.org 252s Description: Computation of the matrix exponential, logarithm, sqrt, 252s and related quantities, using traditional and modern methods. 252s Depends: Matrix 252s Imports: methods 252s Suggests: RColorBrewer, sfsmisc, Rmpfr 252s BuildResaveData: no 252s License: GPL (>= 2) 252s URL: https://R-Forge.R-project.org/projects/expm/ 252s BugReports: 252s https://R-forge.R-project.org/tracker/?atid=472&group_id=107 252s Encoding: UTF-8 252s NeedsCompilation: yes 252s Packaged: 2024-08-19 09:24:41 UTC; maechler 252s Author: Martin Maechler [aut, cre] 252s (), Christophe Dutang 252s [aut] (), Vincent Goulet 252s [aut] (), Douglas Bates 252s [ctb] (cosmetic clean up, in svn r42), David Firth [ctb] 252s (expm(method= "PadeO" and "TaylorO")), Marina Shapira [ctb] 252s (expm(method= "PadeO" and "TaylorO")), Michael Stadelmann [ctb] 252s ("Higham08*" methods, see ?expm.Higham08...) 252s Maintainer: Martin Maechler 252s Repository: CRAN 252s Date/Publication: 2024-08-19 15:20:07 UTC 252s Built: R 4.4.1; s390x-ibm-linux-gnu; 'Mon, 07 Oct 2024 13:27:09 +0900'; 252s unix 252s 252s -- File: /usr/lib/R/site-library/expm/Meta/package.rds 252s > 252s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 252s > 252s > ## Note that these results are achieved with the default 252s > ## settings order=8, method="Pade" -- accuracy could 252s > ## presumably be improved still further by some tuning 252s > ## of these settings. 252s > 252s > ### Latest ATLAS (for BDR on F 36; R-devel Oct.2023) has much worse precision: 252s > ##==> use much larger tolerance in such cases: 252s > 252s > ## Simplified (needs R 3.4.0 and newer, from robustbase/inst/xtraR/platform-sessionInfo.R ) : 252s > BLAS <- extSoftVersion()[["BLAS"]] 252s > Lapack <- La_library() 252s > is.BLAS.Lapack <- identical(BLAS, Lapack) 252s > ## A cheap check (that works on KH's debian-gcc setup, 2019-05): 252s > if(!length(BLAS.is.openBLAS <- grepl("openblas", BLAS, ignore.case=TRUE))) 252s + BLAS.is.openBLAS <- NA 252s > if(!length(Lapack.is.openBLAS <- grepl("openblas", Lapack, ignore.case=TRUE))) 252s + Lapack.is.openBLAS <- NA 252s > 252s > (maybeATLAS <- is.BLAS.Lapack && !BLAS.is.openBLAS) 252s [1] FALSE 252s > 252s > 252s > ## ---------------------------- 252s > ## Test case 1 from Ward (1977) 252s > ## ---------------------------- 252s > T1 <- rbind(c(4, 2, 0), 252s + c(1, 4, 1), 252s + c(1, 1, 4)) 252s > (m1 <- expm(T1, method="Pade")) 252s [,1] [,2] [,3] 252s [1,] 147.8666 183.7651 71.79703 252s [2,] 127.7811 183.7651 91.88257 252s [3,] 127.7811 163.6796 111.96811 252s attr(,"accuracy") 252s [1] 6.493412e-12 252s > (m1O <- expm(T1, method="PadeO"))# very slightly different 252s [,1] [,2] [,3] 252s [1,] 147.8666 183.7651 71.79703 252s [2,] 127.7811 183.7651 91.88257 252s [3,] 127.7811 163.6796 111.96811 252s attr(,"accuracy") 252s [1] 6.493412e-12 252s > (m1T <- expm(T1, method="Taylor")) 252s [,1] [,2] [,3] 252s [1,] 147.8666 183.7651 71.79703 252s [2,] 127.7811 183.7651 91.88257 252s [3,] 127.7811 163.6796 111.96811 252s attr(,"accuracy") 252s [1] 1.774935e-13 252s > (m1TO <- expm(T1, method="TaylorO")) 252s [,1] [,2] [,3] 252s [1,] 147.8666 183.7651 71.79703 252s [2,] 127.7811 183.7651 91.88257 252s [3,] 127.7811 163.6796 111.96811 252s attr(,"accuracy") 252s [1] 1.774935e-13 252s > ## True Eigenvalue Decomposition of T1 252s > s2 <- sqrt(2) 252s > eV1 <- matrix(c(s2,s2,s2, -2,1,1, 2,-1,-1) / sqrt(6), 252s + 3,3) 252s > L1 <- diag(lm1 <- c(6, 3, 3)) 252s > stopifnot( 252s + all.equal(eV1 %*% L1, T1 %*% eV1, tolerance=1e-15) 252s + ) 252s > ## However, eV1 is not orthogonal, but of rank 2 252s > 252s > if(FALSE) { ## require("Rmpfr")) { ## 200 bit precision version of that 252s + S2 <- sqrt(mpfr(2,200)) 252s + E1 <- c(S2,S2,S2, -2,1,1, 2,-1,-1) / sqrt(mpfr(6,200)) 252s + dim(E1) <- c(3,3) 252s + print(E1 %*% L1) 252s + print(E1) 252s + } 252s > 252s > ## "true" result 252s > m1.t <- matrix(c(147.866622446369, 127.781085523181, 127.781085523182, 252s + 183.765138646367, 183.765138646366, 163.679601723179, 252s + 71.797032399996, 91.8825693231832, 111.968106246371), 3,3) 252s > stopifnot(all.equal(m1.t, m1, check.attributes=FALSE, tolerance = 1e-13), 252s + all.equal(m1.t, m1O, check.attributes=FALSE, tolerance = 1e-13), 252s + all.equal(m1.t,m1T, check.attributes=FALSE, tolerance = 1e-13), 252s + all.equal(m1.t,m1TO, check.attributes=FALSE, tolerance = 1e-13), 252s + all.equal(m1.t, expm(T1,"Ward77"), tolerance = 1e-13), 252s + all.equal(m1.t, expm(T1,"R_Pade"), tolerance = 1e-13), 252s + all.equal(m1.t, expm(T1,"R_Ward77"), tolerance = 1e-13)) 252s > ## -- these agree with ward (1977, p608) 252s > ## 252s > m1.2 <- try( expm(T1, "R_Eigen") ) ## 32-bit: gives an error from solve; 64-bit "ok" 252s > if(!inherits(m1.2, "try-error")) { 252s + if(FALSE)## with libatlas R_Eigen is "sehr eigen" 252s + stopifnot(all.equal(m1.t, m1.2, check.attributes=FALSE)) 252s + ## but it's less accurate: 252s + print( all.equal(m1.t, m1.2, check.attributes=FALSE, tolerance= 1e-12)) 252s + ##-> rel.diff = 6.44e-10 / 6.2023e-10 252s + ##__ BUT 0.1228099 252s + ##__ with libatlas (ubuntu 12.04 libatlas-base-dev Version: 3.8.4-3build1) 252s + } 252s [1] "Mean relative difference: 0.07815844" 252s > 252s > ## 252s > ## ---------------------------- 252s > ## Test case 2 from Ward (1977) 252s > ## ---------------------------- 252s > T2 <- t(matrix(c( 252s + 29.87942128909879, .7815750847907159, -2.289519314033932, 252s + .7815750847907159, 25.72656945571064, 8.680737820540137, 252s + -2.289519314033932, 8.680737820540137, 34.39400925519054), 252s + 3, 3)) 252s > (m2 <- expm(T2, method="Pade")) 252s [,1] [,2] [,3] 252s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 252s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 252s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 252s attr(,"accuracy") 252s [1] 13550 252s > ## [,1] [,2] [,3] 252s > ##[1,] 5496313853692357 -18231880972009844 -30475770808580828 252s > ##[2,] -18231880972009852 60605228702227024 101291842930256144 252s > ##[3,] -30475770808580840 101291842930256144 169294411240859072 252s > ## -- which agrees with Ward (1977) to 13 significant figures 252s > (m2O <- expm(T2, method="PadeO")) 252s [,1] [,2] [,3] 252s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 252s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 252s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 252s attr(,"accuracy") 252s [1] 13550 252s > (m2T <- expm(T2,method="Taylor")) 252s [,1] [,2] [,3] 252s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 252s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 252s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 252s attr(,"accuracy") 252s [1] 6 252s > (m2TO <- expm(T2,method="TaylorO")) 252s [,1] [,2] [,3] 252s [1,] 5.496314e+15 -1.823188e+16 -3.047577e+16 252s [2,] -1.823188e+16 6.060523e+16 1.012918e+17 252s [3,] -3.047577e+16 1.012918e+17 1.692944e+17 252s attr(,"accuracy") 252s [1] 6 252s > 252s > m2.t <- matrix(c(5496313853692216, -18231880972008932, -30475770808579672, 252s + -18231880972008928, 60605228702222480, 101291842930249776, 252s + -30475770808579672, 101291842930249808, 169294411240850528), 252s + 3, 3) 252s > 252s > ## -- in this case a very similar degree of accuracy -- even Taylor is ok 252s > stopifnot(all.equal(m2.t, m2, check.attributes=FALSE, tolerance = 1e-12), 252s + all.equal(m2.t, m2O,check.attributes=FALSE, tolerance = 1e-12), 252s + all.equal(m2.t,m2T, check.attributes=FALSE, tolerance = 1e-12), 252s + all.equal(m2.t,m2TO,check.attributes=FALSE, tolerance = 1e-12), 252s + all.equal(m2.t, expm(T2,"Ward77"), tolerance = 1e-12), 252s + all.equal(m2.t, expm(T2,"R_Ward77"), tolerance = 1e-12), 252s + all.equal(m2.t, expm(T2,"R_Pade"), tolerance = 1e-12), 252s + TRUE) 252s > 252s > ## ---------------------------- 252s > ## Test case 3 from Ward (1977) 252s > ## ---------------------------- 252s > T3 <- t(matrix(c( 252s + -131, 19, 18, 252s + -390, 56, 54, 252s + -387, 57, 52), 3, 3)) 252s > (m3 <- expm(T3, method="Pade")) 252s [,1] [,2] [,3] 252s [1,] -1.509644 0.3678794 0.1353353 252s [2,] -5.632571 1.4715178 0.4060058 252s [3,] -4.934938 1.1036383 0.5413411 252s attr(,"accuracy") 252s [1] 1.267564e-10 252s > ## [,1] [,2] [,3] 252s > ##[1,] -1.5096441587713636 0.36787943910439874 0.13533528117301735 252s > ##[2,] -5.6325707997970271 1.47151775847745725 0.40600584351567010 252s > ##[3,] -4.9349383260294299 1.10363831731417195 0.54134112675653534 252s > ## -- agrees to 10dp with Ward (1977), p608. 252s > (m3O <- expm(T3, method="PadeO")) 252s Loading required package: tools 252s [,1] [,2] [,3] 252s [1,] -1.509644 0.3678794 0.1353353 252s [2,] -5.632571 1.4715178 0.4060058 252s [3,] -4.934938 1.1036383 0.5413411 252s attr(,"accuracy") 252s [1] 1.267564e-10 252s > (m3T <- expm(T3,method="Taylor")) 252s [,1] [,2] [,3] 252s [1,] -1.509644 0.3678794 0.1353353 252s [2,] -5.632571 1.4715178 0.4060058 252s [3,] -4.934938 1.1036383 0.5413411 252s attr(,"accuracy") 252s [1] 0 252s > (m3TO <- expm(T3,method="TaylorO")) 252s [,1] [,2] [,3] 252s [1,] -1.509644 0.3678794 0.1353353 252s [2,] -5.632571 1.4715178 0.4060058 252s [3,] -4.934938 1.1036383 0.5413411 252s attr(,"accuracy") 252s [1] 0 252s > 252s > m3.t <- matrix(c(-1.50964415879218, -5.6325707998812, -4.934938326092, 252s + 0.367879439109187, 1.47151775849686, 1.10363831732856, 252s + 0.135335281175235, 0.406005843524598, 0.541341126763207), 252s + 3,3) 252s > 252s > stopifnot(all.equal(m3.t, m3, check.attributes=FALSE, tolerance = 3e-11), 252s + # ^^^^^ 252s + # 1.2455e-11 for libatlas (above) 252s + all.equal(m3.t, m3T, check.attributes=FALSE, tolerance = 1e-11), 252s + all.equal(m3.t, m3O, check.attributes=FALSE, tolerance = 8e-11),# M1: 1.39e-11 252s + all.equal(m3.t, m3TO, check.attributes=FALSE, tolerance = 1e-11), 252s + all.equal(m3.t, expm(T3,"R_Eigen"), tolerance = 1e-11), 252s + all.equal(m3.t, expm(T3,"Ward77"), tolerance = 1e-11), 252s + all.equal(m3.t, expm(T3,"R_Ward"), tolerance = 1e-11), 252s + all.equal(m3.t, expm(T3,"R_Pade"), tolerance = 1e-11), 252s + TRUE) 252s > ## -- in this case, a similar level of agreement with Ward (1977). 252s > 252s > ##-------- expm() ------------------- 252s > 252s > z3 <- T3 * (1 + 1i) 252s > Lz3 <- expmAll(z3) 252s > str(Lz3) 252s List of 13 252s $ Higham08.b : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 252s $ Higham08 : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 252s $ AlMohy-Hi09 : chr "matexp_MH09(.) is _not yet_ implemented for complex matrices" 252s $ Ward77 : chr "invalid argument: not a numeric matrix" 252s $ PadeRBS : chr "expm(, method='PadeRBS') is not (yet) implemented" 252s $ Pade : chr "expm(, method='Pade') is not (yet) implemented" 252s $ Taylor : chr "expm(, method='Taylor') is not (yet) implemented" 252s $ PadeO : chr "expm(, method='PadeO') is not (yet) implemented" 252s $ TaylorO : chr "expm(, method='TaylorO') is not (yet) implemented" 252s $ R_Eigen : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 252s $ R_Pade : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 252s $ R_Ward77 : cplx [1:3, 1:3] -0.427+1.3i -1.878+4.82i -1.113+4.26i ... 252s $ hybrid_Eigen_Ward: chr "invalid argument: not a numeric matrix" 252s > Lz3. <- Lz3[.methComplex] 252s > str(allEq(Lz3., tol=0)) # -> max seen (Lnx 64): 1.3376e-12 252s List of 4 252s $ Higham08: chr "Mean relative Mod difference: 1.501078e-12" 252s $ R_Eigen : chr "Mean relative Mod difference: 1.930389e-13" 252s $ R_Pade : chr "Mean relative Mod difference: 2.522483e-13" 252s $ R_Ward77: chr "Mean relative Mod difference: 6.756325e-13" 252s > stopifnot(unlist(allEq(Lz3.))) 252s > 252s > 252s > ## ---------------------------- 252s > ## Test case 4 from Ward (1977) 252s > ## ---------------------------- 252s > T4 <- 252s + array(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 1e-10, 252s + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252s + 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 252s + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 252s + 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 252s + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 252s + 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 252s + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 252s + 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 252s + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), 252s + dim = c(10, 10)) 252s > (m4 <- expm(T4, method="Pade")) 252s [,1] [,2] [,3] [,4] [,5] 252s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 252s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 252s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 252s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 252s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 252s [,6] [,7] [,8] [,9] [,10] 252s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 252s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 252s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 252s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 252s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 252s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s attr(,"accuracy") 252s [1] 6.023198e-15 252s > (m4O <- expm(T4, method="PadeO")) 252s [,1] [,2] [,3] [,4] [,5] 252s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 252s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 252s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 252s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 252s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 252s [,6] [,7] [,8] [,9] [,10] 252s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 252s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 252s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 252s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 252s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 252s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s attr(,"accuracy") 252s [1] 6.023198e-15 252s > (m4T <- expm(T4,method="Taylor")) 252s [,1] [,2] [,3] [,4] [,5] 252s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 252s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 252s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 252s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 252s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 252s [,6] [,7] [,8] [,9] [,10] 252s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 252s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 252s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 252s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 252s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 252s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s attr(,"accuracy") 252s [1] 2.505947e-18 252s > (m4TO <- expm(T4,method="TaylorO")) 252s [,1] [,2] [,3] [,4] [,5] 252s [1,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [2,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [3,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [4,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [5,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s [6,] 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 252s [7,] 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 2.480159e-15 252s [8,] 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 1.984127e-14 252s [9,] 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 1.388889e-13 252s [10,] 1.000000e-10 5.000000e-11 1.666667e-11 4.166667e-12 8.333333e-13 252s [,6] [,7] [,8] [,9] [,10] 252s [1,] 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 2.755732e-06 252s [2,] 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 2.480159e-05 252s [3,] 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 1.984127e-04 252s [4,] 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 1.388889e-03 252s [5,] 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 8.333333e-03 252s [6,] 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 4.166667e-02 252s [7,] 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 1.666667e-01 252s [8,] 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 5.000000e-01 252s [9,] 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 1.000000e+00 252s [10,] 1.388889e-13 1.984127e-14 2.480159e-15 2.755732e-16 1.000000e+00 252s attr(,"accuracy") 252s [1] 2.505947e-18 252s > 252s > ## ATLAS on BDR's gannet (Fedora 26; gcc-13; R-devel 2023-10-24) 252s > tol1 <- if(maybeATLAS) 4e-7 else 5e-15 # (m4, m4O) gave "Mean relative difference: 1.242879e-07" 252s > 252s > stopifnot(all.equal(m4 [,10], 1/gamma(10:1), tolerance=1e-14), 252s + all.equal(m4O [,10], 1/gamma(10:1), tolerance=1e-14), 252s + all.equal(m4T [,10], 1/gamma(10:1), tolerance=1e-14), 252s + all.equal(m4TO[,10], 1/gamma(10:1), tolerance=1e-14), 252s + all.equal(m4, m4O, check.attributes=FALSE, tolerance=tol1), 252s + all.equal(m4, m4T, check.attributes=FALSE, tolerance=tol1), 252s + all.equal(m4, m4TO,check.attributes=FALSE, tolerance=tol1), 252s + all.equal(m4, expm(T4,"Ward77"), check.attributes=FALSE, tolerance = 1e-14), 252s + all.equal(m4, expm(T4,"R_Ward"), check.attributes=FALSE, tolerance = 1e-14), 252s + all.equal(m4, expm(T4,"R_Pade"), check.attributes=FALSE, tolerance = 1e-14), 252s + max(abs(m4 - expm(T4,"R_Eigen"))) < 1e-7) 252s > ## here expm(., EV ) is accurate only to 7 d.p., whereas 252s > ## expm(.,Pade) is correct to at least 14 d.p. 252s > 252s > ### Test case with diagonalizable matrix with multiple Eigen values: 252s > A4 <- rbind(c(-1, 3, -1), 252s + c(-3, 5, -1), 252s + c(-3, 3, 1)) 252s > Ea4 <- eigen(A4) 252s > stopifnot(all.equal(Ea4$values, (lam4 <- c(2,2,1)))) 252s > ## However, the eigen values don't show the nice property: 252s > V4 <- Ea4$vectors 252s > crossprod(V4) 252s [,1] [,2] [,3] 252s [1,] 1.0000000 -0.6750957 -0.6903482 252s [2,] -0.6750957 1.0000000 0.9907611 252s [3,] -0.6903482 0.9907611 1.0000000 252s > ## i.e., they are *not* orthogonal 252s > ## but still diagonalize: 252s > stopifnot(all.equal(A4, 252s + V4 %*% diag(x=lam4) %*% solve(V4))) 252s > ## whereas this diagonalizes *and* looks nice 252s > W4 <- rbind(c(1, 1, -1), 252s + c(1, 1, 0), 252s + c(1, 0, 3)) 252s > (sW4 <- solve(W4)) 252s [,1] [,2] [,3] 252s [1,] 3 -3 1 252s [2,] -3 4 -1 252s [3,] -1 1 0 252s > assert.EQ(diag(x = c(1,2,2)), solve(W4) %*% A4 %*% W4, giveRE=TRUE) 252s > assert.EQ(A4, logm(expm(A4)), tol = 3e-13, giveRE=TRUE) 252s Mean relative difference: 3.240794e-15 252s > ## seen 5.5e-14 with R's own matprod 252s > 252s 252s R version 4.4.3 (2025-02-28) -- "Trophy Case" 252s Copyright (C) 2025 The R Foundation for Statistical Computing 252s Platform: s390x-ibm-linux-gnu 252s 252s R is free software and comes with ABSOLUTELY NO WARRANTY. 252s You are welcome to redistribute it under certain conditions. 252s Type 'license()' or 'licence()' for distribution details. 252s 252s R is a collaborative project with many contributors. 252s Type 'contributors()' for more information and 252s 'citation()' on how to cite R or R packages in publications. 252s 252s Type 'demo()' for some demos, 'help()' for on-line help, or 252s 'help.start()' for an HTML browser interface to help. 252s Type 'q()' to quit R. 252s 252s > 252s > #### Example matrices from the Matlab demos // expAtv() examples 252s > 252s > library(expm) 252s Loading required package: Matrix 253s 253s Attaching package: ‘expm’ 253s 253s > 253s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 253s The following object is masked from ‘package:Matrix’: 253s 253s expm 253s 253s Loading required package: tools 253s > ## -> assertError(), .., expmAll(), allEq(), doExtras 253s > 253s > ## --- 1 --- 253s > ## Here, all three {eigen; Taylor; Pade(Scaling & Squaring)} should do well 253s > 253s > A1 <- rbind(0:2, 253s + c(0.5, 0, 1), 253s + 2:0) 253s > A1 253s [,1] [,2] [,3] 253s [1,] 0.0 1 2 253s [2,] 0.5 0 1 253s [3,] 2.0 1 0 253s > ml1 <- lapply(c(4:10,20), 253s + function(order) expm(A1, "Pade", order=order)) 253s > for(k in seq_len(length(ml1) - 1)) 253s + stopifnot(all.equal(ml1[[k]], ml1[[k + 1]], tolerance = 1e-12)) 253s > 253s > for(k in seq_len(length(ml1) - 1)) { 253s + print(all.equal(ml1[[k]], ml1[[k + 1]], tolerance = 0)) 253s + } 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 28.51997 >" 253s [2] "Mean relative difference: 1.084305e-14" 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.745486 >" 253s [2] "Mean relative difference: 4.548568e-15" 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.1987097 >" 253s [2] "Mean relative difference: 5.708683e-15" 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.1200362 >" 253s [2] "Mean relative difference: 2.860084e-15" 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.698739 >" 253s [2] "Mean relative difference: 7.557974e-15" 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.6776293 >" 253s [2] "Mean relative difference: 2.883057e-15" 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 0.708767 >" 253s [2] "Mean relative difference: 4.561152e-15" 253s > 253s > mA1 <- ml1[[4]] 253s > stopifnot(all.equal(mA1, 253s + matrix(c(5.3090812852106, 2.8087900904073, 5.1737460019740, 253s + 4.0012030182399, 2.8845155413486, 4.0012030182399, 253s + 5.5778402926177, 3.1930144369526, 5.7131755758543), 253s + 3, 3), 253s + check.attributes = FALSE, tolerance = 1e-11)) 253s > 253s > 253s > ## --- 2 --- 253s > ## Here, Taylor "fails": 253s > 253s > ## A matrix where the terms in the Taylor series become very large 253s > ## before they go to zero. 253s > A2 <- rbind(c(-147, 72), 253s + c(-192, 93)) 253s > A2 253s [,1] [,2] 253s [1,] -147 72 253s [2,] -192 93 253s > 253s > (mA2 <- expm(A2, method="Pade")) 253s [,1] [,2] 253s [1,] -0.09957414 0.0746806 253s [2,] -0.19914827 0.1493612 253s attr(,"accuracy") 253s [1] 1.619931e-12 253s > stopifnot(all.equal(mA2, 253s + matrix(c(-0.099574136735459, -0.199148273470915, 253s + 0.074680602551593 , 0.149361205103183), 253s + 2, 2), check.attributes = FALSE, tolerance = 1e-11)) 253s > mA2.T <- expm(A2, method = "Taylor") 253s > stopifnot(all.equal(mA2, mA2.T, tolerance=1e-10)) 253s > all.equal(mA2, mA2.T, tolerance=1e-14)#-> 3.2e-12 {MM: I think that's pretty good} 253s [1] "Attributes: < Component “accuracy”: Mean relative difference: 1 >" 253s [2] "Mean relative difference: 5.022335e-12" 253s > 253s > ## Try all methods -------------------------------------- 253s > (meths <- eval(formals(expm)$method)) # >= 13 .. 253s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" 253s [4] "Ward77" "PadeRBS" "Pade" 253s [7] "Taylor" "PadeO" "TaylorO" 253s [10] "R_Eigen" "R_Pade" "R_Ward77" 253s [13] "hybrid_Eigen_Ward" 253s > L2 <- expmAll(A2) 253s > str(L2) 253s List of 13 253s $ Higham08.b : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ Higham08 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ AlMohy-Hi09 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ Ward77 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ PadeRBS : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ Pade : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s ..- attr(*, "accuracy")= num 1.62e-12 253s $ Taylor : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s ..- attr(*, "accuracy")= num 0 253s $ PadeO : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s ..- attr(*, "accuracy")= num 1.62e-12 253s $ TaylorO : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s ..- attr(*, "accuracy")= num 0 253s $ R_Eigen : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ R_Pade : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ R_Ward77 : num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s $ hybrid_Eigen_Ward: num [1:2, 1:2] -0.0996 -0.1991 0.0747 0.1494 253s > str(allEq(L2, tol=0)) # -> max seen (Lnx 64): 2.7227e-12 253s List of 12 253s $ Higham08 : logi TRUE 253s $ AlMohy-Hi09 : chr "Mean relative difference: 7.621625e-14" 253s $ Ward77 : chr "Mean relative difference: 1.647503e-13" 253s $ PadeRBS : chr "Mean relative difference: 1.70803e-13" 253s $ Pade : chr "Mean relative difference: 2.308548e-12" 253s $ Taylor : chr "Mean relative difference: 2.713787e-12" 253s $ PadeO : chr "Mean relative difference: 2.308548e-12" 253s $ TaylorO : chr "Mean relative difference: 2.713787e-12" 253s $ R_Eigen : chr "Mean relative difference: 5.58813e-14" 253s $ R_Pade : chr "Mean relative difference: 3.875056e-13" 253s $ R_Ward77 : chr "Mean relative difference: 5.790152e-13" 253s $ hybrid_Eigen_Ward: chr "Mean relative difference: 5.58813e-14" 253s > stopifnot(unlist(allEq(L2))) 253s > 253s > ## --- 3 --- 253s > ## Here, Eigenvalues must fail ("not a full set"): 253s > A3 <- rbind(c(-1, 1), 253s + c(0, -1)) 253s > (mA3 <- expm(A3, method="Pade")) 253s [,1] [,2] 253s [1,] 0.3678794 0.3678794 253s [2,] 0.0000000 0.3678794 253s attr(,"accuracy") 253s [1] 1.665335e-16 253s > assertError(expm(mA3, method="R_Eigen"), verbose=TRUE) 253s > em1 <- exp(-1) 253s > stopifnot(all.equal(mA3, ## and the exact solution: 253s + matrix(c(em1, 0, em1, em1), 2, 2), 253s + check.attributes = FALSE, tolerance = 1e-14)) 253s > 253s > ## using 'eps' instead of 0 : 253s > ## ---> see m2ex3() etc in ./exact-ex.R 253s > 253s > L3 <- expmAll(A3) 253s > str(L3) # R_Eigen -- ".. computationally singular .." 253s List of 13 253s $ Higham08.b : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ Higham08 : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ AlMohy-Hi09 : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ Ward77 : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ PadeRBS : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ Pade : num [1:2, 1:2] 0.368 0 0.368 0.368 253s Asserted error: system is computationally singular: reciprocal condition number = 1.11022e-16 253s ..- attr(*, "accuracy")= num 1.67e-16 253s $ Taylor : num [1:2, 1:2] 0.368 0 0.368 0.368 253s ..- attr(*, "accuracy")= num 0 253s $ PadeO : num [1:2, 1:2] 0.368 0 0.368 0.368 253s ..- attr(*, "accuracy")= num 1.67e-16 253s $ TaylorO : num [1:2, 1:2] 0.368 0 0.368 0.368 253s ..- attr(*, "accuracy")= num 0 253s $ R_Eigen : chr "system is computationally singular: reciprocal condition number = 1.11022e-16" 253s $ R_Pade : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ R_Ward77 : num [1:2, 1:2] 0.368 0 0.368 0.368 253s $ hybrid_Eigen_Ward: num [1:2, 1:2] 0.368 0 0.368 0.368 253s > L3. <- L3[names(L3) != "R_Eigen"] 253s > str(allEq(L3., tol=0)) # -> max seen (Lnx 64): AlMohy-Hi09 -- ".. rel.diff.: 4.8188e-9" 253s List of 11 253s $ Higham08 : logi TRUE 253s $ AlMohy-Hi09 : chr "Mean relative difference: 4.818844e-09" 253s $ Ward77 : chr "Mean relative difference: 1.50895e-16" 253s $ PadeRBS : logi TRUE 253s $ Pade : chr "Mean relative difference: 2.112529e-15" 253s $ Taylor : chr "Mean relative difference: 2.112529e-15" 253s $ PadeO : chr "Mean relative difference: 2.112529e-15" 253s $ TaylorO : chr "Mean relative difference: 2.112529e-15" 253s $ R_Pade : chr "Mean relative difference: 7.544748e-16" 253s $ R_Ward77 : logi TRUE 253s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.50895e-16" 253s > stopifnot(unlist(allEq(L3., tol = 2e-8))) 253s > 253s > 253s > 253s > ## --- 4 --- 253s > ## Here, some version of do_expm() failed: 253s > (m <- matrix(c(0,2:0),2)) 253s [,1] [,2] 253s [1,] 0 1 253s [2,] 2 0 253s > ## Eigenvalue decomposition: 253s > d <- c(sqrt(2), -sqrt(2)) 253s > V <- rbind(c(sqrt(1/3), -sqrt(1/3)), 253s + c(sqrt(2/3), sqrt(2/3))) 253s > ## ==> 253s > IV <- rbind(c( sqrt(3/4), sqrt(3/8)), 253s + c(-sqrt(3/4), sqrt(3/8))) 253s > V.IV <- V %*% IV 253s > all.equal(V.IV, diag(2), tolerance=0) 253s [1] "Mean relative difference: 1.328505e-16" 253s > stopifnot(all.equal(V.IV, diag(2))) 253s > em.true <- V %*% (exp(d) * IV) 253s > all.equal(em.true, expm::expm(m), tolerance=0) 253s [1] "Mean relative difference: 1.767004e-16" 253s > stopifnot(all.equal(em.true, expm::expm(m)), 253s + all.equal(em.true, expm::expm(m,"Pade"), check.attributes=FALSE)) 253s > 253s > L4 <- expmAll(m) 253s > str(L4) 253s List of 13 253s $ Higham08.b : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ Higham08 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ AlMohy-Hi09 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ Ward77 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ PadeRBS : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ Pade : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s ..- attr(*, "accuracy")= num 1.92e-14 253s $ Taylor : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s ..- attr(*, "accuracy")= num 3.08e-15 253s $ PadeO : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s ..- attr(*, "accuracy")= num 1.92e-14 253s $ TaylorO : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s ..- attr(*, "accuracy")= num 3.08e-15 253s $ R_Eigen : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ R_Pade : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ R_Ward77 : num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s $ hybrid_Eigen_Ward: num [1:2, 1:2] 2.18 2.74 1.37 2.18 253s > str(allEq(L4, tol=0)) # -> max seen (Lnx 64): AlMohy-Hi09 -- rel.diff.: 3.575281e-8 253s List of 12 253s $ Higham08 : logi TRUE 253s $ AlMohy-Hi09 : chr "Mean relative difference: 3.575281e-08" 253s $ Ward77 : chr "Mean relative difference: 2.624249e-16" 253s $ PadeRBS : chr "Mean relative difference: 3.673948e-16" 253s $ Pade : chr "Mean relative difference: 2.099399e-15" 253s $ Taylor : chr "Mean relative difference: 2.151884e-15" 253s $ PadeO : chr "Mean relative difference: 2.099399e-15" 253s $ TaylorO : chr "Mean relative difference: 2.151884e-15" 253s $ R_Eigen : chr "Mean relative difference: 1.878294e-16" 253s $ R_Pade : chr "Mean relative difference: 6.035772e-16" 253s $ R_Ward77 : chr "Mean relative difference: 6.035772e-16" 253s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.836974e-16" 253s > stopifnot(unlist(allEq(L4, tol = 1e-7))) 253s > L4n09 <- L4[names(L4) != "AlMohy-Hi09"] 253s > str(allEq(L4n09, tol=0)) # -> max seen (Lnx 64): 2.8625e-15 253s List of 11 253s $ Higham08 : logi TRUE 253s $ Ward77 : chr "Mean relative difference: 2.624249e-16" 253s $ PadeRBS : chr "Mean relative difference: 3.673948e-16" 253s $ Pade : chr "Mean relative difference: 2.099399e-15" 253s $ Taylor : chr "Mean relative difference: 2.151884e-15" 253s $ PadeO : chr "Mean relative difference: 2.099399e-15" 253s $ TaylorO : chr "Mean relative difference: 2.151884e-15" 253s $ R_Eigen : chr "Mean relative difference: 1.878294e-16" 253s $ R_Pade : chr "Mean relative difference: 6.035772e-16" 253s $ R_Ward77 : chr "Mean relative difference: 6.035772e-16" 253s $ hybrid_Eigen_Ward: chr "Mean relative difference: 1.836974e-16" 253s > stopifnot(unlist(allEq(L4n09, tol = 1e-13))) 253s > 253s > 253s > ###----------- expAtv() ---------------- 253s > 253s > ## Bug report, 8 Sep 2014 (R-forge Bugs item #5919), by: Peter Ralph 253s > stopifnot(expAtv(A3, v=c(0,0))$eAtv == 0) 253s > 253s > 253s > n <- 500 253s > A <- bandSparse(n,n, -1:1, diagonals = list(-(2:n), -5*(1:n), 1:(n-1))) 253s > v <- 100*(n:1) 253s > t.v <- showSys.time(rr <- expAtv(A, v=v)) 253s Time user system elapsed 253s Time 0.200 0.009 0.202 253s > if(doExtras) { ## this is an order of magnitude slower : 253s + t.A <- system.time(w. <- (eA <- expm(A, "Higham08")) %*% v) 253s + stopifnot(all.equal(rr$eAtv, as.numeric(w.))) 253s + print( mean((t.A / t.v)[c(1,3)]) )## 23.57 {nb-mm3}; 21.0 {lynne} 253s + } 253s > 253s > 253s > ## Bug report on R-forge by Peter Ralph (petrelharp) 253s > ## If the entries of A are less than about 1e-8, then expAtv(A,v) fails 253s > ## with Error: length(d <- dim(x)) == 2 is not TRUE 253s > ## ... an error that comes from expm, because it has got a 1x1 matrix. (I can't tell why this causes an error; outside of expAtv this doesn't cause an error...) 253s > 253s > ## To reproduce: 253s > 253s > ##' @title Compute several "scaled" versions of e^{At} v : 253s > ##' @param A n x n matrix 253s > ##' @param v n vector 253s > ##' @param s vector of scales 253s > ##' @return list of expAtv() results 253s > ##' @author Martin Maechler, based on Peter Ralph's idea: 253s > scl.e.Atv <- function(A, v, s) { 253s + c(list(I = expAtv(A, v)), 253s + unlist(lapply(s, function(l) { 253s + ## cat(sprintf(" %7g\n", l)) 253s + list(lA = expAtv(l*A, v), lAI = expAtv(l*A, v, t=1/l)) 253s + }), recursive = FALSE)) 253s + } 253s > 253s > A <- matrix( 1:9, nrow=3 )/8 253s > v <- rep(1,3) 253s > sc <- 4^c(-500, -200, -100, -5*(15:6), -2*(14:9), -17:15) 253s > ## 10^9 is too large => expm() "overflow" NaN 253s > r <- scl.e.Atv(A,v, s = sc) # at least without error 253s > (eAv <- t(sapply(r, `[[`, "eAtv"))) 253s [,1] [,2] [,3] 253s I 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000000e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000000e+00 1.000000e+00 1.000001e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000001e+00 1.000002e+00 1.000002e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000006e+00 1.000007e+00 1.000009e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000023e+00 1.000029e+00 1.000034e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000092e+00 1.000114e+00 1.000137e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.000366e+00 1.000458e+00 1.000549e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.001466e+00 1.001833e+00 1.002199e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.005883e+00 1.007353e+00 1.008823e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.023819e+00 1.029765e+00 1.035711e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.100054e+00 1.124924e+00 1.149795e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 1.490149e+00 1.610098e+00 1.730046e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 5.914433e+00 7.068231e+00 8.222030e+00 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 2.405492e+03 2.955530e+03 3.505568e+03 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 7.592135e+13 9.328559e+13 1.106498e+14 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 7.535331e+55 9.258764e+55 1.098220e+56 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA 7.312333e+223 8.984763e+223 1.065719e+224 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN Inf 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s lA NaN NaN NaN 253s lAI 5.914433e+00 7.068231e+00 8.222030e+00 253s > ## Ensure that indeed expAtv(A, v) =.= expAtv(e*A, v, 1/e) for e > 0 253s > ## ----- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 253s > eAv[1,] 253s [1] 5.914433 7.068231 8.222030 253s > assert.EQ.mat(unname( eAv[rep(1, length(sc)), ]), 253s + unname( eAv[1+2*seq_along(sc), ] ), tol = 1e-14) 253s > # 64-bit lynne: 2.7e-16 !! 253s > 253s > sc.Atv <- function(A,v, s) { 253s + vapply(s, function(l) expAtv(l*A, v, t=1/l)$eAtv, v) 253s + } 253s > 253s > chk.sc.Atv <- function(A,v, s, tol=1e-15) { 253s + r <- vapply(s, function(l) expAtv(l*A, v, t=1/l)$eAtv, v) 253s + I <- expAtv(A,v)$eAtv 253s + if (!isTRUE(eq <- all.equal(as.vector(r), rep(I, length(s)), tolerance = tol))) 253s + stop("not all.equal() |-> ", eq) 253s + } 253s > 253s > chk.sc.Atv(A,v, sc, tol=1e-14) 253s > ## for information: see the precision: 253s > tryCatch( chk.sc.Atv(A,v, sc, tol= 0), error=identity)$message 253s [1] "not all.equal() |-> Mean relative difference: 1.501714e-16" 253s > 253s > 253s > A0 <- matrix( c(-3,1,2,1,-2,1,0,1,-1), nrow=3, byrow=TRUE) 253s > A1 <- A0 + 1e-16*rnorm(9) 253s > ## These two also failed originally 253s > chk.sc.Atv(A0, v=10^(1:3), s=sc, tol=1e-14) 253s > chk.sc.Atv(A1, v=rep(1,3), s=sc, tol=1e-14) 253s > 253s > set.seed(17) 253s > S <- rSpMatrix(29, density = 1/64) 253s > v <- round(100*rnorm(nrow(S))) 253s > if(FALSE) ## Error in balance(baP$z, "S") : 253s + ## BLAS/LAPACK routine 'DGEBAL' gave error code -3 253s + chk.sc.Atv(S/64, v, s=sc, tol=1e-14) 253s > if(FALSE) { 253s + ## after 253s + debug(chk.sc.Atv) 253s + ## this is revealing: 253s + image(as(relErrV(I, r),"sparseMatrix")) 253s + ## ==> 253s + sc[28:29] # are giving the largest differences 253s + } 253s > 253s 253s R version 4.4.3 (2025-02-28) -- "Trophy Case" 253s Copyright (C) 2025 The R Foundation for Statistical Computing 253s Platform: s390x-ibm-linux-gnu 253s 253s R is free software and comes with ABSOLUTELY NO WARRANTY. 253s You are welcome to redistribute it under certain conditions. 253s Type 'license()' or 'licence()' for distribution details. 253s 253s R is a collaborative project with many contributors. 253s Type 'contributors()' for more information and 253s 'citation()' on how to cite R or R packages in publications. 253s 253s Type 'demo()' for some demos, 'help()' for on-line help, or 253s 'help.start()' for an HTML browser interface to help. 253s Type 'q()' to quit R. 253s 254s > #### Examples where we know the result "exactly" 254s > 254s > library(expm) 254s Loading required package: Matrix 254s 254s Attaching package: ‘expm’ 254s 254s The following object is masked from ‘package:Matrix’: 254s 254s expm 254s 254s > 254s > options(digits = 4, width = 99, keep.source = FALSE) 254s > 254s > mSource <- function(file, ...) 254s + source(system.file(file, ..., package = "expm", mustWork=TRUE)) 254s > mSource("test-tools.R")## -> assertError(), rMat(), .. doExtras 254s Loading required package: tools 254s > mSource("demo", "exact-fn.R")# -> nilA3(), facMat(), m2ex3(), .... 254s > doExtras 254s [1] FALSE 254s > 254s > re.nilA3 <- function(xyz, EXPMlist) 254s + { 254s + stopifnot(is.list(EXPMlist)) 254s + r <- do.call(nilA3, as.list(xyz)) 254s + sapply(EXPMlist, function(Efn) relErr(r$expA, Efn(r$A))) 254s + } 254s > 254s > re.facMat <- function(n, EXPMlist, rFUN = rnorm, ...) 254s + { 254s + stopifnot(is.list(EXPMlist)) 254s + r <- facMat(n, rFUN, ...) 254s + vapply(EXPMlist, function(EXPM) { 254s + ct <- system.time(E <- EXPM(r$A), gcFirst = FALSE)[[1]] 254s + c(relErr = relErr(r$expA, E), c.time = ct) 254s + }, double(2)) 254s + } 254s > 254s > re.m2ex3 <- function(eps, EXPMlist) 254s + { 254s + stopifnot(is.list(EXPMlist)) 254s + r <- m2ex3(eps) 254s + sapply(EXPMlist, function(EXPM) relErr(r$expA, EXPM(r$A))) 254s + } 254s > 254s > ## check 1x1 matrices 254s > stopifnot( 254s + ## these had failed before 2017-03-28 (= Liselotte's 58-th birthday): 254s + all.equal(as.matrix(sqrtm(matrix(4))), matrix(2)) , 254s + all.equal(as.matrix(logm (matrix(pi))), matrix(log(pi))) , 254s + ## these had "always" worked : 254s + all.equal(as.matrix(expm (matrix(0))), matrix(1)) , 254s + all.equal(as.matrix(expm (matrix(1))), matrix(exp(1))) 254s + ) 254s > 254s > 254s > set.seed(321) 254s > re <- replicate(1000, 254s + c(re.nilA3(rlnorm(3),list(function(x)expm(x,"Pade"))), 254s + re.nilA3(rnorm(3), list(function(x)expm(x,"Pade"))))) 255s > 255s > summary(t(re)) 255s V1 V2 255s Min. :0.00e+00 Min. :0.00e+00 255s 1st Qu.:0.00e+00 1st Qu.:0.00e+00 255s Median :2.90e-17 Median :1.60e-17 255s Mean :4.42e-16 Mean :1.93e-16 255s 3rd Qu.:6.80e-17 3rd Qu.:4.20e-17 255s Max. :2.11e-14 Max. :4.60e-15 255s > stopifnot(rowMeans(re) < 1e-15, 255s + apply(re, 1, quantile, 0.80) < 1e-16, 255s + apply(re, 1, quantile, 0.90) < 2e-15, 255s + apply(re, 1, max) < c(4e-14, 6e-15)) 255s > 255s > showProc.time() 255s Time (user system elapsed): 0.306 0.018 0.332 255s > 255s > ## Check *many* random nilpotent 3 x 3 matrices: 255s > set.seed(321) 255s > RE <- replicate(1000, 255s + c(re.nilA3(rlnorm(3), list(function(x) expm(x, "Ward77"))), 255s + re.nilA3(rnorm(3), list(function(x) expm(x, "Ward77"))))) 255s > stopifnot(rowMeans(RE) < 1e-15, 255s + apply(RE, 1, quantile, 0.80) < 1e-16, 255s + apply(RE, 1, quantile, 0.90) < 2e-15, 255s + apply(RE, 1, max) < c(4e-14, 6e-15)) 255s > 255s > print(summary(t(RE))) 255s V1 V2 255s Min. :0.00e+00 Min. :0.00e+00 255s 1st Qu.:0.00e+00 1st Qu.:0.00e+00 255s Median :0.00e+00 Median :0.00e+00 255s Mean :1.61e-17 Mean :7.68e-18 255s 3rd Qu.:2.95e-17 3rd Qu.:9.51e-18 255s Max. :1.52e-16 Max. :1.50e-16 255s > epsC <- .Machine$double.eps 255s > cat("relErr(expm(.,Pade)) - relErr(expm(.,Ward77)) in Machine_eps units:\n") 255s relErr(expm(.,Pade)) - relErr(expm(.,Ward77)) in Machine_eps units: 255s > print(summary(c(re - RE)) / epsC) 255s Min. 1st Qu. Median Mean 3rd Qu. Max. 255s -0.56 0.00 0.00 1.38 0.16 94.98 255s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 255s > ## -0.6183442 0.0000000 0.0000000 1.3650410 0.1399719 94.9809161 255s > ## nb-mm3; ditto lynne (both x64), 2014-09-11: 255s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 255s > ## -0.8422 0.0000 0.0000 0.0725 0.1067 1.2205 255s > ## 32-bit [i686, florence, Linx 3.14.8-100.fc19..]: 255s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 255s > ## -0.62 0.00 0.00 1.36 0.14 95.93 255s > 255s > 255s > showProc.time() 255s Time (user system elapsed): 0.222 0.001 0.236 255s > 255s > ###--- A second group --- where we know the diagonalization of A --- 255s > 255s > if(!require("Matrix")) 255s + q('no') 255s > ## ------ the rest really uses 'Matrix' 255s > ##---> now use expm::expm() since Matrix has its own may mask the expm one 255s > ## ^^^^^^^^^^^^ 255s > 255s > (osV <- abbreviate(gsub("[^[:alnum:]]", '', sub("\\(.*", '', osVersion)), 12)) 255s UbuntuPluckyPuffin 255s "UbntPlckyPff" 255s > if(!dev.interactive(TRUE)) pdf(paste0("expm_exact-ex_", osV, ".pdf"), width = 9, height=5) 255s > ## 255s > myRversion <- paste(R.version.string, "--", osVersion) 255s > if((mach <- Sys.info()[["machine"]]) != "x86_64") 255s + myRversion <- paste0(myRversion, "_", mach) 255s > if(!capabilities("long.double")) 255s + myRversion <- paste0(myRversion, "_no_LDbl") 255s > myRversion 255s [1] "R version 4.4.3 (2025-02-28) -- Ubuntu Plucky Puffin (development branch)_s390x" 255s > ## in plots use mtext(myRversion, adj=1, cex=3/4) 255s > 255s > 255s > ## rMat() relies on Matrix::rcond(): 255s > ## Now with the change default rcondMin, this "works" 255s > R40 <- rMat(40) 255s > R80 <- rMat(80) 255s > showProc.time() 255s Time (user system elapsed): 0.088 0.001 0.09 255s > 255s > expm.safe.Eigen <- function(x, silent = FALSE) { 255s + r <- try(expm::expm(x, "R_Eigen"), silent = silent) 255s + if(inherits(r, "try-error")) NA else r 255s + } 255s > 255s > ## the S4 generic 255s > Matrix::expm 255s standardGeneric for "expm" defined from package "Matrix" 255s 255s function (x) 255s standardGeneric("expm") 255s 255s 255s Methods may be defined for arguments: x 255s Use showMethods(expm) for currently available ones. 255s > ## the dgeMatrix method - adapted to Matrix changes, had *more versatile* ..2dge() : 255s > expm.Matr.dge <- function(x) getDataPart(getMethod("expm", "dgeMatrix"))(Matrix::.m2dense(x)) 255s > 255s > expmList <- 255s + list(Matr = Matrix::expm, 255s + Matr.d = expm.Matr.dge, 255s + Ward = function(x) expm::expm(x, "Ward77"), 255s + Ward1b = function(x) expm::expm(x, "Ward77", preconditioning = "1bal"), 255s + RWard6 = function(x) expm::expm(x, "R_Ward77", order = 6), 255s + RWard7 = function(x) expm::expm(x, "R_Ward77", order = 7), 255s + RWard8 = function(x) expm::expm(x, "R_Ward77", order = 8), # default 255s + RWard9 = function(x) expm::expm(x, "R_Ward77", order = 9), 255s + s.P.s7 = function(x) expm::expm(x, "Pade", order = 7), 255s + s.POs7 = function(x) expm::expm(x, "PadeO",order = 7), 255s + s.P.s8 = function(x) expm::expm(x, "Pade" ,order = 8), # default 255s + s.POs8 = function(x) expm::expm(x, "PadeO",order = 8), # default 255s + s.P.s9 = function(x) expm::expm(x, "Pade", order = 9), 255s + s.POs9 = function(x) expm::expm(x, "PadeO",order = 9), 255s + s.P.sRBS = function(x) expm::expm(x, "PadeRBS"), 255s + Rs.P.s7 = function(x) expm::expm(x, "R_Pade", order = 7), 255s + Rs.P.s8 = function(x) expm::expm(x, "R_Pade", order = 8), # default 255s + Rs.P.s9 = function(x) expm::expm(x, "R_Pade", order = 9), 255s + sPs.H08. = function(x) expm:: expm.Higham08(x, balancing=FALSE), 255s + sPs.H08b = function(x) expm:: expm.Higham08(x, balancing= TRUE), 255s + ## AmHi09.06= function(x) expm:::expm.AlMoHi09(x, p = 6), 255s + AmHi09.07= function(x) expm:::expm.AlMoHi09(x, p = 7), 255s + AmHi09.08= function(x) expm:::expm.AlMoHi09(x, p = 8), # default -- really sub optimal 255s + AmHi09.09= function(x) expm:::expm.AlMoHi09(x, p = 9), 255s + AmHi09.10= function(x) expm:::expm.AlMoHi09(x, p = 10), 255s + AmHi09.11= function(x) expm:::expm.AlMoHi09(x, p = 11), 255s + AmHi09.12= function(x) expm:::expm.AlMoHi09(x, p = 12), 255s + AmHi09.13= function(x) expm:::expm.AlMoHi09(x, p = 13), 255s + s.T.s7 = function(x) expm::expm(x, "Taylor", order = 7), 255s + s.TOs7 = function(x) expm::expm(x, "TaylorO",order = 7), 255s + s.T.s8 = function(x) expm::expm(x, "Taylor", order = 8), # default 255s + s.TOs8 = function(x) expm::expm(x, "TaylorO",order = 8), # default 255s + s.T.s9 = function(x) expm::expm(x, "Taylor", order = 9), 255s + s.TOs9 = function(x) expm::expm(x, "TaylorO",order = 9), 255s + Eigen = expm.safe.Eigen, # "R_Eigen" 255s + hybrid = function(x) expm::expm(x, "hybrid") 255s + ) 255s > 255s > 255s > ## set.seed(12) 255s > ## facMchk <- replicate(if(doExtras) 100 else 20, facMat(20, rnorm)) 255s > set.seed(12) 255s > fRE <- replicate(if(doExtras) 100 else 20, 255s + re.facMat(20, expmList)) # if(doExtras) gives one "No Matrix found ..." warning 255s > nDig <- -log10(t(fRE["relErr",,])) 255s > cat("Number of correct decimal digits for facMat(20, rnorm):\n") 255s Number of correct decimal digits for facMat(20, rnorm): 255s > t(apply(nDig, 2, summary)) 255s Min. 1st Qu. Median Mean 3rd Qu. Max. 255s Matr 13.702 14.19 14.32 14.33 14.55 14.75 255s Matr.d 13.702 14.19 14.32 14.33 14.55 14.75 255s Ward 13.702 14.19 14.32 14.33 14.55 14.75 255s Ward1b 13.702 14.19 14.32 14.33 14.55 14.75 255s RWard6 13.226 13.82 14.02 13.96 14.13 14.30 255s RWard7 13.618 13.80 13.95 13.95 14.13 14.26 255s RWard8 13.355 13.80 13.90 13.93 14.11 14.32 255s RWard9 13.498 13.75 13.79 13.90 14.11 14.25 255s s.P.s7 12.654 13.14 13.24 13.27 13.46 13.69 255s s.POs7 12.654 13.14 13.24 13.27 13.46 13.69 255s s.P.s8 12.850 13.19 13.25 13.25 13.34 13.56 255s s.POs8 12.850 13.19 13.25 13.25 13.34 13.56 255s s.P.s9 12.790 13.10 13.24 13.25 13.43 13.63 255s s.POs9 12.790 13.10 13.24 13.25 13.43 13.63 255s s.P.sRBS 13.938 14.28 14.39 14.39 14.54 14.84 255s Rs.P.s7 13.425 13.76 13.87 13.91 14.04 14.33 255s Rs.P.s8 13.423 13.78 13.93 13.91 14.08 14.26 255s Rs.P.s9 13.436 13.74 13.91 13.90 14.06 14.32 255s sPs.H08. 14.569 14.81 14.96 14.92 15.02 15.16 255s sPs.H08b 14.569 14.88 14.97 14.95 15.03 15.16 255s AmHi09.07 8.618 10.09 10.54 11.03 12.36 13.39 255s AmHi09.08 9.782 11.27 11.72 12.19 13.55 14.39 255s AmHi09.09 12.000 13.90 14.22 14.08 14.66 15.00 255s AmHi09.10 13.434 14.55 14.75 14.67 14.91 15.00 255s AmHi09.11 14.501 14.67 14.91 14.86 14.99 15.13 255s AmHi09.12 14.501 14.67 14.91 14.86 14.99 15.13 255s AmHi09.13 14.501 14.67 14.91 14.86 14.99 15.13 255s s.T.s7 13.051 13.43 13.52 13.52 13.71 13.91 255s s.TOs7 13.051 13.43 13.52 13.52 13.71 13.91 255s s.T.s8 13.051 13.43 13.52 13.52 13.71 13.91 255s s.TOs8 13.051 13.43 13.52 13.52 13.71 13.91 255s s.T.s9 13.051 13.43 13.52 13.52 13.71 13.91 255s s.TOs9 13.051 13.43 13.52 13.52 13.71 13.91 255s Eigen 14.132 14.48 14.55 14.52 14.59 14.67 255s hybrid 14.155 14.47 14.56 14.52 14.57 14.67 255s > 255s > ## Now look at that: 255s > eaxis <- if(requireNamespace("sfsmisc")) sfsmisc::eaxis else axis 255s > op <- par(mar=.1 + c(5,4 + 1.5, 4,2)) 255s > boxplot(t(fRE["relErr",,]), log="x", xaxt="n", 255s + notch=TRUE, ylim = c(8e-16, 4e-9), 255s + horizontal=TRUE, las = 1, 255s + main = "relative errors for 'random' eigen-ok 20 x 20 matrix") 255s > eaxis(1); grid(lty = 3); mtext(myRversion, adj=1, cex=3/4) 255s > par(op) 255s > 255s > showProc.time() 255s Time (user system elapsed): 0.397 0.008 0.415 255s > 255s > if(doExtras) withAutoprint({ # also "large" n = 100 ------------------------------------------ 255s + str(rf100 <- replicate(20, re.facMat(100, expmList))) 255s + 1000*t(apply(rf100["c.time",,], 1, summary)) 255s + ## lynne {Linux 2.6.34.7-56.fc13.x86_64 --- AMD Phenom II X4 925}: 255s + ## Min. 1st Qu. Median Mean 3rd Qu. Max. 255s + ## Ward 23 24 24.5 24.4 25.0 25 255s + ## s.P.s 107 109 109.0 109.0 109.0 112 255s + ## s.POs 188 190 191.0 192.0 193.0 198 255s + ## s.P.sRBS 17 18 19.0 18.9 19.2 21 255s + ## sPs.H08. 15 17 18.0 17.6 18.0 19 255s + ## sPs.H08b 18 18 19.0 23.4 20.0 107 255s + ## s.T.s 44 45 45.0 45.6 46.0 48 255s + ## s.TOs 96 98 99.0 100.0 100.0 116 255s + ## Eigen 18 19 20.0 24.4 21.0 109 255s + ## hybrid 40 42 42.0 47.1 44.0 133 255s Loading required namespace: sfsmisc 255s Warning message: 255s In (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : 255s some notches went outside hinges ('box'): maybe set notch=FALSE 255s + 255s + nDig <- -log10(t(rf100["relErr",,])) 255s + cat("Number of correct decimal digits for facMat(100, rnorm):\n") 255s + t(apply(nDig, 2, summary)) 255s + 255s + ##--> take out the real slow ones for the subsequent tests: 255s + (not.slow <- grep("^s\\.[PT]", names(expmList), invert = TRUE, value = TRUE)) 255s + 255s + set.seed(18) ## 12 replicates is too small .. but then it's too slow otherwise: 255s + rf400 <- replicate(12, re.facMat(400, expmList[not.slow])) 255s + 255s + showProc.time() 255s + 1000*t(apply(rf400["c.time",,], 1, summary)) 255s + ## lynne: 255s + ## Min. 1st Qu. Median Mean 3rd Qu. Max. 255s + ## Ward 1740 1790 1830 1820 1860 1900 255s + ## s.P.sRBS 1350 1420 1440 1430 1450 1460 255s + ## sPs.H08. 1020 1030 1130 1140 1210 1290 255s + ## sPs.H08b 1120 1130 1220 1220 1300 1390 255s + ## Eigen 962 977 989 992 1000 1030 255s + ## hybrid 2740 2800 2840 2840 2890 2910 255s + 255s + nDig <- -log10(t(rf400["relErr",,])) 255s + cat("Number of correct decimal digits for (12 rep. of) facMat(400, rnorm):\n") 255s + t(apply(nDig, 2, summary)) 255s + 255s + }) else { # *not* (doExtras) ----------------------------------------------------------------- 255s + ## times (in millisec): 255s + print(1000*t(apply(fRE["c.time",,], 1, summary))) 255s + } 255s Min. 1st Qu. Median Mean 3rd Qu. Max. 255s Matr 0 0 0 0.00 0 0 255s Matr.d 0 0 0 0.50 0 10 255s Ward 0 0 0 0.00 0 0 255s Ward1b 0 0 0 0.00 0 0 255s RWard6 0 0 0 0.00 0 0 255s RWard7 0 0 0 0.45 0 9 255s RWard8 0 0 0 0.90 0 10 255s RWard9 0 0 0 0.00 0 0 255s s.P.s7 0 0 0 0.00 0 0 255s s.POs7 0 0 0 0.95 0 10 255s s.P.s8 0 0 0 0.00 0 0 255s s.POs8 0 0 0 0.50 0 10 255s s.P.s9 0 0 0 0.45 0 9 255s s.POs9 0 0 0 2.00 0 10 255s s.P.sRBS 0 0 0 0.00 0 0 255s Rs.P.s7 0 0 0 0.00 0 0 255s Rs.P.s8 0 0 0 0.00 0 0 255s Rs.P.s9 0 0 0 0.50 0 10 255s sPs.H08. 0 0 0 0.50 0 10 255s sPs.H08b 0 0 0 0.50 0 10 255s AmHi09.07 0 0 0 0.50 0 10 255s AmHi09.08 0 0 0 0.00 0 0 255s AmHi09.09 0 0 0 0.00 0 0 255s AmHi09.10 0 0 0 0.50 0 10 255s AmHi09.11 0 0 0 0.00 0 0 255s AmHi09.12 0 0 0 0.00 0 0 255s AmHi09.13 0 0 0 0.00 0 0 255s s.T.s7 0 0 0 0.50 0 10 255s s.TOs7 0 0 0 0.50 0 10 255s s.T.s8 0 0 0 0.50 0 10 255s s.TOs8 0 0 0 0.50 0 10 255s s.T.s9 0 0 0 0.45 0 9 255s s.TOs9 0 0 0 0.45 0 9 255s Eigen 0 0 0 0.00 0 0 255s hybrid 0 0 0 0.00 0 0 255s > 255s > ## Now try an example with badly conditioned "random" M matrix... 255s > ## ... 255s > ## ... (not yet -- TODO?) 255s > 255s > ### m2ex3() --- The 2x2 example with bad condition , see A3 in ./ex2.R 255s > 255s > RE <- re.m2ex3(1e-8, expmList) 255s > sort(RE)# Ward + both sps.H08 are best; s.P.s fair, Eigen (and hybrid): ~1e-9 255s RWard6 RWard7 RWard8 RWard9 s.P.sRBS sPs.H08. sPs.H08b Rs.P.s9 Matr 255s 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 5.030e-17 1.006e-16 255s Matr.d Ward Ward1b AmHi09.13 AmHi09.12 Rs.P.s7 Rs.P.s8 s.P.s8 s.POs8 255s 1.006e-16 1.006e-16 1.006e-16 2.012e-16 3.521e-16 7.042e-16 7.042e-16 2.113e-15 2.113e-15 255s s.T.s8 s.TOs8 s.T.s9 s.TOs9 s.P.s7 s.POs7 s.T.s7 s.TOs7 s.P.s9 255s 2.113e-15 2.113e-15 2.113e-15 2.113e-15 2.213e-15 2.213e-15 2.565e-15 2.565e-15 4.124e-15 255s s.POs9 AmHi09.11 AmHi09.10 AmHi09.09 Eigen hybrid AmHi09.08 AmHi09.07 255s 4.124e-15 1.363e-14 2.325e-12 6.032e-11 1.836e-09 1.836e-09 4.819e-09 6.717e-08 255s > 255s > eps <- 10^-(1:18) 255s > t.m2 <- t(sapply(eps, re.m2ex3, EXPMlist = expmList)) 256s Error in solve.default(V) : 256s system is computationally singular: reciprocal condition number = 1.11022e-16 256s Error in solve.default(V) : 256s system is computationally singular: reciprocal condition number = 1.11022e-16 256s > ## --> 3 error messages from solve(V), 5 error messages from try(. "R_Eigen" ...) 256s Error in solve.default(V) : 256s system is computationally singular: reciprocal condition number = 1.11022e-16 256s > 256s > showProc.time() 256s Time (user system elapsed): 0.133 0.001 0.137 256s > 256s > cbind(sort(apply(log(t.m2),2, median, na.rm=TRUE))) 256s [,1] 256s RWard6 -Inf 256s RWard7 -Inf 256s RWard8 -Inf 256s RWard9 -Inf 256s Rs.P.s9 -90.55 256s sPs.H08. -83.62 256s sPs.H08b -83.62 256s s.P.sRBS -83.28 256s Matr -37.53 256s Matr.d -37.53 256s Ward -37.53 256s Ward1b -37.53 256s AmHi09.13 -36.43 256s AmHi09.12 -35.74 256s Rs.P.s7 -34.82 256s Rs.P.s8 -34.82 256s s.P.s8 -33.79 256s s.POs8 -33.79 256s s.P.s9 -33.79 256s s.POs9 -33.79 256s s.T.s8 -33.79 256s s.TOs8 -33.79 256s s.T.s9 -33.79 256s s.TOs9 -33.79 256s s.P.s7 -33.74 256s s.POs7 -33.74 256s s.T.s7 -33.58 256s s.TOs7 -33.58 256s AmHi09.11 -31.92 256s AmHi09.10 -26.79 256s hybrid -23.74 256s AmHi09.09 -23.53 256s Eigen -20.12 256s AmHi09.08 -19.15 256s AmHi09.07 -16.52 256s > ## 'na.rm=TRUE' needed for Eigen which blows up for the last 3 eps 256s > t.m2.ranks <- sort(rowMeans(apply(t.m2, 1, rank))) 256s > cbind(signif(t.m2.ranks, 3)) 256s [,1] 256s RWard6 3.19 256s RWard7 3.28 256s RWard8 3.53 256s RWard9 3.78 256s sPs.H08. 6.33 256s sPs.H08b 6.33 256s s.P.sRBS 6.78 256s Rs.P.s9 9.44 256s Matr 10.60 256s Matr.d 10.60 256s Ward 10.60 256s Ward1b 10.60 256s AmHi09.13 10.80 256s AmHi09.12 13.10 256s Rs.P.s8 14.90 256s Rs.P.s7 15.30 256s s.T.s8 20.00 256s s.TOs8 20.00 256s s.T.s9 20.20 256s s.TOs9 20.20 256s s.P.s8 21.90 256s s.POs8 21.90 256s s.P.s9 22.70 256s s.POs9 22.70 256s s.P.s7 25.60 256s s.POs7 25.60 256s s.T.s7 26.30 256s s.TOs7 26.30 256s hybrid 27.10 256s AmHi09.11 29.40 256s AmHi09.10 30.70 256s Eigen 31.10 256s AmHi09.09 31.80 256s AmHi09.08 33.10 256s AmHi09.07 34.20 256s > ## lynne (x86_64, Linux 3.14.4-100; Intel i7-4765T), 2014-09: 256s > ## sPs.H08. 2.67 256s > ## sPs.H08b 2.67 256s > ## s.P.sRBS 3.06 256s > ## Ward 4.03 256s > ## AmHi09.13 4.33 <<- still not close to H08 ! 256s > ## AmHi09.12 5.86 256s > ## s.T.s 8.33 256s > ## s.TOs 8.33 256s > ## s.P.s 9.11 256s > ## s.POs 9.11 256s > ## hybrid 10.80 256s > ## AmHi09.10 11.70 << astonishingly bad 256s > ## Eigen 12.60 256s > ## AmHi09.08 13.10 256s > ## AmHi09.06 14.40 256s > 256s > print(t.m2[, names(t.m2.ranks)[1:8]], digits = 3) 256s RWard6 RWard7 RWard8 RWard9 sPs.H08. sPs.H08b s.P.sRBS Rs.P.s9 256s [1,] 1.01e-16 1.01e-16 1.50e-16 2.01e-16 9.99e-17 9.99e-17 2.00e-16 9.53e-16 256s [2,] 2.01e-16 5.03e-17 5.03e-17 5.03e-17 1.01e-16 1.01e-16 1.01e-16 5.53e-16 256s [3,] 0.00e+00 1.01e-16 5.03e-17 5.03e-17 5.03e-17 5.03e-17 2.51e-16 4.53e-16 256s [4,] 0.00e+00 0.00e+00 7.50e-25 7.50e-25 2.51e-16 2.51e-16 3.75e-25 0.00e+00 256s [5,] 0.00e+00 1.17e-26 5.86e-27 1.17e-26 3.52e-16 3.52e-16 2.01e-16 6.54e-16 256s [6,] 5.03e-17 5.03e-17 4.57e-29 0.00e+00 2.01e-16 2.01e-16 2.01e-16 2.51e-16 256s [7,] 1.01e-16 1.01e-16 1.51e-16 1.51e-16 3.52e-16 3.52e-16 3.52e-16 7.04e-16 256s [8,] 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 5.03e-17 256s [9,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.36e-35 4.36e-35 8.73e-35 4.36e-35 256s [10,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 256s [11,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 5.33e-39 5.33e-39 5.33e-39 5.33e-39 256s [12,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.16e-41 4.16e-41 0.00e+00 4.16e-41 256s [13,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 6.50e-43 6.50e-43 256s [14,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 5.08e-45 5.08e-45 256s [15,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.97e-47 3.97e-47 3.97e-47 7.94e-47 256s [16,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 6.20e-49 6.20e-49 256s [17,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 0.00e+00 4.84e-51 9.69e-51 256s [18,] 0.00e+00 0.00e+00 0.00e+00 0.00e+00 3.78e-53 3.78e-53 0.00e+00 0.00e+00 256s > ## ==> 1st class: H08 (both) and (but slightly better than) Ward 256s > ## 2nd class s.T.s and s.P.s 256s > ## "bad" : hybrid and Eigen 256s > 256s > ## ??? AmHi09 - methods, up to order = 10 are worse ! 256s > if(require(RColorBrewer)) { 256s + ## Bcol <- brewer.pal(ncol(t.m2),"Dark2") 256s + Bcol <- brewer.pal(min(9, ncol(t.m2)), "Set1") 256s + Bcol <- Bcol[sqrt(colSums(col2rgb(Bcol)^2)) < 340] 256s + ## FIXME: more colors ==> ~/R/MM/GRAPHICS/color-palettes.R 256s + } else { 256s + ## 7 from Dark2 256s + ## Bcol <- c("#1B9E77", "#D95F02", "#7570B3", "#E7298A", 256s + ## "#66A61E", "#E6AB02", "#A6761D") 256s + ## Rather: those from "Set1" 256s + Bcol <- c("#E41A1C", "#377EB8", "#4DAF4A", 256s + "#984EA3", "#FF7F00", # too bright: "#FFFF33", 256s + "#A65628", "#F781BF", "#999999") 256s + } 256s > 256s > matplot(eps, t.m2, type = "b", log = "xy", col=Bcol, lty = 1:9, pch=1:15, 256s + axes=FALSE, frame = TRUE, 256s + xlab = expression(epsilon), ylab = "relative error", 256s + Loading required package: RColorBrewer 256s main = expression(expm(A, method == "*") *" relative errors for " * 256s + A == bgroup("[", atop({-1} *" "* 1, {epsilon^2} *" "*{-1}), "]"))) 256s > legend("bottomright",colnames(t.m2), col=Bcol, lty = 1:9, pch=1:15, 256s + inset = 0.02) 256s > if(requireNamespace("sfsmisc")) { 256s + sfsmisc::eaxis(1, labels=FALSE) 256s + sfsmisc::eaxis(1, at = eps[c(TRUE,FALSE)]) 256s + sfsmisc::eaxis(2) 256s + ## sfsmisc::eaxis(2, labels=FALSE) 256s + ## op <- par(las=2) 256s + ## sfsmisc::eaxis(2, at = axTicks(2,log=TRUE)[c(TRUE,FALSE,FALSE)]) 256s + ## par(op) 256s + } else { 256s + axis(1) 256s + axis(2) 256s + } 256s > 256s > ## typical case: 256s > ep <- 1e-10 256s > (me <- m2ex3(ep)) 256s $A 256s [,1] [,2] 256s [1,] -1e+00 1 256s [2,] 1e-20 -1 256s 256s $expA 256s [,1] [,2] 256s [1,] 3.679e-01 0.3679 256s [2,] 3.679e-21 0.3679 256s 256s Warning message: 256s In xy.coords(x, y, xlabel, ylabel, log = log, recycle = TRUE) : 256s 61 y values <= 0 omitted from logarithmic plot 256s > me$expA * exp(1) ## the correct value ; numerically identical to simple matrix: 256s [,1] [,2] 256s [1,] 1e+00 1 256s [2,] 1e-20 1 256s > ## identical() not fulfilled e.g. on Solaris 256s > stopifnot(all.equal(me$expA * exp(1), 256s + rbind(c( 1, 1), 256s + c(ep^2, 1)), 256s + tolerance = 1e-14)) 256s > ## The relative error (matrices): 256s > lapply(expmList, function(EXPM) 1 - EXPM(me$A)/me$expA) 256s $Matr 256s 2 x 2 Matrix of class "dgeMatrix" 256s [,1] [,2] 256s [1,] 0 1.11e-16 256s [2,] 0 0.00e+00 256s 256s $Matr.d 256s 2 x 2 Matrix of class "dgeMatrix" 256s [,1] [,2] 256s [1,] 0 1.11e-16 256s [2,] 0 0.00e+00 256s 256s $Ward 256s [,1] [,2] 256s [1,] 0 1.11e-16 256s [2,] 0 0.00e+00 256s 256s $Ward1b 256s [,1] [,2] 256s [1,] 0 1.11e-16 256s [2,] 0 0.00e+00 256s 256s $RWard6 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $RWard7 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $RWard8 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $RWard9 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $s.P.s7 256s [,1] [,2] 256s [1,] -2.22e-15 -2.442e-15 256s [2,] -2.22e-15 -2.220e-15 256s attr(,"accuracy") 256s [1] 2.998e-15 256s 256s $s.POs7 256s [,1] [,2] 256s [1,] -2.22e-15 -2.442e-15 256s [2,] -2.22e-15 -2.220e-15 256s attr(,"accuracy") 256s [1] 2.998e-15 256s 256s $s.P.s8 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 1.665e-16 256s 256s $s.POs8 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 1.665e-16 256s 256s $s.P.s9 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 5.662e-15 256s 256s $s.POs9 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 5.662e-15 256s 256s $s.P.sRBS 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $Rs.P.s7 256s [,1] [,2] 256s [1,] -6.661e-16 -6.661e-16 256s [2,] -8.882e-16 -6.661e-16 256s 256s $Rs.P.s8 256s [,1] [,2] 256s [1,] -6.661e-16 -6.661e-16 256s [2,] -8.882e-16 -6.661e-16 256s 256s $Rs.P.s9 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $sPs.H08. 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $sPs.H08b 256s [,1] [,2] 256s [1,] 0 0 256s [2,] 0 0 256s 256s $AmHi09.07 256s [,1] [,2] 256s [1,] 1.999e-08 -1.615e-07 256s [2,] -1.615e-07 1.999e-08 256s 256s $AmHi09.08 256s [,1] [,2] 256s [1,] -1.414e-09 1.163e-08 256s [2,] 1.163e-08 -1.414e-09 256s 256s $AmHi09.09 256s [,1] [,2] 256s [1,] 1.497e-11 -1.510e-10 256s [2,] -1.510e-10 1.497e-11 256s 256s $AmHi09.10 256s [,1] [,2] 256s [1,] -5.702e-13 5.836e-12 256s [2,] 5.836e-12 -5.702e-13 256s 256s $AmHi09.11 256s [,1] [,2] 256s [1,] 2.998e-15 -3.508e-14 256s [2,] -3.486e-14 2.998e-15 256s 256s $AmHi09.12 256s [,1] [,2] 256s [1,] 1.110e-16 5.551e-16 256s [2,] 7.772e-16 1.110e-16 256s 256s $AmHi09.13 256s [,1] [,2] 256s [1,] 1.11e-16 1.11e-16 256s [2,] 2.22e-16 1.11e-16 256s 256s $s.T.s7 256s [,1] [,2] 256s [1,] 1.776e-15 -4.219e-15 256s [2,] -4.219e-15 1.776e-15 256s attr(,"accuracy") 256s [1] 2.22e-15 256s 256s $s.TOs7 256s [,1] [,2] 256s [1,] 1.776e-15 -4.219e-15 256s [2,] -4.219e-15 1.776e-15 256s attr(,"accuracy") 256s [1] 2.22e-15 256s 256s $s.T.s8 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 0 256s 256s $s.TOs8 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 0 256s 256s $s.T.s9 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 0 256s 256s $s.TOs9 256s [,1] [,2] 256s [1,] -2.22e-15 -2.22e-15 256s [2,] -2.22e-15 -2.22e-15 256s attr(,"accuracy") 256s [1] 0 256s 256s $Eigen 256s [,1] [,2] 256s [1,] 0.000e+00 -5.109e-07 256s [2,] -1.048e-06 0.000e+00 256s 256s $hybrid 256s [,1] [,2] 256s [1,] 0.000e+00 -5.109e-07 256s [2,] -2.419e-07 -2.220e-16 256s 256s > 256s > ## Average number of correct digits [less "extreme" than plot above] 256s > nDig <- sapply(expmList, function(EXPM) -log10(mean(abs(1 - EXPM(me$A)/me$expA)))) 256s > round(nDig, 2) 256s Matr Matr.d Ward Ward1b RWard6 RWard7 RWard8 RWard9 s.P.s7 256s 16.56 16.56 16.56 16.56 Inf Inf Inf Inf 14.64 256s s.POs7 s.P.s8 s.POs8 s.P.s9 s.POs9 s.P.sRBS Rs.P.s7 Rs.P.s8 Rs.P.s9 256s 14.64 14.65 14.65 14.65 14.65 Inf 15.14 15.14 Inf 256s sPs.H08. sPs.H08b AmHi09.07 AmHi09.08 AmHi09.09 AmHi09.10 AmHi09.11 AmHi09.12 AmHi09.13 256s Inf Inf 7.04 8.19 10.08 11.49 13.72 15.41 15.86 256s s.T.s7 s.TOs7 s.T.s8 s.TOs8 s.T.s9 s.TOs9 Eigen hybrid 256s 14.52 14.52 14.65 14.65 14.65 14.65 6.41 6.73 256s > ## Ward s.P.s s.POs s.T.s s.TOs Eigen hybrid 256s > ## 16.26 14.65 14.65 14.65 14.65 6.20 6.39 [AMD Opteron 64-bit] 256s > ## Inf 14.65 14.65 14.65 14.65 6.74 6.33 [Pentium-M (32-bit)] 256s > 256s > showProc.time() 256s Time (user system elapsed): 0.044 0.002 0.052 256s > 256s > ###--- rnilMat() : random upper triangular (zero-diagonal) nilpotent n x n matrix 256s > 256s > set.seed(17) 256s > m <- rnilMat(10) 256s > (m. <- as(m,"sparseMatrix"))# for nicer printing - and more *below* 256s 10 x 10 sparse Matrix of class "dtCMatrix" 256s 256s [1,] . 3 10 7 3 4 9 5 9 6 256s [2,] . . 5 4 3 . 5 6 3 6 256s [3,] . . . 5 7 7 3 7 5 6 256s [4,] . . . . 3 7 6 8 2 7 256s [5,] . . . . . 9 5 2 7 6 256s [6,] . . . . . . 8 5 4 6 256s [7,] . . . . . . . 5 5 3 256s [8,] . . . . . . . . 3 5 256s [9,] . . . . . . . . . 3 256s [10,] . . . . . . . . . . 256s > E.m <- expm::expm(m, method="Pade") 256s > as(E.m, "sparseMatrix") 256s 10 x 10 sparse Matrix of class "dtCMatrix" 256s 256s [1,] 1 3 17.5 50.5 110.9 464.7 1224.0 2169.2 3394.8 5938.8 256s [2,] . 1 5.0 16.5 39.0 172.8 476.1 865.6 1376.4 2438.8 256s [3,] . . 1.0 5.0 14.5 78.5 251.7 498.6 836.0 1540.0 256s [4,] . . . 1.0 3.0 20.5 77.5 170.2 299.4 578.0 256s [5,] . . . . 1.0 9.0 41.0 97.0 180.5 357.1 256s [6,] . . . . . 1.0 8.0 25.0 51.5 112.3 256s [7,] . . . . . . 1.0 5.0 12.5 30.5 256s [8,] . . . . . . . 1.0 3.0 9.5 256s [9,] . . . . . . . . 1.0 3.0 256s [10,] . . . . . . . . . 1.0 256s > 256s > (dN <- 9*7*320) # 20160 256s [1] 20160 256s > stopifnot(abs(round(E.m * dN) - (E.m * dN)) < 9e-6) 256s > EmN <- matrix(c(dN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 256s + 3*dN, dN, 0, 0, 0, 0, 0, 0, 0, 0, 256s + 352800, 5*dN, dN, 0, 0, 0, 0, 0, 0, 0, 256s + 1018080, 332640, 5*dN, dN, 0, 0, 0, 0, 0, 0, 256s + 2235240, 786240, 292320, 3*dN, dN, 0, 0, 0, 0, 0, 256s + 9368520, 3483480, 1582560, 413280, 181440, dN, 0, 0, 0, 0, 256s + 24676176, 9598680, 5073600, 1562400, 826560, 161280, dN, 0,0,0, 256s + 43730160, 17451000, 10051440, 3430560, 1955520, 504000, 256s + 5*dN, dN, 0, 0, 256s + 68438436, 27747480, 16853760, 6036240, 3638880, 1038240, 256s + 252000, 3*dN, dN, 0, 256s + 119725855, 49165892, 31046760, 11652480, 7198800, 2264640, 256s + 614880, 191520, 3*dN, dN), 256s + 10, 10) 256s > 256s > Em.xct <- EmN / dN 256s > all.equal(E.m, Em.xct, check.attributes = FALSE, tolerance = 0) 256s [1] "Mean relative difference: 4.522e-14" 256s > stopifnot(all.equal(E.m, Em.xct, check.attributes = FALSE, tolerance= 1e-13)) 256s > 256s > re.x <- sapply(expmList, function(EXPM) relErr(Em.xct, EXPM(m))) 256s Error in solve.default(V) : 256s Lapack routine dgesv: system is exactly singular: U[3,3] = 0 256s > ## with error message from "safe.Eigen" --> Eigen is NA here 256s > ## result depends quite a bit on platform 256s > which(is.na(re.x)) # gives c(Eigen = 16L) (but not everywhere ?!?) 256s Eigen 256s 34 256s > (re.x <- re.x[!is.na(re.x)]) 256s Matr Matr.d Ward Ward1b RWard6 RWard7 RWard8 RWard9 s.P.s7 256s 7.491e-17 7.491e-17 7.491e-17 7.491e-17 1.056e-16 9.851e-17 1.009e-16 3.716e-17 2.514e-14 256s s.POs7 s.P.s8 s.POs8 s.P.s9 s.POs9 s.P.sRBS Rs.P.s7 Rs.P.s8 Rs.P.s9 256s 2.514e-14 4.502e-14 4.502e-14 2.639e-14 2.639e-14 9.143e-17 9.851e-17 1.009e-16 3.716e-17 256s sPs.H08. sPs.H08b AmHi09.07 AmHi09.08 AmHi09.09 AmHi09.10 AmHi09.11 AmHi09.12 AmHi09.13 256s 9.379e-17 9.379e-17 2.660e-16 1.150e-16 1.150e-16 1.150e-16 1.150e-16 1.150e-16 1.150e-16 256s s.T.s7 s.TOs7 s.T.s8 s.TOs8 s.T.s9 s.TOs9 hybrid 256s 3.716e-17 3.716e-17 3.716e-17 3.716e-17 3.716e-17 3.716e-17 7.491e-17 256s > 256s > ## Pentium-M 32-bit ubuntu gave 256s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 256s > ## 1.079e-16 4.505e-14 4.503e-14 9.379e-17 9.379e-17 3.716e-17 7.079e-18 1.079e-16 256s > ## 32-bit Quad-Core AMD Opteron 2380 (Linux 2.6.30.10-105.2.23.fc11.i686.PAE): 256s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 256s > ## 1.079e-16 4.505e-14 4.503e-14 9.379e-17 9.379e-17 3.716e-17 7.079e-18 1.079e-16 256s > 256s > ## "Ward77": again more accurate than s+Pade+s, but s+Taylor+s is even more accurate 256s > 256s > ## but on 64-bit AMD Opterons 256s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 256s > ## 4.42e-17 3.99e-17 3.99e-17 1.10e-16 1.10e-16 8.44e-17 8.44e-17 4.42e-17 256s > ## 256s > ## even more astonishing the result on Mac OSX (x86_32_mac; R-forge, R 2.9.0 patch.) 256s > ## Ward s.P.s s.POs sPs.H08. sPs.H08b s.T.s s.TOs hybrid 256s > ## 5.13e-17 3.99e-17 3.99e-17 1.84e-15 1.84e-15 8.44e-17 8.44e-17 5.13e-17 256s > 256s > ## 2014-09: AmHi09 are very good (64bit: 8e-17) for p >= 8 (p=6 has 1.5e-11) 256s > 256s > not.09.06 <- which(names(re.x) != "AmHi09.06") 256s > stopifnot(re.x[c("Ward", "s.T.s8", "s.TOs8")] < 3e-16, 256s + ## re.x[["AmHi09.06"]] < 9e-11, # x64 & 686(lnx): = 1.509e-11 256s + re.x[not.09.06] < 4e-13)# max: 686(32b): 4.52e-14, x64(lnx): 1.103e-16 256s > 256s > ##-- Looking at *sparse* matrices: [C,Fortran "dense" code based methods will fail]: 256s > (meths <- eval(formals(expm)$method)) 256s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" "Ward77" 256s [5] "PadeRBS" "Pade" "Taylor" "PadeO" 256s [9] "TaylorO" "R_Eigen" "R_Pade" "R_Ward77" 256s [13] "hybrid_Eigen_Ward" 256s > ems <- sapply(meths, function(met) 256s + tryCatch(expm::expm(m., method=met), error=identity)) 256s coercing to dense matrix, as required by method “Higham08.b” 256s coercing to dense matrix, as required by method “AlMohy-Hi09” 256s coercing to dense matrix, as required by method “Ward77” 256s coercing to dense matrix, as required by method “PadeRBS” 256s coercing to dense matrix, as required by method “Pade” 256s coercing to dense matrix, as required by method “Taylor” 256s coercing to dense matrix, as required by method “PadeO” 256s coercing to dense matrix, as required by method “TaylorO” 256s coercing to dense matrix, as required by method “R_Ward77” 256s coercing to dense matrix, as required by method “hybrid_Eigen_Ward” 256s > ok <- !sapply(ems, is, class2="error") 256s > meths[ok] # now most... are 256s [1] "Higham08.b" "Higham08" "AlMohy-Hi09" "Ward77" 256s [5] "PadeRBS" "Pade" "Taylor" "PadeO" 256s [9] "TaylorO" "R_Pade" "hybrid_Eigen_Ward" 256s > 256s > showProc.time() 256s Time (user system elapsed): 0.074 0.001 0.076 256s > 256s > ## Complex Matrices 256s > re.facMat.Z <- function(n, EXPMlist, rFUN = function(n) rnorm(n) + 1i*rnorm(n), ...) 256s + { 256s + stopifnot(is.list(EXPMlist)) 256s + r <- facMat(n, rFUN, ...) 256s + vapply(EXPMlist, function(EXPM) { 256s + ct <- system.time(E <- EXPM(r$A), gcFirst = FALSE)[[1]] 256s + c(relErr = relErr(r$expA, E), c.time = ct) 256s + }, double(2)) 256s + } 256s > 256s > (nmL <- names(expmList)) 256s [1] "Matr" "Matr.d" "Ward" "Ward1b" "RWard6" "RWard7" "RWard8" 256s [8] "RWard9" "s.P.s7" "s.POs7" "s.P.s8" "s.POs8" "s.P.s9" "s.POs9" 256s [15] "s.P.sRBS" "Rs.P.s7" "Rs.P.s8" "Rs.P.s9" "sPs.H08." "sPs.H08b" "AmHi09.07" 256s [22] "AmHi09.08" "AmHi09.09" "AmHi09.10" "AmHi09.11" "AmHi09.12" "AmHi09.13" "s.T.s7" 256s [29] "s.TOs7" "s.T.s8" "s.TOs8" "s.T.s9" "s.TOs9" "Eigen" "hybrid" 256s > ## [1] "Matr" "Matr.d" "Ward" "Ward1b" "s.P.s" "s.POs" "s.P.s7" 256s > ## [8] "s.POs7" "s.P.s9" "s.POs9" "s.P.sRBS" "sPs.H08." "sPs.H08b" "AmHi09.06" 256s > ## [15] "AmHi09.07" "AmHi09.08" "AmHi09.09" "AmHi09.10" "AmHi09.12" "AmHi09.13" "s.T.s" 256s > ## [22] "s.TOs" "s.T.s7" "s.TOs7" "s.T.s9" "s.TOs9" "Eigen" "hybrid" 256s > 256s > ## dropping "Matr", "Matr.d" (which gives "dgeMatrix" currently --> mean(.) fails ... 256s > ## "Ward" "Ward1b" and "hybrid" error "not a numeric Matrix" 256s > ## "AmHi09": C code currently only for double precision ((FIXME)) 256s > (cplxN <- grep("^(Matr|Ward|hybr|AmHi09|s\\.[PT])", nmL, invert = TRUE, value = TRUE)) 256s [1] "RWard6" "RWard7" "RWard8" "RWard9" "Rs.P.s7" "Rs.P.s8" "Rs.P.s9" "sPs.H08." 256s [9] "sPs.H08b" "Eigen" 256s > 256s > rr <- re.facMat.Z(4, expmList[cplxN]) 256s > 256s > set.seed(47) 256s > fREZ <- replicate(if(doExtras) 64 else 12, 256s + re.facMat.Z(15, expmList[cplxN])) 256s > nDig <- -log10(t(fREZ["relErr",,])) 256s > cat("Number of correct decimal digits for facMat(20, rnorm + i*rnorm):\n") 256s Number of correct decimal digits for facMat(20, rnorm + i*rnorm): 256s > t(apply(nDig, 2, summary)) 256s Min. 1st Qu. Median Mean 3rd Qu. Max. 256s RWard6 13.45 13.75 13.85 13.85 13.95 14.15 256s RWard7 13.46 13.74 13.77 13.80 13.88 14.22 256s RWard8 13.60 13.73 13.83 13.83 13.89 14.11 256s RWard9 13.54 13.78 13.88 13.85 13.92 14.24 256s Rs.P.s7 13.51 13.77 13.86 13.85 13.96 14.15 256s Rs.P.s8 13.59 13.80 13.86 13.85 13.92 14.05 256s Rs.P.s9 13.59 13.74 13.79 13.80 13.87 14.01 256s sPs.H08. 14.69 14.83 14.86 14.86 14.91 14.95 256s sPs.H08b 14.80 14.85 14.87 14.88 14.92 14.95 256s Eigen 14.07 14.40 14.45 14.43 14.50 14.59 256s > 256s > ## times (in millisec): 256s > print(1000*t(apply(fREZ["c.time",,], 1, summary))) 256s Min. 1st Qu. Median Mean 3rd Qu. Max. 256s RWard6 0 0 0 0.0000 0 0 256s RWard7 0 0 0 0.0000 0 0 256s RWard8 0 0 0 0.0000 0 0 256s RWard9 0 0 0 0.8333 0 10 256s Rs.P.s7 0 0 0 0.0000 0 0 256s Rs.P.s8 0 0 0 1.3333 0 8 256s Rs.P.s9 0 0 0 0.0000 0 0 256s sPs.H08. 0 0 0 0.0000 0 0 256s sPs.H08b 0 0 0 0.0000 0 0 256s Eigen 0 0 0 0.8333 0 10 256s > 256s > ## Now look at that: 256s > op <- par(mar=.1 + c(5,4 + 1.5, 4,2)) 256s > boxplot(t(fREZ["relErr",,]), log="x", xaxt="n", 256s + notch=TRUE, # ylim = c(8e-16, 4e-9), 256s + horizontal=TRUE, las = 1, 256s + main = "relative errors for 'random' eigen-ok 20 x 20 matrix") 256s Warning message: 256s In (function (z, notch = FALSE, width = NULL, varwidth = FALSE, : 256s some notches went outside hinges ('box'): maybe set notch=FALSE 256s > eaxis(1); grid(lty = 3); mtext(myRversion, adj=1, cex=3/4) 256s > par(op) 256s > 256s > 256s > 256s > showProc.time() 256s Time (user system elapsed): 0.073 0.002 0.078 256s > 256s 256s R version 4.4.3 (2025-02-28) -- "Trophy Case" 256s Copyright (C) 2025 The R Foundation for Statistical Computing 256s Platform: s390x-ibm-linux-gnu 256s 256s R is free software and comes with ABSOLUTELY NO WARRANTY. 256s You are welcome to redistribute it under certain conditions. 256s Type 'license()' or 'licence()' for distribution details. 256s 256s R is a collaborative project with many contributors. 256s Type 'contributors()' for more information and 256s 'citation()' on how to cite R or R packages in publications. 256s 256s Type 'demo()' for some demos, 'help()' for on-line help, or 256s 'help.start()' for an HTML browser interface to help. 256s Type 'q()' to quit R. 256s 256s > #### Testing the Exponential Condition Number computations 256s > 256s > library(expm) 256s Loading required package: Matrix 257s 257s Attaching package: ‘expm’ 257s 257s The following object is masked from ‘package:Matrix’: 257s 257s expm 257s 257s > 257s > mSource <- function(file, ...) source(system.file(file, ..., 257s + package = "expm", mustWork=TRUE), 257s + keep.source = FALSE) 257s > mSource("test-tools.R")## -> assertError(), rMat() 257s Loading required package: tools 257s > ## getting examples where we know expm(.) "exactly": 257s > mSource("demo", "exact-fn.R") 257s > 257s > M <- xct10$m 257s > eC <- list(expmCondF = 566.582631819923, 257s + expmCond1 = 137.455837652872) 257s > C1 <- expmCond(M, "exact") 257s > (C2 <- expmCond(M, "1.est", expm=FALSE)) 257s [1] 137.4558 257s > (C3. <- expmCond(M, "F.est", abstol = 0.1)[[1]]) 257s [1] 566.5826 257s attr(,"iter") 257s [1] 2 257s > (C3.1 <- expmCond(M, "F.est", abstol = 0.01, reltol = 1e-12)[[1]]) 257s [1] 566.5826 257s attr(,"iter") 257s [1] 3 257s > 257s > stopifnot(all.equal(C1[1:2], eC, tolerance = 1e-14), 257s + all.equal(C2 , eC$expmCond1, tolerance = 1e-14), 257s + all.equal(C3. , eC$expmCondF, tolerance = 1e-14, check.attributes = FALSE), 257s + all.equal(C3.1, eC$expmCondF, tolerance = 1e-14, check.attributes = FALSE)) 257s > 257s > cat('Time elapsed: ', (p1 <- proc.time()),'\n') # for ``statistical reasons'' 257s Time elapsed: 0.949 0.043 0.997 0 0.002 257s > 257s > ## cat('Time elapsed: ',(p2 <- proc.time())-p1,'\n') # for ``statistical reasons'' 257s > 257s > ## cat('Time elapsed: ',(p3 <- proc.time())-p2,'\n') # for ``statistical reasons'' 257s > 257s 257s R version 4.4.3 (2025-02-28) -- "Trophy Case" 257s Copyright (C) 2025 The R Foundation for Statistical Computing 257s Platform: s390x-ibm-linux-gnu 257s 257s R is free software and comes with ABSOLUTELY NO WARRANTY. 257s You are welcome to redistribute it under certain conditions. 257s Type 'license()' or 'licence()' for distribution details. 257s 257s R is a collaborative project with many contributors. 257s Type 'contributors()' for more information and 257s 'citation()' on how to cite R or R packages in publications. 257s 257s Type 'demo()' for some demos, 'help()' for on-line help, or 257s 'help.start()' for an HTML browser interface to help. 257s Type 'q()' to quit R. 257s 257s > library(Matrix) 258s > library(expm) 258s 258s Attaching package: ‘expm’ 258s 258s The following object is masked from ‘package:Matrix’: 258s 258s expm 258s 258s > 258s > source(system.file("test-tools.R", package = "expm"), keep.source=FALSE) 258s Loading required package: tools 258s > doExtras 258s [1] FALSE 258s > 258s > tst.sqrtm <- function(m, tol = 1e-12, zap.Im.tol = 1e-10) { 258s + r.m <- sqrtm(m)## should now work 258s + s <- r.m %*% r.m 258s + if(is.complex(s) && all(abs(Im(s)) < mean(abs(s)) * zap.Im.tol)) 258s + s <- Re(s) 258s + all.equal(m, s, tolerance=tol) 258s + } 258s > 258s > 258s > options(verbose = TRUE) # -> get some messages from logm.Higham 258s > 258s > ### ---- Small exact : ---------- 258s > L2 <- cbind(1, 0:1) 258s > lL2 <- cbind(0:1, 0) 258s > (L3 <- rbind(cbind(1,cbind(0:1,0)),1)) 258s [,1] [,2] [,3] 258s [1,] 1 0 0 258s [2,] 1 1 0 258s [3,] 1 1 1 258s > (lL3 <- cbind(rbind(0, cbind((2:1)/2,0:1)), 0)) 258s [,1] [,2] [,3] 258s [1,] 0.0 0 0 258s [2,] 1.0 0 0 258s [3,] 0.5 1 0 258s > 258s > assertError(logm(L2, method="Eigen")) 258s > assertError(logm(L3, method="Eigen")) 258s > 258s > logm.Higham08 <- expm:::logm.Higham08 258s > l.L2 <- logm.Higham08(L2) 258s logm.Higham08() -> (k, m) = (2, 5) 258s > l.L3 <- logm.Higham08(L3) 258s logm.Higham08() -> (k, m) = (4, 3) 258s > 258s > all.equal(l.L2, lL2, tolerance=0)# 5.64 e-14 (32-bit *and* 64-bit) 258s [1] "Mean relative difference: 5.639933e-14" 258s > all.equal(l.L3, lL3, tolerance=0)# 2.40 e-15 (ditto) 258s [1] "Mean relative difference: 2.398082e-15" 258s > stopifnot(all.equal(l.L2, lL2, tolerance= 1000e-16), 258s + all.equal(l.L3, lL3, tolerance= 80e-16)) 258s > showProc.time() 258s Time (user system elapsed): 0.048 0.003 0.052 258s logm.Higham08() -> (k, m) = (4, 5) 258s logm.Higham08() -> (k, m) = (4, 5) 258s > 258s > ### --------- More & larger randomly generated examples : ----------------- 258s > set.seed(101) 258s > 258s > EA <- expm.Higham08(A <- matrix(round(rnorm(25),1), 5)) 258s > all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=0) 258s [1] "Mean relative difference: 1.001987e-13" 258s > ## "Mean relative difference: 1.020137e-13" 258s > stopifnot(all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=1e-12)) 258s > 258s > S <- crossprod(A) 258s > all.equal(S, sqrtm(S) %*% sqrtm(S), tolerance=0) 258s [1] "Mean relative difference: 1.690803e-15" 258s > ## "Mean relative difference: 2.26885e-15" 258s > stopifnot(all.equal(S, sqrtm(S) %*% sqrtm(S), tolerance=1e-14)) 258s > showProc.time() 258s Time (user system elapsed): 0.02 0.002 0.022 258s > 258s > set.seed(3) 258s > 258s > ## n = 50 is already "too" slow (well: logm.Higham08(.) needs 2.2 sec 258s > ## --> CPU measurements below 258s > for(n in c(2:5, 10:11, if(doExtras) 30)) { 258s + cat("n = ",n,": ") 258s + for(kk in seq_len(if(doExtras) 30 else 10)) { 258s + ## Testing logm() 258s + EA <- expm.Higham08(A <- matrix(round(rnorm(n^2),2), n,n)) 258s + stopifnot(all.equal(EA, expm.Higham08(logm.Higham08(EA)), tolerance=1e-12)) 258s + cat(" ") 258s + ## Testing sqrtm() --- for positive definite *and* arbitrary 258s + stopifnot(tst.sqrtm(A))# A is completely random 258s + S <- crossprod(A) + rnorm(n^2) / 1000 258s + stopifnot(tst.sqrtm(S)) 258s + cat(".") 258s + } 258s + cat("\n") 258s + } 258s n = 2 : logm.Higham08() -> (k, m) = (3, 4) 258s .logm.Higham08() -> (k, m) = (4, 4) 258s .logm.Higham08() -> (k, m) = (3, 5) 258s .logm.Higham08() -> (k, m) = (3, 5) 258s .logm.Higham08() -> (k, m) = (4, 3) 258s .logm.Higham08() -> (k, m) = (4, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s logm.Higham08() -> (k, m) = (4, 3) 258s . .logm.Higham08() -> (k, m) = (4, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 3) 258s .logm.Higham08() -> (k, m) = (3, 4) 258s . 258s n = 3 : logm.Higham08() -> (k, m) = (5, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (3, 5) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 5) 258s .logm.Higham08() -> (k, m) = (4, 5) 258s .logm.Higham08() -> (k, m) = (5, 4) 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 5) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 3) 258s . 258s n = 4 : logm.Higham08() -> (k, m) = (5, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 5) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s .logm.Higham08() -> (k, m) = (4, 5) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 4) 258s .logm.Higham08() -> (k, m) = (4, 5) 258s . 258s n = 5 : logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (6, 3) 258s .logm.Higham08() -> (k, m) = (6, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (4, 5) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (6, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (5, 4) 258s . 258s n = 10 : logm.Higham08() -> (k, m) = (7, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (6, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (6, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (7, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (6, 4) 258s .logm.Higham08() -> (k, m) = (6, 4) 258s .logm.Higham08() -> (k, m) = (7, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (6, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s . logm.Higham08() -> (k, m) = (6, 4) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s .logm.Higham08() -> (k, m) = (7, 3) 258s 'x' has negative real eigenvalues; maybe ok for sqrtm() 258s . 258s n = 11 : logm.Higham08() -> (k, m) = (6, 4) 259s .logm.Higham08() -> (k, m) = (6, 5) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (6, 4) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (6, 4) 259s logm.Higham08() -> (k, m) = (6, 4) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (7, 3) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (7, 3) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (6, 4) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (7, 3) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s logm.Higham08() -> (k, m) = (7, 3) 259s 'x' has negative real eigenvalues; maybe ok for sqrtm() 259s . . . . . . . . . 259s > 259s > showProc.time() 259s Time (user system elapsed): 0.496 0.018 0.529 259s > 259s > 259s > ### CPU-measurements for logm() 259s > options(verbose = FALSE)# printing costs .. 259s > set.seed(5) 259s > if(doExtras) { 259s + n <- 50 259s + sim <- 32 259s + } else { 259s + n <- 21 259s + sim <- 8 259s + } 259s > 259s > cpuT <- numeric(sim) 259s > for(k in seq_len(sim)) { 259s + EA <- expm.Higham08(A <- matrix(rnorm(n^2), n,n)) 259s + cat(".") 259s + cpuT[k] <- system.time(LEA <- logm.Higham08(EA))[1] 259s + stopifnot(all.equal(EA, expm.Higham08(LEA), tolerance=1e-12)) 259s + }; cat("\n") 259s ........ 259s > summary(cpuT) 259s Min. 1st Qu. Median Mean 3rd Qu. Max. 259s 0.01900 0.02675 0.02950 0.02913 0.03150 0.04000 259s > ## cmath-5 {Feb.2009}; Michi's original code: 259s > ## Min. 1st Qu. Median Mean 3rd Qu. Max. 259s > ## 1.794 2.249 2.389 2.388 2.515 2.831 259s > 259s > showProc.time() 259s Time (user system elapsed): 0.859 0.002 0.89 259s > 259s > 259s 259s R version 4.4.3 (2025-02-28) -- "Trophy Case" 259s Copyright (C) 2025 The R Foundation for Statistical Computing 259s Platform: s390x-ibm-linux-gnu 259s 259s R is free software and comes with ABSOLUTELY NO WARRANTY. 259s You are welcome to redistribute it under certain conditions. 259s Type 'license()' or 'licence()' for distribution details. 259s 259s R is a collaborative project with many contributors. 259s Type 'contributors()' for more information and 259s 'citation()' on how to cite R or R packages in publications. 259s 259s Type 'demo()' for some demos, 'help()' for on-line help, or 259s 'help.start()' for an HTML browser interface to help. 259s Type 'q()' to quit R. 259s 259s > library(expm) 259s Loading required package: Matrix 260s 260s Attaching package: ‘expm’ 260s 260s The following object is masked from ‘package:Matrix’: 260s 260s expm 260s 260s > 260s > source(system.file("test-tools.R", package= "expm"), keep.source=FALSE) 260s Loading required package: tools 260s > ## -> assertError()... doExtras 260s > doExtras 260s [1] FALSE 260s > 260s > ## Missing REPROTECT(), till 2014-09-03 [because 'A' is *integer*]: 260s > set.seed(17) 260s > n <- 300 260s > A <- matrix(rbinom(n^2, size=1, prob=0.1), n,n) 260s > stopifnot(is.integer(A)) 260s > A2 <- A %^% 2 260s > for(i in 1:100) { 260s + A. <- A %^% 2 260s + if(!isTRUE(all.equal(A2, A.))) 260s + cat("not equal; i=",i,"\n") 260s + } 262s > ## MM: On nb-mm3, I get a different error which shows memory corruption: 262s > ## REAL() can only be applied to a 'numeric', not a 'character' 262s > ## or REAL() can only be applied to a 'numeric', not a 'NULL' 262s > 262s > ## Check that *large* matrices now work 262s > if(FALSE) ## << even m %^% 2 takes > 20 hours (!!!) [but no longer stops early!] 262s + if(doExtras && require("sfsmisc") && 262s + exists("Sys.memGB", "package:sfsmisc", mode="function") && 262s + sfsmisc::Sys.memGB() > 50) { ## seems to need 3 x size(m) 262s + ## 262s + n <- 46341 262s + print(as.integer(n^2))# integer overflow 262s + cat("Creating large matrix 'm' (more than max_int entries):\n ") 262s + print(system.time(m <- diag(x = (1:n)^3, nrow = n))) # 9.1 sec 262s + i <- 1:(n-1) 262s + print(system.time( m[cbind(i,i+1)] <- i )) # 11.3 sec 262s + cat("object.size(m): "); print(object.size(m), units="Gb") 262s + ## 16 Gb (= 17.78 e9 bytes) 262s + ## This __STILL__ takes hours 262s + cat("m %^% 2: "); print(system.time(m2 <- m %^% 2)) 262s + ## user system elapsed 262s + ## 127199.580 9608.373 137236.405 ==> 262s + 262s + cat("m %^% 4: "); print(system.time(m4 <- m %^% 4)) # 262s + } 262s > 262s > 262s autopkgtest [18:04:22]: test run-unit-test: -----------------------] 263s autopkgtest [18:04:23]: test run-unit-test: - - - - - - - - - - results - - - - - - - - - - 263s run-unit-test PASS 263s autopkgtest [18:04:23]: test pkg-r-autopkgtest: preparing testbed 420s autopkgtest [18:07:00]: testbed dpkg architecture: s390x 420s autopkgtest [18:07:00]: testbed apt version: 2.9.33 420s autopkgtest [18:07:00]: @@@@@@@@@@@@@@@@@@@@ test bed setup 420s autopkgtest [18:07:00]: testbed release detected to be: plucky 421s autopkgtest [18:07:01]: updating testbed package index (apt update) 421s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed InRelease [126 kB] 422s Hit:2 http://ftpmaster.internal/ubuntu plucky InRelease 422s Hit:3 http://ftpmaster.internal/ubuntu plucky-updates InRelease 422s Hit:4 http://ftpmaster.internal/ubuntu plucky-security InRelease 422s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main Sources [99.7 kB] 422s Get:6 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse Sources [15.8 kB] 422s Get:7 http://ftpmaster.internal/ubuntu plucky-proposed/universe Sources [379 kB] 422s Get:8 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x Packages [113 kB] 423s Get:9 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x c-n-f Metadata [1824 B] 423s Get:10 http://ftpmaster.internal/ubuntu plucky-proposed/restricted s390x c-n-f Metadata [116 B] 423s Get:11 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x Packages [320 kB] 423s Get:12 http://ftpmaster.internal/ubuntu plucky-proposed/universe s390x c-n-f Metadata [13.4 kB] 423s Get:13 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x Packages [3776 B] 423s Get:14 http://ftpmaster.internal/ubuntu plucky-proposed/multiverse s390x c-n-f Metadata [240 B] 423s Fetched 1073 kB in 2s (593 kB/s) 424s Reading package lists... 424s Reading package lists... 424s Building dependency tree... 424s Reading state information... 424s Calculating upgrade... 425s Calculating upgrade... 425s The following packages were automatically installed and are no longer required: 425s libnsl2 libpython3.12-minimal libpython3.12-stdlib libpython3.12t64 425s linux-headers-6.11.0-8 linux-headers-6.11.0-8-generic 425s linux-modules-6.11.0-8-generic linux-tools-6.11.0-8 425s linux-tools-6.11.0-8-generic 425s Use 'sudo apt autoremove' to remove them. 425s The following packages will be upgraded: 425s pinentry-curses python3-jinja2 strace 425s 3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 425s Need to get 652 kB of archives. 425s After this operation, 27.6 kB of additional disk space will be used. 425s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x strace s390x 6.13+ds-1ubuntu1 [500 kB] 425s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x pinentry-curses s390x 1.3.1-2ubuntu3 [42.9 kB] 425s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x python3-jinja2 all 3.1.5-2ubuntu1 [109 kB] 426s Fetched 652 kB in 1s (687 kB/s) 426s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81428 files and directories currently installed.) 426s Preparing to unpack .../strace_6.13+ds-1ubuntu1_s390x.deb ... 426s Unpacking strace (6.13+ds-1ubuntu1) over (6.11-0ubuntu1) ... 426s Preparing to unpack .../pinentry-curses_1.3.1-2ubuntu3_s390x.deb ... 426s Unpacking pinentry-curses (1.3.1-2ubuntu3) over (1.3.1-2ubuntu2) ... 426s Preparing to unpack .../python3-jinja2_3.1.5-2ubuntu1_all.deb ... 426s Unpacking python3-jinja2 (3.1.5-2ubuntu1) over (3.1.5-2) ... 426s Setting up pinentry-curses (1.3.1-2ubuntu3) ... 426s Setting up python3-jinja2 (3.1.5-2ubuntu1) ... 426s Setting up strace (6.13+ds-1ubuntu1) ... 426s Processing triggers for man-db (2.13.0-1) ... 427s Reading package lists... 427s Building dependency tree... 427s Reading state information... 427s Solving dependencies... 427s The following packages will be REMOVED: 427s libnsl2* libpython3.12-minimal* libpython3.12-stdlib* libpython3.12t64* 427s linux-headers-6.11.0-8* linux-headers-6.11.0-8-generic* 427s linux-modules-6.11.0-8-generic* linux-tools-6.11.0-8* 427s linux-tools-6.11.0-8-generic* 427s 0 upgraded, 0 newly installed, 9 to remove and 5 not upgraded. 427s After this operation, 167 MB disk space will be freed. 427s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 81428 files and directories currently installed.) 427s Removing linux-tools-6.11.0-8-generic (6.11.0-8.8) ... 427s Removing linux-tools-6.11.0-8 (6.11.0-8.8) ... 427s Removing libpython3.12t64:s390x (3.12.9-1) ... 427s Removing libpython3.12-stdlib:s390x (3.12.9-1) ... 427s Removing libnsl2:s390x (1.3.0-3build3) ... 427s Removing libpython3.12-minimal:s390x (3.12.9-1) ... 427s Removing linux-headers-6.11.0-8-generic (6.11.0-8.8) ... 427s Removing linux-headers-6.11.0-8 (6.11.0-8.8) ... 428s Removing linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 428s Processing triggers for libc-bin (2.41-1ubuntu1) ... 428s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56328 files and directories currently installed.) 428s Purging configuration files for libpython3.12-minimal:s390x (3.12.9-1) ... 428s Purging configuration files for linux-modules-6.11.0-8-generic (6.11.0-8.8) ... 428s autopkgtest [18:07:08]: upgrading testbed (apt dist-upgrade and autopurge) 429s Reading package lists... 429s Building dependency tree... 429s Reading state information... 429s Calculating upgrade...Starting pkgProblemResolver with broken count: 0 429s Starting 2 pkgProblemResolver with broken count: 0 429s Done 429s Entering ResolveByKeep 429s 429s Calculating upgrade... 429s The following packages will be upgraded: 429s libc-bin libc-dev-bin libc6 libc6-dev locales 430s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 430s Need to get 9512 kB of archives. 430s After this operation, 8192 B of additional disk space will be used. 430s Get:1 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6-dev s390x 2.41-1ubuntu2 [1678 kB] 431s Get:2 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-dev-bin s390x 2.41-1ubuntu2 [24.3 kB] 431s Get:3 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc6 s390x 2.41-1ubuntu2 [2892 kB] 434s Get:4 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x libc-bin s390x 2.41-1ubuntu2 [671 kB] 435s Get:5 http://ftpmaster.internal/ubuntu plucky-proposed/main s390x locales all 2.41-1ubuntu2 [4246 kB] 439s Preconfiguring packages ... 439s Fetched 9512 kB in 10s (992 kB/s) 439s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 439s Preparing to unpack .../libc6-dev_2.41-1ubuntu2_s390x.deb ... 439s Unpacking libc6-dev:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 439s Preparing to unpack .../libc-dev-bin_2.41-1ubuntu2_s390x.deb ... 439s Unpacking libc-dev-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 439s Preparing to unpack .../libc6_2.41-1ubuntu2_s390x.deb ... 439s Unpacking libc6:s390x (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 439s Setting up libc6:s390x (2.41-1ubuntu2) ... 440s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 440s Preparing to unpack .../libc-bin_2.41-1ubuntu2_s390x.deb ... 440s Unpacking libc-bin (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 440s Setting up libc-bin (2.41-1ubuntu2) ... 440s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 440s Preparing to unpack .../locales_2.41-1ubuntu2_all.deb ... 440s Unpacking locales (2.41-1ubuntu2) over (2.41-1ubuntu1) ... 440s Setting up locales (2.41-1ubuntu2) ... 440s Generating locales (this might take a while)... 441s en_US.UTF-8... done 441s Generation complete. 441s Setting up libc-dev-bin (2.41-1ubuntu2) ... 441s Setting up libc6-dev:s390x (2.41-1ubuntu2) ... 441s Processing triggers for man-db (2.13.0-1) ... 442s Processing triggers for systemd (257.3-1ubuntu3) ... 442s Reading package lists... 443s Building dependency tree... 443s Reading state information... 443s Starting pkgProblemResolver with broken count: 0 443s Starting 2 pkgProblemResolver with broken count: 0 443s Done 443s Solving dependencies... 443s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 443s autopkgtest [18:07:23]: rebooting testbed after setup commands that affected boot 464s Reading package lists... 464s Building dependency tree... 464s Reading state information... 464s Starting pkgProblemResolver with broken count: 0 464s Starting 2 pkgProblemResolver with broken count: 0 464s Done 464s The following NEW packages will be installed: 464s build-essential cpp cpp-14 cpp-14-s390x-linux-gnu cpp-s390x-linux-gnu 464s dctrl-tools fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-mono 464s g++ g++-14 g++-14-s390x-linux-gnu g++-s390x-linux-gnu gcc gcc-14 464s gcc-14-s390x-linux-gnu gcc-s390x-linux-gnu gfortran gfortran-14 464s gfortran-14-s390x-linux-gnu gfortran-s390x-linux-gnu icu-devtools libasan8 464s libblas-dev libblas3 libbz2-dev libcairo2 libcc1-0 libdatrie1 libdeflate-dev 464s libdeflate0 libfontconfig1 libfreetype6 libgcc-14-dev libgfortran-14-dev 464s libgfortran5 libgomp1 libgraphite2-3 libharfbuzz0b libice6 libicu-dev 464s libisl23 libitm1 libjbig0 libjpeg-dev libjpeg-turbo8 libjpeg-turbo8-dev 464s libjpeg8 libjpeg8-dev liblapack-dev liblapack3 liblzma-dev libmpc3 464s libncurses-dev libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 464s libpaper-utils libpaper2 libpcre2-16-0 libpcre2-32-0 libpcre2-dev 464s libpcre2-posix3 libpixman-1-0 libpkgconf3 libpng-dev libreadline-dev 464s libsharpyuv0 libsm6 libstdc++-14-dev libtcl8.6 libthai-data libthai0 464s libtiff6 libtirpc-dev libtk8.6 libubsan1 libwebp7 libxcb-render0 libxcb-shm0 464s libxft2 libxrender1 libxss1 libxt6t64 pkg-r-autopkgtest pkgconf pkgconf-bin 464s r-base-core r-base-dev r-cran-expm r-cran-lattice r-cran-matrix 464s r-cran-rcolorbrewer r-cran-sfsmisc unzip x11-common xdg-utils zip zlib1g-dev 465s 0 upgraded, 100 newly installed, 0 to remove and 0 not upgraded. 465s Need to get 129 MB of archives. 465s After this operation, 371 MB of additional disk space will be used. 465s Get:1 http://ftpmaster.internal/ubuntu plucky/main s390x libisl23 s390x 0.27-1 [704 kB] 465s Get:2 http://ftpmaster.internal/ubuntu plucky/main s390x libmpc3 s390x 1.3.1-1build2 [57.8 kB] 466s Get:3 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [9572 kB] 477s Get:4 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-14 s390x 14.2.0-17ubuntu3 [1028 B] 477s Get:5 http://ftpmaster.internal/ubuntu plucky/main s390x cpp-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [5556 B] 477s Get:6 http://ftpmaster.internal/ubuntu plucky/main s390x cpp s390x 4:14.2.0-1ubuntu1 [22.4 kB] 477s Get:7 http://ftpmaster.internal/ubuntu plucky/main s390x libcc1-0 s390x 15-20250222-0ubuntu1 [49.2 kB] 479s Get:8 http://ftpmaster.internal/ubuntu plucky/main s390x libgomp1 s390x 15-20250222-0ubuntu1 [152 kB] 479s Get:9 http://ftpmaster.internal/ubuntu plucky/main s390x libitm1 s390x 15-20250222-0ubuntu1 [31.2 kB] 479s Get:10 http://ftpmaster.internal/ubuntu plucky/main s390x libasan8 s390x 15-20250222-0ubuntu1 [2970 kB] 483s Get:11 http://ftpmaster.internal/ubuntu plucky/main s390x libubsan1 s390x 15-20250222-0ubuntu1 [1212 kB] 484s Get:12 http://ftpmaster.internal/ubuntu plucky/main s390x libgcc-14-dev s390x 14.2.0-17ubuntu3 [1037 kB] 485s Get:13 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [18.7 MB] 506s Get:14 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-14 s390x 14.2.0-17ubuntu3 [526 kB] 507s Get:15 http://ftpmaster.internal/ubuntu plucky/main s390x gcc-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1204 B] 507s Get:16 http://ftpmaster.internal/ubuntu plucky/main s390x gcc s390x 4:14.2.0-1ubuntu1 [5004 B] 507s Get:17 http://ftpmaster.internal/ubuntu plucky/main s390x libstdc++-14-dev s390x 14.2.0-17ubuntu3 [2611 kB] 510s Get:18 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [11.0 MB] 521s Get:19 http://ftpmaster.internal/ubuntu plucky/main s390x g++-14 s390x 14.2.0-17ubuntu3 [21.8 kB] 521s Get:20 http://ftpmaster.internal/ubuntu plucky/main s390x g++-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [956 B] 521s Get:21 http://ftpmaster.internal/ubuntu plucky/main s390x g++ s390x 4:14.2.0-1ubuntu1 [1080 B] 521s Get:22 http://ftpmaster.internal/ubuntu plucky/main s390x build-essential s390x 12.10ubuntu1 [4930 B] 521s Get:23 http://ftpmaster.internal/ubuntu plucky/main s390x dctrl-tools s390x 2.24-3build3 [106 kB] 521s Get:24 http://ftpmaster.internal/ubuntu plucky/main s390x libfreetype6 s390x 2.13.3+dfsg-1 [431 kB] 521s Get:25 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-mono all 2.37-8 [502 kB] 522s Get:26 http://ftpmaster.internal/ubuntu plucky/main s390x fonts-dejavu-core all 2.37-8 [835 kB] 523s Get:27 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig-config s390x 2.15.0-2ubuntu1 [37.5 kB] 523s Get:28 http://ftpmaster.internal/ubuntu plucky/main s390x libfontconfig1 s390x 2.15.0-2ubuntu1 [150 kB] 523s Get:29 http://ftpmaster.internal/ubuntu plucky/main s390x fontconfig s390x 2.15.0-2ubuntu1 [191 kB] 523s Get:30 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran5 s390x 15-20250222-0ubuntu1 [620 kB] 524s Get:31 http://ftpmaster.internal/ubuntu plucky/main s390x libgfortran-14-dev s390x 14.2.0-17ubuntu3 [654 kB] 524s Get:32 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14-s390x-linux-gnu s390x 14.2.0-17ubuntu3 [10.3 MB] 534s Get:33 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-14 s390x 14.2.0-17ubuntu3 [13.6 kB] 534s Get:34 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran-s390x-linux-gnu s390x 4:14.2.0-1ubuntu1 [1012 B] 534s Get:35 http://ftpmaster.internal/ubuntu plucky/main s390x gfortran s390x 4:14.2.0-1ubuntu1 [1160 B] 534s Get:36 http://ftpmaster.internal/ubuntu plucky/main s390x icu-devtools s390x 76.1-1ubuntu2 [225 kB] 535s Get:37 http://ftpmaster.internal/ubuntu plucky/main s390x libblas3 s390x 3.12.1-2 [252 kB] 535s Get:38 http://ftpmaster.internal/ubuntu plucky/main s390x libblas-dev s390x 3.12.1-2 [254 kB] 535s Get:39 http://ftpmaster.internal/ubuntu plucky/main s390x libbz2-dev s390x 1.0.8-6 [39.1 kB] 535s Get:40 http://ftpmaster.internal/ubuntu plucky/main s390x libpixman-1-0 s390x 0.44.0-3 [201 kB] 535s Get:41 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-render0 s390x 1.17.0-2 [17.0 kB] 535s Get:42 http://ftpmaster.internal/ubuntu plucky/main s390x libxcb-shm0 s390x 1.17.0-2 [5862 B] 535s Get:43 http://ftpmaster.internal/ubuntu plucky/main s390x libxrender1 s390x 1:0.9.10-1.1build1 [20.4 kB] 535s Get:44 http://ftpmaster.internal/ubuntu plucky/main s390x libcairo2 s390x 1.18.2-2 [580 kB] 536s Get:45 http://ftpmaster.internal/ubuntu plucky/main s390x libdatrie1 s390x 0.2.13-3build1 [20.6 kB] 536s Get:46 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate0 s390x 1.23-1 [46.1 kB] 536s Get:47 http://ftpmaster.internal/ubuntu plucky/main s390x libdeflate-dev s390x 1.23-1 [52.2 kB] 536s Get:48 http://ftpmaster.internal/ubuntu plucky/main s390x libgraphite2-3 s390x 1.3.14-2ubuntu1 [79.8 kB] 536s Get:49 http://ftpmaster.internal/ubuntu plucky/main s390x libharfbuzz0b s390x 10.2.0-1 [538 kB] 537s Get:50 http://ftpmaster.internal/ubuntu plucky/main s390x x11-common all 1:7.7+23ubuntu3 [21.7 kB] 537s Get:51 http://ftpmaster.internal/ubuntu plucky/main s390x libice6 s390x 2:1.1.1-1 [45.4 kB] 537s Get:52 http://ftpmaster.internal/ubuntu plucky/main s390x libicu-dev s390x 76.1-1ubuntu2 [12.2 MB] 548s Get:53 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8 s390x 2.1.5-3ubuntu2 [147 kB] 548s Get:54 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-turbo8-dev s390x 2.1.5-3ubuntu2 [281 kB] 548s Get:55 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8 s390x 8c-2ubuntu11 [2146 B] 548s Get:56 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg8-dev s390x 8c-2ubuntu11 [1484 B] 548s Get:57 http://ftpmaster.internal/ubuntu plucky/main s390x libjpeg-dev s390x 8c-2ubuntu11 [1484 B] 548s Get:58 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack3 s390x 3.12.1-2 [2971 kB] 551s Get:59 http://ftpmaster.internal/ubuntu plucky/main s390x liblapack-dev s390x 3.12.1-2 [5967 kB] 556s Get:60 http://ftpmaster.internal/ubuntu plucky/main s390x libncurses-dev s390x 6.5+20250216-2 [407 kB] 556s Get:61 http://ftpmaster.internal/ubuntu plucky/main s390x libthai-data all 0.1.29-2build1 [158 kB] 556s Get:62 http://ftpmaster.internal/ubuntu plucky/main s390x libthai0 s390x 0.1.29-2build1 [20.7 kB] 556s Get:63 http://ftpmaster.internal/ubuntu plucky/main s390x libpango-1.0-0 s390x 1.56.2-1 [253 kB] 556s Get:64 http://ftpmaster.internal/ubuntu plucky/main s390x libpangoft2-1.0-0 s390x 1.56.2-1 [50.2 kB] 556s Get:65 http://ftpmaster.internal/ubuntu plucky/main s390x libpangocairo-1.0-0 s390x 1.56.2-1 [28.2 kB] 556s Get:66 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper2 s390x 2.2.5-0.3 [17.2 kB] 556s Get:67 http://ftpmaster.internal/ubuntu plucky/main s390x libpaper-utils s390x 2.2.5-0.3 [15.3 kB] 556s Get:68 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-16-0 s390x 10.45-1 [259 kB] 557s Get:69 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-32-0 s390x 10.45-1 [245 kB] 557s Get:70 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-posix3 s390x 10.45-1 [7080 B] 557s Get:71 http://ftpmaster.internal/ubuntu plucky/main s390x libpcre2-dev s390x 10.45-1 [899 kB] 558s Get:72 http://ftpmaster.internal/ubuntu plucky/main s390x libpkgconf3 s390x 1.8.1-4 [31.2 kB] 558s Get:73 http://ftpmaster.internal/ubuntu plucky/main s390x zlib1g-dev s390x 1:1.3.dfsg+really1.3.1-1ubuntu1 [898 kB] 558s Get:74 http://ftpmaster.internal/ubuntu plucky/main s390x libpng-dev s390x 1.6.47-1 [278 kB] 558s Get:75 http://ftpmaster.internal/ubuntu plucky/main s390x libreadline-dev s390x 8.2-6 [187 kB] 559s Get:76 http://ftpmaster.internal/ubuntu plucky/main s390x libsharpyuv0 s390x 1.5.0-0.1 [16.7 kB] 559s Get:77 http://ftpmaster.internal/ubuntu plucky/main s390x libsm6 s390x 2:1.2.4-1 [18.4 kB] 559s Get:78 http://ftpmaster.internal/ubuntu plucky/main s390x libtcl8.6 s390x 8.6.16+dfsg-1 [1034 kB] 559s Get:79 http://ftpmaster.internal/ubuntu plucky/main s390x libjbig0 s390x 2.1-6.1ubuntu2 [33.1 kB] 559s Get:80 http://ftpmaster.internal/ubuntu plucky/main s390x libwebp7 s390x 1.5.0-0.1 [210 kB] 559s Get:81 http://ftpmaster.internal/ubuntu plucky/main s390x libtiff6 s390x 4.5.1+git230720-4ubuntu4 [217 kB] 560s Get:82 http://ftpmaster.internal/ubuntu plucky/main s390x libxft2 s390x 2.3.6-1build1 [49.6 kB] 560s Get:83 http://ftpmaster.internal/ubuntu plucky/main s390x libxss1 s390x 1:1.2.3-1build3 [7396 B] 560s Get:84 http://ftpmaster.internal/ubuntu plucky/main s390x libtk8.6 s390x 8.6.16-1 [830 kB] 560s Get:85 http://ftpmaster.internal/ubuntu plucky/main s390x libxt6t64 s390x 1:1.2.1-1.2build1 [184 kB] 560s Get:86 http://ftpmaster.internal/ubuntu plucky/main s390x zip s390x 3.0-14ubuntu2 [187 kB] 561s Get:87 http://ftpmaster.internal/ubuntu plucky/main s390x unzip s390x 6.0-28ubuntu6 [186 kB] 561s Get:88 http://ftpmaster.internal/ubuntu plucky/main s390x xdg-utils all 1.2.1-2ubuntu1 [66.0 kB] 561s Get:89 http://ftpmaster.internal/ubuntu plucky/universe s390x r-base-core s390x 4.4.3-1 [28.6 MB] 584s Get:90 http://ftpmaster.internal/ubuntu plucky/main s390x liblzma-dev s390x 5.6.4-1 [183 kB] 584s Get:91 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf-bin s390x 1.8.1-4 [21.5 kB] 584s Get:92 http://ftpmaster.internal/ubuntu plucky/main s390x pkgconf s390x 1.8.1-4 [16.7 kB] 584s Get:93 http://ftpmaster.internal/ubuntu plucky/main s390x libtirpc-dev s390x 1.3.4+ds-1.3 [196 kB] 585s Get:94 http://ftpmaster.internal/ubuntu plucky/universe s390x r-base-dev all 4.4.3-1 [4176 B] 585s Get:95 http://ftpmaster.internal/ubuntu plucky/universe s390x pkg-r-autopkgtest all 20231212ubuntu1 [6448 B] 585s Get:96 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-lattice s390x 0.22-6-1 [1340 kB] 586s Get:97 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-matrix s390x 1.7-3-1 [4449 kB] 590s Get:98 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-expm s390x 1.0-0-1 [229 kB] 590s Get:99 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-rcolorbrewer all 1.1-3-1build1 [55.4 kB] 590s Get:100 http://ftpmaster.internal/ubuntu plucky/universe s390x r-cran-sfsmisc all 1.1-20-1 [674 kB] 591s Preconfiguring packages ... 591s Fetched 129 MB in 2min 6s (1021 kB/s) 591s Selecting previously unselected package libisl23:s390x. 591s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 56326 files and directories currently installed.) 591s Preparing to unpack .../00-libisl23_0.27-1_s390x.deb ... 591s Unpacking libisl23:s390x (0.27-1) ... 591s Selecting previously unselected package libmpc3:s390x. 591s Preparing to unpack .../01-libmpc3_1.3.1-1build2_s390x.deb ... 591s Unpacking libmpc3:s390x (1.3.1-1build2) ... 591s Selecting previously unselected package cpp-14-s390x-linux-gnu. 591s Preparing to unpack .../02-cpp-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 591s Unpacking cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package cpp-14. 592s Preparing to unpack .../03-cpp-14_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking cpp-14 (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package cpp-s390x-linux-gnu. 592s Preparing to unpack .../04-cpp-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 592s Unpacking cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 592s Selecting previously unselected package cpp. 592s Preparing to unpack .../05-cpp_4%3a14.2.0-1ubuntu1_s390x.deb ... 592s Unpacking cpp (4:14.2.0-1ubuntu1) ... 592s Selecting previously unselected package libcc1-0:s390x. 592s Preparing to unpack .../06-libcc1-0_15-20250222-0ubuntu1_s390x.deb ... 592s Unpacking libcc1-0:s390x (15-20250222-0ubuntu1) ... 592s Selecting previously unselected package libgomp1:s390x. 592s Preparing to unpack .../07-libgomp1_15-20250222-0ubuntu1_s390x.deb ... 592s Unpacking libgomp1:s390x (15-20250222-0ubuntu1) ... 592s Selecting previously unselected package libitm1:s390x. 592s Preparing to unpack .../08-libitm1_15-20250222-0ubuntu1_s390x.deb ... 592s Unpacking libitm1:s390x (15-20250222-0ubuntu1) ... 592s Selecting previously unselected package libasan8:s390x. 592s Preparing to unpack .../09-libasan8_15-20250222-0ubuntu1_s390x.deb ... 592s Unpacking libasan8:s390x (15-20250222-0ubuntu1) ... 592s Selecting previously unselected package libubsan1:s390x. 592s Preparing to unpack .../10-libubsan1_15-20250222-0ubuntu1_s390x.deb ... 592s Unpacking libubsan1:s390x (15-20250222-0ubuntu1) ... 592s Selecting previously unselected package libgcc-14-dev:s390x. 592s Preparing to unpack .../11-libgcc-14-dev_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package gcc-14-s390x-linux-gnu. 592s Preparing to unpack .../12-gcc-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package gcc-14. 592s Preparing to unpack .../13-gcc-14_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking gcc-14 (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package gcc-s390x-linux-gnu. 592s Preparing to unpack .../14-gcc-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 592s Unpacking gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 592s Selecting previously unselected package gcc. 592s Preparing to unpack .../15-gcc_4%3a14.2.0-1ubuntu1_s390x.deb ... 592s Unpacking gcc (4:14.2.0-1ubuntu1) ... 592s Selecting previously unselected package libstdc++-14-dev:s390x. 592s Preparing to unpack .../16-libstdc++-14-dev_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package g++-14-s390x-linux-gnu. 592s Preparing to unpack .../17-g++-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package g++-14. 592s Preparing to unpack .../18-g++-14_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking g++-14 (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package g++-s390x-linux-gnu. 592s Preparing to unpack .../19-g++-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 592s Unpacking g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 592s Selecting previously unselected package g++. 592s Preparing to unpack .../20-g++_4%3a14.2.0-1ubuntu1_s390x.deb ... 592s Unpacking g++ (4:14.2.0-1ubuntu1) ... 592s Selecting previously unselected package build-essential. 592s Preparing to unpack .../21-build-essential_12.10ubuntu1_s390x.deb ... 592s Unpacking build-essential (12.10ubuntu1) ... 592s Selecting previously unselected package dctrl-tools. 592s Preparing to unpack .../22-dctrl-tools_2.24-3build3_s390x.deb ... 592s Unpacking dctrl-tools (2.24-3build3) ... 592s Selecting previously unselected package libfreetype6:s390x. 592s Preparing to unpack .../23-libfreetype6_2.13.3+dfsg-1_s390x.deb ... 592s Unpacking libfreetype6:s390x (2.13.3+dfsg-1) ... 592s Selecting previously unselected package fonts-dejavu-mono. 592s Preparing to unpack .../24-fonts-dejavu-mono_2.37-8_all.deb ... 592s Unpacking fonts-dejavu-mono (2.37-8) ... 592s Selecting previously unselected package fonts-dejavu-core. 592s Preparing to unpack .../25-fonts-dejavu-core_2.37-8_all.deb ... 592s Unpacking fonts-dejavu-core (2.37-8) ... 592s Selecting previously unselected package fontconfig-config. 592s Preparing to unpack .../26-fontconfig-config_2.15.0-2ubuntu1_s390x.deb ... 592s Unpacking fontconfig-config (2.15.0-2ubuntu1) ... 592s Selecting previously unselected package libfontconfig1:s390x. 592s Preparing to unpack .../27-libfontconfig1_2.15.0-2ubuntu1_s390x.deb ... 592s Unpacking libfontconfig1:s390x (2.15.0-2ubuntu1) ... 592s Selecting previously unselected package fontconfig. 592s Preparing to unpack .../28-fontconfig_2.15.0-2ubuntu1_s390x.deb ... 592s Unpacking fontconfig (2.15.0-2ubuntu1) ... 592s Selecting previously unselected package libgfortran5:s390x. 592s Preparing to unpack .../29-libgfortran5_15-20250222-0ubuntu1_s390x.deb ... 592s Unpacking libgfortran5:s390x (15-20250222-0ubuntu1) ... 592s Selecting previously unselected package libgfortran-14-dev:s390x. 592s Preparing to unpack .../30-libgfortran-14-dev_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking libgfortran-14-dev:s390x (14.2.0-17ubuntu3) ... 592s Selecting previously unselected package gfortran-14-s390x-linux-gnu. 592s Preparing to unpack .../31-gfortran-14-s390x-linux-gnu_14.2.0-17ubuntu3_s390x.deb ... 592s Unpacking gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 593s Selecting previously unselected package gfortran-14. 593s Preparing to unpack .../32-gfortran-14_14.2.0-17ubuntu3_s390x.deb ... 593s Unpacking gfortran-14 (14.2.0-17ubuntu3) ... 593s Selecting previously unselected package gfortran-s390x-linux-gnu. 593s Preparing to unpack .../33-gfortran-s390x-linux-gnu_4%3a14.2.0-1ubuntu1_s390x.deb ... 593s Unpacking gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 593s Selecting previously unselected package gfortran. 593s Preparing to unpack .../34-gfortran_4%3a14.2.0-1ubuntu1_s390x.deb ... 593s Unpacking gfortran (4:14.2.0-1ubuntu1) ... 593s Selecting previously unselected package icu-devtools. 593s Preparing to unpack .../35-icu-devtools_76.1-1ubuntu2_s390x.deb ... 593s Unpacking icu-devtools (76.1-1ubuntu2) ... 593s Selecting previously unselected package libblas3:s390x. 593s Preparing to unpack .../36-libblas3_3.12.1-2_s390x.deb ... 593s Unpacking libblas3:s390x (3.12.1-2) ... 593s Selecting previously unselected package libblas-dev:s390x. 593s Preparing to unpack .../37-libblas-dev_3.12.1-2_s390x.deb ... 593s Unpacking libblas-dev:s390x (3.12.1-2) ... 593s Selecting previously unselected package libbz2-dev:s390x. 593s Preparing to unpack .../38-libbz2-dev_1.0.8-6_s390x.deb ... 593s Unpacking libbz2-dev:s390x (1.0.8-6) ... 593s Selecting previously unselected package libpixman-1-0:s390x. 593s Preparing to unpack .../39-libpixman-1-0_0.44.0-3_s390x.deb ... 593s Unpacking libpixman-1-0:s390x (0.44.0-3) ... 593s Selecting previously unselected package libxcb-render0:s390x. 593s Preparing to unpack .../40-libxcb-render0_1.17.0-2_s390x.deb ... 593s Unpacking libxcb-render0:s390x (1.17.0-2) ... 593s Selecting previously unselected package libxcb-shm0:s390x. 593s Preparing to unpack .../41-libxcb-shm0_1.17.0-2_s390x.deb ... 593s Unpacking libxcb-shm0:s390x (1.17.0-2) ... 593s Selecting previously unselected package libxrender1:s390x. 593s Preparing to unpack .../42-libxrender1_1%3a0.9.10-1.1build1_s390x.deb ... 593s Unpacking libxrender1:s390x (1:0.9.10-1.1build1) ... 593s Selecting previously unselected package libcairo2:s390x. 593s Preparing to unpack .../43-libcairo2_1.18.2-2_s390x.deb ... 593s Unpacking libcairo2:s390x (1.18.2-2) ... 593s Selecting previously unselected package libdatrie1:s390x. 593s Preparing to unpack .../44-libdatrie1_0.2.13-3build1_s390x.deb ... 593s Unpacking libdatrie1:s390x (0.2.13-3build1) ... 593s Selecting previously unselected package libdeflate0:s390x. 593s Preparing to unpack .../45-libdeflate0_1.23-1_s390x.deb ... 593s Unpacking libdeflate0:s390x (1.23-1) ... 593s Selecting previously unselected package libdeflate-dev:s390x. 593s Preparing to unpack .../46-libdeflate-dev_1.23-1_s390x.deb ... 593s Unpacking libdeflate-dev:s390x (1.23-1) ... 593s Selecting previously unselected package libgraphite2-3:s390x. 593s Preparing to unpack .../47-libgraphite2-3_1.3.14-2ubuntu1_s390x.deb ... 593s Unpacking libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 593s Selecting previously unselected package libharfbuzz0b:s390x. 593s Preparing to unpack .../48-libharfbuzz0b_10.2.0-1_s390x.deb ... 593s Unpacking libharfbuzz0b:s390x (10.2.0-1) ... 593s Selecting previously unselected package x11-common. 593s Preparing to unpack .../49-x11-common_1%3a7.7+23ubuntu3_all.deb ... 593s Unpacking x11-common (1:7.7+23ubuntu3) ... 593s Selecting previously unselected package libice6:s390x. 593s Preparing to unpack .../50-libice6_2%3a1.1.1-1_s390x.deb ... 593s Unpacking libice6:s390x (2:1.1.1-1) ... 593s Selecting previously unselected package libicu-dev:s390x. 593s Preparing to unpack .../51-libicu-dev_76.1-1ubuntu2_s390x.deb ... 593s Unpacking libicu-dev:s390x (76.1-1ubuntu2) ... 593s Selecting previously unselected package libjpeg-turbo8:s390x. 593s Preparing to unpack .../52-libjpeg-turbo8_2.1.5-3ubuntu2_s390x.deb ... 593s Unpacking libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 593s Selecting previously unselected package libjpeg-turbo8-dev:s390x. 593s Preparing to unpack .../53-libjpeg-turbo8-dev_2.1.5-3ubuntu2_s390x.deb ... 593s Unpacking libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 593s Selecting previously unselected package libjpeg8:s390x. 593s Preparing to unpack .../54-libjpeg8_8c-2ubuntu11_s390x.deb ... 593s Unpacking libjpeg8:s390x (8c-2ubuntu11) ... 593s Selecting previously unselected package libjpeg8-dev:s390x. 593s Preparing to unpack .../55-libjpeg8-dev_8c-2ubuntu11_s390x.deb ... 593s Unpacking libjpeg8-dev:s390x (8c-2ubuntu11) ... 593s Selecting previously unselected package libjpeg-dev:s390x. 593s Preparing to unpack .../56-libjpeg-dev_8c-2ubuntu11_s390x.deb ... 593s Unpacking libjpeg-dev:s390x (8c-2ubuntu11) ... 593s Selecting previously unselected package liblapack3:s390x. 593s Preparing to unpack .../57-liblapack3_3.12.1-2_s390x.deb ... 593s Unpacking liblapack3:s390x (3.12.1-2) ... 593s Selecting previously unselected package liblapack-dev:s390x. 593s Preparing to unpack .../58-liblapack-dev_3.12.1-2_s390x.deb ... 593s Unpacking liblapack-dev:s390x (3.12.1-2) ... 593s Selecting previously unselected package libncurses-dev:s390x. 593s Preparing to unpack .../59-libncurses-dev_6.5+20250216-2_s390x.deb ... 593s Unpacking libncurses-dev:s390x (6.5+20250216-2) ... 593s Selecting previously unselected package libthai-data. 593s Preparing to unpack .../60-libthai-data_0.1.29-2build1_all.deb ... 593s Unpacking libthai-data (0.1.29-2build1) ... 593s Selecting previously unselected package libthai0:s390x. 593s Preparing to unpack .../61-libthai0_0.1.29-2build1_s390x.deb ... 593s Unpacking libthai0:s390x (0.1.29-2build1) ... 593s Selecting previously unselected package libpango-1.0-0:s390x. 593s Preparing to unpack .../62-libpango-1.0-0_1.56.2-1_s390x.deb ... 593s Unpacking libpango-1.0-0:s390x (1.56.2-1) ... 593s Selecting previously unselected package libpangoft2-1.0-0:s390x. 593s Preparing to unpack .../63-libpangoft2-1.0-0_1.56.2-1_s390x.deb ... 593s Unpacking libpangoft2-1.0-0:s390x (1.56.2-1) ... 593s Selecting previously unselected package libpangocairo-1.0-0:s390x. 593s Preparing to unpack .../64-libpangocairo-1.0-0_1.56.2-1_s390x.deb ... 593s Unpacking libpangocairo-1.0-0:s390x (1.56.2-1) ... 593s Selecting previously unselected package libpaper2:s390x. 593s Preparing to unpack .../65-libpaper2_2.2.5-0.3_s390x.deb ... 593s Unpacking libpaper2:s390x (2.2.5-0.3) ... 593s Selecting previously unselected package libpaper-utils. 593s Preparing to unpack .../66-libpaper-utils_2.2.5-0.3_s390x.deb ... 593s Unpacking libpaper-utils (2.2.5-0.3) ... 593s Selecting previously unselected package libpcre2-16-0:s390x. 593s Preparing to unpack .../67-libpcre2-16-0_10.45-1_s390x.deb ... 593s Unpacking libpcre2-16-0:s390x (10.45-1) ... 593s Selecting previously unselected package libpcre2-32-0:s390x. 593s Preparing to unpack .../68-libpcre2-32-0_10.45-1_s390x.deb ... 593s Unpacking libpcre2-32-0:s390x (10.45-1) ... 593s Selecting previously unselected package libpcre2-posix3:s390x. 593s Preparing to unpack .../69-libpcre2-posix3_10.45-1_s390x.deb ... 593s Unpacking libpcre2-posix3:s390x (10.45-1) ... 593s Selecting previously unselected package libpcre2-dev:s390x. 593s Preparing to unpack .../70-libpcre2-dev_10.45-1_s390x.deb ... 593s Unpacking libpcre2-dev:s390x (10.45-1) ... 593s Selecting previously unselected package libpkgconf3:s390x. 593s Preparing to unpack .../71-libpkgconf3_1.8.1-4_s390x.deb ... 593s Unpacking libpkgconf3:s390x (1.8.1-4) ... 593s Selecting previously unselected package zlib1g-dev:s390x. 593s Preparing to unpack .../72-zlib1g-dev_1%3a1.3.dfsg+really1.3.1-1ubuntu1_s390x.deb ... 593s Unpacking zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 593s Selecting previously unselected package libpng-dev:s390x. 593s Preparing to unpack .../73-libpng-dev_1.6.47-1_s390x.deb ... 593s Unpacking libpng-dev:s390x (1.6.47-1) ... 593s Selecting previously unselected package libreadline-dev:s390x. 593s Preparing to unpack .../74-libreadline-dev_8.2-6_s390x.deb ... 593s Unpacking libreadline-dev:s390x (8.2-6) ... 593s Selecting previously unselected package libsharpyuv0:s390x. 593s Preparing to unpack .../75-libsharpyuv0_1.5.0-0.1_s390x.deb ... 593s Unpacking libsharpyuv0:s390x (1.5.0-0.1) ... 593s Selecting previously unselected package libsm6:s390x. 593s Preparing to unpack .../76-libsm6_2%3a1.2.4-1_s390x.deb ... 593s Unpacking libsm6:s390x (2:1.2.4-1) ... 593s Selecting previously unselected package libtcl8.6:s390x. 593s Preparing to unpack .../77-libtcl8.6_8.6.16+dfsg-1_s390x.deb ... 593s Unpacking libtcl8.6:s390x (8.6.16+dfsg-1) ... 593s Selecting previously unselected package libjbig0:s390x. 593s Preparing to unpack .../78-libjbig0_2.1-6.1ubuntu2_s390x.deb ... 593s Unpacking libjbig0:s390x (2.1-6.1ubuntu2) ... 593s Selecting previously unselected package libwebp7:s390x. 593s Preparing to unpack .../79-libwebp7_1.5.0-0.1_s390x.deb ... 593s Unpacking libwebp7:s390x (1.5.0-0.1) ... 593s Selecting previously unselected package libtiff6:s390x. 593s Preparing to unpack .../80-libtiff6_4.5.1+git230720-4ubuntu4_s390x.deb ... 593s Unpacking libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 593s Selecting previously unselected package libxft2:s390x. 593s Preparing to unpack .../81-libxft2_2.3.6-1build1_s390x.deb ... 593s Unpacking libxft2:s390x (2.3.6-1build1) ... 593s Selecting previously unselected package libxss1:s390x. 593s Preparing to unpack .../82-libxss1_1%3a1.2.3-1build3_s390x.deb ... 593s Unpacking libxss1:s390x (1:1.2.3-1build3) ... 593s Selecting previously unselected package libtk8.6:s390x. 593s Preparing to unpack .../83-libtk8.6_8.6.16-1_s390x.deb ... 593s Unpacking libtk8.6:s390x (8.6.16-1) ... 593s Selecting previously unselected package libxt6t64:s390x. 593s Preparing to unpack .../84-libxt6t64_1%3a1.2.1-1.2build1_s390x.deb ... 593s Unpacking libxt6t64:s390x (1:1.2.1-1.2build1) ... 594s Selecting previously unselected package zip. 594s Preparing to unpack .../85-zip_3.0-14ubuntu2_s390x.deb ... 594s Unpacking zip (3.0-14ubuntu2) ... 594s Selecting previously unselected package unzip. 594s Preparing to unpack .../86-unzip_6.0-28ubuntu6_s390x.deb ... 594s Unpacking unzip (6.0-28ubuntu6) ... 594s Selecting previously unselected package xdg-utils. 594s Preparing to unpack .../87-xdg-utils_1.2.1-2ubuntu1_all.deb ... 594s Unpacking xdg-utils (1.2.1-2ubuntu1) ... 594s Selecting previously unselected package r-base-core. 594s Preparing to unpack .../88-r-base-core_4.4.3-1_s390x.deb ... 594s Unpacking r-base-core (4.4.3-1) ... 594s Selecting previously unselected package liblzma-dev:s390x. 594s Preparing to unpack .../89-liblzma-dev_5.6.4-1_s390x.deb ... 594s Unpacking liblzma-dev:s390x (5.6.4-1) ... 594s Selecting previously unselected package pkgconf-bin. 594s Preparing to unpack .../90-pkgconf-bin_1.8.1-4_s390x.deb ... 594s Unpacking pkgconf-bin (1.8.1-4) ... 594s Selecting previously unselected package pkgconf:s390x. 594s Preparing to unpack .../91-pkgconf_1.8.1-4_s390x.deb ... 594s Unpacking pkgconf:s390x (1.8.1-4) ... 594s Selecting previously unselected package libtirpc-dev:s390x. 594s Preparing to unpack .../92-libtirpc-dev_1.3.4+ds-1.3_s390x.deb ... 594s Unpacking libtirpc-dev:s390x (1.3.4+ds-1.3) ... 594s Selecting previously unselected package r-base-dev. 594s Preparing to unpack .../93-r-base-dev_4.4.3-1_all.deb ... 594s Unpacking r-base-dev (4.4.3-1) ... 594s Selecting previously unselected package pkg-r-autopkgtest. 594s Preparing to unpack .../94-pkg-r-autopkgtest_20231212ubuntu1_all.deb ... 594s Unpacking pkg-r-autopkgtest (20231212ubuntu1) ... 594s Selecting previously unselected package r-cran-lattice. 594s Preparing to unpack .../95-r-cran-lattice_0.22-6-1_s390x.deb ... 594s Unpacking r-cran-lattice (0.22-6-1) ... 594s Selecting previously unselected package r-cran-matrix. 594s Preparing to unpack .../96-r-cran-matrix_1.7-3-1_s390x.deb ... 594s Unpacking r-cran-matrix (1.7-3-1) ... 594s Selecting previously unselected package r-cran-expm. 594s Preparing to unpack .../97-r-cran-expm_1.0-0-1_s390x.deb ... 594s Unpacking r-cran-expm (1.0-0-1) ... 594s Selecting previously unselected package r-cran-rcolorbrewer. 594s Preparing to unpack .../98-r-cran-rcolorbrewer_1.1-3-1build1_all.deb ... 594s Unpacking r-cran-rcolorbrewer (1.1-3-1build1) ... 594s Selecting previously unselected package r-cran-sfsmisc. 594s Preparing to unpack .../99-r-cran-sfsmisc_1.1-20-1_all.deb ... 594s Unpacking r-cran-sfsmisc (1.1-20-1) ... 594s Setting up libgraphite2-3:s390x (1.3.14-2ubuntu1) ... 594s Setting up libpixman-1-0:s390x (0.44.0-3) ... 594s Setting up libsharpyuv0:s390x (1.5.0-0.1) ... 594s Setting up libncurses-dev:s390x (6.5+20250216-2) ... 594s Setting up libxrender1:s390x (1:0.9.10-1.1build1) ... 594s Setting up libdatrie1:s390x (0.2.13-3build1) ... 594s Setting up libxcb-render0:s390x (1.17.0-2) ... 594s Setting up unzip (6.0-28ubuntu6) ... 594s Setting up x11-common (1:7.7+23ubuntu3) ... 594s Setting up libdeflate0:s390x (1.23-1) ... 594s Setting up libxcb-shm0:s390x (1.17.0-2) ... 594s Setting up libreadline-dev:s390x (8.2-6) ... 594s Setting up libgomp1:s390x (15-20250222-0ubuntu1) ... 594s Setting up libjbig0:s390x (2.1-6.1ubuntu2) ... 594s Setting up libpcre2-16-0:s390x (10.45-1) ... 594s Setting up zip (3.0-14ubuntu2) ... 594s Setting up libpcre2-32-0:s390x (10.45-1) ... 594s Setting up libblas3:s390x (3.12.1-2) ... 594s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so.3 to provide /usr/lib/s390x-linux-gnu/libblas.so.3 (libblas.so.3-s390x-linux-gnu) in auto mode 594s Setting up libtirpc-dev:s390x (1.3.4+ds-1.3) ... 594s Setting up libpkgconf3:s390x (1.8.1-4) ... 594s Setting up libfreetype6:s390x (2.13.3+dfsg-1) ... 594s Setting up fonts-dejavu-mono (2.37-8) ... 594s Setting up libmpc3:s390x (1.3.1-1build2) ... 594s Setting up libtcl8.6:s390x (8.6.16+dfsg-1) ... 594s Setting up icu-devtools (76.1-1ubuntu2) ... 594s Setting up fonts-dejavu-core (2.37-8) ... 594s Setting up pkgconf-bin (1.8.1-4) ... 594s Setting up libjpeg-turbo8:s390x (2.1.5-3ubuntu2) ... 594s Setting up libgfortran5:s390x (15-20250222-0ubuntu1) ... 594s Setting up libwebp7:s390x (1.5.0-0.1) ... 594s Setting up liblzma-dev:s390x (5.6.4-1) ... 594s Setting up libubsan1:s390x (15-20250222-0ubuntu1) ... 594s Setting up zlib1g-dev:s390x (1:1.3.dfsg+really1.3.1-1ubuntu1) ... 594s Setting up libpcre2-posix3:s390x (10.45-1) ... 594s Setting up libasan8:s390x (15-20250222-0ubuntu1) ... 594s Setting up libharfbuzz0b:s390x (10.2.0-1) ... 594s Setting up libthai-data (0.1.29-2build1) ... 594s Setting up libxss1:s390x (1:1.2.3-1build3) ... 594s Setting up libpaper2:s390x (2.2.5-0.3) ... 594s Setting up libisl23:s390x (0.27-1) ... 594s Setting up libdeflate-dev:s390x (1.23-1) ... 594s Setting up libicu-dev:s390x (76.1-1ubuntu2) ... 594s Setting up xdg-utils (1.2.1-2ubuntu1) ... 594s update-alternatives: using /usr/bin/xdg-open to provide /usr/bin/open (open) in auto mode 594s Setting up libcc1-0:s390x (15-20250222-0ubuntu1) ... 594s Setting up libblas-dev:s390x (3.12.1-2) ... 594s update-alternatives: using /usr/lib/s390x-linux-gnu/blas/libblas.so to provide /usr/lib/s390x-linux-gnu/libblas.so (libblas.so-s390x-linux-gnu) in auto mode 594s Setting up dctrl-tools (2.24-3build3) ... 594s Setting up libitm1:s390x (15-20250222-0ubuntu1) ... 594s Setting up libbz2-dev:s390x (1.0.8-6) ... 594s Setting up libjpeg8:s390x (8c-2ubuntu11) ... 594s Setting up libice6:s390x (2:1.1.1-1) ... 594s Setting up libjpeg-turbo8-dev:s390x (2.1.5-3ubuntu2) ... 594s Setting up liblapack3:s390x (3.12.1-2) ... 594s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so.3 to provide /usr/lib/s390x-linux-gnu/liblapack.so.3 (liblapack.so.3-s390x-linux-gnu) in auto mode 594s Setting up libpcre2-dev:s390x (10.45-1) ... 594s Setting up fontconfig-config (2.15.0-2ubuntu1) ... 594s Setting up libpng-dev:s390x (1.6.47-1) ... 594s Setting up libpaper-utils (2.2.5-0.3) ... 594s Setting up pkgconf:s390x (1.8.1-4) ... 594s Setting up libthai0:s390x (0.1.29-2build1) ... 594s Setting up liblapack-dev:s390x (3.12.1-2) ... 594s update-alternatives: using /usr/lib/s390x-linux-gnu/lapack/liblapack.so to provide /usr/lib/s390x-linux-gnu/liblapack.so (liblapack.so-s390x-linux-gnu) in auto mode 594s Setting up cpp-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 594s Setting up cpp-14 (14.2.0-17ubuntu3) ... 594s Setting up libtiff6:s390x (4.5.1+git230720-4ubuntu4) ... 594s Setting up libfontconfig1:s390x (2.15.0-2ubuntu1) ... 594s Setting up libgcc-14-dev:s390x (14.2.0-17ubuntu3) ... 594s Setting up libjpeg8-dev:s390x (8c-2ubuntu11) ... 594s Setting up libstdc++-14-dev:s390x (14.2.0-17ubuntu3) ... 594s Setting up libsm6:s390x (2:1.2.4-1) ... 594s Setting up libgfortran-14-dev:s390x (14.2.0-17ubuntu3) ... 594s Setting up fontconfig (2.15.0-2ubuntu1) ... 596s Regenerating fonts cache... done. 596s Setting up libxft2:s390x (2.3.6-1build1) ... 596s Setting up cpp-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 596s Setting up libtk8.6:s390x (8.6.16-1) ... 597s Setting up libpango-1.0-0:s390x (1.56.2-1) ... 597s Setting up libjpeg-dev:s390x (8c-2ubuntu11) ... 597s Setting up libcairo2:s390x (1.18.2-2) ... 597s Setting up gcc-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 597s Setting up gcc-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 597s Setting up libxt6t64:s390x (1:1.2.1-1.2build1) ... 597s Setting up g++-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 597s Setting up cpp (4:14.2.0-1ubuntu1) ... 597s Setting up libpangoft2-1.0-0:s390x (1.56.2-1) ... 597s Setting up libpangocairo-1.0-0:s390x (1.56.2-1) ... 597s Setting up gfortran-14-s390x-linux-gnu (14.2.0-17ubuntu3) ... 597s Setting up g++-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 597s Setting up gcc-14 (14.2.0-17ubuntu3) ... 597s Setting up r-base-core (4.4.3-1) ... 597s Creating config file /etc/R/Renviron with new version 597s Setting up r-cran-lattice (0.22-6-1) ... 597s Setting up g++-14 (14.2.0-17ubuntu3) ... 597s Setting up gfortran-14 (14.2.0-17ubuntu3) ... 597s Setting up gfortran-s390x-linux-gnu (4:14.2.0-1ubuntu1) ... 597s Setting up r-cran-sfsmisc (1.1-20-1) ... 597s Setting up gcc (4:14.2.0-1ubuntu1) ... 597s Setting up r-cran-rcolorbrewer (1.1-3-1build1) ... 597s Setting up r-cran-matrix (1.7-3-1) ... 597s Setting up g++ (4:14.2.0-1ubuntu1) ... 597s update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode 597s Setting up build-essential (12.10ubuntu1) ... 597s Setting up r-cran-expm (1.0-0-1) ... 597s Setting up gfortran (4:14.2.0-1ubuntu1) ... 597s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f95 (f95) in auto mode 597s update-alternatives: warning: skip creation of /usr/share/man/man1/f95.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f95) doesn't exist 597s update-alternatives: using /usr/bin/gfortran to provide /usr/bin/f77 (f77) in auto mode 597s update-alternatives: warning: skip creation of /usr/share/man/man1/f77.1.gz because associated file /usr/share/man/man1/gfortran.1.gz (of link group f77) doesn't exist 597s Setting up r-base-dev (4.4.3-1) ... 597s Setting up pkg-r-autopkgtest (20231212ubuntu1) ... 597s Processing triggers for libc-bin (2.41-1ubuntu2) ... 597s Processing triggers for man-db (2.13.0-1) ... 598s Processing triggers for install-info (7.1.1-1) ... 599s autopkgtest [18:09:59]: test pkg-r-autopkgtest: /usr/share/dh-r/pkg-r-autopkgtest 599s autopkgtest [18:09:59]: test pkg-r-autopkgtest: [----------------------- 600s Test: Try to load the R library expm 600s 600s R version 4.4.3 (2025-02-28) -- "Trophy Case" 600s Copyright (C) 2025 The R Foundation for Statistical Computing 600s Platform: s390x-ibm-linux-gnu 600s 600s R is free software and comes with ABSOLUTELY NO WARRANTY. 600s You are welcome to redistribute it under certain conditions. 600s Type 'license()' or 'licence()' for distribution details. 600s 600s R is a collaborative project with many contributors. 600s Type 'contributors()' for more information and 600s 'citation()' on how to cite R or R packages in publications. 600s 600s Type 'demo()' for some demos, 'help()' for on-line help, or 600s 'help.start()' for an HTML browser interface to help. 600s Type 'q()' to quit R. 600s 600s > library('expm') 600s Loading required package: Matrix 600s 600s Attaching package: ‘expm’ 600s 600s The following object is masked from ‘package:Matrix’: 600s 600s expm 600s 600s > 600s > 600s Other tests are currently unsupported! 600s They will be progressively added. 601s autopkgtest [18:10:01]: test pkg-r-autopkgtest: -----------------------] 601s pkg-r-autopkgtest PASS 601s autopkgtest [18:10:01]: test pkg-r-autopkgtest: - - - - - - - - - - results - - - - - - - - - - 602s autopkgtest [18:10:02]: @@@@@@@@@@@@@@@@@@@@ summary 602s run-unit-test PASS 602s pkg-r-autopkgtest PASS 619s nova [W] Using flock in prodstack6-s390x 619s Creating nova instance adt-plucky-s390x-r-cran-expm-20250315-175959-juju-7f2275-prod-proposed-migration-environment-20-0a0c87e5-2eae-4b4f-8051-fa612c7ce331 from image adt/ubuntu-plucky-s390x-server-20250315.img (UUID 3d3557fa-fd0f-4bba-9b89-8d5964e09f61)... 619s nova [W] Timed out waiting for 213ccb48-668e-4292-81da-5706a4f27551 to get deleted. 619s nova [W] Using flock in prodstack6-s390x 619s flock: timeout while waiting to get lock 619s Creating nova instance adt-plucky-s390x-r-cran-expm-20250315-175959-juju-7f2275-prod-proposed-migration-environment-20-0a0c87e5-2eae-4b4f-8051-fa612c7ce331 from image adt/ubuntu-plucky-s390x-server-20250315.img (UUID 3d3557fa-fd0f-4bba-9b89-8d5964e09f61)... 619s nova [W] Timed out waiting for 770f79cd-1bb0-4492-a719-2fe779060750 to get deleted.