mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Factoring (https://www.mersenneforum.org/forumdisplay.php?f=19)
-   -   New ECMNET Client (https://www.mersenneforum.org/showthread.php?t=2566)

rogue 2004-05-31 02:10

New ECMNET Client
 
The new ECMNET Client is nearing a release. There are a number of improvements in the new client, such as:

support for connecting to multiple servers with one .cfg file
support to run additional curves if unable to connect to a server
no more memory leaks
support to do P-1 and P+1 factoring, which will be used when the new ECMNET Server is released

This has been tested against some existing ECMNET servers for a couple of weeks, including Paul Leyland's BMtR factoring project and WIlliam Lipp's Eleven Smooth factoring project. There are no known bugs, in other words, I squashed all bugs that I am aware of.

If you are interested in giving it a spin, send me an e-mail at rogue (at) wi.rr.com and I'll get it off to you. If you need a build, I can build it for Windows (under DOS) and Windows (under Cygwin). Since you get the full source, you would be able to compile under any OS that has the gcc compiler.

smh 2004-06-02 06:43

Are you working on a new server too?

I'm interested in the client (and new server!) although i won't need it straight away. I guess you'll make it available for general download soon?

rogue 2004-06-02 12:51

Yes, I'm working on a new server, but the server code is much more complex than the client code. It will take a while. I'm only about 25% done with it and don't expect to be done until July at the earliest as I can only work on it in increments.

The new client will be available for general download from Paul Zimmerman's site in the near future.

BotXXX 2004-06-02 13:29

Good work :)
 
It will be very intressting to see the new client. On the server side. would it be possible to make a sort of template file to use for 'exporting' the stats that are generated by the server. So it would be more easier to import this data to a database or to prepare it for your own code creations ;)

It would be quite handy to read a template ini file or similar that has the global layout. Altho also quite challenging to make it work without problems.

rogue 2004-06-03 00:54

[QUOTE=BotXXX]It will be very intressting to see the new client. On the server side. would it be possible to make a sort of template file to use for 'exporting' the stats that are generated by the server. So it would be more easier to import this data to a database or to prepare it for your own code creations ;)

It would be quite handy to read a template ini file or similar that has the global layout. Altho also quite challenging to make it work without problems.[/QUOTE]

Right now I haven't thought about stats at all. No-one who is currently running a server seems to care much about user stats and user stats on the server have no meaning for clients. They will probably not be included in the next release of the server. The same can be said about client stats. They appear to be fairly meaningless. If someone really wants stats, they can parse the log files, otherwise, I consider them to be a waste of memory. If someone can make a good case for client stats, then I will work with them to add them to the client, but there are no guarantees that they will be in the next release.

On another note for the server, the format of the ini file will be changed, but only slightly so that the current ini file is still compatible with the new server, but I won't support backward compatibility because of the new functionality that is included in the new server.

If you would like to look at the client code, just drop me an e-mail at the above address. The client code is included in the distribution.

smh 2004-09-04 18:44

Last night i found an annoying problem with the client.

I put up a few dozen numbers on the server some of which contained small factors.

I set recurse=1 to continue factor composite cofactors, but as a side effect, also composite factors found are put back on the server. No problem, but sometimes ecm is not able to factor the composite (to high bound) and only finds the input numbers as a factor and gets stuck in an infinite loop without contacting the server.

[code]
...
[2004-09-03 18:16:18 GMT] Found input number.
[2004-09-03 18:16:19 GMT] Found input number.
[2004-09-03 18:16:20 GMT] Found input number.
[2004-09-03 18:16:21 GMT] Found input number.
...
[/code]

Sander

rogue 2004-09-04 20:24

[QUOTE=smh]Last night i found an annoying problem with the client.

I put up a few dozen numbers on the server some of which contained small factors.

I set recurse=1 to continue factor composite cofactors, but as a side effect, also composite factors found are put back on the server. No problem, but sometimes ecm is not able to factor the composite (to high bound) and only finds the input numbers as a factor and gets stuck in an infinite loop without contacting the server.

[code]
...
[2004-09-03 18:16:18 GMT] Found input number.
[2004-09-03 18:16:19 GMT] Found input number.
[2004-09-03 18:16:20 GMT] Found input number.
[2004-09-03 18:16:21 GMT] Found input number.
...
[/code]

Sander[/QUOTE]

I think I understand what you are saying, but it would be best for me to see your ecmserver.log and ecmclient.log. Could you PM them to me? If I understand your problem correctly from your post, this shouldn't be too difficult to handle in the sever.

