bugGNU Octave - Bugs: bug #61711, Test errors for sorting NaN values...

 
 

bug #61711: Test errors for sorting NaN values on Windows with visibility flags

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Tue 21 Dec 2021 08:04:01 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 07 Nov 2022 03:38:01 PM UTC, comment #13: 

The buildbots ran one 24h cycle without build or link errors on any of the builders. And no new warnings afaict.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Sun 06 Nov 2022 05:25:03 PM UTC, comment #12: 

I moved the definition of that constructor back to Array.h here:
https://hg.savannah.gnu.org/hgweb/octave/rev/3ea38ae97cc6

I believe that all we can do for this bug report for the moment.

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Sun 06 Nov 2022 04:04:41 PM UTC, comment #11: 

The changes from comment #10 built on the platforms for which we have runners on GitHub (Linux, macOS, MinGW, Cygwin). So, I pushed them to the default branch after adding a commit message:
https://hg.savannah.gnu.org/hgweb/octave/rev/e7fc6251b698

This might allow to partially revert the changes from comment #6 and move that constructor definition back to the header.
I'll try to do that, and also try building with `-O0` again.

Markus Mützel <mmuetzel>
Group administrator
Sun 06 Nov 2022 10:58:07 AM UTC, comment #10: 

The classes exported by the standard library are a bit different conceptually from what we do with the Array<T> template class.
In the standard library, instead of exporting specialized template classes directly, they do the "specialization" in child classes.
E.g., for the `std::basic_string<T>` template class, instead of exporting the specializations in `std::basic_string<char>`, they create a child class `std::string` and export that child class with any "specializations" (i.e., overloaded methods).

In liboctave and liboctinterp, we'd like to export things like `Array<double>` including any specializations directly (without an "indirection" through a child class).

That means the same concepts that are used for exporting template classes in the standard library cannot be applied directly to Octave.
However, it is still possible to imitate some of the ideas to our use case.

The attached patch is an attempt to mimic the more fine-grained visibility flags that they are using in libcxx and apply that idea to our template classes.
Since we are building a couple of different libraries that link to each other, that results in a whole lot of API flags that could potentially be used. Not all of them are used in all libraries currently. But I figured it would make sense to nevertheless define all of them for symmetry reasons (see the changes in `oct-conf-post-public.in.h`).

Judging from how they define these flags, MSVC and MinGW compilers seem to require different combinations of attributes. Afaict, currently no one is building Octave with MSVC. But I kept the distinction they are making anyways.

Is there a way to not having to repeat these definitions almost identically several times? E.g., can a pre-processor macro be used to create several pre-processor definitions?


