mersenneforum.org PRPNet released!
 Register FAQ Search Today's Posts Mark Forums Read

2009-01-02, 20:08   #67
Mini-Geek
Account Deleted

"Tim Sorbera"
Aug 2006
San Antonio, TX USA

10AB16 Posts

Quote:
 Originally Posted by rogue Here is the native Windows client, untested. I'll post the server if you need it. After you unzip, you will need to change the "_" to a "." in the filename.
Thanks for posting that. I just wanted to test the client, I don't need the server (although of course including it in a download eventually would be good). I set up the .ini file and ran the program. It received work and then crashed. It seems to be crashing at about the time it should be triggering cllr so I've tried several variations on the file name/path there, and inclusion of a phrotexe (the error message seems to not support this theory). Here's logs, etc.:
Code:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!

Program: C:\Files\Prime\prpnet\client\1\prpclient.exe
Module: C:\Files\Prime\prpnet\client\1\prpclient.exe
File:

Run-Time Check Failure #3 - The variable 'workUnits' is being used without being initialized.

(Press Retry to debug the application)
---------------------------
Abort   Retry   Ignore
---------------------------
Code:
// email= is a REQUIRED field (either here, or on the command line)
email=tim.sorbera@gmail.com

// This value differtiates clients using the same e-mail ID
clientid=Mini-Geek

// server= are the servers that you want to get work from.  The first
// number is a percentage of work to get from that server.  The second
// parameter is a unique identifier appended to file names created by
// the client for that server.  The third is the server IP.  The fourth
// is the port for that server.  It is normally 7101.  Using a percentage
// of 0 will get work from that server only if the client could not
// in this directory for information on some known PRPNet servers.
server=100:a:nplb-gb1.no-ip.org:3000

// maxworkunits= is the maximum number of workunits that a client can
// request at a time.  If a client requests too many the chances that
// some workunits timeout is greater.  The default is 5.  The server
// also has a limit, so the actual limit will be the less of this
// value and the value on the server.
maxworkunits=5

// This is the name of LLR executable.  On Windows, this needs to be
// the LLR console application, not the GUI application.  The GUI
// application does not terminate when the PRP test is done.
// On some systems you will need to put a "./" in front of the executable
// name so that it looks in the current directory for it rather than
// in the system path.
llrexe=C:\Files\Prime\prpnet\client\1\cllr.exe

// This is the name of Phrot executable.
// On some systems you will need to put a "./" in front of the executable
// name so that it looks in the current directory for it rather than
// in the system path.
phrotexe=

// Default idle status is 1 (idle)
idle=1

// Timeout on communications errors
// (default is 60 minutes, minimum is 1 minute if not specified here...)
// Note that the actual used in the client is anywhere from 90% to 110% of this value
errortimeout=10

// Size limit for the prpclient.log file...
// 0 means no limit.
// -1 means no log.
loglimit=5000000

// Set the debug level for the client
//    0 - no debug messages
//    1 - all debug messages
//    2 - output debug messages from socket communication
debuglevel=1
Code:
[2009-01-02 20:01:33 GMT] PRPNet Client application v1.0.1 started
[2009-01-02 20:01:33 GMT] User email address is tim.sorbera@gmail.com
[2009-01-02 20:01:33 GMT] in FindNextServerForWork: total time for client=0 seconds
[2009-01-02 20:01:33 GMT] suffix: a, no work done yet, target pct work done=100
[2009-01-02 20:01:34 GMT] socket 1376 >>>> FROM tim.sorbera@gmail.com Mini-Geek
[2009-01-02 20:01:34 GMT] a: Getting work from server nplb-gb1.no-ip.org at port 3000
[2009-01-02 20:01:34 GMT] socket 1376 >>>> GETWORK 1.0.1 5
[2009-01-02 20:01:34 GMT] socket 1376 <<<< ServerVersion: 1.0.1

[2009-01-02 20:01:34 GMT] socket 1376 <<<< WorkUnit: 10107*6^101423+1 1230926494 10107 6 101423 1

[2009-01-02 20:01:34 GMT] socket 1376 <<<< WorkUnit: 10107*6^101483+1 1230926494 10107 6 101483 1

[2009-01-02 20:01:34 GMT] socket 1376 <<<< WorkUnit: 10107*6^101587+1 1230926494 10107 6 101587 1

[2009-01-02 20:01:34 GMT] socket 1376 <<<< WorkUnit: 10107*6^101615+1 1230926494 10107 6 101615 1

[2009-01-02 20:01:34 GMT] socket 1376 <<<< WorkUnit: 10107*6^101695+1 1230926494 10107 6 101695 1

[2009-01-02 20:01:34 GMT] socket 1376 <<<< End of Message

[2009-01-02 20:01:34 GMT] socket 1376 >>>> GETGREETING
[2009-01-02 20:01:35 GMT] socket 1376 <<<< ############

