![]() |
Install Script for Linux
I wrote a script to download, setup and run CUDALucas on Linux. It also downloads, sets up and runs the Python script from Mlucas for automated PrimeNet assignments: [URL]https://github.com/tdulcet/Distributed-Computing-Scripts#cudalucas[/URL]
If the required dependencies (Subversion and the CUDA Toolkit) are already installed, it should work on any Linux distribution. Otherwise, it will install the required dependencies on Ubuntu. Pull requests are welcome! This should satisfy part of the of the "Install script" (number 46) in the [URL="http://www.mersenneforum.org/showpost.php?p=476927&postcount=2658"]CUDALucas wishlist table[/URL]. There is also a separate script to download, setup and run Prime95 on Linux: [URL]https://github.com/tdulcet/Distributed-Computing-Scripts#prime95mprime[/URL] |
[QUOTE=tdulcet;490167]I wrote a script to download, setup and run CUDALucas on Linux. It also downloads, sets up and runs the Python script from Mlucas for automated PrimeNet assignments: [URL]https://github.com/tdulcet/Distributed-Computing-Scripts#cudalucas[/URL]
If the required dependencies (Subversion and the CUDA Toolkit) are already installed, it should work on any Linux distribution. Otherwise, it will install the required dependencies on Ubuntu. Pull requests are welcome! This should satisfy part of the of the "Install script" (number 46) in the [URL="http://www.mersenneforum.org/showpost.php?p=476927&postcount=2658"]CUDALucas wishlist table[/URL]. There is also a separate script to download, setup and run Prime95 on Linux: [URL]https://github.com/tdulcet/Distributed-Computing-Scripts#prime95mprime[/URL][/QUOTE] Haven't tried it out, and I don't do much with linux, but thanks for sharing your efforts. I'm adding a link to your post to the entry for install script, which I have as CUDALucas Item ID #43 in row 46 of the spreadsheet. Looks like a good job on documentation you did concisely there in the post; dependencies etc. |
Reference materials
I was offered "a blog area to consolidate all of your pdfs and guides and stuff" and accepted.
Feel free to have a look and suggest content. (G-rated only;) General interest gpu related reference material [URL]http://www.mersenneforum.org/showthread.php?t=23371[/URL] CUDALucas Lucas-Lehmer primality testing with CUDA on gpus [URL]http://www.mersenneforum.org/showthread.php?t=23387[/URL] Future updates to material previously posted in this thread (bug and wish list, etc.) and posting of new reference material will probably occur on the blog threads and not here. Having in-place update without a time limit makes it more manageable there. Links to things like the bug and wish list post will remain constant and be updated in place occasionally. There's a modest update to the bug and wish list there now. |
comments in worktodo file
While looking for something else, I stumbled across this:
The source of parse.c for CUDAPm1 indicates # or \\ or / are comment characters marking the rest of a worktodo line as a comment I've confirmed by test in CUDALucas v2.06beta that # or \\ but not / work in my test, which placed them mostly at the beginnings of records. I could tell by the line number in any warning messages which did or did not work. The capability is not present in the readme.txt (yet) that I recall. |
I tried to compile CUDALucas svn on Amazon p3.2xlarge with Tesla V100.
I tried with the Deep Learning Amazon Linux image and the Deep Learning Ubuntu image, both has CUDA Version 9.2.88. I changed the path to the CUDA 9.2 installation and changed line in the makefile to "arch=compute_70,code=sm_70" (I also tried 50 and 52) But I get these errors, any ideas?: [CODE][ec2-user@ip-172-31-29-42 cudalucas]$ make /usr/local/cuda/bin/nvcc -O1 --generate-code arch=compute_70,code=sm_70 --compiler-options=-Wall -I/usr/local/cuda/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_00000b18_00000000-6_CUDALucas.cpp1.ii". make: *** [CUDALucas.o] Error 1 [ec2-user@ip-172-31-29-42 cudalucas]$ [/CODE] |
[QUOTE=ATH;493468]I tried to compile CUDALucas svn on Amazon p3.2xlarge with Tesla V100.
I tried with the Deep Learning Amazon Linux image and the Deep Learning Ubuntu image, both has CUDA Version 9.2.88. I changed the path to the CUDA 9.2 installation and changed line in the makefile to "arch=compute_70,code=sm_70" (I also tried 50 and 52) But I get these errors, any ideas?: [CODE][ec2-user@ip-172-31-29-42 cudalucas]$ make /usr/local/cuda/bin/nvcc -O1 --generate-code arch=compute_70,code=sm_70 --compiler-options=-Wall -I/usr/local/cuda/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 ... 5 errors detected in the compilation of "/tmp/tmpxft_00000b18_00000000-6_CUDALucas.cpp1.ii". make: *** [CUDALucas.o] Error 1 [ec2-user@ip-172-31-29-42 cudalucas]$ [/CODE][/QUOTE] Going from v2.05.1 to 2.06beta (May 5 2017) on Windows coincided with the need for nvml.dll. Do you have nvml.h? [URL]https://devtalk.nvidia.com/default/topic/542702/nvml-header-file-missing/[/URL] [URL]https://stackoverflow.com/questions/16326306/nvml-header-file-missing[/URL] |
[QUOTE=kriesel;493472]Going from v2.05.1 to 2.06beta (May 5 2017) on Windows coincided with the need for nvml.dll. Do you have nvml.h? [URL]https://devtalk.nvidia.com/default/topic/542702/nvml-header-file-missing/[/URL] [URL]https://stackoverflow.com/questions/16326306/nvml-header-file-missing[/URL][/QUOTE]
Yes, it is in the /usr/local/cuda/include and I tried now to copy it to /usr/local/include as well. But it is not complaining about missing nvml.h |
[QUOTE=ATH;493491]Yes, it is in the /usr/local/cuda/include and I tried now to copy it to /usr/local/include as well. But it is not complaining about missing nvml.h[/QUOTE]
It's complaining about nvml related variables being undefined, and not complaining about the absence of a header file that probably defines them. That sounds like a set of symptoms of the same thing, to me. If I was in that situation, I'd now be checking very carefully for a typo in the include line, or an explicit other location for nvml.h, the sort of careful slow no-assumptions-unquestioned checking mode for after I've missed something 3 times. It happens. Or has nvml.h been modified, or is it finding one that's not a version match? Permissions ok? Can you tell whether it's being found, read, and processed? |
I used CUDALucas v2.05.1 on Amazon Deep Learning Base AMI and got it to work (passes self-tests -r 0 and -r 1 and finds M6972593 prime in about 11 or 12 minutes).
First you have to change the symbolic link: [CODE] ls -l /usr/local/cuda ### ---> will be cuda9.0, which is no good! sudo rm /usr/local/cuda; sudo ln -s /usr/local/cuda-9.2 /usr/local/cuda [/CODE] Then if you use Deep Learning Base AMI (as opposed to just plain Deep Learning AMI), there is a peculiar bug with the compiler, hopefully they will fix it in the next update. This affects Deep Learning Base AMI version 9.0, maybe it will be fixed by the time future readers read this. If you get the error [c]gcc: error trying to exec 'cc1plus': execvp: No such file or directory[/c] at link time when compiling and linking any program, even "hello world", then do this: [CODE] alternatives --display gcc ### ---> will be gcc72 which causes a problem at link time for all programs sudo alternatives --set gcc "/usr/bin/gcc48" [/CODE] Then in the CUDALucas source and Makefile, make these changes: [CODE] diff Makefile.orig Makefile 23c23 < CUFLAGS = -O$(OptLevel) --generate-code arch=compute_35,code=sm_35 --compiler-options=-Wall -I$(CUINC) --- > CUFLAGS = -O$(OptLevel) --generate-code arch=compute_70,code=sm_70 --compiler-options=-Wall -I$(CUINC) [/CODE] [CODE] diff CUDALucas.cu.orig CUDALucas.cu 755c755 < #ifndef WIN_ENVIRONMENT32 //no 32-bit win support for NVML --- > #ifdef WIN_ENVIRONMENT64 //no 32-bit win support for NVML [/CODE] Of course the cost for p3.2xlarge of more than $1 / hour is prohibitive... :shock: [QUOTE=ATH;493468]I tried to compile CUDALucas svn on Amazon p3.2xlarge with Tesla V100. I tried with the Deep Learning Amazon Linux image and the Deep Learning Ubuntu image, both has CUDA Version 9.2.88. I changed the path to the CUDA 9.2 installation and changed line in the makefile to "arch=compute_70,code=sm_70" (I also tried 50 and 52) But I get these errors, any ideas?: [/QUOTE] |
As I recall, 2.05.1 lacks a check for at least one flavor of bad residue that 2.06beta May 5 2017 includes. So check your results and the corresponding logs.
|
#ifdef WIN_ENVIRONMENT64 did not work, but I just commented out each nvml line and then it worked, thanks :smile:
It passed the long self test -r 1 and found M6972593 to be prime. I ran a cufftbench all the way from 1K to 32768K with 50 iterations: ./CUDALucas -cufftbench 1 32768 50 and then a threadbench on those best fft lengths again with 50 iterations: ./CUDALucas -threadbench 1 32768 50 1 If anyone is interested, here are the outputs from those runs: [URL="http://hoegge.dk/mersenne/Tesla V100 cufftbench1K-32768K.txt"]Tesla V100 cufftbench1K-32768K.txt[/URL] [URL="http://hoegge.dk/mersenne/Tesla V100 threadbench1K-32768K.txt"]Tesla V100 threadbench1K-32768K.txt[/URL] and then the actual files produced which CUDALucas uses: [URL="http://hoegge.dk/mersenne/Tesla V100-SXM2-16GB fft.txt"]Tesla V100-SXM2-16GB fft.txt[/URL] [URL="http://hoegge.dk/mersenne/Tesla V100-SXM2-16GB threads.txt"]Tesla V100-SXM2-16GB threads.txt[/URL] Btw I got the error: [QUOTE]gcc: error trying to exec 'cc1plus': execvp: No such file or directory[/QUOTE] on the image: [B]Deep Learning AMI (Amazon Linux) Version 12.0 (ami-45655f20)[/B] but it seems to be just because g++ is not installed, doing: [B]sudo yum install gcc72-c++.x86_64 -y[/B] fixed it. |
| All times are UTC. The time now is 22:00. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.