mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > GMP-ECM

Reply
 
Thread Tools
Old 2014-01-18, 16:51   #232
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

11001001101102 Posts
Default

Try looking for package nvidia-cuda-dev

I certainly have that installed on 13.10 on the machine that's currently running gpu-ecm; packages.ubuntu.com suggests it exists on 13.04
fivemack is offline   Reply With Quote
Old 2014-01-19, 17:41   #233
chris2be8
 
chris2be8's Avatar
 
Sep 2009

25×7×11 Posts
Default

I've installed packages nvidia-cuda-dev and cuda and all their pre-requisites and rebooted, but it still won't work because the nvidia driver module isn't loaded:
Code:
 chris@4core ~/ecm-gpu/trunk $ ./test.gpuecm ./ecm
GMP-ECM 7.0-dev [configured with GMP 5.1.3, --enable-asm-redc, --enable-gpu, --enable-assert] [ECM]
Input number is 458903930815802071188998938170281707063809443792768383215233 (60 digits)
FATAL: Module nvidia not found.
GPU: Error: no active device.
GPU: Error msg: no CUDA-capable device is detected
Segmentation fault
############### ERROR ###############
Expected return code 14 but got 139

chris@4core ~/ecm-gpu/trunk $ sudo modprobe nvidia
FATAL: Module nvidia not found.
It could be because I'm still using the built in graphics (which has a D-Sub port that fits my monitor) instead of the GPU (which only has DVI-D ports). I could buy a monitor with a DVI-D connector, but would like to know if that will fix it before I spend money. Fivemack, are you using the GPU for graphics as well as computations? And does anyone have advice on setting up the GPU when it's not used for graphics output?

This has passed from "interesting" to "educational" and is approaching "frustrating".

Chris
chris2be8 is offline   Reply With Quote
Old 2014-01-20, 17:09   #234
chris2be8
 
chris2be8's Avatar
 
Sep 2009

1001101000002 Posts
Default Solved!

I've finally got it working. The last problem was that Linux had loaded the nouveau driver (an open source driver for Nvidia cards) so the nvidia driver could not be used to access them. "lspci -v" shows which kernel driver is in use for a card.

To make the system use the nvidia driver I had to blacklist the nouveau driver by adding it to /etc/modprobe.d/blacklist.conf (this step may not be needed) and then run "update-initramfs -u" (this almost certainly is needed on Ubuntu based systems). After a reboot lspci -v showed the card was using the nvidia driver. Then ./test.gpuecm ./ecm succeeded.

Running "make ecm-params; make" caused problems though. I backed out ecm-params.h and they went away.

Other points that might help someone else installing it on Linux:
Start with post 209. The password is also anonsvn.
If you need a newer version of GMP get it from http://gmplib.org/.
To compile with a newer version of GMP than the one installed on the system:
Code:
 ./configure --enable-gpu=sm_21 --with-cuda=/usr/local/cuda --with-gmp-lib=home/chris/gmp-5.1.3/.libs --with-gmp-include=home/chris/gmp-5.1.3 | tee -a configure.out
Where --with-gmp-include is the dir containing gmp.h and --with-gmp-lib is the dir containing libgmp.a.
Get CUDA etc from https://developer.nvidia.com/cuda-downloads if you need it. Follow the getting started guide for Linux (especially to set PATH and LD_LIBRARY_PATH).

This was definitely an "educational" experience.

Chris
chris2be8 is offline   Reply With Quote
Old 2014-01-20, 17:56   #235
Ralf Recker
 
Ralf Recker's Avatar
 
Oct 2010

BF16 Posts
Default

Quote:
Originally Posted by chris2be8 View Post
Running "make ecm-params; make" caused problems though. I backed out ecm-params.h and they went away.
Try this:

Code:
make ecm-params
./bench_mulredc >> ecm-params.h
make

Last fiddled with by Ralf Recker on 2014-01-20 at 18:01
Ralf Recker is offline   Reply With Quote
Old 2014-01-22, 15:04   #236
chris2be8
 
chris2be8's Avatar
 
Sep 2009

9A016 Posts
Default

Thanks, that did it. Presumably the Makefile should be updated to do that when making ecm-params.

Chris
chris2be8 is offline   Reply With Quote
Old 2014-03-04, 16:52   #237
chris2be8
 
