| 
      
      
      From: martin g. <a.m...@ic...> - 2025-08-27 12:38:15
      
     | 
| Dear reduce-algebra-developers,
running the procedure
procedure lastprime (n) ;
   begin scalar k, kfact ;
      k:=n+1 ;
      repeat
      << k:=k-1 ;
	 kfact:=factorize(k) 
      >> until length(kfact) = 1 and second(first(kfact))=1;
      return first(first(kfact))
   end ;
with n=10^25 on MacOS Intel/12.7.6 CSL snapshot 6866 or higher results in the following message
!!! Aborting: newcslgc.cpp:266 page type not recognised
and the last number tested before the abort is 10^25-112.
On the same macbook with the same call PSL snapshot 6866 and both PSL and CSL snapshot 6658 all complete without issues. On Linux 5.15.187 CSL and PSL snapshots 7131, 6860 and 6658 (compiled locally) all complete without issues. The result in all cases is 10^25-123. Repeating up to 10^40 on these versions causes no problems.
The log files for the both CSL and PSL 6866 runs are attached.
In case it's relevant, here are the machine specs:
Darwin Kernel Version 21.6.0: Mon Jun 24 00:56:10 PDT 2024; 
root:xnu-8020.240.18.709.2~1/RELEASE_X86_64 x86_64
Processor: Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
Linux 5.15.187 #1 SMP PREEMPT Thu Jul 10 19:03:37 CDT 2025 x86_64
Processor: Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz GenuineIntel GNU/Linux
Finally the context in case it helps: the R to REDUCE interface I'm building can notify at user-defined intervals that a calculation is still running and can also interrupt a calculation after a user-defined timeout. I'm using the above procedure to test these features by executing it for a series of integers to determine how long it takes to run on an arbitrary test system and then use this to calculate appropriate notification interval and timeout so that these will be triggered.
Kind regards, 
Martin
 |