--Mark

smh 2004-09-05 11:18

Hi Mark,

I sent parts of the logs to your wi.rr.com account.

Sander

rogue 2004-09-05 15:35

This is a problem with the old client, but is also a problem with the new client. I will address it with the new client/server.

Mystwalker 2004-09-13 16:00

Linux version?
 
Hi Mark,

I just tried to compile the ecmclient (2.0k) under Linux and ran into difficulties.
It should work with Linux, shouldn't it?

Maybe someone can provide the binaries? :help:

Dennis

rogue 2004-09-13 16:52

Many others have compiled under Linux without problem. What errors are you getting during the compile? Either I or someone else can help you resolve them.

Mystwalker 2004-09-13 17:16

[QUOTE=rogue]Many others have compiled under Linux without problem. What errors are you getting during the compile? Either I or someone else can help you resolve them.[/QUOTE]
gcc -c -O6 -DUNIX thread.cpp
thread.cpp: In function `void MakeThread(_thread_handle*, void (*)(void*),void*)':
thread.cpp:78: error: `usleep' undeclared (first use this function)
thread.cpp:78: error: (Each undeclared identifier is reported only once for each function it appears in.)

I already skiped the compilation of the server as I only need the client...

Prior are some warnings:
[code]
talis@Suse:~/bin/ECMNET/source> make
gcc -c -O6 -DUNIX ecmclient.cpp
gcc -c -O6 -DUNIX common.cpp
common.cpp: In function `unsigned int inet_address(const char*)':
common.cpp:308: Warnung: return of negative value `-1' to `unsigned int'
common.cpp:308: Warnung: argument of negative value `-1' to `unsigned int'
gcc -c -O6 -DUNIX ecm_list.cpp
ecm_list.cpp: In member function `double ecm_list::get_bestb1(int, int*)':
ecm_list.cpp:566: Warnung: assignment to `int' from `double'
ecm_list.cpp:566: Warnung: argument to `int' from `double'
ecm_list.cpp:568: Warnung: assignment to `int' from `double'
ecm_list.cpp:568: Warnung: argument to `int' from `double'
ecm_list.cpp:570: Warnung: assignment to `int' from `double'
ecm_list.cpp:570: Warnung: argument to `int' from `double'
ecm_list.cpp:572: Warnung: assignment to `int' from `double'
ecm_list.cpp:572: Warnung: argument to `int' from `double'
ecm_list.cpp:574: Warnung: assignment to `int' from `double'
ecm_list.cpp:574: Warnung: argument to `int' from `double'
ecm_list.cpp:576: Warnung: assignment to `int' from `double'
ecm_list.cpp:576: Warnung: argument to `int' from `double'
ecm_list.cpp:580: Warnung: assignment to `int' from `double'
ecm_list.cpp:580: Warnung: argument to `int' from `double'
ecm_list.cpp:582: Warnung: assignment to `int' from `double'
ecm_list.cpp:582: Warnung: argument to `int' from `double'
ecm_list.cpp:584: Warnung: assignment to `int' from `double'
ecm_list.cpp:584: Warnung: argument to `int' from `double'
ecm_list.cpp:586: Warnung: assignment to `int' from `double'
ecm_list.cpp:586: Warnung: argument to `int' from `double'
ecm_list.cpp:588: Warnung: assignment to `int' from `double'
ecm_list.cpp:588: Warnung: argument to `int' from `double'
ecm_list.cpp:590: Warnung: assignment to `int' from `double'
ecm_list.cpp:590: Warnung: argument to `int' from `double'
ecm_list.cpp:592: Warnung: assignment to `int' from `double'
ecm_list.cpp:592: Warnung: argument to `int' from `double'
[/code]

rogue 2004-09-13 18:10

Remove thread.o as a requirement to link ecmclient.

xilman 2004-09-14 07:55

[QUOTE=Mystwalker]gcc -c -O6 -DUNIX thread.cpp
thread.cpp: In function `void MakeThread(_thread_handle*, void (*)(void*),void*)':
thread.cpp:78: error: `usleep' undeclared (first use this function)
thread.cpp:78: error: (Each undeclared identifier is reported only once for each function it appears in.)

[/code][/QUOTE]

usleep() sleeps for an integral number of microseconds. Its definition should be in <unistd.h> so make sure that file is included. source/defs.h should #include it.

If usleep() is not defined in your /usr/include/unistd.h you need to go looking for it. grep(1) is your friend.


