mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2019-01-18, 16:23   #166
nomead
 
nomead's Avatar
 
"Sam Laur"
Dec 2018
Turku, Finland

317 Posts
Default

Quote:
Originally Posted by Luis View Post
Makefile says
Code:
VERSION = 2.05.1
How to get 2.06 sourcecode?
Yeah that's the place I fetched mine from, too. r102 trunk, and same thing, Makefile says 2.05.1 but then CUDALucas.cu first line says
Code:
char program[] = "CUDALucas v2.06beta"; //do not change
nomead is offline   Reply With Quote
Old 2019-01-18, 16:59   #167
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

7,823 Posts
Default

Quote:
Originally Posted by Luis View Post
I did a snapshot here.

Makefile says
Code:
VERSION = 2.05.1
How to get 2.06 sourcecode?
I don't know if flashjh ever did 2.06 in linux to go with the work he did on additional bad-residue checks and device confirmation for Windows in https://sourceforge.net/projects/cud...iles/2.06Beta/ You could try stripping out the Windows specific device confirmation code, or perhaps more easily, porting the additional bad-residue check over to linux. A file comparison utility run on the two sets of source code should help to zero in on the relevant code differences.
Look for code that handles these residues as bad interim residues:
0x0000000000000000, 0x0000000000000002, 0xfffffffffffffffd
It looks like the mersenne.ca mirror lacks the 2.06 betas.
There were Windows builds on April 16 2017 and May 5 2017 posted to the CUDALucas thread I think by flashjh.
https://www.mersenneforum.org/showth...12576&page=236
There's some background in that thread on bad residue values around post 2441 -2449, 2464 (msft), 2487, 2595.

I've been accumulating reference data at https://www.mersenneforum.org/forumdisplay.php?f=154
You may find the CUDALucas-specific thread useful, or one or two others.

Last fiddled with by kriesel on 2019-01-18 at 17:03
kriesel is online now   Reply With Quote
Old 2019-01-18, 17:14   #168
nomead
 
nomead's Avatar
 
"Sam Laur"
Dec 2018
Turku, Finland

4758 Posts
Default

It's just a link to a Windows build. Click on Code, then trunk, newest file is 2017-05-05 CUDALucas.cu... The commit r102 comment actually says, among other things, "Have not compiled or tested linux yet." So I suspect it's the exact same code, just precompiled for Windows.

In other words, a link to the source is
https://sourceforge.net/code-snapsho...r102-trunk.zip
nomead is offline   Reply With Quote
Old 2019-01-18, 17:17   #169
Luis
 
Luis's Avatar
 
Oct 2014
Bari, Italy

3·13 Posts
Default

I'm trying compilation.


Firstly

Installed CUDA 6.5

Found CUDA path
find / -type d -name cuda 2>/dev/null
Code:
/usr/local/cuda-6.5/targets/x86_64-linux/include/thrust/system/cuda
and edited Makefile
Code:
CUDA = /usr/local/cuda-6.5
Run make from the folder where the source files are located
make
Code:
/usr/local/cuda-6.5/bin/nvcc -O1  --generate-code arch=compute_50,code=sm_50 --compiler-options=-Wall -I/usr/local/cuda-6.5/include -c CUDALucas.cu
In file included from /usr/local/cuda-6.5/include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda-6.5/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
 #error -- unsupported GNU version! gcc 4.9 and up are not supported!
  ^~~~~
 make: *** [CUDALucas.o] Errore 1
gcc -v
Code:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~14.04~ppa1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=gcc4-compatible --disable-libstdcxx-dual-abi --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~14.04~ppa1)
Solved by
Code:
sudo mv /usr/bin/gcc /usr/bin/gcc.old
sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
gcc -v
Code:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.5-4ubuntu8~14.04.2' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
  gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu8~14.04.2)
Now


I get 5 errors.
make
Code:
/usr/local/cuda-6.5/bin/nvcc -O1  --generate-code arch=compute_35,code=sm_35 --compiler-options=-Wall -I/usr/local/cuda-6.5/include -c CUDALucas.cu
CUDALucas.cu(756): error: identifier "nvmlInit" is undefined

CUDALucas.cu(757): error: identifier "nvmlDevice_t" is undefined

CUDALucas.cu(758): error: identifier "nvmlDeviceGetHandleByIndex" is undefined

CUDALucas.cu(759): error: identifier "nvmlDeviceGetUUID" is undefined

CUDALucas.cu(760): error: identifier "nvmlShutdown" is undefined

CUDALucas.cu(3430): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3432): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3434): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3436): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3438): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3440): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3442): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3444): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3446): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3448): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3450): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3452): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3454): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3456): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3458): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3460): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3462): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3462): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3464): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3464): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3467): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3467): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3469): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3469): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3471): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3471): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3473): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3475): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3475): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3995): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3995): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3996): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3996): warning: conversion from a string literal to "char *" is deprecated

