flintlib / arb

Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
http://arblib.org/
GNU Lesser General Public License v2.1
456 stars 138 forks source link

make check failed on partitions_fmpz_ui_threaded #301

Open zhaoli-IHEP opened 4 years ago

zhaoli-IHEP commented 4 years ago

"make" is okay but not for "make check". flint has successfully passed "make" and "make check". Here is the error message

partitions_fmpz_ui_threaded....warning: newton_refine_root: improvement failed
make[1]: *** [../build/partitions/test/t-partitions_fmpz_ui_threaded_RUN] Segmentation fault (core dumped)

gcc version is

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) 
fredrik-johansson commented 4 years ago

I don't know what causes this. Can you try it with valgrind?

Anyone else able to reproduce the problem?

tthsqe12 commented 4 years ago

With what versions of arb/flint should I try this? Could not reproduce with the latest of both.

zhaoli-IHEP commented 4 years ago

With what versions of arb/flint should I try this? Could not reproduce with the latest of both.

flint version is 2.5.2 arb is the git latest version

tthsqe12 commented 4 years ago

I can say https://github.com/fredrik-johansson/arb/blob/master/partitions/test/t-partitions_fmpz_ui_threaded.c#L146 should probably be flint_cleanup_master and that @wbhart would have a better idea of the final specifications of the threading in flint. This is nothing to do the crash, though.

fredrik-johansson commented 4 years ago

@tthsqe12 @wbhart Yes, I noticed that the threaded tests in Arb now leak a small amount of memory according valgrind, presumably because the thread pool is not cleaned up. Changing all instances of flint_cleanup() to flint_cleanup_master() would unforunately not be backward compatible with previous versions of flint, which for the time being might be desirable. I wonder if the new interface in flint could be tweaked in some way for better backward compatibility. Alternatively, I could perhaps replace flint_cleanup() with an arb_cleanup() that detects the version of flint and calls flint_cleanup() / flint_cleanup_master() (though as of the current git version of flint I don't know if there's a way to check for this).