Paul

rogue 2004-09-14 12:42

[QUOTE=xilman]usleep() sleeps for an integral number of microseconds. Its definition should be in <unistd.h> so make sure that file is included. source/defs.h should #include it.

If usleep() is not defined in your /usr/include/unistd.h you need to go looking for it. grep(1) is your friend.


Paul[/QUOTE]

That is true and that is what I would have posted, but AFAICT, thread.c is not needed in the ECMNet client. The functions it contains are never called. Off the top of my head, I think the code was intended for use with ECMNet as a service for setting its priority. In any case, that code is removed from the new client/server.

Mystwalker 2004-09-14 19:21

Thanks for your help! :bow:

Both suggestions solved that problem, but now I encountered the next one:

[code]gcc -c -O6 -DUNIX users.cpp
gcc -O6 -DUNIX -o ecmclient ecmclient.o common.o ecm_list.o users.o
ecmclient.o(.text+0x3e3): In function `getfactors(char*, char*, char*, ecm_list*, char*)':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.text+0x507): In function `getfactors(char*, char*, char*, ecm_list*, char*)':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.text+0x6ce): In function `getfactors(char*, char*, char*, ecm_list*, char*)':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.text+0xd75): In function `admin(char*, int, char*)':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.text+0xf8b): In function `admin(char*, int, char*)':
: undefined reference to `operator delete(void*)'
ecmclient.o(.text+0x1430): In function `main':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.text+0x1442): In function `main':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.text+0x1453): In function `main':
: undefined reference to `operator new[](unsigned)'
ecmclient.o(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
common.o(.text+0x521): In function `putstring(int, char*)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x54a): In function `putstring(int, char*)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x6e6): In function `getstring(int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x79d): In function `getstring(int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x7cb): In function `getstring(int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x848): In function `getstring(int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x871): In function `getstring(int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x89f): In function `getstring(int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x9e1): In function `inet_address(char const*)':
: undefined reference to `__h_errno_location()'
common.o(.text+0xcdc): In function `open_server(char*, int, char*)':
: undefined reference to `__h_errno_location()'
common.o(.text+0xf2c): In function `getb1andfacinfo(ecm_list*, int, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0xf71): In function `getb1andfacinfo(ecm_list*, int, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x10ac): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x1100): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x1177): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x11a6): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x122d): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x1280): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x1351): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x13a5): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x1474): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x14be): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x1570): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x15d8): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x1634): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x167e): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x174c): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x17b4): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x1814): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator delete(void*)'
common.o(.text+0x1879): In function `returnwork(int, ecm_list*, int, int)':
: undefined reference to `operator new[](unsigned)'
common.o(.text+0x195a): In function `nextword(char*)':
: undefined reference to `operator new[](unsigned)'
common.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
ecm_list.o(.text+0x1466): In function `ecm_list::get_allb1info(char*)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x1552): In function `ecm_list::get_allb1info(int)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x1728): In function `ecm_list::get_facinfo(char*, int)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x179c): In function `ecm_list::get_facinfo(int, int)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x1e1f): In function `ecm_list::StoreDetails(char*, char*)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x1e49): more undefined references to `operator new[](unsigned)' follow
ecm_list.o(.text+0x1e73): In function `ecm_list::StoreDetails(char*, char*)':
: undefined reference to `operator new(unsigned)'
ecm_list.o(.text+0x1e9d): In function `ecm_list::StoreDetails(char*, char*)':
: undefined reference to `operator new(unsigned)'
ecm_list.o(.text+0x1f87): In function `ecm_list::StoreDetails(char*, char*)':
: undefined reference to `operator new(unsigned)'
ecm_list.o(.text+0x278c): In function `ecm_list::newnumber(char*, char*)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x27cf): In function `ecm_list::newnumber(char*, char*)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.text+0x291d): In function `ecm_list::newnumber(char*, char*)':
: undefined reference to `operator new[](unsigned)'
ecm_list.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
users.o(.text+0x1c0): In function `user::LoadUsers(char*, int)':
: undefined reference to `operator new[](unsigned)'
users.o(.text+0x81f): In function `user::storeuser(char const*, int, double, double, int, char const*, char const*)':
: undefined reference to `operator new[](unsigned)'
users.o(.text+0x83a): In function `user::storeuser(char const*, int, double, double, int, char const*, char const*)':
: undefined reference to `operator new[](unsigned)'
users.o(.text+0x853): In function `user::storeuser(char const*, int, double, double, int, char const*, char const*)':
: undefined reference to `operator new[](unsigned)'
users.o(.text+0x105): In function `user::~user [not-in-charge]()':
: undefined reference to `operator delete(void*)'
users.o(.text+0x195): In function `user::~user [in-charge]()':
: undefined reference to `operator delete(void*)'
users.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
make: *** [ecmclient] Fehler 1[/code]