CUDALucas.cu(3997): warning: conversion from a string literal to "char *" is deprecated

5 errors detected in the compilation of "/tmp/tmpxft_000012a8_00000000-6_CUDALucas.cpp1.ii".
make: *** [CUDALucas.o] Errore 2
What to do?
Luis is offline   Reply With Quote
Old 2019-01-18, 17:38   #170
Luis
 
Luis's Avatar
 
Oct 2014
Bari, Italy

1001112 Posts
Default

Quote:
Originally Posted by kriesel View Post
You could try stripping out the Windows specific device confirmation code
What do you mean?

This code and/or something similar?
Code:
  #ifndef WIN_ENVIRONMENT32 //no 32-bit win support for NVML 
    nvmlInit(); 
    nvmlDevice_t device;           
    nvmlDeviceGetHandleByIndex(device_number, &device); 
    nvmlDeviceGetUUID(device, uuid, sizeof(uuid)/sizeof(uuid[0])); 
    nvmlShutdown(); 
  #else 
    strcpy(uuid, "**64-bit only on Windows**"); //nVidia doesn't supply 32-bit nvml.dll for windows 
  #endif
Quote:
or perhaps more easily, porting the additional bad-residue check over to linux. A file comparison utility run on the two sets of source code should help to zero in on the relevant code differences.
Look for code that handles these residues as bad interim residues:
0x0000000000000000, 0x0000000000000002, 0xfffffffffffffffd
It looks like the mersenne.ca mirror lacks the 2.06 betas.
There were Windows builds on April 16 2017 and May 5 2017 posted to the CUDALucas thread I think by flashjh.
I will take a look.


P.S. now you know why I ask for binaries. :)
Luis is offline   Reply With Quote
Old 2019-01-18, 18:43   #171
nomead
 
nomead's Avatar
 
"Sam Laur"
Dec 2018
Turku, Finland

317 Posts
Default

There is no need to strip anything Windows-related. The source files are the same, the makefile is different. (Makefile.win for compiling under Windows) And anything OS specific is done via preprocessor defines.

The nvml errors come because nvml includes were added for Windows environment (in CUDALucas.cu) but not Linux. The easiest fix for that is to add one line before that Check windows part so that it looks like this:

Code:
#include <cuda.h>
#include <nvml.h>

// Check windows
Then you also need to edit the Makefile, included libraries, because nvml was for some reason commented out!
Before:
Code:
L = -lcufft -lcudart -lm #-lnvidia-ml
After:
Code:
L = -lcufft -lcudart -lm -lnvidia-ml
Now make will go through (with a bunch of warnings but meh, nothing critical)

Then of course you need to check what card you're running and what compute capability it has. By default the Makefile has defines for CC 3.5 (on the CUFLAGS row) ... change to whatever you have.

Should be fine now.
nomead is offline   Reply With Quote
Old 2019-01-18, 23:56   #172
Luis
 
Luis's Avatar
 
Oct 2014
Bari, Italy

1001112 Posts
Default

GPU: GeForce GTX 1060
Compute Capability: 6.1

make
Code:
/usr/local/cuda-6.5/bin/nvcc -O1  --generate-code arch=compute_61,code=sm_61 --compiler-options=-Wall -I/usr/local/cuda-6.5/include -c CUDALucas.cu
nvcc fatal   : Unsupported gpu architecture 'compute_61'
make: *** [CUDALucas.o] Errore 1
D:


Another try with XY=50


make
Code:
/usr/local/cuda-6.5/bin/nvcc -O1  --generate-code arch=compute_50,code=sm_50 --compiler-options=-Wall -I/usr/local/cuda-6.5/include -c CUDALucas.cu
CUDALucas.cu:27:18: fatal error: nvml.h: No such file or directory
 #include <nvml.h>
                  ^
compilation terminated.
  make: *** [CUDALucas.o] Errore 1
Is there NVML in CUDA 6.5?


