![]() |
![]() |
#34 | |
Mar 2006
Germany
13·227 Posts |
![]() Quote:
- Download this zip-file containing all scripts and programs (and the script from above, too) - unzip the file in an empty folder - run "do.bat" Explanations: - the script first downloads the page with all exponents and factors found so far - it creates a file called "expo.txt" with all exponents without a factor - from this list another temporary batch called "gimpsget.bat" is created to test one of those exponents (by random or one after each other) - the result (factor found or not) is written in "results.txt" - after 100 attempts, the exponents-page is downloaded again, to be sure, only expos w/o factors are searched - found factors are then collected in "factors.txt" and "results.txt" is deleted Code:
@echo off :begin set /a n=1 if not exist results.txt goto begin1 findstr /c:"Factor found :" results.txt >>factors.txt echo.>>factors.txt del results.txt :begin1 wget -O gimps.txt "http://www.moregimps.it/mersenne-test/" gawk -f get_expo.awk gimps.txt >expo.txt :next if exist expo_neu.txt del expo_neu.txt gawk -f make.awk -v random=1 expo.txt del expo.txt ren expo_neu.txt expo.txt echo.>>results.txt call gimpsget.bat copy results.txt+in.txt results.txt >nul del in.txt set /a n=%n%+1 if %n% GTR 100 goto begin goto next Set "random=0" to go through the whole list from top to down. Doing this, the counter for 'n' should be set higher than 100 (see line "if %n% GTR 100 goto begin" at the end), otherwise only first 100 expos will tested (currently should be 877 or more). PS: I think, the DOS-command "findstr" is not available in V6.20 so please check first. The currently tested expo-no is shown only in the DOS-BOX title because all outputs are disabled during testing (echo off). Last fiddled with by kar_bon on 2011-02-25 at 02:36 |
|
![]() |
![]() |
![]() |
#35 |
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
244158 Posts |
![]()
Can you also allow a sort of k from smallest to lowest? That way it would be easier to request the lowest k's that have have no factor.
|
![]() |
![]() |
![]() |
#36 | |
Banned
"Luigi"
Aug 2002
Team Italia
22·7·173 Posts |
![]() Quote:
![]() You should have those links by the end of this week. Luigi Last fiddled with by ET_ on 2011-02-25 at 10:07 |
|
![]() |
![]() |
![]() |
#37 | |
Banned
"Luigi"
Aug 2002
Team Italia
113548 Posts |
![]() Quote:
![]() I'm getting too many 500 Internal Server Error, so I will lower the k request from 500,000 to 400,000 tonight, and see if the problem goes away. Meanwhile, I'd appreciate if you put a sleep call in your scripts to avoid web server clobbering... ![]() Sorry for the inconvenience. Luigi Last fiddled with by ET_ on 2011-02-25 at 14:37 |
|
![]() |
![]() |
![]() |
#38 | |
Jun 2010
Pennsylvania
23·32·13 Posts |
![]() Quote:
![]() Rodrigo Last fiddled with by Rodrigo on 2011-02-25 at 14:55 |
|
![]() |
![]() |
![]() |
#39 |
Jun 2010
Pennsylvania
23×32×13 Posts |
![]()
OK, I’ve done some experimenting with these batch files, and here’s what I have so far.
In Windows Vista, they work to perfection from Start – Run. DO.BAT also works if I double-click on it from Windows Explorer. It opens a DOS window and does its thing. RUNGIMPS.BAT (by itself) will also run, but it doesn’t seem to accomplish anything since from that route there is no way to tell it which exponent to test. At first, neither of the batch files would work if I opened a DOS window first and then tried to launch them from there. For example, in these circumstances DO.BAT was returning an error saying that, “’do’ is not recognized as an internal or external command, operable program or batch file” (!). But today both batch files are working properly if I open a DOS window first. The real test, though, is on the Windows for Workgroups 3.11/DOS 6.20 computer, which is the one that I’m trying to add to the project. I haven’t been able to get either of the batch files to work there. They both return a whole mess of error messages, no matter how I try to launch them. The most serious error appears to be that, “This program cannot be run in DOS mode.” This happens whether I click on the batch file through File Manager, open a DOS prompt, or use Run. The next step will be to try these files on one of my Windows 98 systems. Windows 98 is of course at an intermediate stage between Windows 3.11 and Vista, so I'm curious to see how well it handles these batch files. When I get the chance to (hopefully, later today) I will try a couple of ideas I’ve come up with to see if they solve (or work around) this issue. Suggestions are, of course, welcome! Rodrigo |
![]() |
![]() |
![]() |
#40 | ||||
Mar 2006
Germany
B8716 Posts |
![]() Quote:
Quote:
Quote:
I have no chance to make this working here! So sorry for this task. Quote:
Instead you can use Code:
find "Factor found :" results.txt >>factors.txt |
||||
![]() |
![]() |
![]() |
#41 | |
6809 > 6502
"""""""""""""""""""
Aug 2003
101×103 Posts
1050910 Posts |
![]() Quote:
http://wget.addictivecode.org/Freque...t=Faq#download And for DOS gawk, check here: http://www.gnu.org/software/gawk/man...C-Installation I have taken to manually fetching the status page and then sorting it in Excel. Then I paste the expos that I want into the expo.txt file. I modified the do.bat to just loop the selected expos in order. |
|
![]() |
![]() |
![]() |
#42 | ||
Jun 2010
Pennsylvania
23×32×13 Posts |
![]() Quote:
Quote:
![]() By coincidence, the MOREGIMPS.IT server may also have been down just at the time when I tried these batch files, and that may have influenced the results. (Going to the page via IE8 in Vista was yielding an "Internal Server Error" message.) But Win98 was just an experiment for our purposes. I'll look into MS-DOS versions of GAWK.EXE and WGET.EXE. Thanks again! Rodrigo |
||
![]() |
![]() |
![]() |
#43 |
Mar 2006
Germany
295110 Posts |
![]()
Comment out the first line with "REM @echo off". This will now show any output of the batch, good for testing.
|
![]() |
![]() |
![]() |
#44 | |
Jun 2010
Pennsylvania
23·32·13 Posts |
![]() Quote:
The link to WGET for DOS didn't work for me ("Explorer cannot display the page"). But I did find this: http://www.rahul.net/dkaufman/. Do a search on that page for "wget 1.8.2", it's about halfway down. What do you think? Will also look into GAWK for DOS. This is taking me back 20 years! ![]() Rodrigo |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Java applet alternative | a1call | Programming | 19 | 2019-11-08 22:31 |
New feature in my ECM applet | alpertron | Factoring | 87 | 2014-11-21 21:23 |
Porting my factorization applet to Android | alpertron | Programming | 2 | 2013-03-19 11:28 |
A strange applet: | 3.14159 | Miscellaneous Math | 7 | 2010-06-01 01:29 |
Faster factorization applet | alpertron | Factoring | 14 | 2006-01-01 04:00 |