This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's General Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Open Topic & United-TI Talk => General Open Topic
Author Message
Skittle


Newbie


Joined: 11 Aug 2009
Posts: 23

Posted: 11 Aug 2009 03:20:50 pm    Post subject:

I have just started 22m-25m on a Q6600 @ 3.0ghz
:)

EDIT: just replaced with 64bit binaries !

~little over 10% done
edit2: forgot i had computer set to sleep after 2 hours, lost about 6 hours of crunching. now about 20%
edit3: about 37% | 1486322 relations
43% done | 1905023 relations
70% done | 2873950 relations
80% done | 3292436 relations
looks like it will be done in the early morning ~ 7 hours


Last edited by Guest on 13 Aug 2009 06:41:36 pm; edited 1 time in total
Back to top
squalyl


Advanced Newbie


Joined: 04 Aug 2009
Posts: 57

Posted: 11 Aug 2009 03:36:26 pm    Post subject:

FloppusMaximus:

The BOINC server is up and running, I used a test application to validate this part.

The BOINC application is ALMOST ok, the code is adapted to use Boinc, everything works (workunits generation, download to client, siever execution) EXCEPT I get a strange behaviour inside boinc because the computation is long, and I don't "talk" with the BOINC manager during this time, so it thinks the application is dead and refuses to upload the result although the work is done! (wow fck*** long sentence, sorry X_X)

We get this error: http://www.boinc-wiki.info/Result_%27%28re...inished%27_file

I've spotted the point in the code where the
[font="Courier New"]fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel)", (unsigned int)yield, (unsigned int)special_q, (tNow - tStart)/yield);

is displayed (in the lasieve() function of $GGNFS/src/lasieve4/gnfs-lasieve4e.c) and I think I can solve the problem when I'll find how to send a "heartbeat" to the boinc manager. This may be done tomorrow.

So once it's sorted out, we'll be able to share CPUs for all keys.

After this, what remains is recompiling the boinc enabled siever for linux and other enjoyable platforms.

Regards.

Last edited by Guest on 11 Aug 2009 03:39:37 pm; edited 1 time in total
Back to top
Skittle


Newbie


Joined: 11 Aug 2009
Posts: 23

Posted: 11 Aug 2009 04:56:22 pm    Post subject:


Code:
# This is for an Athlon 2800+ laptop. If your machine is about half as fast,
# replace this with a 2. 25% as fast, replace with a 4. It controls how long
# the polynomial selection phase will last.
$polySelTimeMultiplier=1.0;


Is it necessary to change this? and if so, does it take multiple cores into account?


Last edited by Guest on 11 Aug 2009 05:02:06 pm; edited 1 time in total
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 11 Aug 2009 05:17:50 pm    Post subject:

Skittle: No, as it says, that only affects polynomial selection. We've already selected the polynomial (it's in the k0A.txt file that I posted); now we need to find relations.