(file #53931)

Markus Mützel <mmuetzel>
Group administrator
Sat 05 Nov 2022 12:54:57 PM UTC, comment #9: 

I pushed a change that covers what I described as the first part in comment #6:
https://hg.savannah.gnu.org/hgweb/octave/rev/7e60506a5428

That might break compiling some third-party code that instantiates the Array<T> class template with new types. But if it does, we'd notice that something was going wrong the whole time.

I'll try to look into how to sort out exporting template class instantiations (with specializations!) along the lines of what LLVM does in this case.

Markus Mützel <mmuetzel>
Group administrator
Thu 03 Nov 2022 09:16:41 AM UTC, comment #8: 

It looks like exporting template classes with specializations is kind of tricky for Windows targets. See, e.g., how LLVM approaches that problem:
https://github.com/llvm/llvm-project/blob/llvmorg-13.0.0-rc1/libcxx/include/__config#L621-L644

Maybe, we'd also need more fine-grained macros (on top of OCTAVE_API and co.).
That might be an alternative (and better) approach to splitting definitions from declarations entirely.

Markus Mützel <mmuetzel>
Group administrator
Tue 01 Nov 2022 03:41:36 PM UTC, comment #7: 

Apparently, which symbols are needed to be imported depends on how aggressively the compiler optimizes the code. The patch from comment #6 was enough when building with `-O2` (our default).

When I build with `-O0`, linking fails with these missing symbols:

  CXXLD    libinterp/liboctinterp.la
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: libinterp\template-inst\.libs\liboctinterp_la-Array-tc.o: in function `ZN16rec_index_helperC1ERK10dim_vectorRK5ArrayIN6octave10idx_vectorENSt3pmr21polymorphic_allocatorIS5_EEE':
D:\Octave-mingw32\.build/../liboctave/array/Array.cc:546: undefined reference to `Array<octave::idx_vector, std::pmr::polymorphic_allocator<octave::idx_vector> >::operator()(int) const'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:\Octave-mingw32\.build/../liboctave/array/Array.cc:551: undefined reference to `Array<octave::idx_vector, std::pmr::polymorphic_allocator<octave::idx_vector> >::operator()(int) const'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:\Octave-mingw32\.build/../liboctave/array/Array.cc:560: undefined reference to `Array<octave::idx_vector, std::pmr::polymorphic_allocator<octave::idx_vector> >::operator()(int) const'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: libinterp\template-inst\.libs\liboctinterp_la-Array-tc.o: in function `ZNK5ArrayI12octave_valueNSt3pmr21polymorphic_allocatorIS0_EEE5indexERKS_IN6octave10idx_vectorENS2_IS6_EEE':
D:\Octave-mingw32\.build/../liboctave/array/Array.cc:860: undefined reference to `Array<octave::idx_vector, std::pmr::polymorphic_allocator<octave::idx_vector> >::operator()(int) const'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: D:\Octave-mingw32\.build/../liboctave/array/Array.cc:862: undefined reference to `Array<octave::idx_vector, std::pmr::polymorphic_allocator<octave::idx_vector> >::operator()(int) const'
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/bin/ld.exe: libinterp\template-inst\.libs\liboctinterp_la-Array-tc.o:
D:\Octave-mingw32\.build/../liboctave/array/Array.cc:862: more undefined references to `Array<octave::idx_vector, std::pmr::polymorphic_allocator<octave::idx_vector> >::operator()(int) const' follow
collect2.exe: error: ld returned 1 exit status


Linking succeeds when I move the definition of these (and other similar) operators and functions from the header:

diff -r fa025af77216 liboctave/array/Array.cc
--- a/liboctave/array/Array.cc        Tue Nov 01 12:19:33 2022 +0100
+++ b/liboctave/array/Array.cc        Tue Nov 01 16:39:53 2022 +0100
@@ -253,6 +253,50 @@
 }

 template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::elem (octave_idx_type n)
+{
+  make_unique ();
+  return xelem (n);
+}
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::elem (octave_idx_type i, octave_idx_type j)
+{ return elem (dim1 ()*j+i); }
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::elem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
+{ return elem (i, dim2 ()*k+j); }
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::elem (const Array<octave_idx_type>& ra_idx)
+{ return Array<T, Alloc>::elem (compute_index_unchecked (ra_idx)); }
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::operator () (octave_idx_type n)
+{ return elem (n); }
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::operator () (octave_idx_type i, octave_idx_type j)
+{ return elem (i, j); }
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::operator () (octave_idx_type i, octave_idx_type j,
+                              octave_idx_type k)
+{ return elem (i, j, k); }
+
+template <typename T, typename Alloc>
+T&
+Array<T, Alloc>::operator () (const Array<octave_idx_type>& ra_idx)
+{ return elem (ra_idx); }
+
+template <typename T, typename Alloc>
 typename Array<T, Alloc>::crefT
 Array<T, Alloc>::checkelem (octave_idx_type n) const
 {
@@ -288,6 +332,47 @@
 }

 template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::elem (octave_idx_type n) const
+{ return xelem (n); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::elem (octave_idx_type i, octave_idx_type j) const
+{ return xelem (i, j); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
+{ return xelem (i, j, k); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::elem (const Array<octave_idx_type>& ra_idx) const
+{ return Array<T, Alloc>::xelem (compute_index_unchecked (ra_idx)); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::operator () (octave_idx_type n) const
+{ return elem (n); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::operator () (octave_idx_type i, octave_idx_type j) const
+{ return elem (i, j); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::operator () (octave_idx_type i, octave_idx_type j,
+                              octave_idx_type k) const
+{ return elem (i, j, k); }
+
+template <typename T, typename Alloc>
+typename Array<T, Alloc>::crefT
+Array<T, Alloc>::operator () (const Array<octave_idx_type>& ra_idx) const
+{ return elem (ra_idx); }
+
+template <typename T, typename Alloc>
 Array<T, Alloc>
 Array<T, Alloc>::column (octave_idx_type k) const
 {
diff -r fa025af77216 liboctave/array/Array.h
--- a/liboctave/array/Array.h        Tue Nov 01 12:19:33 2022 +0100
+++ b/liboctave/array/Array.h        Tue Nov 01 16:39:53 2022 +0100
@@ -526,26 +526,23 @@

   OCTARRAY_API T& checkelem (const Array<octave_idx_type>& ra_idx);

-  T& elem (octave_idx_type n)
-  {
-    make_unique ();
-    return xelem (n);
-  }
+  OCTARRAY_API T& elem (octave_idx_type n);
+
+  OCTARRAY_API T& elem (octave_idx_type i, octave_idx_type j);

-  T& elem (octave_idx_type i, octave_idx_type j) { return elem (dim1 ()*j+i); }
+  OCTARRAY_API T& elem (octave_idx_type i, octave_idx_type j,
+                        octave_idx_type k);
+
+  OCTARRAY_API T& elem (const Array<octave_idx_type>& ra_idx);

-  T& elem (octave_idx_type i, octave_idx_type j, octave_idx_type k)
-  { return elem (i, dim2 ()*k+j); }
+  OCTARRAY_API T& operator () (octave_idx_type n);

-  T& elem (const Array<octave_idx_type>& ra_idx)
-  { return Array<T, Alloc>::elem (compute_index_unchecked (ra_idx)); }
+  OCTARRAY_API T& operator () (octave_idx_type i, octave_idx_type j);

-  T& operator () (octave_idx_type n) { return elem (n); }
-  T& operator () (octave_idx_type i, octave_idx_type j) { return elem (i, j); }
-  T& operator () (octave_idx_type i, octave_idx_type j, octave_idx_type k)
-  { return elem (i, j, k); }
-  T& operator () (const Array<octave_idx_type>& ra_idx)
-  { return elem (ra_idx); }
+  OCTARRAY_API T& operator () (octave_idx_type i, octave_idx_type j,
+                               octave_idx_type k);
+
+  OCTARRAY_API T& operator () (const Array<octave_idx_type>& ra_idx);

   OCTARRAY_API crefT checkelem (octave_idx_type n) const;

@@ -556,25 +553,23 @@

   OCTARRAY_API crefT checkelem (const Array<octave_idx_type>& ra_idx) const;

-  crefT elem (octave_idx_type n) const { return xelem (n); }
+  OCTARRAY_API crefT elem (octave_idx_type n) const;
+
+  OCTARRAY_API crefT elem (octave_idx_type i, octave_idx_type j) const;

-  crefT elem (octave_idx_type i, octave_idx_type j) const
-  { return xelem (i, j); }
+  OCTARRAY_API crefT elem (octave_idx_type i, octave_idx_type j,
+                           octave_idx_type k) const;

-  crefT elem (octave_idx_type i, octave_idx_type j, octave_idx_type k) const
-  { return xelem (i, j, k); }
+  OCTARRAY_API crefT elem (const Array<octave_idx_type>& ra_idx) const;

-  crefT elem (const Array<octave_idx_type>& ra_idx) const
-  { return Array<T, Alloc>::xelem (compute_index_unchecked (ra_idx)); }
+  OCTARRAY_API crefT operator () (octave_idx_type n) const;
+
+  OCTARRAY_API crefT operator () (octave_idx_type i, octave_idx_type j) const;

-  crefT operator () (octave_idx_type n) const { return elem (n); }
-  crefT operator () (octave_idx_type i, octave_idx_type j) const
-  { return elem (i, j); }
-  crefT operator () (octave_idx_type i, octave_idx_type j,
-                     octave_idx_type k) const
-  { return elem (i, j, k); }
-  crefT operator () (const Array<octave_idx_type>& ra_idx) const
-  { return elem (ra_idx); }
+  OCTARRAY_API crefT operator () (octave_idx_type i, octave_idx_type j,
+                                  octave_idx_type k) const;
+
+  OCTARRAY_API crefT operator () (const Array<octave_idx_type>& ra_idx) const;

   // Fast extractors.  All of these produce shallow copies.


Do we want to do that?

Markus Mützel <mmuetzel>
Group administrator
Tue 01 Nov 2022 11:42:32 AM UTC, comment #6: 

I pushed a changeset here that should help to avoid the build error:
https://hg.savannah.gnu.org/hgweb/octave/rev/fa025af77216

This still leaves us with how we should generally fix the issue that implicit instantiations on Windows (and maybe other platforms?) in one library might lead to missing specializations from another library.
But at the same time: If we prevent implicit instantiations, we need to make sure that all (necessary) constructors and member functions are exported from the library that contains the specialized instantiation. That includes also those functions that aren't specialized.

One way to do the first part could be to:
- Rename "Array.cc" in liboctave to, e.g., "Array-base.cc".
- Add a new file in liboctave that includes "Array-base.cc" followed by `extern template Array<T>` declarations for all types that are exported from the liboctave library. That would prevent (accidentally) instantiating the template class implicitly with those types again where that file is included. That file could be called "Array-oct.cc".
- Everywhere where we currently include "Array.cc" in libinterp, we could include "Array-oct.cc" instead.
- Add a new file to libinterp that includes "Array-oct.cc" followed by `extern template Array<T>` declarations for all types that are exported from the liboctinterp library. (Same motivation as for "Array-oct.cc".) That file could be called "Array.cc".
- Install these three files with Octave.

That way third-party code that currently includes "Array.cc" could continue doing that if they link against the liboctinterp library. Third-party code that only links against liboctave (but not liboctinterp) would need to include "Array-oct.cc". In either case, including those files would prevent (accidentally) instantiating the template class implicitly with types that should be used in the definition from the libraries.

For the second part of the task, the only way that I can currently think of is splitting the declaration of the Array<T> template class from its definition completely. But I'm open to other ideas.

Markus Mützel <mmuetzel>
Group administrator
Tue 01 Nov 2022 09:28:37 AM UTC, comment #5: 

Re comment #3: I agree. We should probably try to find a general solution that would also work to avoid the same issue when "Array.cc" is included in third-party code (e.g., to instantiate the Array<T> template with additional types).
I'll try to fix the current build issues. And if that succeeds, I'll try to find such a generalization.

Markus Mützel <mmuetzel>
Group administrator
Tue 01 Nov 2022 09:09:25 AM UTC, comment #4: 

The buildbot runner that builds Octave for 32-bit MinGW is failing now with the following errors:

libtool: link: ( cd "liboctave/.libs" && rm -f "liboctave.la" && ln -s "../liboctave.la" "liboctave.la" )
/bin/bash ./libtool  --tag=CXX   --mode=link i686-w64-mingw32-g++  -pthread -fopenmp -mieee-fp -Wall -W -Wshadow -Woverloaded-virtual -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual  -g -O2 -version-info 10:0:0 -no-undefined -bindir /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/bin -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib           -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib  -Wl,-rpath-link,"/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib" -L"/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib" -L"/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/qt5/lib" -o libinterp/liboctinterp.la -rpath /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/octave/8.0.0 libinterp/liboctinterp_la-octave.lo libinterp/operators/liboctinterp_la-op-b-b.lo libinterp/operators/liboctinterp_la-op-b-bm.lo libinterp/operators/liboctinterp_la-op-b-sbm.lo libinterp/operators/liboctinterp_la-op-bm-b.lo libinterp/operators/liboctinterp_la-op-bm-bm.lo libinterp/operators/liboctinterp_la-op-bm-sbm.lo libinterp/operators/liboctinterp_la-op-cdm-cdm.lo libinterp/operators/liboctinterp_la-op-cdm-cm.lo libinterp/operators/liboctinterp_la-op-cdm-cs.lo libinterp/operators/liboctinterp_la-op-cdm-dm.lo libinterp/operators/liboctinterp_la-op-cdm-m.lo libinterp/operators/liboctinterp_la-op-cdm-s.lo libinterp/operators/liboctinterp_la-op-cell.lo libinterp/operators/liboctinterp_la-op-chm.lo libinterp/operators/liboctinterp_la-op-class.lo libinterp/operators/liboctinterp_la-op-cm-cdm.lo libinterp/operators/liboctinterp_la-op-cm-cm.lo libinterp/operators/liboctinterp_la-op-cm-cs.lo libinterp/operators/liboctinterp_la-op-cm-dm.lo libinterp/operators/liboctinterp_la-op-cm-m.lo libinterp/operators/liboctinterp_la-op-cm-pm.lo libinterp/operators/liboctinterp_la-op-cm-s.lo libinterp/operators/liboctinterp_la-op-cm-scm.lo libinterp/operators/liboctinterp_la-op-cm-sm.lo libinterp/operators/liboctinterp_la-op-cs-cm.lo libinterp/operators/liboctinterp_la-op-cs-cs.lo libinterp/operators/liboctinterp_la-op-cs-m.lo libinterp/operators/liboctinterp_la-op-cs-s.lo libinterp/operators/liboctinterp_la-op-cs-scm.lo libinterp/operators/liboctinterp_la-op-cs-sm.lo libinterp/operators/liboctinterp_la-op-dm-cdm.lo libinterp/operators/liboctinterp_la-op-dm-cm.lo libinterp/operators/liboctinterp_la-op-dm-cs.lo libinterp/operators/liboctinterp_la-op-dm-dm.lo libinterp/operators/liboctinterp_la-op-dm-m.lo libinterp/operators/liboctinterp_la-op-dm-s.lo libinterp/operators/liboctinterp_la-op-dm-scm.lo libinterp/operators/liboctinterp_la-op-dm-sm.lo libinterp/operators/liboctinterp_la-op-fcdm-fcdm.lo libinterp/operators/liboctinterp_la-op-fcdm-fcm.lo libinterp/operators/liboctinterp_la-op-fcdm-fcs.lo libinterp/operators/liboctinterp_la-op-fcdm-fdm.lo libinterp/operators/liboctinterp_la-op-fcdm-fm.lo libinterp/operators/liboctinterp_la-op-fcdm-fs.lo libinterp/operators/liboctinterp_la-op-fcm-fcdm.lo libinterp/operators/liboctinterp_la-op-fcm-fcm.lo libinterp/operators/liboctinterp_la-op-fcm-fcs.lo libinterp/operators/liboctinterp_la-op-fcm-fdm.lo libinterp/operators/liboctinterp_la-op-fcm-fm.lo libinterp/operators/liboctinterp_la-op-fcm-fs.lo libinterp/operators/liboctinterp_la-op-fcm-pm.lo libinterp/operators/liboctinterp_la-op-fcn.lo libinterp/operators/liboctinterp_la-op-fcs-fcm.lo libinterp/operators/liboctinterp_la-op-fcs-fcs.lo libinterp/operators/liboctinterp_la-op-fcs-fm.lo libinterp/operators/liboctinterp_la-op-fcs-fs.lo libinterp/operators/liboctinterp_la-op-fdm-fcdm.lo libinterp/operators/liboctinterp_la-op-fdm-fcm.lo libinterp/operators/liboctinterp_la-op-fdm-fcs.lo libinterp/operators/liboctinterp_la-op-fdm-fdm.lo libinterp/operators/liboctinterp_la-op-fdm-fm.lo libinterp/operators/liboctinterp_la-op-fdm-fs.lo libinterp/operators/liboctinterp_la-op-fm-fcdm.lo libinterp/operators/liboctinterp_la-op-fm-fcm.lo libinterp/operators/liboctinterp_la-op-fm-fcs.lo libinterp/operators/liboctinterp_la-op-fm-fdm.lo libinterp/operators/liboctinterp_la-op-fm-fm.lo libinterp/operators/liboctinterp_la-op-fm-fs.lo libinterp/operators/liboctinterp_la-op-fm-pm.lo libinterp/operators/liboctinterp_la-op-fs-fcm.lo libinterp/operators/liboctinterp_la-op-fs-fcs.lo libinterp/operators/liboctinterp_la-op-fs-fm.lo libinterp/operators/liboctinterp_la-op-fs-fs.lo libinterp/operators/liboctinterp_la-op-i16-i16.lo libinterp/operators/liboctinterp_la-op-i32-i32.lo libinterp/operators/liboctinterp_la-op-i64-i64.lo libinterp/operators/liboctinterp_la-op-i8-i8.lo libinterp/operators/liboctinterp_la-op-int-concat.lo libinterp/operators/liboctinterp_la-op-m-cdm.lo libinterp/operators/liboctinterp_la-op-m-cm.lo libinterp/operators/liboctinterp_la-op-m-cs.lo libinterp/operators/liboctinterp_la-op-m-dm.lo libinterp/operators/liboctinterp_la-op-m-m.lo libinterp/operators/liboctinterp_la-op-m-pm.lo libinterp/operators/liboctinterp_la-op-m-s.lo libinterp/operators/liboctinterp_la-op-m-scm.lo libinterp/operators/liboctinterp_la-op-m-sm.lo libinterp/operators/liboctinterp_la-op-mi.lo libinterp/operators/liboctinterp_la-op-pm-cm.lo libinterp/operators/liboctinterp_la-op-pm-fcm.lo libinterp/operators/liboctinterp_la-op-pm-fm.lo libinterp/operators/liboctinterp_la-op-pm-m.lo libinterp/operators/liboctinterp_la-op-pm-pm.lo libinterp/operators/liboctinterp_la-op-pm-scm.lo libinterp/operators/liboctinterp_la-op-pm-sm.lo libinterp/operators/liboctinterp_la-op-range.lo libinterp/operators/liboctinterp_la-op-s-cm.lo libinterp/operators/liboctinterp_la-op-s-cs.lo libinterp/operators/liboctinterp_la-op-s-m.lo libinterp/operators/liboctinterp_la-op-s-s.lo libinterp/operators/liboctinterp_la-op-s-scm.lo libinterp/operators/liboctinterp_la-op-s-sm.lo libinterp/operators/liboctinterp_la-op-sbm-b.lo libinterp/operators/liboctinterp_la-op-sbm-bm.lo libinterp/operators/liboctinterp_la-op-sbm-sbm.lo libinterp/operators/liboctinterp_la-op-scm-cm.lo libinterp/operators/liboctinterp_la-op-scm-cs.lo libinterp/operators/liboctinterp_la-op-scm-m.lo libinterp/operators/liboctinterp_la-op-scm-s.lo libinterp/operators/liboctinterp_la-op-scm-scm.lo libinterp/operators/liboctinterp_la-op-scm-sm.lo libinterp/operators/liboctinterp_la-op-sm-cm.lo libinterp/operators/liboctinterp_la-op-sm-cs.lo libinterp/operators/liboctinterp_la-op-sm-m.lo libinterp/operators/liboctinterp_la-op-sm-s.lo libinterp/operators/liboctinterp_la-op-sm-scm.lo libinterp/operators/liboctinterp_la-op-sm-sm.lo libinterp/operators/liboctinterp_la-op-str-m.lo libinterp/operators/liboctinterp_la-op-str-s.lo libinterp/operators/liboctinterp_la-op-str-str.lo libinterp/operators/liboctinterp_la-op-struct.lo libinterp/operators/liboctinterp_la-op-ui16-ui16.lo libinterp/operators/liboctinterp_la-op-ui32-ui32.lo libinterp/operators/liboctinterp_la-op-ui64-ui64.lo libinterp/operators/liboctinterp_la-op-ui8-ui8.lo libinterp/template-inst/liboctinterp_la-Array-tc.lo libinterp/liboctinterp_la-build-env-features.lo libinterp/liboctinterp_la-build-env.lo libinterp/liboctinterp_la-builtins.lo libinterp/corefcn/liboctinterp_la-oct-errno.lo libinterp/liboctinterp_la-liboctinterp-build-info.lo libinterp/operators/liboctinterp_la-ops.lo libinterp/octave-value/liboctave-value.la libinterp/parse-tree/libparse-tree.la libinterp/corefcn/libcorefcn.la  liboctave/liboctave.la -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib -lfreetype -lhdf5 -lGraphicsMagick++ -lGraphicsMagick -lz -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse -lsuitesparseconfig -lspqr -lfftw3 -lfftw3f -lopengl32 -lglu32 -lfontconfig -lfreetype    -lgl2ps -ladvapi32 -llapack liboctave/external/blas-xtra/libxerbla.la -lshlwapi -lgdi32 -lpthread -lm
libtool: link: i686-w64-mingw32-g++ -shared -nostdlib /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/lib/../lib/dllcrt2.o /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/crtbegin.o  libinterp/.libs/liboctinterp_la-octave.o libinterp/operators/.libs/liboctinterp_la-op-b-b.o libinterp/operators/.libs/liboctinterp_la-op-b-bm.o libinterp/operators/.libs/liboctinterp_la-op-b-sbm.o libinterp/operators/.libs/liboctinterp_la-op-bm-b.o libinterp/operators/.libs/liboctinterp_la-op-bm-bm.o libinterp/operators/.libs/liboctinterp_la-op-bm-sbm.o libinterp/operators/.libs/liboctinterp_la-op-cdm-cdm.o libinterp/operators/.libs/liboctinterp_la-op-cdm-cm.o libinterp/operators/.libs/liboctinterp_la-op-cdm-cs.o libinterp/operators/.libs/liboctinterp_la-op-cdm-dm.o libinterp/operators/.libs/liboctinterp_la-op-cdm-m.o libinterp/operators/.libs/liboctinterp_la-op-cdm-s.o libinterp/operators/.libs/liboctinterp_la-op-cell.o libinterp/operators/.libs/liboctinterp_la-op-chm.o libinterp/operators/.libs/liboctinterp_la-op-class.o libinterp/operators/.libs/liboctinterp_la-op-cm-cdm.o libinterp/operators/.libs/liboctinterp_la-op-cm-cm.o libinterp/operators/.libs/liboctinterp_la-op-cm-cs.o libinterp/operators/.libs/liboctinterp_la-op-cm-dm.o libinterp/operators/.libs/liboctinterp_la-op-cm-m.o libinterp/operators/.libs/liboctinterp_la-op-cm-pm.o libinterp/operators/.libs/liboctinterp_la-op-cm-s.o libinterp/operators/.libs/liboctinterp_la-op-cm-scm.o libinterp/operators/.libs/liboctinterp_la-op-cm-sm.o libinterp/operators/.libs/liboctinterp_la-op-cs-cm.o libinterp/operators/.libs/liboctinterp_la-op-cs-cs.o libinterp/operators/.libs/liboctinterp_la-op-cs-m.o libinterp/operators/.libs/liboctinterp_la-op-cs-s.o libinterp/operators/.libs/liboctinterp_la-op-cs-scm.o libinterp/operators/.libs/liboctinterp_la-op-cs-sm.o libinterp/operators/.libs/liboctinterp_la-op-dm-cdm.o libinterp/operators/.libs/liboctinterp_la-op-dm-cm.o libinterp/operators/.libs/liboctinterp_la-op-dm-cs.o libinterp/operators/.libs/liboctinterp_la-op-dm-dm.o libinterp/operators/.libs/liboctinterp_la-op-dm-m.o libinterp/operators/.libs/liboctinterp_la-op-dm-s.o libinterp/operators/.libs/liboctinterp_la-op-dm-scm.o libinterp/operators/.libs/liboctinterp_la-op-dm-sm.o libinterp/operators/.libs/liboctinterp_la-op-fcdm-fcdm.o libinterp/operators/.libs/liboctinterp_la-op-fcdm-fcm.o libinterp/operators/.libs/liboctinterp_la-op-fcdm-fcs.o libinterp/operators/.libs/liboctinterp_la-op-fcdm-fdm.o libinterp/operators/.libs/liboctinterp_la-op-fcdm-fm.o libinterp/operators/.libs/liboctinterp_la-op-fcdm-fs.o libinterp/operators/.libs/liboctinterp_la-op-fcm-fcdm.o libinterp/operators/.libs/liboctinterp_la-op-fcm-fcm.o libinterp/operators/.libs/liboctinterp_la-op-fcm-fcs.o libinterp/operators/.libs/liboctinterp_la-op-fcm-fdm.o libinterp/operators/.libs/liboctinterp_la-op-fcm-fm.o libinterp/operators/.libs/liboctinterp_la-op-fcm-fs.o libinterp/operators/.libs/liboctinterp_la-op-fcm-pm.o libinterp/operators/.libs/liboctinterp_la-op-fcn.o libinterp/operators/.libs/liboctinterp_la-op-fcs-fcm.o libinterp/operators/.libs/liboctinterp_la-op-fcs-fcs.o libinterp/operators/.libs/liboctinterp_la-op-fcs-fm.o libinterp/operators/.libs/liboctinterp_la-op-fcs-fs.o libinterp/operators/.libs/liboctinterp_la-op-fdm-fcdm.o libinterp/operators/.libs/liboctinterp_la-op-fdm-fcm.o libinterp/operators/.libs/liboctinterp_la-op-fdm-fcs.o libinterp/operators/.libs/liboctinterp_la-op-fdm-fdm.o libinterp/operators/.libs/liboctinterp_la-op-fdm-fm.o libinterp/operators/.libs/liboctinterp_la-op-fdm-fs.o libinterp/operators/.libs/liboctinterp_la-op-fm-fcdm.o libinterp/operators/.libs/liboctinterp_la-op-fm-fcm.o libinterp/operators/.libs/liboctinterp_la-op-fm-fcs.o libinterp/operators/.libs/liboctinterp_la-op-fm-fdm.o libinterp/operators/.libs/liboctinterp_la-op-fm-fm.o libinterp/operators/.libs/liboctinterp_la-op-fm-fs.o libinterp/operators/.libs/liboctinterp_la-op-fm-pm.o libinterp/operators/.libs/liboctinterp_la-op-fs-fcm.o libinterp/operators/.libs/liboctinterp_la-op-fs-fcs.o libinterp/operators/.libs/liboctinterp_la-op-fs-fm.o libinterp/operators/.libs/liboctinterp_la-op-fs-fs.o libinterp/operators/.libs/liboctinterp_la-op-i16-i16.o libinterp/operators/.libs/liboctinterp_la-op-i32-i32.o libinterp/operators/.libs/liboctinterp_la-op-i64-i64.o libinterp/operators/.libs/liboctinterp_la-op-i8-i8.o libinterp/operators/.libs/liboctinterp_la-op-int-concat.o libinterp/operators/.libs/liboctinterp_la-op-m-cdm.o libinterp/operators/.libs/liboctinterp_la-op-m-cm.o libinterp/operators/.libs/liboctinterp_la-op-m-cs.o libinterp/operators/.libs/liboctinterp_la-op-m-dm.o libinterp/operators/.libs/liboctinterp_la-op-m-m.o libinterp/operators/.libs/liboctinterp_la-op-m-pm.o libinterp/operators/.libs/liboctinterp_la-op-m-s.o libinterp/operators/.libs/liboctinterp_la-op-m-scm.o libinterp/operators/.libs/liboctinterp_la-op-m-sm.o libinterp/operators/.libs/liboctinterp_la-op-mi.o libinterp/operators/.libs/liboctinterp_la-op-pm-cm.o libinterp/operators/.libs/liboctinterp_la-op-pm-fcm.o libinterp/operators/.libs/liboctinterp_la-op-pm-fm.o libinterp/operators/.libs/liboctinterp_la-op-pm-m.o libinterp/operators/.libs/liboctinterp_la-op-pm-pm.o libinterp/operators/.libs/liboctinterp_la-op-pm-scm.o libinterp/operators/.libs/liboctinterp_la-op-pm-sm.o libinterp/operators/.libs/liboctinterp_la-op-range.o libinterp/operators/.libs/liboctinterp_la-op-s-cm.o libinterp/operators/.libs/liboctinterp_la-op-s-cs.o libinterp/operators/.libs/liboctinterp_la-op-s-m.o libinterp/operators/.libs/liboctinterp_la-op-s-s.o libinterp/operators/.libs/liboctinterp_la-op-s-scm.o libinterp/operators/.libs/liboctinterp_la-op-s-sm.o libinterp/operators/.libs/liboctinterp_la-op-sbm-b.o libinterp/operators/.libs/liboctinterp_la-op-sbm-bm.o libinterp/operators/.libs/liboctinterp_la-op-sbm-sbm.o libinterp/operators/.libs/liboctinterp_la-op-scm-cm.o libinterp/operators/.libs/liboctinterp_la-op-scm-cs.o libinterp/operators/.libs/liboctinterp_la-op-scm-m.o libinterp/operators/.libs/liboctinterp_la-op-scm-s.o libinterp/operators/.libs/liboctinterp_la-op-scm-scm.o libinterp/operators/.libs/liboctinterp_la-op-scm-sm.o libinterp/operators/.libs/liboctinterp_la-op-sm-cm.o libinterp/operators/.libs/liboctinterp_la-op-sm-cs.o libinterp/operators/.libs/liboctinterp_la-op-sm-m.o libinterp/operators/.libs/liboctinterp_la-op-sm-s.o libinterp/operators/.libs/liboctinterp_la-op-sm-scm.o libinterp/operators/.libs/liboctinterp_la-op-sm-sm.o libinterp/operators/.libs/liboctinterp_la-op-str-m.o libinterp/operators/.libs/liboctinterp_la-op-str-s.o libinterp/operators/.libs/liboctinterp_la-op-str-str.o libinterp/operators/.libs/liboctinterp_la-op-struct.o libinterp/operators/.libs/liboctinterp_la-op-ui16-ui16.o libinterp/operators/.libs/liboctinterp_la-op-ui32-ui32.o libinterp/operators/.libs/liboctinterp_la-op-ui64-ui64.o libinterp/operators/.libs/liboctinterp_la-op-ui8-ui8.o libinterp/template-inst/.libs/liboctinterp_la-Array-tc.o libinterp/.libs/liboctinterp_la-build-env-features.o libinterp/.libs/liboctinterp_la-build-env.o libinterp/.libs/liboctinterp_la-builtins.o libinterp/corefcn/.libs/liboctinterp_la-oct-errno.o libinterp/.libs/liboctinterp_la-liboctinterp-build-info.o libinterp/operators/.libs/liboctinterp_la-ops.o  -Wl,--whole-archive libinterp/octave-value/.libs/liboctave-value.a libinterp/parse-tree/.libs/libparse-tree.a libinterp/corefcn/.libs/libcorefcn.a -Wl,--no-whole-archive  -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/qt5/lib -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/mingw/lib -lws2_32 liboctave/.libs/liboctave.dll.a -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0 -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/gcc/i686-w64-mingw32/12.2.0 -lhdf5 /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/libGraphicsMagick++.dll.a /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/libGraphicsMagick.dll.a -lz -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse -lsuitesparseconfig -lspqr /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/libfftw3.dll.a /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/libfftw3f.dll.a -lopengl32 -lglu32 /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/libfontconfig.dll.a -lfreetype -lgl2ps -ladvapi32 -llapack liboctave/external/blas-xtra/.libs/libxerbla.dll.a -lshlwapi -lgdi32 -lpthread -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/lib/../lib -L/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/../../../../i686-w64-mingw32/lib /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/libstdc++.dll.a /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib/gcc/i686-w64-mingw32/12.2.0/libgomp.dll.a -lmingwthrd -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lssp_nonshared -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingwthrd -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lssp_nonshared /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/libssp.dll.a -lmsvcrt -lkernel32 /scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/lib/gcc/i686-w64-mingw32/12.2.0/crtend.o  -fopenmp -mieee-fp -g -O2 -Wl,-rpath-link -Wl,/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/i686-w64-mingw32/lib   -pthread -fopenmp -o libinterp/.libs/liboctinterp-10.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker libinterp/.libs/liboctinterp.dll.a
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/bin/i686-w64-mingw32-ld: libinterp/corefcn/.libs/libcorefcn.a(libcorefcn_la-mex.o): in function `ZNK17mxArray_base_full8fp_to_ovISt7complexIdEEE12octave_valueRK10dim_vector':
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/tmp-default-octave/octave-8.0.0/libinterp/corefcn/mex.cc:2200: undefined reference to `Array<std::complex<double>, std::pmr::polymorphic_allocator<std::complex<double> > >::Array(std::complex<double>*, dim_vector const&, std::pmr::polymorphic_allocator<std::complex<double> > const&)'
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/bin/i686-w64-mingw32-ld: libinterp/corefcn/.libs/libcorefcn.a(libcorefcn_la-mex.o): in function `ZNK17mxArray_base_full8fp_to_ovIdEE12octave_valueRK10dim_vector':
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/tmp-default-octave/octave-8.0.0/libinterp/corefcn/mex.cc:2200: undefined reference to `Array<double, std::pmr::polymorphic_allocator<double> >::Array(double*, dim_vector const&, std::pmr::polymorphic_allocator<double> const&)'
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/bin/i686-w64-mingw32-ld: libinterp/corefcn/.libs/libcorefcn.a(libcorefcn_la-mex.o): in function `ZNK17mxArray_base_full8fp_to_ovISt7complexIfEEE12octave_valueRK10dim_vector':
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/tmp-default-octave/octave-8.0.0/libinterp/corefcn/mex.cc:2200: undefined reference to `Array<std::complex<float>, std::pmr::polymorphic_allocator<std::complex<float> > >::Array(std::complex<float>*, dim_vector const&, std::pmr::polymorphic_allocator<std::complex<float> > const&)'
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/usr/bin/i686-w64-mingw32-ld: libinterp/corefcn/.libs/libcorefcn.a(libcorefcn_la-mex.o): in function `ZNK17mxArray_base_full8fp_to_ovIfEE12octave_valueRK10dim_vector':
/scratch/buildbot/workers/jwe-debian-x86_64-5/w32-on-debian/src/tmp-default-octave/octave-8.0.0/libinterp/corefcn/mex.cc:2200: undefined reference to `Array<float, std::pmr::polymorphic_allocator<float> >::Array(float*, dim_vector const&, std::pmr::polymorphic_allocator<float> const&)'
collect2: error: ld returned 1 exit status



I don't see those error on the GitHub runners that build for MINGW32. But maybe that is because they aren't configured with `--enable-std-pmr-polymorphic-allocator`.
The builders that target 64-bit Windows also are able to resolve those symbols.

I'll check if I can reproduce locally.

Markus Mützel <mmuetzel>
Group administrator
Mon 31 Oct 2022 07:56:42 PM UTC, comment #3: 

Thanks for tracking down the cause of the problem.

We probably need a better long-term fix for this kind of problem.  I don't think we want to end up repeating lists of "extern template class Array<...>;" declarations in many files.  It looks like we have a few other places in libinterp and liboctave where this kind of pattern appears.

John W. Eaton <jwe>
Group administrator
Mon 31 Oct 2022 06:49:20 PM UTC, comment #2: 

I finally found what caused this issue: Including "Array.cc" in "mex.cc" lead to implicit instantiations of the Array<T> template class for some types. Due to how symbols are shared between different libraries that lead to the situation where functions in liboctinterp were using those classes without the specializations they have in liboctave.

I pushed this change to prevent implicitly instantiating those classes in that file here:
https://hg.savannah.gnu.org/hgweb/octave/rev/8dc9508b8364

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Fri 24 Dec 2021 09:24:57 AM UTC, comment #1: 

This no longer blocks Octave 7. Updating release tag.

Markus Mützel <mmuetzel>
Group administrator
Tue 21 Dec 2021 08:04:01 AM UTC, original submission:  

When compiling with visibility flags some tests are failing on Windows. They all seem to be related to functions that involve sorting NaN values.
See e.g.: https://github.com/gnu-octave/octave-buildbot/runs/4585314430?check_suite_focus=true

>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\etc\tests\libinterp\corefcn\data.cc-tst
[...]
***** assert (sort ([NaN, 1, -1, 2, Inf]), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf]),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
***** assert (sort ([NaN, 1, -1, 2, Inf], 2), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf], 2),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
***** assert (sort ([NaN, 1, -1, 2, Inf], "ascend"), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf], "ascend"),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
***** assert (sort ([NaN, 1, -1, 2, Inf], 2, "ascend"), [-1, 1, 2, Inf, NaN])
!!!!! test failed
ASSERT errors for:  assert (sort ([NaN, 1, -1, 2, Inf], 2, "ascend"),[-1, 1, 2, Inf, NaN])

  Location  |  Observed  |  Expected  |  Reason
    (1)          NaN           -1        'NaN' mismatch
    (5)          Inf          NaN        'NaN' mismatch
    (4)           2           Inf        'Inf' mismatch
    (2)           -1           1         Abs err 2 exceeds tol 0 by 2
    (3)           1            2         Abs err 1 exceeds tol 0 by 1
shared variables     id = 1640020029344
[...]
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\set\unique.m
***** assert (unique ([1,NaN,Inf,NaN,Inf]), [1,Inf,NaN,NaN])
!!!!! test failed
ASSERT errors for:  assert (unique ([1, NaN, Inf, NaN, Inf]),[1, Inf, NaN, NaN])

  Location  |  Observed  |  Expected  |  Reason
     .          O(1x5)       E(1x4)      Dimensions don't match
[...]
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\statistics\iqr.m
***** assert (iqr ([1 NaN 2 3], 2), 1.5)
!!!!! test failed
ASSERT errors for:  assert (iqr ([1, NaN, 2, 3], 2),1.5)

  Location  |  Observed  |  Expected  |  Reason
     ()          NaN          1.5        'NaN' mismatch
***** assert (iqr ([[1 2 5], [2 NaN 6]], "all"), 3.5)
!!!!! test failed
ASSERT errors for:  assert (iqr ([[1, 2, 5], [2, NaN, 6]], "all"),3.5)

  Location  |  Observed  |  Expected  |  Reason
     ()          NaN          3.5        'NaN' mismatch
[...]
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\statistics\prctile.m
***** test
 pct = 50;
 tol = 0.0001;
 x = [0.1126, 0.1148, 0.0521, 0.2364, 0.1393
      0.1718, 0.7273, 0.2041, 0.4531, 0.1585
      0.2795, 0.7978, 0.3296, 0.5567, 0.7307
      0.4288, 0.8753, 0.6477, 0.6287, 0.8165
      0.9331, 0.9312, 0.9635, 0.7796, 0.8461];
 x(5,5) = NaN;
 q = prctile (x, pct, 2);
 qa = [0.1148; 0.2041; 0.5567; 0.6477; 0.9322];
 assert (q, qa, tol);
 x(1,1) = NaN;
 q = prctile (x, pct, 2);
 qa = [0.1270; 0.2041; 0.5567; 0.6477; 0.9322];
 assert (q, qa, tol);
 x(3,3) = NaN;
 q = prctile (x, pct, 2);
 qa = [0.1270; 0.2041; 0.6437; 0.6477; 0.9322];
 assert (q, qa, tol);
!!!!! test failed
ASSERT errors for:  assert (q,qa,tol)

  Location  |  Observed  |  Expected  |  Reason
    (1)        0.08345       0.127       Abs err 0.04355 exceeds tol 0.0001 by 0.04
>>>>> processing D:\a\OCTAVE~1\OCTAVE~1\OCTAVE~1\mingw64\share\octave\7.0.1\m\statistics\quantile.m
***** test
 p = 0.5;
 x = [0.112600, 0.114800, 0.052100, 0.236400, 0.139300
      0.171800, 0.727300, 0.204100, 0.453100, 0.158500
      0.279500, 0.797800, 0.329600, 0.556700, 0.730700
      0.428800, 0.875300, 0.647700, 0.628700, 0.816500
      0.933100, 0.931200, 0.963500, 0.779600, 0.846100];
 tol = 0.00001;
 x(5,5) = NaN;
 assert (quantile (x, p, 1),
         [0.27950, 0.79780, 0.32960, 0.55670, 0.44460], tol);
 x(1,1) = NaN;
 assert (quantile (x, p, 1),
         [0.35415, 0.79780, 0.32960, 0.55670, 0.44460], tol);
 x(3,3) = NaN;
 assert (quantile (x, p, 1),
         [0.35415, 0.79780, 0.42590, 0.55670, 0.44460], tol);
!!!!! test failed
ASSERT errors for:  assert (quantile (x, p, 1),[0.35415, 0.79780, 0.32960, 0.55670, 0.44460],tol)

  Location  |  Observed  |  Expected  |  Reason
    (1)        0.22565      0.35415      Abs err 0.1285 exceeds tol 1e-05 by 0.1


This might (or might not) be related to bug #61704.

Markus Mützel <mmuetzel>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-07 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-11-06 mmuetzel StatusPatch Submitted Ready For Test
    2022-11-06 mmuetzel Attached File- Added bug61711-template-visibility.patch, #53931
        StatusIn Progress Patch Submitted
    2022-11-03 mmuetzel StatusReady For Test In Progress
    2022-10-31 mmuetzel StatusNone Ready For Test
    2022-01-03 mmuetzel Dependencies- bugs #61752 is dependent
    2021-12-24 mmuetzel Release7.0.90 dev

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code