Unfortunately, I'm quite a newbie when it comes to Linux and C++. :sad:

rogue 2004-09-14 20:40

[QUOTE=Mystwalker]Thanks for your help! :bow:

Both suggestions solved that problem, but now I encountered the next one:

Unfortunately, I'm quite a newbie when it comes to Linux and C++. :sad:[/QUOTE]

Try g++ instead of gcc.

--Mark

Mystwalker 2004-09-15 14:48

Looks a lot better (to me) now:

[code]g++ -O6 -DUNIX -o ecmclient ecmclient.o common.o ecm_list.o users.o
common.o(.text+0x9e1): In function `inet_address(char const*)':
: undefined reference to `__h_errno_location()'
common.o(.text+0xcdc): In function `open_server(char*, int, char*)':
: undefined reference to `__h_errno_location()'
collect2: ld returned 1 exit status[/code]

As a side effect, I learned a lot about Makefiles. :smile:

Mystwalker 2004-09-17 00:44

Ok, figured out the last problem with the help of this site:

[url]http://www.ecompute.org/factors/unix.html[/url]

It is running now! :banana:
Thanks once again for your kind support. :bow:

rpropper 2004-12-28 18:49

Need help getting ECMNET to compile
 
Is anyone else still watching this thread? The [URL=http://www.ecompute.org/factors/unix.html]http://www.ecompute.org/factors/unix.html[/URL] site is down and I've gotten to this point:

[CODE]g++ -O6 -DUNIX -o ecmclient ecmclient.o common.o ecm_list.o users.o
common.o(.text+0x9e1): In function `inet_address(char const*)':
: undefined reference to `__h_errno_location()'
common.o(.text+0xcdc): In function `open_server(char*, int, char*)':
: undefined reference to `__h_errno_location()'
collect2: ld returned 1 exit status[/CODE]
Would anyone mind helping me resolve these last compilation problems?

Thanks!

rogue 2004-12-28 22:25

[QUOTE=rpropper]Is anyone else still watching this thread? The [URL=http://www.ecompute.org/factors/unix.html]http://www.ecompute.org/factors/unix.html[/URL] site is down and I've gotten to this point:

[CODE]g++ -O6 -DUNIX -o ecmclient ecmclient.o common.o ecm_list.o users.o
common.o(.text+0x9e1): In function `inet_address(char const*)':
: undefined reference to `__h_errno_location()'
common.o(.text+0xcdc): In function `open_server(char*, int, char*)':
: undefined reference to `__h_errno_location()'
collect2: ld returned 1 exit status[/CODE]
Would anyone mind helping me resolve these last compilation problems?

Thanks![/QUOTE]

What OS is this on?

BTW, if you would like the new client (which shouldn't have any many compile issues), send an email to me at rogue (at) wi.rr.com and I'll send it to you. It is fully compatible with the 2.0 server.

Mystwalker 2004-12-29 23:35

Linux, I'd guess...
I'll look into the source to figure out the changes once I get to that particular machine (1st or 2nd January).
I'm going to post the changes here, as I've seen that this thread is the only reference google finds for that problem. :sad:

rogue 2004-12-30 03:19

[QUOTE=Mystwalker]Linux, I'd guess...
I'll look into the source to figure out the changes once I get to that particular machine (1st or 2nd January).
I'm going to post the changes here, as I've seen that this thread is the only reference google finds for that problem. :sad:[/QUOTE]

Yes, it was linux. I sent the 2.5.5 source to rpropper yesterday and haven't heard from him yet. If this compile issue still exists with linux, I will be more easily able to address it.

BTW, I had asked Paul Zimmerman to host the new ECMNet source a few months ago and he agreed. I sent it off to him today, but have not received a response yet...

Mystwalker 2005-01-02 15:42

Here is the diff:

talis@Suse:~/bin/ECMNET/source> diff common.cpp.original common.cpp
[code]292,294d291
< #ifdef UNIX
< extern int h_errno;
< #endif
306c303
< h_errno);
---
> errno);[/code]

So:
- take out those 3 lines
- change "h_errno" to "errno"

That made it run on my system. :smile:
Hope that helps!


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

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