[Ecm-commits] r2644 - trunk

cvs commits ecm-commits at lists.gforge.inria.fr
Fri Feb 27 15:16:00 CET 2015


Author: zimmerma
Date: 2015-02-27 15:16:00 +0100 (Fri, 27 Feb 2015)
New Revision: 2644

Modified:
   trunk/main.c
   trunk/test.ecm
Log:
added GMP_NUMB_BITS in print_config()
this enables to properly avoid tests that are known to fail on 32 bits


Modified: trunk/main.c
===================================================================
--- trunk/main.c	2015-02-27 08:23:56 UTC (rev 2643)
+++ trunk/main.c	2015-02-27 14:16:00 UTC (rev 2644)
@@ -163,6 +163,7 @@
              __GNU_MP_VERSION, __GNU_MP_VERSION_MINOR);
    #endif
 #endif /* __MPIR_VERSION */
+  printf ("GMP_NUMB_BITS = %u\n", GMP_NUMB_BITS);
 
 #ifdef ECM_TUNE_CASE
   printf ("Tuning parameters from %s\n", ECM_TUNE_CASE);

Modified: trunk/test.ecm
===================================================================
--- trunk/test.ecm	2015-02-27 08:23:56 UTC (rev 2643)
+++ trunk/test.ecm	2015-02-27 14:16:00 UTC (rev 2644)
@@ -234,7 +234,11 @@
 if [ "$MUL" != "redc" -a "$MUL" != "mpzmod" ]; then
 
 echo 31622776601683791911 | $ECM 11000
+# Note: on 32-bit machines, param 1 (ECM_PARAM_BATCH_SQUARE) does not work
+$ECM -printconfig | grep "GMP_NUMB_BITS = 64"
+if [ "$?" == "0" ]; then
 echo 31622776601683791911 | $ECM -param 1 11000
+fi
 echo 31622776601683791911 | $ECM -param 2 11000
 echo 31622776601683791911 | $ECM -param 3 11000
 
@@ -372,7 +376,8 @@
 
 # the following tests should work on machines which have uint64_t or where
 # unsigned long long has 64 bits (exercises patch from David Cleaver, r1575)
-echo "NOTE: NEXT TESTS WILL FAIL ON SOME 32BIT MACHINES, THIS IS EXPECTED."
+$ECM -printconfig | grep "GMP_NUMB_BITS = 64"
+if [ "$?" == "0" ]; then
 
 echo 10000000000000000000000000000000000000121 | $ECM -param 0 -sigma 61 -go 1195504287780095287 2950307;  checkcode $? 8
 
@@ -380,6 +385,8 @@
 
 echo 10000000000000000000000000000000000000121 | $ECM -param 0 -sigma 291 -go 5994496018878137 4372759;  checkcode $? 8
 
+fi
+
 if [ "$MUL" = "modmuln" ]; then
 # exercise batch mode
 echo 33852066257429811148979390609187539760850944806763555795340084882048986912482949506591909041130651770779842162499482875755533111808276172876211496409325473343590723224081353129229935527059488811457730702694849036693756201766866018562295004353153066430367 | $ECM -v -sigma 1:17 1e6; checkcode $? 0



More information about the Ecm-commits mailing list