Thread: LLRNet
View Single Post
Old 2007-06-02, 08:41   #1
em99010pepe's Avatar
Sep 2004

2×5×283 Posts
Default LLRNet

What about using LLRNET to bring more people to the fun?

I asked Lars how to set up a LLRNet server, here his reply.

 If you do not have it already downloaded the llrnet client from PSP you should do that at:
This file contains everything we need for the server.
If your project targets a base different to "2" you need the client from the sr5 project as
the normal client has a restriction only to allow base 2 tests. The server has no restrictions whatsoever.
The server application we need is llrserver.exe.
Before we can start this we need to make some modifications to some files.
First we need a file called:
The file contains all tests not yet distributed to a client. It has the "newpgen" format.
222113 2132853
222361 2060960
222361 2115176
The first line describes the kind of test to be done.
There can only be one of these lines in the complete file!!!
There is no way to switch between different test type within one server.
So if you need to test differnt types like at SR5 you need two servers.
The example shows how the line looks for PSP.
The following lines contains the tests.
If you need to modify this file you should stop the server.
Next file to modify is llr-serverconfig.txt
The following text contains an example for this config.
I will give the informations where you should change something
within the file.
My comments all start with -->>
-- 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)
serverName = "llrserver"
-- port that the server listen to (make sure clients are configured
-- with the same number)
-->> The port number in the example is the same as from the PSP server
-->> Choose a port that is easiest for your network
-->> For example 80 could be interisting as most firewalls allow this to pass.
-->> Every server port is only allowed once per PC
port = 12984
-- maximum number of concurrent connections
maxConnections = 8
-- maximum allowed time for a user to complete a job (in seconds)
-->> This setting depends on the size of your jobs and the control
-->> you have over your clients 28 days is the PSP setting
-->> on a local network i would recommend something like 5 days
-->> or even less if you have very short tests
jobMaxTime = 28 * 24 * 3600 --  28 days
-- various files used by the server
-->> The file containing all tests as we have set up before
knPairsFile = "knpairs.txt"
-->> This file contains all tests handed out to a client with additional informations
-->> It is created by the server automatic
jobListFile = "joblist.txt"
-->> File containing all results returned by the client
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.
prunePeriod = 1 * 24 * 3600 -- every 1 days
-- (for gurus only)
-->> I do not remember what this switch does you should try it.
if WIN32 then
   no_shell = 1
-- format used to display numbers in result file
-- (uncomment the appropriate line)
-->> The foolowing string contains the format how the reuslts are put into the results file.
-->> With the active line you get the following result output:
-->>[2006-10-16 06:45:37]
-->>258317*2^3050735+1 is not prime.  Res64: 675A861E1064B302  Time : 446049.0 sec.
-->>the sr5 server for riesel number for example looks like this: displayFormat = "%s*5^%s-1"
displayFormat = "%s*2^%s+1"      -- use this for PRP type test
--displayFormat = "%s*2^%s-1"      -- use this for LLR type test (default)
-- 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
-->> I have never tried to use the proxy settings so if you want to use them
-->> please give me an info when you find problems.
--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    = 0
-- sql general configuration
--sqlServer    = "localhost"
--sqlServerPort    = 3306
--sqlDriver    = "mysql"
--sqlUser        = "psptr"
--sqlPassword    = "bravo"
--sqlDbName    = "primesierpinskitr"
-- 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
serviceName = "LLRserver"
-- under WIN32 platform, uncomment the following line to log stdout and stderr
-- to a file called "stdout.txt"
logOutput = 1
file end.
In short you only have to modify the following lines from the config file
port = 12984
jobMaxTime = 28 * 24 * 3600 --  28 days
knPairsFile = "knpairs.txt"
jobListFile = "joblist.txt"
resultsFile = "results.txt"
prunePeriod = 1 * 24 * 3600 -- every 1 days
displayFormat = "%s*2^%s+1"      -- use this for PRP type test

Last fiddled with by em99010pepe on 2007-06-02 at 08:48
em99010pepe is offline   Reply With Quote