[2009-01-02 20:01:35 GMT] socket 1376 <<<< Welcome to the CRUS G3000 PRPnet beta test server! :-D

[2009-01-02 20:01:35 GMT] socket 1376 <<<< Server is running PRPnet v1.0.1

[2009-01-02 20:01:35 GMT] socket 1376 <<<< ############

[2009-01-02 20:01:35 GMT] socket 1376 <<<< OK.

[2009-01-02 20:01:35 GMT] socket 1376 >>>> QUIT
[2009-01-02 20:01:35 GMT] closing socket 1376
Code:
Client will run in idle class.
[2009-01-02 20:06:50 GMT] PRPNet Client application v1.0.1 started
[2009-01-02 20:06:50 GMT] User email address is tim.sorbera@gmail.com
[2009-01-02 20:06:50 GMT] in FindNextServerForWork: total time for client=0 seco
nds
[2009-01-02 20:06:50 GMT] suffix: a, no work done yet, target pct work done=100
[2009-01-02 20:06:51 GMT] socket 1380 >>>> FROM tim.sorbera@gmail.com Mini-Geek
[2009-01-02 20:06:51 GMT] a: Getting work from server nplb-gb1.no-ip.org at port
3000
[2009-01-02 20:06:51 GMT] socket 1380 >>>> GETWORK 1.0.1 5
[2009-01-02 20:06:55 GMT] socket 1380 <<<< ServerVersion: 1.0.1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< WorkUnit: 10107*6^101807+1 1230926815
10107 6 101807 1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< WorkUnit: 10107*6^102019+1 1230926815
10107 6 102019 1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< WorkUnit: 10107*6^102119+1 1230926815
10107 6 102119 1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< WorkUnit: 10107*6^102143+1 1230926815
10107 6 102143 1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< WorkUnit: 10107*6^102167+1 1230926815
10107 6 102167 1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< End of Message

[2009-01-02 20:06:56 GMT] socket 1380 >>>> GETGREETING
[2009-01-02 20:06:56 GMT] socket 1380 <<<< ############

[2009-01-02 20:06:56 GMT] socket 1380 <<<< Welcome to the CRUS G3000 PRPnet beta
test server! :-D

[2009-01-02 20:06:56 GMT] socket 1380 <<<< Server is running PRPnet v1.0.1

[2009-01-02 20:06:56 GMT] socket 1380 <<<< ############

[2009-01-02 20:06:56 GMT] socket 1380 <<<< OK.

[2009-01-02 20:06:56 GMT] socket 1380 >>>> QUIT
[2009-01-02 20:06:56 GMT] closing socket 1380
############
Welcome to the CRUS G3000 PRPnet beta test server! :-D
Server is running PRPnet v1.0.1
############
Any ideas?

Last fiddled with by Mini-Geek on 2009-01-02 at 20:23

2009-01-02, 20:40   #68
rogue

"Mark"
Apr 2003
Between here and the

22·7·211 Posts

Try this one. There was a copy and paste error in the Windows-only code. I found another error that in some cases can cause a segfault. This could be related to the other issue mentioned above. I'll have a formal patch later.
Attached Files
 prpclien_exe.zip (182.4 KB, 68 views)

2009-01-02, 21:01   #69
Mini-Geek
Account Deleted

"Tim Sorbera"
Aug 2006
San Antonio, TX USA

102538 Posts

Quote:
 Originally Posted by rogue Try this one. There was a copy and paste error in the Windows-only code. I found another error that in some cases can cause a segfault. This could be related to the other issue mentioned above. I'll have a formal patch later.
Hm, it was working, but then I stopped it with Ctrl+C to change a few settings and now it's giving this error again:
Code:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Error!

Program: C:\Files\Prime\prpnet\client\prpclient.exe
Module: C:\Files\Prime\prpnet\client\prpclient.exe
File:

Run-Time Check Failure #3 - The variable 'workUnits' is being used without being initialized.

(Press Retry to debug the application)
---------------------------
Abort   Retry   Ignore
---------------------------
When I pressed Ctrl+C it showed this and seemed to close correctly:
Code:
 Caught signal.  Terminating.
[2009-01-02 20:57:43 GMT] Accepted force quit.  Waiting to close sockets before
exiting

2009-01-02, 21:53   #70
rogue

"Mark"
Apr 2003
Between here and the

22×7×211 Posts

Here you go.

The problem is that Visual Studio will not initialize local variables to 0 if not explicitly initialized. gcc does. This one is fixed, but there might be others.
Attached Files
 prpclient_exe.zip (182.5 KB, 73 views)

2009-01-02, 22:03   #71
henryzz
Just call me Henry

"David"
Sep 2007
Cambridge (GMT/BST)

165A16 Posts

Quote:
 Originally Posted by rogue Here you go. The problem is that Visual Studio will not initialize local variables to 0 if not explicitly initialized. gcc does. This one is fixed, but there might be others.
