{"action":"created","issue":{"url":"https://api.github.com/repos/wbhart/flint2/issues/128","labels_url":"https://api.github.com/repos/wbhart/flint2/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/wbhart/flint2/issues/128/comments","events_url":"https://api.github.com/repos/wbhart/flint2/issues/128/events","html_url":"https://github.com/wbhart/flint2/issues/128","id":63453608,"number":128,"title":"Test failures (64 bit) with FLINT and ARB on Windows 7 ","user":{"login":"duhadler","id":10748329,"avatar_url":"https://avatars.githubusercontent.com/u/10748329?v=3","gravatar_id":"","url":"https://api.github.com/users/duhadler","html_url":"https://github.com/duhadler","followers_url":"https://api.github.com/users/duhadler/followers","following_url":"https://api.github.com/users/duhadler/following{/other_user}","gists_url":"https://api.github.com/users/duhadler/gists{/gist_id}","starred_url":"https://api.github.com/users/duhadler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duhadler/subscriptions","organizations_url":"https://api.github.com/users/duhadler/orgs","repos_url":"https://api.github.com/users/duhadler/repos","events_url":"https://api.github.com/users/duhadler/events{/privacy}","received_events_url":"https://api.github.com/users/duhadler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-21T20:32:43Z","updated_at":"2015-07-21T18:20:52Z","closed_at":null,"body":"Dear FLINT and ARB Team!\r\nI would like to report my experience with FLINT and ARB on Windows 7 (64 bit)\r\nI am using the following system:\r\nEnvironment: MSYS2 32 bit .\r\nCompiler: TDM-GCC 4.9.2 (12 December 2014). Note: I have tested this compiler extensively; it compiles e.g.  Boost Math and Boost Multiprecision (MPFR and MPFI) without problems, and also works well with EIGEN (including the MPFR version).\r\nGMP 5.1.3, configured as follows  \r\n32 bit:\r\n./configure --build=i686-w64-mingw32 --host=i686-w64-mingw32 --enable-fat --enable-cxx  --enable-static --disable-shared ABI=32  CFLAGS=\"-m32 -march=i686 -Wno-attributes\" --prefix=/local/Win32 --exec-prefix=/local/Win32\r\n64 bit:\r\n./configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --enable-fat  --enable-static --disable-shared ABI=64  CFLAGS=\"-m64 -march=k8 -Wno-attributes\" --prefix=/local/Win64 --exec-prefix=/local/Win64\r\nMPFR 3.1.2, configured as follows  \r\n32 bit:\r\n./configure --build=i686-w64-mingw32 --host=i686-w64-mingw32  --enable-static --disable-shared   CFLAGS=\"-m32 -march=i686  -Wno-attributes\" --with-gmp-include=/local/Win32/include --with-gmp-lib=/local/Win32/lib  --prefix=/local/Win32 --exec-prefix=/local/Win32\r\n64 bit:\r\n./configure --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32  --enable-static --disable-shared   CFLAGS=\"-m64 -march=k8  -Wno-attributes\" --with-gmp-include=/local/Win64/include --with-gmp-lib=/local/Win64/lib  --prefix=/local/Win64 --exec-prefix=/local/Win64\r\nFLINT 2.4.5, configured as follows  \r\n32 bit:\r\n./configure --build=x86-MINGW32  --enable-static --disable-shared ABI=32  CFLAGS=\"-m32 -march=i686 -Wno-attributes\" --with-gmp=/local/Win32  --with-mpfr=/local/Win32  --prefix=/local/Win32\r\n64 bit:\r\n./configure --build=x86_64-MINGW64  --enable-static --disable-shared ABI=64  CFLAGS=\"-m64 -march=k8 -Wno-attributes\" --with-gmp=/local/Win64  --with-mpfr=/local/Win64  --prefix=/local/Win64\r\nARB 2.5.0, configured as follows  \r\n32 bit:\r\n./configure --build=x86-MINGW32  --enable-static --disable-shared ABI=32  CFLAGS=\"-m32 -march=i686 -Wno-attributes\" --with-gmp=/local/Win32  --with-mpfr=/local/Win32  --with-flint=/local/Win32 --prefix=/local/Win32\r\n64 bit:\r\n./configure --build=x86_64-MINGW64  --enable-static --disable-shared ABI=64  CFLAGS=\"-m64 -march=k8 -Wno-attributes\" --with-gmp=/local/Win64  --with-mpfr=/local/Win64  --with-flint=/local/Win64  --prefix=/local/Win64\r\n\r\nThe outcome so far is the following:\r\nGMP and MPFR compile without errors and warnings, and all tests pass (both 32 bit and 64 bit).\r\nFLINT 32 bit compiles without errors and warnings, and all tests pass .\r\nFLINT 64 bit compiles without errors and warnings, but 5 tests fail at run-time, all with a segmentation fault:\r\nFmpz\\test\\t-clog.c, fmpz\\test\\t-clog_ui.c, fmpz\\test\\t-flog.c, fmpz\\test\\t-flog_ui.c, fmpz_poly_factor\\test\\ t-factor_zassenhaus.c\r\nWith these tests removed, all other tests pass.\r\n\r\nARB 32 bit compiles without errors and warnings, and all but 2 tests pass. These tests are:\r\nTEST1, Runtime error:\r\nset_str....\r\nThis application has requested the Runtime to terminate it in an unusual way.\r\nPlease contact the application's support team for more information.\r\nFAIL (valid input): inf\r\ninf +/- 0\r\n0 +/- 0\r\n../Makefile.subdirs:84: recipe for target '../build/arb/test/t-set_str.exe_RUN'                                                                                                                                                                                                failed\r\nmake[1]: *** [../build/arb/test/t-set_str.exe_RUN] Error 3\r\nmake[1]: Leaving directory '/home/MP32/arb-2.5.0/arb'\r\nMakefile:170: recipe for target 'check' failed\r\nmake: *** [check] Error 2\r\n\r\nTEST2, Compile Time Error:\r\nmake[1]: Entering directory '/home/MP32/arb-2.5.0/acb_modular'\r\n    CC   ../build/acb_modular/test/t-elliptic_p.exe\r\n    CC   ../build/acb_modular/test/t-epsilon_arg.exe\r\nI:\\Data\\mpFormulaTDM\\ExternalTools\\msys32\\tmp\\cc121Hff.o:t-epsilon_arg.c:(.text+0x490): undefined reference to `fmpq_dedekind_sum'\r\ncollect2.exe: error: ld returned 1 exit status\r\n../Makefile.subdirs:78: recipe for target '../build/acb_modular/test/t-epsilon_arg.exe' failed\r\nmake[1]: *** [../build/acb_modular/test/t-epsilon_arg.exe] Error 1\r\nmake[1]: Leaving directory '/home/MP32/arb-2.5.0/acb_modular'\r\nMakefile:170: recipe for target 'check' failed\r\nmake: *** [check] Error 2\r\nWhen these 2 tests are removed, all other tests pass without error.\r\n\r\n\r\nARB 64 bit compiles without errors but with many  warnings. All tests seem to fail. It did not manage to try all tests, because run-time failure already occurs at the beginning, and it is very cumbersome to compile and run manually. This is a typical error message from the log:\r\nDH@DH-PC MINGW32 /home/MP64/arb-2.5.0\r\n$ make check\r\nmake[1]: Entering directory '/home/MP64/arb-2.5.0'\r\nmake[1]: Nothing to be done for 'static'.\r\nmake[1]: Leaving directory '/home/MP64/arb-2.5.0'\r\nmake[1]: Entering directory '/home/MP64/arb-2.5.0'\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0'\r\nmake[2]: Nothing to be done for 'static'.\r\nmake[2]: Leaving directory '/home/MP64/arb-2.5.0'\r\nmake[1]: Leaving directory '/home/MP64/arb-2.5.0'\r\nmake[1]: Entering directory '/home/MP64/arb-2.5.0/fmpr'\r\nsqrt....\r\nThis application has requested the Runtime to terminate it in an unusual way.\r\nPlease contact the application's support team for more information.\r\nFAIL\r\n\r\nbits = 32\r\nx = (1 * 2^0)\r\n\r\nz = (1 * 2^0)\r\n\r\nw = (-1 * 2^0)\r\n\r\n../Makefile.subdirs:84: recipe for target '../build/fmpr/test/t-sqrt.exe_RUN' failed\r\nmake[1]: *** [../build/fmpr/test/t-sqrt.exe_RUN] Error 3\r\nmake[1]: Leaving directory '/home/MP64/arb-2.5.0/fmpr'\r\nMakefile:170: recipe for target 'check' failed\r\nmake: *** [check] Error 2\r\n\r\n\r\nBrowsing through the source of various tests I noted that there is a lot of use of the types long and int. For 64 bit programs long is 64 bit on Linux but 32 bit on Windows, as I am sure you know, and this might in part explain these failures on the Windows platform.\r\nThe warnings during compilation seem to point in a similar direction:\r\n\r\nDH@DH-PC MINGW32 /home/MP64/arb-2.5.0\r\n$ bash arb_configure_Win64_Release.sh\r\nConfiguring...x86_64-MINGW64\r\nTesting __builtin_popcountl...yes\r\nTesting native popcount...no\r\nTesting __thread...yes\r\nARB was successfully configured.\r\n\r\nDH@DH-PC MINGW32 /home/MP64/arb-2.5.0\r\n$ make\r\nmake[1]: Entering directory '/home/MP64/arb-2.5.0'\r\nmkdir -p build/interfaces\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/fmpr'\r\n \r\nset_d.c: In function 'fmpr_set_d':\r\nset_d.c:65:9: warning: left shift count >= width of type\r\n         frac |= (1UL << 52);\r\n         ^\r\n\r\nmake[2]: Leaving directory '/home/MP64/arb-2.5.0/fmpr'\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/arf'\r\nceil.c: In function 'arf_ceil':\r\nceil.c:41:9: warning: right shift count >= width of type\r\n         if (COEFF_IS_MPZ(exp) || exp <= 0)\r\n         ^\r\nset_d.c: In function 'arf_set_d':\r\nset_d.c:66:9: warning: left shift count >= width of type\r\n         frac |= (1UL << 52);\r\n         ^\r\nfloor.c: In function 'arf_floor':\r\nfloor.c:41:9: warning: right shift count >= width of type\r\n         if (COEFF_IS_MPZ(exp) || exp <= 0)\r\n         ^\r\nmake[2]: Leaving directory '/home/MP64/arb-2.5.0/arf'\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/mag'\r\nset_fmpz_2exp_fmpz.c: In function 'mag_set_fmpz_2exp_fmpz':\r\nset_fmpz_2exp_fmpz.c:40:37: warning: passing argument 1 of 'fmpz_abs_ubound_ui_2exp' from incompatible pointer type\r\n         m = fmpz_abs_ubound_ui_2exp(&cexp, man, MAG_BITS);\r\n                                     ^\r\nIn file included from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/mag.h:37:0,\r\n                 from set_fmpz_2exp_fmpz.c:26:\r\nI:/Data/mpFormulaTDM/ExternalTools/msys32/local/Win64/include/flint/fmpz.h:663:11: note: expected 'mp_limb_signed_t *' but argument is of type 'long int *'\r\n mp_limb_t fmpz_abs_ubound_ui_2exp(slong * exp, const fmpz_t x, int bits);\r\n           ^\r\nset_fmpz_2exp_fmpz.c: In function 'mag_set_fmpz_2exp_fmpz_lower':\r\nset_fmpz_2exp_fmpz.c:58:37: warning: passing argument 1 of 'fmpz_abs_lbound_ui_2exp' from incompatible pointer type\r\n         m = fmpz_abs_lbound_ui_2exp(&cexp, man, MAG_BITS);\r\n                                     ^\r\nIn file included from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/mag.h:37:0,\r\n                 from set_fmpz_2exp_fmpz.c:26:\r\nI:/Data/mpFormulaTDM/ExternalTools/msys32/local/Win64/include/flint/fmpz.h:665:11: note: expected 'mp_limb_signed_t *' but argument is of type 'long int *'\r\n mp_limb_t fmpz_abs_lbound_ui_2exp(slong * exp, const fmpz_t x, int bits);\r\n           ^\r\n\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/arb_mat'\r\nsolve.c: In function 'arb_mat_solve':\r\nsolve.c:41:10: warning: assignment from incompatible pointer type\r\n     perm = _perm_init(n);\r\n          ^\r\nsolve.c:50:17: warning: passing argument 1 of '_perm_clear' from incompatible pointer type\r\n     _perm_clear(perm);\r\n                 ^\r\nIn file included from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/arb_mat.h:38:0,\r\n                 from solve.c:26:\r\nI:/Data/mpFormulaTDM/ExternalTools/msys32/local/Win64/include/flint/perm.h:63:24: note: expected 'mp_limb_signed_t *' but argument is of type 'long int *'\r\n static __inline__ void _perm_clear(slong * vec)\r\n                        ^\r\n\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/acb_mat'\r\nsolve.c: In function 'acb_mat_solve':\r\nsolve.c:41:10: warning: assignment from incompatible pointer type\r\n     perm = _perm_init(n);\r\n          ^\r\nsolve.c:50:17: warning: passing argument 1 of '_perm_clear' from incompatible pointer type\r\n     _perm_clear(perm);\r\n                 ^\r\nIn file included from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/arb_mat.h:38:0,\r\n                 from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/acb_mat.h:39,\r\n                 from solve.c:26:\r\nI:/Data/mpFormulaTDM/ExternalTools/msys32/local/Win64/include/flint/perm.h:63:24: note: expected 'mp_limb_signed_t *' but argument is of type 'long int *'\r\n static __inline__ void _perm_clear(slong * vec)\r\n                        ^\r\n\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/fmprb'\r\n    CC   ../build/fmprb/fmprb_mul.o\r\nmul.c: In function '_rad_bound':\r\nmul.c:60:34: warning: passing argument 1 of 'fmpz_abs_ubound_ui_2exp' from incompatible pointer type\r\n     *m = fmpz_abs_ubound_ui_2exp(&e, fmpr_manref(t), FMPRB_RAD_PREC);\r\n                                  ^\r\nIn file included from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/fmpr.h:34:0,\r\n                 from I:/Data/mpFormulaTDM/ExternalTools/msys32/home/MP64/arb-2.5.0/fmprb.h:29,\r\n                 from mul.c:26:\r\nI:/Data/mpFormulaTDM/ExternalTools/msys32/local/Win64/include/flint/fmpz.h:663:11: note: expected 'mp_limb_signed_t *' but argument is of type 'long int *'\r\n mp_limb_t fmpz_abs_ubound_ui_2exp(slong * exp, const fmpz_t x, int bits);\r\n           ^\r\n    CC   ../build/fmprb/fmprb_contains_fmpr.o\r\nmake[2]: Leaving directory '/home/MP64/arb-2.5.0/fmprb'\r\nmake[2]: Entering directory '/home/MP64/arb-2.5.0/bernoulli'\r\n    CC   ../build/bernoulli/bernoulli_bound_2exp_si.o\r\nbound_2exp_si.c: In function 'bernoulli_bound_2exp_si':\r\nbound_2exp_si.c:93:9: warning: left shift count >= width of type\r\n         if (hi || n > (1UL << (FLINT_BITS - 6)))\r\n         ^\r\n\r\ntouch: cannot touch ‘test/t-*.c’: No such file or directory\r\ntouch: cannot touch ‘hypgeom/test/t-*.c’: No such file or directory\r\n    AR   libarb.a\r\nmake[1]: Leaving directory '/home/MP64/arb-2.5.0'\r\n\r\nDH@DH-PC MINGW32 /home/MP64/arb-2.5.0\r\n$\r\n\r\nAny advice on the above issues would be much appreciated!\r\nBest regards,\r\n\r\nDietrich Hadler\r\n"},"comment":{"url":"https://api.github.com/repos/wbhart/flint2/issues/comments/123425172","html_url":"https://github.com/wbhart/flint2/issues/128#issuecomment-123425172","issue_url":"https://api.github.com/repos/wbhart/flint2/issues/128","id":123425172,"user":{"login":"duhadler","id":10748329,"avatar_url":"https://avatars.githubusercontent.com/u/10748329?v=3","gravatar_id":"","url":"https://api.github.com/users/duhadler","html_url":"https://github.com/duhadler","followers_url":"https://api.github.com/users/duhadler/followers","following_url":"https://api.github.com/users/duhadler/following{/other_user}","gists_url":"https://api.github.com/users/duhadler/gists{/gist_id}","starred_url":"https://api.github.com/users/duhadler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duhadler/subscriptions","organizations_url":"https://api.github.com/users/duhadler/orgs","repos_url":"https://api.github.com/users/duhadler/repos","events_url":"https://api.github.com/users/duhadler/events{/privacy}","received_events_url":"https://api.github.com/users/duhadler/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T18:20:52Z","updated_at":"2015-07-21T18:20:52Z","body":"Hi Bill,\r\nSwitching to MPIR 2.7.0 solved all problems! No more test failures on Windows 64. \r\nThanks for looking into this!\r\n\r\nBest regards,\r\n\r\nDietrich\r\n"}}