(If you're curious, factMsieve does not use multiple cores for the polynomial selection phase. If you wanted to, you could hack around and use the pol5 tools directly, or you could tweak the script and perform several searches simultaneously, starting at different coefficient values.)

And thanks for your help!

Squalyl: Sounds exciting. I'm looking forward to it.
Back to top
squalyl


Advanced Newbie


Joined: 04 Aug 2009
Posts: 57

Posted: 12 Aug 2009 02:27:08 am    Post subject:

That's definitely exciting.

We could also use BOINC for the polynomial selection, the only programming to do would be to wrap the right programs and a selector to keep the best reported result.

I'm progressing on the siever part. I think the problem existed because I did not report any progress during the computation.

I don't know if you looked at the interesting code, but I believe I can get a fraction of the total job by calculating:

[font="Courier New"]boincstatus(((double)(special_q - first_spq))/((double)sieve_count));


All three are global variables.

sieve count seems to be the actual number of values to search, in the main() routine I can read:
last_spq = first_spq + sieve_count;

I'm testing this now on a few workunits.

FYI: the partial "patch" to support BOINC looks like this:

[font="Courier New"]
#ifdef HAVE_BOINC
/* this main talks with BOINC */
//you must ensure this is enough
#define ARGVCOUNT 12

int main(int argc, char **argv)
{
int app_argc;
char* app_argv[ARGVCOUNT];
int retcode;
app_argc= boincstart(0,app_argv);
if(argc < 0) {
retcode = 1;
} else {
retcode= main_lasieve(app_argc,app_argv);
}
return boincstop(retcode);
}


int main_lasieve(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
/**************************************************/
{ u16_t zip_output, force_aFBcalc;
.......
}
.....

#ifdef HAVE_BOINC

void fail(const char *str,...)
{
va_list ap;
va_start(ap,str);
vfprintf(stderr,str,ap);
va_end(ap);
fprintf(stderr,"\n");
fflush(stderr);
boinc_finish(1);
}

int boincstart(int argc_init, char **argv)
{
int status,i;
status=boinc_init();
if(status) {
fail("boinc_init() failed: %d",status);
return -1;
}
fprintf(stderr, "boinc initialized\n",path_in);

status=boinc_resolve_filename(FILE_WORKUNIT, path_in, sizeof(path_in) );
if(status) {
fail("cannot resolve workunit file name");
}

status=boinc_resolve_filename(FILE_RESULT, path_out, sizeof(path_out) );
if(status) {
fail("cannot resolve result file name");
}

fprintf(stderr, "work files resolved, now working\n");

//construct arg list
argv[argc_init++]="-k";
argv[argc_init++]="-R";
argv[argc_init++]="-o";
argv[argc_init++]=path_out;
argv[argc_init++]="-v";
argv[argc_init++]="-n0";
argv[argc_init++]="-a";
argv[argc_init++]=path_in;

for(i=0;i<argc_init;i++) {
fprintf(stderr,"-> %s\n",argv[i]);
}

return argc_init;
}

int boincstop(int retcode)
{
boinc_finish(retcode);
return retcode;
}

void boincstatus(double percent)
{
boinc_fraction_done(percent);
}

#endif


(and 1. inserting a call to boinc status at the right place, and 2. replacing all calls to fopen by boinc_fopen )

edit: now testing, seem to work, waiting first workunit completion, ETA ~45 min

Last edited by Guest on 12 Aug 2009 03:29:18 am; edited 1 time in total
Back to top
squalyl


Advanced Newbie


Joined: 04 Aug 2009
Posts: 57

Posted: 12 Aug 2009 07:02:15 am    Post subject:

Okay everyone the boinc application is fixed, I didn't notice some exit() calls in the middle of computation function, which prevented execution of the boinc_finish() call. The BOINC client took this for an application crash.

Here are the informations to participate to the effort if you're running windows.

First, download BOINC.
http://boinc.berkeley.edu/download.php

Then, attach to this project
http://boinc.unsads.com/rsals/

You can register using the boinc client.

And that's all.
note that there's no cruncher for linux yet.

I've added the key_0A to the list, tell me what ranges you want to work on and I'll add some workunits.

The polynomial I have is this one:
Quote:
n: 12537072476862421230323818220670094176024121433129402568805703301509542532518840
117998301702770251376727694567865443226427097771931350481518184606521695409
m:
c5: 7797600
c4: 23599061408952
c3: 87576392702571674174
c2: -346231005879880708232825
c1: -3621573065566539657182186001324
c0: -174992518730891284837277302704395277
Y1: 640915374563362171
Y0: -276214470369449464279330486112
skew: 514644.23
rlim: 27000000
alim: 27000000
lpbr: 29
lpba: 29
mfbr: 58
mfba: 58
rlambda: 2.7
alambda: 2.7
q0: __START__
qintsize: __COUNT__

Can you confirm it's ok?

Please don't hesitate to send me more key polynomials to work on.

You will notice that your computers will work both in tiz80 and ti68k keys. But that's not a problem : just add more CPUs to the project Rolling Eyes :biggrin:


I want to thank FloppusMaximus and all the members of the UnitedTI forum for having bothered to start this whole thing. Thanks, really.
Back to top
Lionel Debroux


Member


Joined: 01 Aug 2009
Posts: 170

Posted: 12 Aug 2009 07:42:44 am    Post subject:

Well, I can only echo squalyl's congratulations to Benjamin and the others... and we can congratulate him, too Smile
Back to top
squalyl


Advanced Newbie


Joined: 04 Aug 2009
Posts: 57

Posted: 12 Aug 2009 07:44:16 am    Post subject:

Hehe:

[font="Courier New"]$ ./my_gnfs_make_wus.php input/key_ti83p.job k0A 25000000 28000000 10000
generating work for k0A from 25000000 to 28000000, count = 10000
...
done, created 300 work units


They are waiting for you :)

Validated results will appear here :
http://boinc.unsads.com/rsals_data/

Last edited by Guest on 12 Aug 2009 07:56:50 am; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 12 Aug 2009 12:51:59 pm    Post subject:

magicdanw's Linux computer is sad he cannot help Sad
Back to top
Lionel Debroux


Member


Joined: 01 Aug 2009
Posts: 170

Posted: 12 Aug 2009 01:03:20 pm    Post subject:

Linux binaries should be available within a day or two Wink
Back to top
squalyl


Advanced Newbie


Joined: 04 Aug 2009
Posts: 57

Posted: 12 Aug 2009 01:40:57 pm    Post subject:

I'm working on it right now :)

edit: done, the binary is statically linked and should work on any linux with a cpu >= pentium 3.

I really need reports for this application, I just recompiled the windows code for linux, hope it works OK.

Just enable your boinc client.

edit: just added 200 WUs for the k0A key in the 28M-30M range.


Last edited by Guest on 12 Aug 2009 03:50:51 pm; edited 1 time in total
Back to top
Skittle


Newbie


Joined: 11 Aug 2009
Posts: 23

Posted: 12 Aug 2009 04:19:25 pm    Post subject:

BOINC client works on debian, however my laptop does not have sufficient ram to run any it.
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 12 Aug 2009 04:42:23 pm    Post subject:

Nice work, Linux seems to be handling the jobs well!
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 12 Aug 2009 05:20:33 pm    Post subject:

squalyl: Sounds great! And thank you very much for hosting this and getting it working.

Have you dealt with the issue of re-calculating the algebraic factor base? For q-values below 27 million (i.e., the AFB limit specified in the poly file) you need to lower alim appropriately and regenerate the AFB. For q-values above 27 million, you can reuse the AFB and save a bit of time. Have a look at what factMsieve does - I think it just deletes the AFB cache file after running the siever, whenever Q0 < alim.

I don't want to be a spoilsport here, but please don't spend a lot of CPU time on this before we're sure it is working.

Is the source for your BOINC client available somewhere? What would I need to do to compile it?

Also, I'm done with 20M-22M. I guess I'll take 25M-28M for now.


Last edited by Guest on 12 Aug 2009 05:25:35 pm; edited 1 time in total
Back to top
squalyl


Advanced Newbie


Joined: 04 Aug 2009
Posts: 57

Posted: 12 Aug 2009 06:06:16 pm    Post subject:

To get the cruncher working I modified some ggnfs files.
there's no perl here, just a modified form of gnfs-lasieve4I14e
What I do is resolve file names, construct the command line, and call the original code.
Every search job is independent from others, no state is retained inbetween.

My repository is here:

https://www.unsads.com/scm/svn/squalyl/boinc/rsals

login guest , password guest

The modified files include a new project under build.vc, and also src/lasieve4/Makefile and src/lasieve4/ggnfs-lasieve4e.c

a new binary target was added to the makefile to link with boinc libraries (link phase needs g++ since boinc code has some c++)

to build, you need gmp (the one provided is for win32, there should be a gmp-devel like package in every distro) and boinc, here is how I got it:
[font="Courier New"]
svn co -r 18818 http://boinc.berkeley.edu/svn/trunk/boinc boinc
cd boinc
./configure --prefix=/usr --disable-client --disable-server
make
sudo make install

(hmm someone's whispering it's bad to install it in /usr :biggrin:)
I just used the poly file you uploaded in this topic and turned it to a job.
I don't have sufficient mathematical skills to optimize the search.

Your input is greatly appreciated here, if you can provide job files optimized for particular ranges.

the workunit generator is also available in the repo, so you can understand what I sent to clients.

Whatever you have in mind, tell me.

Last edited by Guest on 12 Aug 2009 06:16:53 pm; edited 1 time in total
Back to top
Skittle


Newbie


Joined: 11 Aug 2009
Posts: 23

Posted: 12 Aug 2009 06:19:48 pm    Post subject:

Since qintsize is set to (default) 100000 and factmsieveQ can only launch one instance of gnfs-lasieve4I14e.exe at a time, i have cores sitting idle because they are waiting for the last gnfs-lasieve4I14e.exe to finish before moving on. would setting qintsize to a smaller value (20000) help? and if so can i safely stop the process, change the parameters and continue?
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 12 Aug 2009 06:46:38 pm    Post subject:

Skittle: I doubt that would help much, but you can certainly try it if you want to. What would probably work better, if you want to try it, would be to run multiple instances of the script simultaneously, on different q ranges (you might have to run them in different directories.)

squalyl: Thanks. I will have a look at your code later tonight; maybe I'll try to adapt the experimental siever, so we can have a fast 64-bit client. Would BOINC allow for multiple sub-architectures (e.g. separate pentium3/pentium4 builds)? I don't know how much difference that would make.

I'm not sure about the AFB issue - the BOINC version doesn't seem to be saving the AFB at all, but perhaps I'm missing something. It would certainly save some time, especially with a small qintsize, if we could reuse the AFB when sieving large q values.
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 12 Aug 2009 08:03:41 pm    Post subject:

Oops. Squalyl, I saw your message about working on 28M-30M and missed the part about 25M-28M. I will work on 30M-33M instead.
Back to top
fullmetalcoder


Member


Joined: 01 Aug 2009
Posts: 139

Posted: 12 Aug 2009 09:44:49 pm    Post subject:

17M-20M : done -> 4161960 relations

I'm on 10M-13M now.
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 12 Aug 2009 11:54:09 pm    Post subject:

fullmetalcoder: Great, thanks!

squalyl: Here's what I've found so far.
- The siever was not saving the factor base because main() calls boincstart() with argc_init = 0, so the first "argument" (which happens to be -k) is written as argv[0], hence ignored.
- At the same time, we should not be using the -k option until we work out how to deal with the FB files. In particular, if you use the -k option as is, FB files will just get dumped in the project directory, and, as I understand it, these files will never get cleaned up.
- The -R option only works if you use -f and -c to specify the q range. It doesn't work if you get the q range from a job file. From what I can figure, though, it should be safe to move the "resume" code down to below the call to parseJobFile(). (The code is so messy that whoever implemented the resume function probably didn't notice what was going on there.)
- I think I made all the necessary changes to the experimental siever. It seems to work in "standalone" mode, anyway.

Patch: [attachment=2739:rsals_fixes.patch.txt]
(For reference, the experimental siever seems to run about twice as fast as the athlon-xp siever, which is only a little bit faster than the pentium3 siever.)

As far as the AFB files go, here are a few options:
1. Don't save the AFB to a file at all, and just don't worry about it. It's not a huge amount of time we're wasting at the moment.
2. For work units with q0 ≥ alim, have the siever reuse an existing AFB file, or generate a new one if it doesn't exist. This would require modifying the siever to use a BOINC-specified AFB file name; that's not hard. On the BOINC side, I think it would be sufficient to add a second input file reference with the 'generated_locally' and 'sticky' attributes. But this would have to be done only when q0 ≥ alim.
3. Have somebody generate and upload all of the complete AFB files. Then, for work units with q0 ≥ alim, have clients download the corresponding AFB file as well as the job file. These files will be around 13 megabytes, but the client should only have to download each of them once. Again, this would require a slight modification to the siever. This would not work for clients on big-endian systems.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
» View previous topic :: View next topic  
Page 2 of 10 » All times are UTC - 5 Hours

 

Advertisement