-   No Prime Left Behind (
-   -   Automated LLR testing with LLRnet (

mdettweiler 2008-02-03 20:08

Automated LLR testing with LLRnet
Hi all,

We have several No Prime Left Behind LLRnet servers. With LLRnet, you can perform LLR tests [B]automatically[/B]. There is no need to mess with reserving/reporting ranges and all that stuff. There is no need to worry about whether your machine will run out of work in the middle of the night or while you're on vacation. Just set it and forget it! :smile:

LLRnet is very simple to set up--in less than 5 minutes you can be all set and crunching away! It's perfect for users who just want to donate their spare CPU cycles to a worthy cause without adding a degree of complexity to their computer use. (That's not to say that it isn't great for advanced users, too. :wink:) It's also great for work computers, since you can set it up on a computer and not have to worry about having it run out of work while it's not accessible. (Sorry, LLRnet doesn't currently work with HTTP/SOCKS proxy servers. There is one workaround that I know of, but it's more technically oriented--if you're interested, either PM me or post here.)

Here's all you need to do:

[B]1.[/B] Download the LLRnet client software for your operating system. The latest version of LLRnet is available for Windows and Linux. For downloads, please see [URL=""]LLRnet supports LLR V3.8 and higher[/URL].

All are 32-bit; Because of the type of work that LLR does, 64-bit has minimal, if any, speed difference.

[B]2.[/B] Extract the files from the archive you just downloaded. C:\llrnet is a good choice (or /home/[I]username[/I]/llrnet for Linux users).

[B]3.[/B] Navigate to the folder where you extracted LLRnet. Open up the llr-clientconfig.txt file in your favorite text editor. You'll notice a little ways down from the top a line that says the following:

username = "nobody"

Change "nobody" to your username. For example, I would set this to "mdettweiler". This ensures that numbers you work on are credited properly to you in the stats that will be published periodically. (If you'd rather crunch anonymously, and not have your crunching associated with your username, simply set this to something different). Note: leaving your username at the default of "nobody" will [B]not[/B] work--LLRnet will give an error instead and immediately exit, and in fact on Windows the error may not be visibile at all, and LLRnet will just seemingly shut down immediately after starting.

Save the file, and close out your text editor.

[B]4.[/B] Open up a command prompt window and navigate to the folder where you extracted LLRnet. In Windows, type "do". In Linux, type "./". Work should begin almost immediately. (Note: GUIs are not available with the recent more efficient versions of LLRnet.) When you want to stop running LLRnet, don't just "X" out of the command prompt window. Instead, type Ctl-C followed by a "Y" (Windows) when a question appears. Then type "do -c" in Windows or "./ -c" in Linux. This will return completed results to the server and cancel remaining tests so that they can be handed out to others.

If you would like to have LLRnet run at startup, please post a message here that includes which O.S. that you are running and someone will help. Many changes to LLRnet over the years have made it difficult to give specific instructions.

That's all!

Please post any questions/comments here, or send a private message to me (mdettweiler).

Let's get crunching! :banana:

mdettweiler 2008-02-03 20:18

[B]Q: Is there a deadline for returning LLRnet results?[/B]
[I]A: Yes. Currently the deadline is [B][COLOR=blue]2 days[/COLOR][/B] from the time when the number was handed out to your client (for both servers). After 2 days, if you still haven't finished crunching your number (or simply haven't been able to return it yet even if it is finished), it will be assigned to another person.[/I]

[B]Q: Can I cancel a number that I don't actually want to crunch for whatever reason, or is over deadline?[/B]
[I]A: Yes. Go to your command prompt window, hit "Ctl-C" and type "Y" at the question (Windows). Then type the command "do -c" (Windows) or "./ -c" (Linux) and press Enter. LLRnet will return all results that have been completed and cancel all remaining tests.[/I]

[B]Q: Can I run LLRnet on a multi-core system and still utilize all the cores?[/B]
[I]Yes. You will need to run multiple copies of LLRnet. When installing, extract the archive you downloaded into as many folders as you have cores (such as c:\llrnet, c:\llrnet2, etc.). Then, configure the llr-clientconfig.txt for each core (you have to configure each installation separately--and [B]make sure to change the GUIPort value to something different on everything except the first installation. You'll also have to change this value in the llr-guiconfig.txt for the installations that have been set to a different GUIPort.[/B]), and run the do.exe (or "./" on Linux) in each installation.[/I]

[B]Q: I'm not constantly connected to the Internet. Can I set LLRnet to keep a larger queue to last until the next connect?[/B]
[I]A: Yes. Close out LLRnet, open up llr-clientconfig.txt, set the "WUCacheSize" value to however many workunits you want to keep in queue, and restart LLRnet. The maximum is 100, which should be plenty.[/I]

[B]Q: I'm on a team. do I have to do anything special with LLRnet?[/B]
[I]A: No. As long as you've properly announced your team membership in the "Teams: Join a Team" thread, then we'll get you all set on the backend as soon as we notice your post. In the meantime, you can still go ahead and submit results--even if they're attributed to "no team" at first. We will be able to get that corrected when you are entered into the database as a member of your team.[/I]

[COLOR=blue][COLOR=black][B]Q: I'm already experienced with LLRnet, and I just want to know what to punch in to my already-set-up copy of LLRnet for it to work with NPLB. Out with it man, already![/B][/COLOR]
[COLOR=black][I]A: See [URL=""]this thread[/URL] for a current list of all the LLRnet servers that this project operates.[/I][/COLOR]

[COLOR=blue][COLOR=green][B][COLOR=black]Q: After unzipping the LLRnet archive on Windows, the llr-clientconfig.txt file appears garbled. What's up?[/COLOR][/B]
[COLOR=black][I]A: The llr-clientconfig.txt file uses Linux/Unix style line endings, rather than Windows ones, thus, Notepad just shows a block where a new line should have begun. Wordpad handles them just fine, though, so you just have to open the file in Wordpad for it to display correctly. Or, get [URL=""]Metapad[/URL], a free Notepad replacement that handles Linux line endings fine and adds a lot of improvements to Notepad.[/I][/COLOR]

[COLOR=black][B]Q: Where are the stats? How often are they updated?[/B][/COLOR]
[COLOR=black][I]A: The stats are at [URL][/URL]. Stats are updated continuously.[/I][/COLOR]

[COLOR=black][B]Q: What do I do if I find a prime with LLRnet?[/B][/COLOR]
[COLOR=black][I]A: Just the same as you would do if you had found the prime with manual LLR for the team drive that LLRnet is working on. Refer to the "[URL=""]Report Primes Here[/URL]" thread for more information.[/I][/COLOR]

[COLOR=black][B]Q: How do I know if I found a prime (besides checking lresults.txt, which may or may not be feasible depending on the situation)?[/B][/COLOR]
[COLOR=black][I]A: If you're using one of our LLRnet/PRPnet servers, then your primes will show up at [URL][/URL] (LLRnet) or [URL][/URL] (PRPnet) at the next hourly status page refresh after they've been submitted to the server. They will continue to be displayed until the next daily results copy-off (which happens at approximately 5 AM or 6 AM GMT each day). However, even after they're removed from the main status page, they will continue to be listed in the "All Primes found so far" list for the respective server.[/I][/COLOR]

If you have any more questions that should be added to this list, please post here. :smile:

em99010pepe 2008-02-24 11:47

How to set up a LLRnet server
The LLRnet server files can be downloaded from here:

windows version
linux version

The first thing to do is to change settings on llr-serverconfig.txt file, see bold text.

[B]serverName - [/B]IP address of your machine

[B]port = 100 [/B]- port, don't forget to open it on your firewall settings, UDP and TCP ports, open everything

[B]maxConnections = 30 [/B]- max connections the server can handle simultaneously

[B]jobMaxTime = 4 * 24 * 3600 -- 4 days - [/B]wu's will expire in x seconds

[B]prunePeriod = 0.5 * 24 * 3600 -- 1/2 days - [/B]prunes the knpairs and the joblist txt files each X seconds

[B] --displayFormat = "%s*2^%s+1" -- use this for PRP type test [/B]- for Proth numbers
[B]displayFormat = "%s*2^%s-1" -- use this for LLR type test (default) [/B]- For Riesel numbers

[B]serviceName = "NPLB_LLRserver"[/B] - if you run more than one server you should name them different

Below you'll find my llr-serverconfig.txt file content:

-- LLRNet - network part of LLR
-- (C) 2004-2005 Vincent Penne
-- (See file LICENSE that must be included with this software)
-- WARNING: comments start with two dashes

-- general settings

-- server name
-- used in particular to identify the server into the sql stats table
-- (change this name if you have several servers using the same sql database)
[B]serverName = ""[/B]

-- port that the server listen to (make sure clients are configured
-- with the same number)
[B]port = 100[/B]

-- maximum number of concurrent connections
[B]maxConnections = 30[/B]

-- maximum allowed time for a user to complete a job (in seconds)
[B]jobMaxTime = 4 * 24 * 3600 -- 4 days [/B]

-- various files used by the server
knPairsFile = "knpairs.txt"
jobListFile = "joblist.txt"
resultsFile = "results.txt"

-- if you want the server to regularly prune your knpairs and joblist
-- files, then uncomment the following line and set the period of
-- pruning in second.
[B]prunePeriod = 0.5 * 24 * 3600 -- 1/2 days [/B]

-- (for gurus only)
if WIN32 then
no_shell = 1

-- format used to display numbers in result file
-- (uncomment the appropriate line)
--displayFormat = "%s*2^%s+1" -- use this for PRP type test
[B]displayFormat = "%s*2^%s-1" -- use this for LLR type test (default)[/B]

-- uncomment the following line to remove username check when
-- accepting a new result
noUserCheck = 1

-- you can customize the way the date is displayed
-- (in joblist.txt and results.txt)
--function DisplayDate()
-- return date("%d/%m/%Y\ %r")

-- PROXY settings
-- uncomment the following line to make this server a proxy server
--proxy = 1

-- address of the parent server
proxyMasterAddress = "localhost"
proxyMasterPort = 7000

-- name of this proxy (change 'nobody' to something else)
proxyName = "nobody"

-- size of the proxy cache
proxyCacheSize = 10

-- minimum number of results to send back to the main server
-- at a time
proxyTosendThreshold = 10

-- name of the tosend file of the proxy
tosendFile = "tosend-proxy.txt"


-- below is an example of callback to log all primes as they are
-- found into an additional file

--function OnPrime(t, k, n, job)
-- local fileprime = openfile("primes.txt", "a")
-- if fileprime then
-- write(fileprime, format("[%s]\n", job.resultdate))
-- write(fileprime, format(displayFormat.." is prime! Time : %d.0 sec.\n",
-- k, n,
-- Seconds() - job.seconds))
-- closefile(fileprime)
-- end

-- similarly, you can have another callback called OnResult,
-- beware that it takes one additional argument (the residue)

--function OnResult(t, k, n, residue, job)
-- insert whatever you want here

-- SQL settings (mySql only at the moment)

-- uncomment the line below to use SQL
--sqlUsed = 1

-- sql general configuration
sqlServer = "localhost"
--sqlServerPort = 4000
sqlDriver = "mysql"
sqlUser = "llrnet"
sqlPassword = "llrnet"
sqlDbName = "llrnet"

-- SQL user table
-- uncomment the line below and set the name of the table of users
--sqlUsersTable = "users"

-- name of the fields containing the username and the password
sqlUsernameEntry= "username"
sqlPasswordEntry= "password"

-- SQL pairs and results
-- uncomment the line below and set the name of the tables
--sqlPairsTable = "pairs"
sqlJobsTable = "jobs"
sqlResultsTable = "results"
sqlRejectedTable= "rejected"

-- SQL stats
-- uncomment the line below to allow llrnet server statistics and infos
-- to be regularly updated into the given sql table
--sqlStatsTable = "stats"

-- WIN32 specific settings
-- uncomment the line below to hide the tray icon on startup
--hideTrayIcon = 1

-- change this value if you want to run several client as services
[B]serviceName = "NPLB_LLRserver"[/B]

-- under WIN32 platform, uncomment the following line to log stdout and stderr
-- to a file called "stdout.txt"
--logOutput = 1

--port = 7001
--proxy = 1
--knPairsFile = "knpairs-proxy.txt"
--jobListFile = "joblist-proxy.txt"
--proxyCacheSize = 10
--proxyName = "proxy1"

--sqlUsed = 1
--sqlUsersTable = "users"

[/quote]Next step is to create the knpairs.txt file. This one is the main file of the server and it's equivalent to an input file for manual LLRing (where you have the candidates to test). I usually download the file from the reservation thread. For the first time you just need to rename it to knpairs.txt and move to the server folder. If you are already running the server you always need to stop the server if you want to update the knpairs.txt file, this is very important. Stop the server, open knpairs.txt with notepad and add the work at the end of the content of knpairs.txt.
After everything is set up you can run the server by clicking on llrserver.exe file. The client runs on system tray, you have a console if you want to check the behave of the client. Its output is something like this:

[quote]NPLB_LLRserver current status :
connection request from 829ea741:43522 (socket 168)
Proposing pair 911/286858 to gd_barnes
connection closed (socket 168)
connection request from 200a8c0:3251 (socket 956)
Proposing pair 923/286858 to Free-DC_em99010pepe
connection closed (socket 956)
connection request from 200a8c0:3252 (socket 584)
Proposing pair 945/286858 to Free-DC_em99010pepe
connection closed (socket 584)
connection request from 829ea741:43528 (socket 168)
Proposing pair 981/286858 to gd_barnes
connection closed (socket 168)

You can easily check the pair proposed and to whom.

The results received by all clients will be written in a file called results.txt with the following format (base 2):

[month/day/year time]
k*2^n+-1 is not prime. Res64: **** Time : *** sec.


[month/day/year time]
k*2^n+-1 is prime.

[/quote]You can always move results.txt file from the server folder that the server will always create one, never do this for knpairs.txt.

Doubts? I know my English is poor...


IronBits 2008-03-01 15:44

If there is any problems with llrnet.ironbits.ne5
you can find me in the irc chat room here #lobby #Free-DC

to join to a channel and chat, type this /join #Free-DC
I use Mirc in windows, not sure what is best on Linux.

mdettweiler 2008-05-17 23:01

Well, I've finally gotten around to updating this thread to reflect our two servers hosted by IronBits and Adam (previously it referenced Carlos's old server). I'll try to stay on top of it from now on. :smile:

Dead J. Dona 2008-06-11 11:38

badly needed llrnet with ability to [B]proxy authentication[/B]

gd_barnes 2008-06-14 01:29

[quote=Dead J. Dona;135664]badly needed llrnet with ability to [B]proxy authentication[/B][/quote]

Anon or some of the other server gurus here, can you respond on this?


IronBits 2008-06-14 02:35

Per CarlosEduardo in this thread

(Sorry, LLRnet doesn't currently work with HTTP/SOCKS proxy servers. There is one workaround that I know of, but it's more technically oriented--if you're interested, either PM me or post here.)

mdettweiler 2008-06-14 13:17

[quote=gd_barnes;135880]Anon or some of the other server gurus here, can you respond on this?


[quote=IronBits;135884]Per CarlosEduardo in this thread

(Sorry, LLRnet doesn't currently work with HTTP/SOCKS proxy servers. There is one workaround that I know of, but it's more technically oriented--if you're interested, either PM me or post here.)[/quote]
I know of one iffy way that might get it to work (though it requires that you have at least one Linux machine on the same network as the machine that needs proxied access), using a program called socat...Dead, are you using Linux or Windows?

em99010pepe 2008-10-12 20:03

Special thanks to IronBits and Adam (AES) for graciously hosting the LLRnet server for us! :bow:


Please update your comment by deleting the second part of it.

[B]Q: Where are the stats? How often are they updated?[/B]
[I]A: The stats are at [URL=""][/URL]. The stats for the AES300 server are updated real-time, whereas the stats for all the other servers are imported into the database every few days to a week.
[B]Q: How do I know if I found a prime (besides checking lresults.txt, which may or may not be feasible depending on the situation)?[/B]
[I]A: If you're using our (AES300) server, you can just send a PM or email to me (Anonymous) or Adam (AES) with your email in it, and we can get it punched in to the server so that it will automatically send you email notifications of primes. If you're using any of our other servers, you can't get e-mail notifications, but we will notify you either by forum PM or email if you find a prime and don't report it within a few days.[/I]

Same here.

gd_barnes 2008-10-13 07:16

[quote=em99010pepe;145190]Please update your comment by deleting the second part of it.

Same here.[/quote]

(1) Done by making the statement more general.

(2) Done and allowed for the possibility in Ironbits' servers in the future.

All times are UTC. The time now is 07:33.

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