mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   CUDALucas (a.k.a. MaclucasFFTW/CUDA 2.3/CUFFTW) (https://www.mersenneforum.org/showthread.php?t=12576)

flashjh 2012-01-14 15:47

[QUOTE=aaronhaviland;261076]On linux, I use the following in a bash script. Reads input from worktodo.txt (one number per line), and for each input, checks to see if there is already a result output into mersarch.txt. Might there be something similar you could do in a .bat?

[CODE]while read i; do
if grep -q "M( ${i} )" mersarch.txt; then
echo ${i} is already done.
else
${NICE} CUDALucas $i
fi
done < worktodo.txt[/CODE][/QUOTE]

Anyone using something like this on Windows? Can you show me the code?

Brain 2012-01-14 20:35

[QUOTE=flashjh;286276]I haven't finsihed a test with 1.48, but I'm still having this proplem with 1.46. I use the -D01 command line switch to select my 2nd GPU.

Anyone had any luck fixing the issue?[/QUOTE]
Wasn't something similar (the same) fixed in 1.2b/1.3 (compared to 1.2)? I remember reading something about an IO issue...

flashjh 2012-01-18 00:40

[QUOTE=Brain;286306]Wasn't something similar (the same) fixed in 1.2b/1.3 (compared to 1.2)? I remember reading something about an IO issue...

Yes, It was fixed here (though I never tested this problem in that version):
[QUOTE=apsen;267365]I figured it out (kind of). When restarting from checkpoint and finishing the test it will then try to read more input from the same file although it has already been closed. It will loop endlessly until it crashes (haven't really figured out the exact point and reason for crash but it happens in "input" function when it enters endless loop).

As I tried to figure it out I have cut out a lot of unused code, removed K&R style prototypes, etc. Also added some timing output. I haven't touched anything related to calculations but it would be prudent to be cautious - it needs a lot of testing before production use. Most likely bugs would be in parsing command line. That code suffered most nontrivial change.

I'm attaching the modified source code with Win64 executable compiled for sm_13.[/QUOTE]


[/QUOTE]

It's still doing it though. 1.48 has successfully tested 2 DCs on my machine now.
[CODE]
M( 26011537 )C, 0xac73277e904aabbd, n = 1572864, CUDALucas v1.48
M( 26012447 )C, 0x0849047d6e256559, n = 1572864, CUDALucas v1.48

[/CODE]

Is anyone else having this trouble? Anyone have any suggestions? I would really like CUDA to go on to the next exponent without me being 'right' there to fix it. It ends up wasting several hours locked up or redoing the last exponent. Thanks. :smile:

Brain 2012-01-23 17:58

[QUOTE=flashjh;286601]It's still doing it though. 1.48 has successfully tested 2 DCs on my machine now.
[/QUOTE]
+1 successful DC
[CODE]Processing result: M( 44128291 )C, 0x867977d6aaede935, n = 2621440, CUDALucas v1.48 LL test successfully completes double-check of M44128291[/CODE]

Brain 2012-01-28 15:10

1.48 Win64 SM 2.1 CUDA 4.1 compile, tested.
 
1 Attachment(s)
1.48 Win64 SM 2.1 CUDA 4.1 compile, tested with M(216091):
[CODE]F:\Eigene Dateien\Computing\CUDALucas\cudalucas.1.48\bin>CUDALucas.cuda4.1.sm_21.WIN64.exe 216091
Iteration 10000 1.8 msec/Iter M( 216091 )C, 0x30247786758b8792, n = 524288, CUDALucas v1.48
Iteration 20000 1.7 msec/Iter M( 216091 )C, 0x13e968bf40fda4d7, n = 524288, CUDALucas v1.48
Iteration 30000 1.8 msec/Iter M( 216091 )C, 0x540772c2abb7833a, n = 524288, CUDALucas v1.48
Iteration 40000 1.7 msec/Iter M( 216091 )C, 0xc26da9695ac418c1, n = 524288, CUDALucas v1.48
Iteration 50000 1.7 msec/Iter M( 216091 )C, 0x95ce3ff44abdd1e5, n = 524288, CUDALucas v1.48
Iteration 60000 1.8 msec/Iter M( 216091 )C, 0x99aa87c495daffe7, n = 524288, CUDALucas v1.48
Iteration 70000 1.7 msec/Iter M( 216091 )C, 0x505d249be3145893, n = 524288, CUDALucas v1.48
Iteration 80000 1.7 msec/Iter M( 216091 )C, 0xddf612c72037b8a1, n = 524288, CUDALucas v1.48
Iteration 90000 1.8 msec/Iter M( 216091 )C, 0xb5d8309a1ce9e2b6, n = 524288, CUDALucas v1.48
Iteration 100000 1.7 msec/Iter M( 216091 )C, 0x4de7f101ee1cb7a5, n = 524288, CUDALucas v1.48
Iteration 110000 1.7 msec/Iter M( 216091 )C, 0x10aa3286c0b03369, n = 524288, CUDALucas v1.48
Iteration 120000 1.8 msec/Iter M( 216091 )C, 0x3981b56788b529e2, n = 524288, CUDALucas v1.48
Iteration 130000 1.7 msec/Iter M( 216091 )C, 0x80438af231f8fccd, n = 524288, CUDALucas v1.48
Iteration 140000 1.7 msec/Iter M( 216091 )C, 0x669382faea06df89, n = 524288, CUDALucas v1.48
Iteration 150000 1.8 msec/Iter M( 216091 )C, 0x1b73cb121df7d6fa, n = 524288, CUDALucas v1.48
Iteration 160000 1.7 msec/Iter M( 216091 )C, 0xb391010f29c70ee1, n = 524288, CUDALucas v1.48
Iteration 170000 1.7 msec/Iter M( 216091 )C, 0x04055d84a77be1d8, n = 524288, CUDALucas v1.48
Iteration 180000 1.8 msec/Iter M( 216091 )C, 0xe3d74c104f02967d, n = 524288, CUDALucas v1.48
Iteration 190000 1.7 msec/Iter M( 216091 )C, 0x54b2a8b9cb149f9f, n = 524288, CUDALucas v1.48
Iteration 200000 1.8 msec/Iter M( 216091 )C, 0xf433496947b7b103, n = 524288, CUDALucas v1.48
Iteration 210000 1.7 msec/Iter M( 216091 )C, 0xcfe091c8f59f8a7b, n = 524288, CUDALucas v1.48
M( 216091 )P, n = 524288, CUDALucas v1.48[/CODE]Switch from CUDA 4.0 to 4.1 increased iteration time from 10.0 to 10.1ms for n=2621440... :sad:
Can anybody confirm?

flashjh 2012-01-28 15:13

[QUOTE=Brain;287511]1.48 Win64 SM 2.1 CUDA 4.1 compile, tested with M(216091):
[CODE]F:\Eigene Dateien\Computing\CUDALucas\cudalucas.1.48\bin>CUDALucas.cuda4.1.sm_21.WIN64.exe 216091
Iteration 10000 1.8 msec/Iter M( 216091 )C, 0x30247786758b8792, n = 524288, CUDALucas v1.48
Iteration 20000 1.7 msec/Iter M( 216091 )C, 0x13e968bf40fda4d7, n = 524288, CUDALucas v1.48
Iteration 30000 1.8 msec/Iter M( 216091 )C, 0x540772c2abb7833a, n = 524288, CUDALucas v1.48
Iteration 40000 1.7 msec/Iter M( 216091 )C, 0xc26da9695ac418c1, n = 524288, CUDALucas v1.48
Iteration 50000 1.7 msec/Iter M( 216091 )C, 0x95ce3ff44abdd1e5, n = 524288, CUDALucas v1.48
Iteration 60000 1.8 msec/Iter M( 216091 )C, 0x99aa87c495daffe7, n = 524288, CUDALucas v1.48
Iteration 70000 1.7 msec/Iter M( 216091 )C, 0x505d249be3145893, n = 524288, CUDALucas v1.48
Iteration 80000 1.7 msec/Iter M( 216091 )C, 0xddf612c72037b8a1, n = 524288, CUDALucas v1.48
Iteration 90000 1.8 msec/Iter M( 216091 )C, 0xb5d8309a1ce9e2b6, n = 524288, CUDALucas v1.48
Iteration 100000 1.7 msec/Iter M( 216091 )C, 0x4de7f101ee1cb7a5, n = 524288, CUDALucas v1.48
Iteration 110000 1.7 msec/Iter M( 216091 )C, 0x10aa3286c0b03369, n = 524288, CUDALucas v1.48
Iteration 120000 1.8 msec/Iter M( 216091 )C, 0x3981b56788b529e2, n = 524288, CUDALucas v1.48
Iteration 130000 1.7 msec/Iter M( 216091 )C, 0x80438af231f8fccd, n = 524288, CUDALucas v1.48
Iteration 140000 1.7 msec/Iter M( 216091 )C, 0x669382faea06df89, n = 524288, CUDALucas v1.48
Iteration 150000 1.8 msec/Iter M( 216091 )C, 0x1b73cb121df7d6fa, n = 524288, CUDALucas v1.48
Iteration 160000 1.7 msec/Iter M( 216091 )C, 0xb391010f29c70ee1, n = 524288, CUDALucas v1.48
Iteration 170000 1.7 msec/Iter M( 216091 )C, 0x04055d84a77be1d8, n = 524288, CUDALucas v1.48
Iteration 180000 1.8 msec/Iter M( 216091 )C, 0xe3d74c104f02967d, n = 524288, CUDALucas v1.48
Iteration 190000 1.7 msec/Iter M( 216091 )C, 0x54b2a8b9cb149f9f, n = 524288, CUDALucas v1.48
Iteration 200000 1.8 msec/Iter M( 216091 )C, 0xf433496947b7b103, n = 524288, CUDALucas v1.48
Iteration 210000 1.7 msec/Iter M( 216091 )C, 0xcfe091c8f59f8a7b, n = 524288, CUDALucas v1.48
M( 216091 )P, n = 524288, CUDALucas v1.48[/CODE]Switch from CUDA 4.0 to 4.1 increased iteration time from 10.0 to 10.1ms for n=2621440... :sad:
Can anybody confirm?[/QUOTE]

I'll test right now...

EDIT1: Eveything is running the same speed for me. I have two double checks going. Still @ ~3.3-3.4 ms/iter. I'm in the 26M range. My n=1572864.

EDIT2: It may be a *tiny* bit slower as I would fluctuate between 3.3 and 3.4. It now shows mostly 3.4 and I just saw one 3.5 :sad:

Brain 2012-01-28 15:15

1.48 Win64 SM 1.3 CUDA 4.1 compile, untested.
 
1 Attachment(s)
Still to be done / My wishlist:
- Fix crash when exponent is finished, enable automated start of next exponent (via worktodo.txt)
- Improve responsiveness: Since 1.46 patch my system has become very inresponsive. A tiny delay between CUDA calls will probably help. Currently GPU usage is @99% on my GTX 560 Ti

Thanks to msft for all his work.

ET_ 2012-01-28 20:03

Can't compile...
 
Hi all,

I am a happy user of CUDALucas v1.3 on my system (Ubuntu 9.04, 64 bit, CC 1.3 [GTX 275], CUDA 3.0, driver version 195.36.15).
I followed Shoichiro's work since the beginning, and was always able to compile his code from source.

I just downloaded CUDALucas 1.48 from msft link, but when I tried to compile I got this:

[CODE]
luigi@luigi-desktop:~/luigi/CUDA/cudaLucas/test/cudalucas.1.48$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64/
luigi@luigi-desktop:~/luigi/CUDA/cudaLucas/test/cudalucas.1.48$ make
/usr/local/cuda/bin/nvcc -O3 -DMERS_PACKAGE -DBIT_SIEVE -DTESTING_SMALL_EXPONENTS -DSIEVE_SIZE_IN_BYTES=32 -DNUM_SMALL_PRIMES=32768 -DDO_NOT_USE_LONG_DOUBLE -I/usr/local/include -I/home/luigi/NVIDIA_GPU_Computing_SDK/C/common/inc CUDALucas.cu -arch=sm_13 -c
CUDALucas.cu(979): error: identifier "CUFFT_COMPATIBILITY_NATIVE" is undefined

CUDALucas.cu(979): error: identifier "cufftSetCompatibilityMode" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_000045b9_00000000-4_CUDALucas.cpp1.ii".
make: *** [CUDALucas.o] Error 2
luigi@luigi-desktop:~/luigi/CUDA/cudaLucas/test/cudalucas.1.48$
[/CODE]

Is CC 1.3 not supported anymore?
Or should I download and install CUDA 4.1 sdk?

Or...?

Thank you for your help.

Luigi

msft 2012-01-29 03:58

Hi ,ET_
cufftSetCompatibilityMode() support CUDA3.1.
You can comment out.
[code]
// cufftSetCompatibilityMode(plan_fw,CUFFT_COMPATIBILITY_NATIVE);
// cufftSetCompatibilityMode(plan_bw,CUFFT_COMPATIBILITY_NATIVE);
[/code]

ET_ 2012-01-29 10:29

[QUOTE=msft;287596]Hi ,ET_
cufftSetCompatibilityMode() support CUDA3.1.
You can comment out.
[code]
// cufftSetCompatibilityMode(plan_fw,CUFFT_COMPATIBILITY_NATIVE);
// cufftSetCompatibilityMode(plan_bw,CUFFT_COMPATIBILITY_NATIVE);
[/code][/QUOTE]

It worked! :smile:

Thank you msft, now I will do some tests against v1.3 and report my results.

Luigi

ET_ 2012-01-29 16:18

[QUOTE=ET_;287623]It worked! :smile:

Thank you msft, now I will do some tests against v1.3 and report my results.

Luigi[/QUOTE]

Erm... I should have said "It compiled!" :sad:

[code]
luigi@luigi-desktop:~/luigi/CUDA/cudaLucas/test/cudalucas.1.48$ ./CUDALucas -c 10000 45317927
CUDALucas: Could not find a checkpoint file to resume from
CUDALucas.cu(977) : cufftSafeCall() CUFFT error.
luigi@luigi-desktop:~/luigi/CUDA/cudaLucas/test/cudalucas.1.48$
[/code]

After commenting out the lines on the previous message.

Luigi


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

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