Anyway I have a fresh install of Ubuntu 18.04 (now I'm on Ubuntu 14.04.5).
I should try there all the new stuff (last CUDA version, last NVIDIA drivers, etc...).
Luis is offline   Reply With Quote
Old 2019-01-19, 00:20   #173
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013
https://pedan.tech/

24·199 Posts
Default

You need at least CUDA 8.0.
Mark Rose is offline   Reply With Quote
Old 2019-01-19, 02:59   #174
nomead
 
nomead's Avatar
 
"Sam Laur"
Dec 2018
Turku, Finland

317 Posts
Default

Yes, you need at least CUDA 8.0 but not because of nvml...

See https://en.wikipedia.org/wiki/CUDA

"CUDA SDK 8.0 support for compute capability 2.0 – 6.x (Fermi, Kepler, Maxwell, Pascal)."
Earlier ones won't support Pascal.

Same goes for Volta (minimum CUDA 9.0) and Turing (minimum CUDA 10.0).
nomead is offline   Reply With Quote
Old 2019-01-19, 09:50   #175
Luis
 
Luis's Avatar
 
Oct 2014
Bari, Italy

3910 Posts
Default

CUDA 8.0 asks me to remove nvidia-396 and to install to nvidia-410.

Code:
The following packages will be REMOVED:
  libcuda1-396 nvidia-396 nvidia-opencl-icd-396
The following NEW packages will be installed:
  cuda-8-0 cuda-command-line-tools-8-0 cuda-core-8-0 cuda-cublas-8-0
  cuda-cublas-dev-8-0 cuda-cudart-8-0 cuda-cudart-dev-8-0 cuda-cufft-8-0
  cuda-cufft-dev-8-0 cuda-curand-8-0 cuda-curand-dev-8-0 cuda-cusolver-8-0
  cuda-cusolver-dev-8-0 cuda-cusparse-8-0 cuda-cusparse-dev-8-0
  cuda-demo-suite-8-0 cuda-documentation-8-0 cuda-driver-dev-8-0 cuda-drivers
  cuda-license-8-0 cuda-misc-headers-8-0 cuda-npp-8-0 cuda-npp-dev-8-0
  cuda-nvgraph-8-0 cuda-nvgraph-dev-8-0 cuda-nvml-dev-8-0 cuda-nvrtc-8-0
  cuda-nvrtc-dev-8-0 cuda-runtime-8-0 cuda-samples-8-0 cuda-toolkit-8-0
  cuda-visual-tools-8-0 libcuda1-410 nvidia-410 nvidia-410-dev
  nvidia-opencl-icd-410
The following packages will be UPDATED:
  nvidia-modprobe
I will not do it on Ubuntu 14.04.5 for now because I run BOINC and it seems there is an issue with new drivers, if I have understood correctly. I could try when I will be able to switch to Ubuntu 18.04.
Luis is offline   Reply With Quote
Old 2019-01-19, 16:15   #176
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

7,823 Posts
Default

Quote:
Originally Posted by Luis View Post
CUDA 8.0 asks me to remove nvidia-396 and to install to nvidia-410.

Code:
The following packages will be REMOVED:
  libcuda1-396 nvidia-396 nvidia-opencl-icd-396
The following NEW packages will be installed:
  cuda-8-0 cuda-command-line-tools-8-0 cuda-core-8-0 cuda-cublas-8-0
  cuda-cublas-dev-8-0 cuda-cudart-8-0 cuda-cudart-dev-8-0 cuda-cufft-8-0
  cuda-cufft-dev-8-0 cuda-curand-8-0 cuda-curand-dev-8-0 cuda-cusolver-8-0
  cuda-cusolver-dev-8-0 cuda-cusparse-8-0 cuda-cusparse-dev-8-0
  cuda-demo-suite-8-0 cuda-documentation-8-0 cuda-driver-dev-8-0 cuda-drivers
  cuda-license-8-0 cuda-misc-headers-8-0 cuda-npp-8-0 cuda-npp-dev-8-0
  cuda-nvgraph-8-0 cuda-nvgraph-dev-8-0 cuda-nvml-dev-8-0 cuda-nvrtc-8-0
  cuda-nvrtc-dev-8-0 cuda-runtime-8-0 cuda-samples-8-0 cuda-toolkit-8-0
  cuda-visual-tools-8-0 libcuda1-410 nvidia-410 nvidia-410-dev
  nvidia-opencl-icd-410
The following packages will be UPDATED:
  nvidia-modprobe
I will not do it on Ubuntu 14.04.5 for now because I run BOINC and it seems there is an issue with new drivers, if I have understood correctly. I could try when I will be able to switch to Ubuntu 18.04.
https://www.primegrid.com/forum_thre...ap=true#123421 seems to say it is an application developer's issue. And relates to OpenCL performance.
But, have you considered going dual-boot as a workaround?

Last fiddled with by kriesel on 2019-01-19 at 16:16
kriesel is online now   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anti-poverty drug testing vs "high" tax deduction testing kladner Soap Box 3 2016-10-14 18:43
What am I testing? GARYP166 Information & Answers 9 2009-02-18 22:41
k=243 testing ?? gd_barnes Riesel Prime Search 20 2007-11-08 21:13
Testing grobie Marin's Mersenne-aries 1 2006-05-15 12:26
Speed of P-1 testing vs. Trial Factoring testing eepiccolo Math 6 2006-03-28 20:53

All times are UTC. The time now is 14:14.


Fri Jul 7 14:14:39 UTC 2023 up 323 days, 11:43, 0 users, load averages: 1.48, 1.49, 1.32

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.

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