chris2be8's Avatar
 
Sep 2009

25×7×11 Posts
Default

Would setting the GPU into persistence mode have any effect? The man page for nvidia=smi says:
Code:
 Persistence Mode
       A  flag  that indicates whether persistence mode is enabled for the GPU.  Value is either "Enabled" or "Disabled".  When persis‐
       tence mode is enabled the NVIDIA driver remains loaded even when no active clients, such as X11 or nvidia-smi, exist.  This min‐
       imizes  the  driver  load latency associated with running dependent apps, such as CUDA programs.  For all CUDA-capable products.
       Linux only.
Which sounds interesting.

Chris

PS. Would it affect msieve polynomial selection either?
chris2be8 is offline   Reply With Quote
Old 2014-03-04, 20:24   #238
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

2,663 Posts
Default

Nothing significant. By default, Linux unloads the driver if nothing is using the card. When you then start a CUDA program, that program has to wait a short amount of time, probably about 0.5 seconds on one of my older machines, for the driver to load. This has a big effect only if you run a CUDA program many times and it has a short runtime. Otherwise, it doesn't really matter.
frmky is offline   Reply With Quote
Old 2014-06-06, 15:09   #239
ChristianB
 
Apr 2013
Germany

2×3×53 Posts
Default

Hi,

I'm currently investigating new applications for yoyo@home. We want to update the server code of yoyo@home in the future and this would give us the possibility to run optimized applications and also GPU applications. I already set up a test project for this with the yoyo@home ecm application.

With my next step I would like to update ecm to a current version and also support a cuda enabled version. As I had trouble with my local cuda build system I would like to test with a working precompiled binary. Could someone provide me with one? Especially a windows one would be nice as I don't have a windows build system.
ChristianB is offline   Reply With Quote
Old 2014-06-06, 15:55   #240
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

32×131 Posts
Default

Quote:
Originally Posted by ChristianB View Post
Hi,

I'm currently investigating new applications for yoyo@home. We want to update the server code of yoyo@home in the future and this would give us the possibility to run optimized applications and also GPU applications. I already set up a test project for this with the yoyo@home ecm application.

With my next step I would like to update ecm to a current version and also support a cuda enabled version. As I had trouble with my local cuda build system I would like to test with a working precompiled binary. Could someone provide me with one? Especially a windows one would be nice as I don't have a windows build system.
It is still an experimental version and only runs stage 1. Stage 2 needs to be done on a CPU. Also a 200W GPU has about the same performance as an 160W CPU. I would not recommend it at this time.
VictordeHolland is offline   Reply With Quote
Old 2014-06-06, 15:56   #241
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

3·619 Posts
Default

If somebody can help me figure out why I get the following errors, I can provide one:

Code:
Error	202 error LNK2001: unresolved external symbol __gmpn_mul_fft

Error	204 error LNK2001: unresolved external symbol __gmpn_fft_best_k
libecm_gpu.lib builds without any issue.

Last fiddled with by wombatman on 2014-06-06 at 15:57
wombatman is offline   Reply With Quote
Old 2014-06-06, 16:39   #242
lorgix
 
lorgix's Avatar
 
Sep 2010
Scandinavia

3·5·41 Posts
Default

Quote:
Originally Posted by VictordeHolland View Post
It is still an experimental version and only runs stage 1. Stage 2 needs to be done on a CPU. Also a 200W GPU has about the same performance as an 160W CPU. I would not recommend it at this time.
That doesn't sound right to me, but I might be mistaken.

I was under the impression that ECM on GPU was quite a bit more efficient than that.

Last fiddled with by lorgix on 2014-06-06 at 17:25 Reason: typo
lorgix is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running CUDA on non-Nvidia GPUs Rodrigo GPU Computing 3 2016-05-17 05:43
Error in GMP-ECM 6.4.3 and latest svn ATH GMP-ECM 10 2012-07-29 17:15
latest SVN 1677 ATH GMP-ECM 7 2012-01-07 18:34
Has anyone seen my latest treatise? davieddy Lounge 0 2011-01-21 19:29
Latest version? [CZ]Pegas Software 3 2002-08-23 17:05

All times are UTC. The time now is 13:58.


Fri Jul 7 13:58:06 UTC 2023 up 323 days, 11:26, 0 users, load averages: 1.20, 1.18, 1.16

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