mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2009-10-13, 19:32   #45
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

133708 Posts
Default

i am have trouble compiling the gpu version of msieve
i get the following error:
Code:
david@Jimmy-Ubuntu:~/Desktop/cuda/msieve-gpu$ make x86_64 GMP=1
gcc -D_FILE_OFFSET_BITS=64 -O3 -fomit-frame-pointer -march=k8 -DNDEBUG  -Wall -W -I. -Iinclude -Ignfs -Ignfs/poly -I -c -o common/filter/clique.o common/filter/clique.c
/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/crt1.o: In function `_start':
/build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
/tmp/cc2OXnTr.o: In function `filter_purge_cliques':
clique.c:(.text+0x3c2): undefined reference to `filter_purge_singletons_core'
clique.c:(.text+0xa98): undefined reference to `logprintf'
collect2: ld returned 1 exit status
make: *** [common/filter/clique.o] Error 1
i have successfully compiled msieve 1.42 as a test
henryzz is offline   Reply With Quote
Old 2009-10-13, 20:25   #46
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

Henry, the makefile expects environment variables CUDA_LIB_PATH and CUDA_INC_PATH; because you don't have the latter, the last -I in your compile line is treating the token afterwards as a library path. Unfortunately, that token is '-c', so you're not doing incremental compilation anymore and gcc is looking for 'main'.
jasonp is offline   Reply With Quote
Old 2009-10-13, 21:05   #47
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

2×34×13 Posts
Default

Quote:
Originally Posted by bsquared View Post
Curve fits against data from 5,421- (C180), 2,877- (C178), 109!+1 (C179), 6,383+ (C165), and quite a few C150's and C140s, suggest a MurphyE of about 1.17e-12 is expected using pol51. Although I remember the poly search for 6,383+ took much longer than "overnight" .
Getting closer...
# norm 1.110963e-15 alpha -6.989151 e 1.159e-12

This has been running about 14 hours now on 4 GPUs, so conservatively assuming that the GPU is about 10x faster, that corresponds to almost 25 CPU-days. A more accurate estimate is probably significantly more than double that.
frmky is online now   Reply With Quote
Old 2009-10-13, 21:25   #48
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

New binary at the same URL:

- smaller deadline per coefficient

- allow GPU number to be specified

- fixes that remove most of the 'crap'

Ive also found that tweaking the internal size of a batch of polynomials can yield significantly better throughput: it can finish twice the work in 1.5x the time, but it will be a little tricky to avoid losing sensitivity when the batch is too large.

One thing to keep in mind when making timing comparisons between old and new code is that stage 1 and stage2 are interleaved, but only stage 1 can use a GPU. This is important for large poly selection problems; most of my tests use RSA130, and in that case one block of work takes 150 seconds, almost 50 seconds of which is running stage 2 on two candidate polynomials. For really large problems, stage 2 can take 20 minutes to run!

Last fiddled with by jasonp on 2009-10-13 at 21:33
jasonp is offline   Reply With Quote
Old 2009-10-14, 13:33   #49
siew
 
Oct 2009

3F16 Posts
Default

Please, can you suggest the comman line params for benchmarking?

I mean, can i test with same Seeds?

I compiled the source code successfully under VS2008, seems working ok.

how to test each stage ?

Also, is it possible to use 2 devices instead each for different stage?
siew is offline   Reply With Quote
Old 2009-10-14, 15:10   #50
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,541 Posts
Default

Did you modify the MSVC project in the msieve-gpu branch on sourceforge? If yes, I'd be interested in the changes you had to make; could you PM or email them? Otherwise, I would make sure you are actually using GPUs before benchmarking :)

For comparison purposes, I would try a relatively small problem (~130 digits) and see how many candidate polynomials the new code produces in the same time as v1.42 . That's the figure of merit that really matters.

You can specify the one GPU the binary will use; Nvidia have made it tricky for one program to use multiple GPUs unless it is multithreaded. Stage 2 doesn't use a GPU, and it would be quite difficult to change that. Stage 1 and 2 are not separate in msieve, you don't have to run the binary twice.

Last fiddled with by jasonp on 2009-10-14 at 15:11
jasonp is offline   Reply With Quote
Old 2009-10-14, 16:15   #51
siew
 
Oct 2009

32·7 Posts
Default

Yes, i compiled the msieve-gpu branch from sourceforge project page.
I compiled the gmp.lib from 4.1.4 version with patch 1.7, then set
no_gmp_ecm_config.vsprops.
Used cuda 2.3 Toolkit for cuda.lib.
Then first compiled the ggnfs and latest the msieve.

Then i got the copiled msieve.exe and the .ptx file i got from this thread.

So i runned the 100 digit factorization on 1 core of my PC (3.6 Ghz)
and other thread on CUDA 9800GTX+
so tomorrow will compare the results and timings.
siew is offline   Reply With Quote
Old 2009-10-14, 16:18   #52
siew
 
Oct 2009

6310 Posts
Default

also i want to try change code to make it running with 2xGTX260, but only after benchmark finished.

The 89-digit:
on cpu - 7 second
on GPU -0.563 second
siew is offline   Reply With Quote
Old 2009-10-14, 16:21   #53
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

23·3·5·72 Posts
Default

i am afraid i have another problem
i can't see that it is more missing library paths this time
Code:
gcc -D_FILE_OFFSET_BITS=64 -O3 -fomit-frame-pointer -march=k8 -DNDEBUG  -Wall -W -I. -Iinclude -Ignfs -Ignfs/poly -I/usr/local/cuda/include demo.c -o msieve  \
            libmsieve.a -lgmp -lm -lpthread -lcuda
demo.c: In function ‘get_random_seeds’:
demo.c:50: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
demo.c:51: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
demo.c: In function ‘main’:
demo.c:486: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
demo.c:507: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
libmsieve.a(stage1_sieve_gpu.no): In function `sieve_lattice_gpu':
stage1_sieve_gpu.c:(.text+0x95d): undefined reference to `cuFuncGetAttribute'
collect2: ld returned 1 exit status
make: *** [x86_64] Error 1

Last fiddled with by henryzz on 2009-10-14 at 16:21
henryzz is offline   Reply With Quote
Old 2009-10-14, 16:52   #54
siew
 
Oct 2009

32×7 Posts
Default

Maybe you forgot to link cuda library? or using old sdk version?

Last fiddled with by siew on 2009-10-14 at 16:53
siew is offline   Reply With Quote
Old 2009-10-14, 19:03   #55
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

23×3×5×72 Posts
Default

what needs to be done to get -lcuda working?
it seems that i am having to add all the environment variables myself
is something else needed for -lcuda?
henryzz is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Msieve with GPU support LegionMammal978 Msieve 6 2017-02-09 04:28
5+ GPU support TheMawn GPU Computing 3 2014-07-13 02:31
Support AVX Unregistered Information & Answers 5 2011-07-05 17:12
Msieve with GNFS support R.D. Silverman Msieve 465 2010-01-11 20:59
Athlon64 support? JuanTutors Software 1 2004-06-04 02:46

All times are UTC. The time now is 00:48.


Sat Jul 17 00:48:41 UTC 2021 up 49 days, 22:35, 1 user, load averages: 1.32, 1.47, 1.38

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.