is there another windows version of gcc except cygwin
are cygwin compiles slower as mine often have been

2009-01-02, 22:39   #72
rogue

"Mark"
Apr 2003
Between here and the

10111000101002 Posts

Quote:
 Originally Posted by henryzz is there another windows version of gcc except cygwin are cygwin compiles slower as mine often have been
The prpclient build I supplied was Windows only. It does not require Cygwin.

2009-01-02, 23:30   #73
Mini-Geek
Account Deleted

"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts

Quote:
 Originally Posted by rogue Here you go. The problem is that Visual Studio will not initialize local variables to 0 if not explicitly initialized. gcc does. This one is fixed, but there might be others.
Thanks, that's running now. Now to see if it finishes one and reports it without crashing again.

2009-01-03, 04:44   #74
rogue

"Mark"
Apr 2003
Between here and the

22×7×211 Posts
PPRNet 1.0.3

I have attached PRPNEt 1.0.3. This includes mainly bug fixes. The changes to the client are:
• Create .sln and .vcproj files for Microsoft Visual Studio.
• Modified Socket logic and defs.h to work with MS Visual Studio.
• Explicitly intialize some variables so that the Visual Studio build does not complain about them.
• Reset number of completed work units after getting new work.
• Put the erroneous client ID in the message that indicates that the client ID is invalid (instead of the e-mail ID).

Here are a list of changes to the server:
• Create .sln and .vcproj files for Microsoft Visual Studio.
• Modified Socket logic and defs.h to work with MS Visual Studio.
• Send an INFO message instead of ERROR if the server does not find the candidate by name. This will cause the results of the test to be lost, but will allow the client to continue processing other work units. This behavior might be changed in the future.

AFAIK, this resolves all reported bugs. There is at least one requested enhancement (read the included futures.txt file), but it will be a few days before I can work on it.
Attached Files
 prpnet.zip (47.2 KB, 76 views)

 2009-01-04, 17:03 #75 em99010pepe     Sep 2004 2·5·283 Posts I notice that when the client is caching work the machine stays in idle. At the end of the day you have wasted a few minutes or even more. Can be possible to the client to cache work when it is running its last candidate? llrnet behaves better in this manner. Thank you and great job who have done.
2009-01-04, 18:37   #76
rogue

"Mark"
Apr 2003
Between here and the

22×7×211 Posts

Quote:
 Originally Posted by em99010pepe I notice that when the client is caching work the machine stays in idle. At the end of the day you have wasted a few minutes or even more. Can be possible to the client to cache work when it is running its last candidate? llrnet behaves better in this manner. Thank you and great job who have done.
You're welcome!

There are plusses and minuses to multi-threading, which is what would be required to do as you ask. There are also a number of hurdles that must be overcome. As the llr/phrot software is not linked into the client, there is no way to know how close a test is to being completed. That will NEVER change. There are very good reasons to not link them together. LLRNet linked the client directly with LLR and you saw what happened, LLR was updated and LLRNet never got the new features.

Another issue is that multi-threading has its own overhead. Think of it this way, if you get enough workunits to keep the client busy for an hour, then you only need to communicate with the server once an hour. If each communication takes 15 seconds, then you are looking at 360 seconds = 6 minutes a day. That is only a loss of .4% (6/1440) efficiency. I don't know what kind of overhead that multi-threading creates, but I bet that you lose more time per day by using the computer for other tasks (because CPU time is shared) than what is spent in server communication. I believe that BOINC is multi-threaded and the BOINC client pays a price for it. Workunits with BOINC take more time than workunits with PRPNet.

In short, the best way to avoid losing a lot of time is to set maxworkunits on both the client and server to a reasonably high limit.

 2009-01-04, 23:49 #77 rogue     "Mark" Apr 2003 Between here and the 134248 Posts PRPNet 1.0.4 I've just released 1.0.4. You can d/l from here. It contains Windows binaries for the client and server, which is why I did not attach them here. Here is a list of changes:Increase size of buffer for candidate names as 20 characters was not long enough. If there is only one workunit and it is inprogress, then do no communicate with the server. Write LLR primes to llr.prime and PRPs to llr.prp. Fixed a bug introduced with the Windows build that causes the server to not calculate the decimal length correctly. I hope to lay low for a little while to work on 1.1.0. I'll fix any critical bugs, but nothing minor.

 Similar Threads Thread Thread Starter Forum Replies Last Post rogue Software 163 2020-07-11 14:51 ltd Prime Sierpinski Project 86 2012-06-06 02:30 rogue Software 84 2011-11-16 21:20 Joe O Sierpinski/Riesel Base 5 1 2010-10-22 20:11 rogue Conjectures 'R Us 220 2010-10-12 20:48

All times are UTC. The time now is 14:23.

Thu Sep 24 14:23:02 UTC 2020 up 14 days, 11:34, 1 user, load averages: 2.36, 2.02, 1.88