mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Lone Mersenne Hunters

Reply
 
Thread Tools
Old 2011-02-25, 02:31   #34
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

13·227 Posts
Default

Quote:
Originally Posted by kar_bon View Post
Other idea:
- reading first the page which expos without any factor
- run any of those
Here's that sort of script:

- 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
I've just found the factor 110648174743660201 of exponent #683 = 4294981591 with this script.

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
kar_bon is offline   Reply With Quote
Old 2011-02-25, 07:33   #35
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

244158 Posts
Default

Quote:
Originally Posted by ET_ View Post
Finally, I'm trying to implement links that allow automatization of simple tasks (like run some TF) on smallest/biggest factored/unfactored exponents.
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.
Uncwilly is offline   Reply With Quote
Old 2011-02-25, 10:07   #36
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

22·7·173 Posts
Default

Quote:
Originally Posted by Uncwilly View Post
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.
Of course, that makes sense!

You should have those links by the end of this week.

Luigi

Last fiddled with by ET_ on 2011-02-25 at 10:07
ET_ is offline   Reply With Quote
Old 2011-02-25, 14:27   #37
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

113548 Posts
Default

Quote:
Originally Posted by ET_ View Post
Of course, that makes sense!

You should have those links by the end of this week.

Luigi
It seems that my page is having more success than expected...

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
ET_ is offline   Reply With Quote
Old 2011-02-25, 14:54   #38
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

23·32·13 Posts
Default

Quote:
Originally Posted by ET_ View Post
It seems that my page is having more success than expected...

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
Ain't me (yet)! But I will keep your request in mind as I work on the script.

Rodrigo

Last fiddled with by Rodrigo on 2011-02-25 at 14:55
Rodrigo is offline   Reply With Quote
Old 2011-02-28, 21:35   #39
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

23×32×13 Posts
Default Update

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
Rodrigo is offline   Reply With Quote
Old 2011-02-28, 23:22   #40
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

B8716 Posts
Default

Quote:
Originally Posted by Rodrigo View Post
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.

RUNGIMPS.BAT needs a parameter "%1" so calling "RUNGIMPS.BAT 1" will test cand. No.1.

Creating a shortcut on your desktop, you can add this param. at the target.
Doubleclick should work now.
Quote:
Originally Posted by Rodrigo View Post
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.
Perhaps the extension 'bat' was not assiciated properly to the cmd-command.

Quote:
Originally Posted by Rodrigo View Post
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 two used programs (wget and gawk) seems not working for those old WfW.
I have no chance to make this working here! So sorry for this task.

Quote:
Originally Posted by Rodrigo View Post
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.
Under Win 98 all should work fine but not the command "findstr".
Instead you can use
Code:
find "Factor found :" results.txt >>factors.txt
Another point: the line with "echo.>>factors.txt" can/should be deleted.
kar_bon is offline   Reply With Quote
Old 2011-02-28, 23:34   #41
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

1050910 Posts
Default

Quote:
Originally Posted by Rodrigo View Post
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 version on wget attached above is not for the older DOS, there is a version that should run, check here:
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.
Uncwilly is offline   Reply With Quote
Old 2011-03-01, 00:09   #42
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

23×32×13 Posts
Default

Quote:
Originally Posted by kar_bon View Post
The two used programs (wget and gawk) seems not working for those old WfW.
I have no chance to make this working here! So sorry for this task.
Not a problem, kar_bon. Thank you for trying. And, in addition to the factoring work that my Vista did with these programs during testing, it looks like other folks have adopted the batch file for their own use with the project. So your efforts were not in vain.

Quote:
Originally Posted by kar_bon View Post
Under Win 98 all should work fine but not the command "findstr".
Instead you can use
find "Factor found :" results.txt >>factors.txt
I will try that. When launching DO.BAT in Win98, the results were stranger than in WFWG. The DOS window opened and the program appeared to start working, but unlike in Vista, there was no visible output after the first line or two, and all it showed was a blinking cursor. Then entering CTRL-C did not stop the program -- got an error message saying that I could not close the program from Windows. The Pause key didn't work, either. Used Task Manager to close the application, but I could still hear the PC churning afterward. Ended up having to shut down completely.

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
Rodrigo is offline   Reply With Quote
Old 2011-03-01, 00:15   #43
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

295110 Posts
Default

Quote:
Originally Posted by Rodrigo View Post
The DOS window opened and the program appeared to start working, but unlike in Vista, there was no visible output after the first line or two, and all it showed was a blinking cursor.
Comment out the first line with "REM @echo off". This will now show any output of the batch, good for testing.
kar_bon is offline   Reply With Quote
Old 2011-03-01, 00:31   #44
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

23·32·13 Posts
Default

Quote:
Originally Posted by Uncwilly View Post
The version on wget attached above is not for the older DOS, there is a version that should run, check here:
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.
Thanks, Uncwilly.

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! It could end up being a lot of fun, or highly frustrating. Hopefully it'll be like what they say for riding a bicycle, that you never forget and it comes back to you...

Rodrigo
Rodrigo is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
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

All times are UTC. The time now is 20:46.


Mon May 16 20:46:54 UTC 2022 up 32 days, 18:48, 2 users, load averages: 2.66, 2.12, 1.83

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