mersenneforum.org  

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

Reply
Thread Tools
Old 2019-04-13, 07:10   #1068
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

137110 Posts
Default

Quote:
Originally Posted by SELROC View Post
I have attempted to reproduce the segfault without success. I have fixed the Makefile by adding -lstdc++fs , the pull request is waiting.
Thanks Valerio, in fact adding -lstdc++fs fixes the segfault problem. Your pull request is merged now.
preda is offline   Reply With Quote
Old 2019-04-13, 07:19   #1069
SELROC
 

3×7×127 Posts
Default

Quote:
Originally Posted by preda View Post
Thanks Valerio, in fact adding -lstdc++fs fixes the segfault problem. Your pull request is merged now.

One thing I don't understand is that compiling without stdc++fs throws a compile-time error, so I don't know how he got there.

Last fiddled with by SELROC on 2019-04-13 at 07:19
  Reply With Quote
Old 2019-04-13, 07:20   #1070
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

3×457 Posts
Default

Quote:
Originally Posted by kriesel View Post
Same method as used for V6.4, produced
Ken, I'm looking into these, give me one moment.
preda is offline   Reply With Quote
Old 2019-04-13, 09:24   #1071
M344587487
 
M344587487's Avatar
 
"Composite as Heck"
Oct 2017

11001110112 Posts
Default

That works nicely. The only issue I can see is the new way the version is done means that it's not in the binary so not in any submitted results.
M344587487 is offline   Reply With Quote
Old 2019-04-13, 09:49   #1072
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

3·457 Posts
Default

Quote:
Originally Posted by M344587487 View Post
That works nicely. The only issue I can see is the new way the version is done means that it's not in the binary so not in any submitted results.
Why do you think the version is not in the binary?

There are two ways to build now, using make with Makefile, or using scons with SConstruct.
Both ways generate during the build a version string that is written to the file version.inc, which is included in the build thus the version is in the binary. The version should be reported in the results as well.

The version string is produced by:
git describe --long
and looks like:
v6.5-1-g168a15c

Where 'v6.5' is a tag in git, '1' is the number of commits after the tag, and '168a15c' is a commit hash.

Also, I'm changing the executable name back to 'gpuowl' from 'openowl', I hope that's not a problem.

Last fiddled with by preda on 2019-04-13 at 09:51
preda is offline   Reply With Quote
Old 2019-04-13, 10:21   #1073
SELROC
 

105248 Posts
Default

Quote:
Originally Posted by preda View Post
Why do you think the version is not in the binary?

There are two ways to build now, using make with Makefile, or using scons with SConstruct.
Both ways generate during the build a version string that is written to the file version.inc, which is included in the build thus the version is in the binary. The version should be reported in the results as well.

The version string is produced by:
git describe --long
and looks like:
v6.5-1-g168a15c

Where 'v6.5' is a tag in git, '1' is the number of commits after the tag, and '168a15c' is a commit hash.

Also, I'm changing the executable name back to 'gpuowl' from 'openowl', I hope that's not a problem.



not a problem if I don't care :-)


I have to edit all my scripts.
  Reply With Quote
Old 2019-04-13, 10:47   #1074
preda
 
preda's Avatar
 
"Mihai Preda"
Apr 2015

3·457 Posts
Default

Quote:
Originally Posted by kriesel View Post
Same method as used for V6.4, produced [errors]
Please try again now.

Note, the build now uses a file version.inc which contains the version between quotes, e.g.:
"v6.5-5-ga574d99-dirty"

This file is normally generated by:
echo "`git describe --long --dirty`" > version.inc

I'm not sure how this works on Windows, but if you get
git describe --long --dirty
to work, just put that string between quotes in version.inc

(you can see this in Makefile)

If you get a binary built, and publish it, please use a proper version with the right git hash (which would allow in the future to track down a result to the exact source code that generated it)

Last fiddled with by preda on 2019-04-13 at 10:49
preda is offline   Reply With Quote
Old 2019-04-13, 13:35   #1075
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

543710 Posts
Default

Quote:
Originally Posted by preda View Post
Please try again now.

Note, the build now uses a file version.inc which contains the version between quotes, e.g.:
"v6.5-5-ga574d99-dirty"

This file is normally generated by:
echo "`git describe --long --dirty`" > version.inc

I'm not sure how this works on Windows, but if you get
git describe --long --dirty
to work, just put that string between quotes in version.inc

(you can see this in Makefile)

If you get a binary built, and publish it, please use a proper version with the right git hash (which would allow in the future to track down a result to the exact source code that generated it)
I've never used git; I always download a zipfile. Clumsy perhaps but works and lets me dodge a learning curve for now.
I edit the makefile to add an openowl-win section, as shown, with hardcoded hash, and the necessary -static option. It would be great if you would add the openowl-win section, even if it is still written for using git, as it would mean less makefile editing for me every time. Usually the resulting makefile looks something like the following, and after running the make, I also typically run strip openowl.exe, which then gives an executable ~540k in size from the original ~1.4M, as for v6.4

Code:
HEADERS = Background.h Pm1Plan.h GmpUtil.h Args.h checkpoint.h clwrap.h common.h kernel.h state.h timeutil.h tinycl.h Worktodo.h Gpu.h Primes.h Signal.h FFTConfig.h
SRCS = Pm1Plan.cpp GmpUtil.cpp Worktodo.cpp common.cpp gpuowl.cpp Gpu.cpp clwrap.cpp Task.cpp checkpoint.cpp timeutil.cpp Args.cpp Primes.cpp state.cpp Signal.cpp FFTConfig.cpp

# Edit the path in -L below if needed, to the folder containing OpenCL.dll on Windows or libOpenCL.so on UNIX.
# The included lib paths are for ROCm, AMDGPU-pro/Linux or MSYS-2/Windows.
LIBPATH = -L/opt/rocm/opencl/lib/x86_64 -L/opt/amdgpu-pro/lib/x86_64-linux-gnu -L/c/Windows/System32 -L.

#-fsanitize=leak

openowl: ${HEADERS} ${SRCS}
    g++ -Wall -O2 -std=c++17 -DREV=\"`git rev-parse --short HEAD``git diff-files --quiet || echo -mod`\" -Wall ${SRCS} -o openowl -lOpenCL -lgmp -pthread ${LIBPATH}

openowl-win: ${HEADERS} ${SRCS}
    g++ -Wall -O2 -std=c++17 -DREV=\"aa9f555f\" -Wall ${SRCS} -o openowl -lOpenCL -lgmp -pthread ${LIBPATH} -static
For the latest, I used the following. Not sure the -5 is right here. This time the executable is 4.2M size before the strip, 1.4M after.

Code:
HEADERS = Background.h Pm1Plan.h GmpUtil.h Args.h checkpoint.h clwrap.h common.h kernel.h state.h timeutil.h tinycl.h Worktodo.h Gpu.h Signal.h FFTConfig.h
SRCS = Pm1Plan.cpp GmpUtil.cpp Worktodo.cpp common.cpp gpuowl.cpp Gpu.cpp clwrap.cpp Task.cpp checkpoint.cpp timeutil.cpp Args.cpp state.cpp Signal.cpp FFTConfig.cpp

# Edit the path in -L below if needed, to the folder containing OpenCL.dll on Windows or libOpenCL.so on UNIX.
# The included lib paths are for ROCm, AMDGPU-pro/Linux or MSYS-2/Windows.
LIBPATH = -L/opt/rocm/opencl/lib/x86_64 -L/opt/amdgpu-pro/lib/x86_64-linux-gnu -L/c/Windows/System32 -L.

#-fsanitize=leak

openowl: ${HEADERS} ${SRCS}
    echo \"`git describe --long --dirty`\" > version.inc
    echo Version: `cat version.inc`
    g++ -Wall -O2 -std=c++17 -Wall ${SRCS} -o gpuowl -lOpenCL -lgmp -lstdc++fs -pthread ${LIBPATH}

openowl-win:  ${HEADERS} ${SRCS}
    echo \"v6.5-5-1f401d5\" >version.inc
    echo Version: `cat version.inc`
    g++ -Wall -O2 -std=c++17 -Wall ${SRCS} -o gpuowl -lOpenCL -lgmp -lstdc++fs -pthread ${LIBPATH} -static
which then yields
Code:
$ make openowl-win
echo \"v6.5-5-1f401d5\" >version.inc
echo Version: `cat version.inc`
Version: "v6.5-5-1f401d5"
g++ -Wall -O2 -std=c++17 -Wall Pm1Plan.cpp GmpUtil.cpp Worktodo.cpp common.cpp gpuowl.cpp Gpu.cpp clwrap.cpp Task.cpp checkpoint.cpp timeutil.cpp Args.cpp state.cpp Signal.cpp FFTConfig.cpp -o gpuowl -lOpenCL -lgmp -lstdc++fs -pthread -L/opt/rocm/opencl/lib/x86_64 -L/opt/amdgpu-pro/lib/x86_64-linux-gnu -L/c/Windows/System32 -L. -static
and a clean build. At least, no error messages, and -h ran.
Code:
>gpuowl -h
2019-04-13 08:09:34 gpuowl v6.5-5-1f401d5
2019-04-13 08:09:34 config: -h

Command line options:

-dir <folder>      : specify work directory (containing worktodo.txt, results.txt, config.txt, gpuowl.log)
-user <name>       : specify the user name.
-cpu  <name>       : specify the hardware name.
-time              : display kernel profiling information.
-fft <size>        : specify FFT size, such as: 5000K, 4M, +2, -1.
-block <value>     : PRP GEC block size. Default 400. Smaller block is slower but detects errors sooner.
-carry long|short  : force carry type. Short carry may be faster, but requires high bits/word.
-B1                : P-1 B1, default 500000
-rB2               : ratio of B2 to B1, default 30
-prp <exponent>    : run a single PRP test and exit, ignoring worktodo.txt
-pm1 <exponent>    : run a single P-1 test and exit, ignoring worktodo.txt
-device <N>        : select a specific device:
 0 : Ellesmere-36x1266-@28:0.0 Radeon (TM) RX 480 Graphics
 1 : gfx804-8x1203-@3:0.0 Radeon 550 Series

FFT Configurations:
FFT    8K [  0.01M -    0.18M]  64-64
FFT   32K [  0.05M -    0.68M]  64-256 256-64
FFT   48K [  0.07M -    1.01M]  64-64-6
FFT   64K [  0.10M -    1.34M]  64-512 512-64
FFT   72K [  0.11M -    1.50M]  64-64-9
FFT   80K [  0.12M -    1.66M]  64-64-10
FFT  128K [  0.20M -    2.63M]  1K-64 64-1K 256-256
FFT  192K [  0.29M -    3.91M]  64-256-6 256-64-6
FFT  256K [  0.39M -    5.18M]  64-2K 256-512 512-256 2K-64
FFT  288K [  0.44M -    5.81M]  64-256-9 256-64-9
FFT  320K [  0.49M -    6.44M]  64-256-10 256-64-10
FFT  384K [  0.59M -    7.69M]  64-512-6 512-64-6
FFT  512K [  0.79M -   10.18M]  1K-256 256-1K 512-512 4K-64
FFT  576K [  0.88M -   11.42M]  64-512-9 512-64-9
FFT  640K [  0.98M -   12.66M]  64-512-10 512-64-10
FFT  768K [  1.18M -   15.12M]  1K-64-6 64-1K-6 256-256-6
FFT    1M [  1.57M -   20.02M]  1K-512 256-2K 512-1K 2K-256
FFT 1152K [  1.77M -   22.45M]  1K-64-9 64-1K-9 256-256-9
FFT 1280K [  1.97M -   24.88M]  1K-64-10 64-1K-10 256-256-10
FFT 1536K [  2.36M -   29.72M]  64-2K-6 256-512-6 512-256-6 2K-64-6
FFT    2M [  3.15M -   39.34M]  1K-1K 512-2K 2K-512 4K-256
FFT 2304K [  3.54M -   44.13M]  64-2K-9 256-512-9 512-256-9 2K-64-9
FFT 2560K [  3.93M -   48.90M]  64-2K-10 256-512-10 512-256-10 2K-64-10
FFT    3M [  4.72M -   58.41M]  1K-256-6 256-1K-6 512-512-6 4K-64-6
FFT    4M [  6.29M -   77.30M]  1K-2K 2K-1K 4K-512
FFT 4608K [  7.08M -   86.70M]  1K-256-9 256-1K-9 512-512-9 4K-64-9
FFT    5M [  7.86M -   96.07M]  1K-256-10 256-1K-10 512-512-10 4K-64-10
FFT    6M [  9.44M -  114.74M]  1K-512-6 256-2K-6 512-1K-6 2K-256-6
FFT    8M [ 12.58M -  151.83M]  2K-2K 4K-1K
FFT    9M [ 14.16M -  170.28M]  1K-512-9 256-2K-9 512-1K-9 2K-256-9
FFT   10M [ 15.73M -  188.68M]  1K-512-10 256-2K-10 512-1K-10 2K-256-10
FFT   12M [ 18.87M -  225.32M]  1K-1K-6 512-2K-6 2K-512-6 4K-256-6
FFT   16M [ 25.17M -  298.13M]  4K-2K
FFT   18M [ 28.31M -  334.34M]  1K-1K-9 512-2K-9 2K-512-9 4K-256-9
FFT   20M [ 31.46M -  370.44M]  1K-1K-10 512-2K-10 2K-512-10 4K-256-10
FFT   24M [ 37.75M -  442.34M]  1K-2K-6 2K-1K-6 4K-512-6
FFT   36M [ 56.62M -  656.22M]  1K-2K-9 2K-1K-9 4K-512-9
FFT   40M [ 62.91M -  727.03M]  1K-2K-10 2K-1K-10 4K-512-10
FFT   48M [ 75.50M -  868.07M]  2K-2K-6 4K-1K-6
FFT   72M [113.25M - 1287.53M]  2K-2K-9 4K-1K-9
FFT   80M [125.83M - 1426.38M]  2K-2K-10 4K-1K-10
FFT   96M [150.99M - 1702.92M]  4K-2K-6
FFT  144M [226.49M - 2525.23M]  4K-2K-9
FFT  160M [251.66M - 2797.39M]  4K-2K-10
2019-04-13 08:09:39 Exiting because "help"
 2019-04-13 08:09:39 Bye
If you'll tell me whether the -5 is correct for that hash, I'll alter the makefile & rerun it if needed, and post the executable in a zipfile. I think the right zip contents would now be
gpuowl.exe
makefile (not really necessary, but shows how it was built)
primenet.py
read.md
kriesel is offline   Reply With Quote
Old 2019-04-13, 14:27   #1076
M344587487
 
M344587487's Avatar
 
"Composite as Heck"
Oct 2017

827 Posts
Default

Quote:
Originally Posted by preda View Post
Why do you think the version is not in the binary?

There are two ways to build now, using make with Makefile, or using scons with SConstruct.
Both ways generate during the build a version string that is written to the file version.inc, which is included in the build thus the version is in the binary. The version should be reported in the results as well.

The version string is produced by:
git describe --long
and looks like:
v6.5-1-g168a15c

Where 'v6.5' is a tag in git, '1' is the number of commits after the tag, and '168a15c' is a commit hash.

Also, I'm changing the executable name back to 'gpuowl' from 'openowl', I hope that's not a problem.
I did a full git clone, tarred it up and transferred to the offline PC. Compiled with make verbatim, nothing shows up in the header when you run gpuowl or in the results.txt JSON data, just version:"". It's not a problem for now as I'm batching it manually, I'll just grep v6.5-1-g168a15c into the results. I'll investigate a bit more later.

Quote:
Originally Posted by kriesel View Post
I've never used git; I always download a zipfile. Clumsy perhaps but works and lets me dodge a learning curve for now.
...
It can be as simple as:
Code:
git clone https://github.com/preda/gpuowl
You could get adventurous and download and compile in one go:
Code:
git clone https://github.com/preda/gpuowl && cd gpuowl && make
There's a bit more to git if you want that's only a search away, but if all you want to do is get the latest version and compile you can avoid the hassle by doing the above in a fresh directory every time. You could be a bit more efficient by only getting the latest commit:
Code:
git clone --depth 1 https://github.com/preda/gpuowl && cd gpuowl && make
M344587487 is offline   Reply With Quote
Old 2019-04-13, 14:51   #1077
kriesel
 
kriesel's Avatar
 
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest

5,437 Posts
Default

Quote:
Originally Posted by M344587487 View Post
It can be as simple as:
Code:
git clone https://github.com/preda/gpuowl
You could get adventurous and download and compile in one go:
Code:
git clone https://github.com/preda/gpuowl && cd gpuowl && make
There's a bit more to git if you want that's only a search away, but if all you want to do is get the latest version and compile you can avoid the hassle by doing the above in a fresh directory every time. You could be a bit more efficient by only getting the latest commit:
Code:
git clone --depth 1 https://github.com/preda/gpuowl && cd gpuowl && make
Would need to first install git, yes? in the msys/mingw environment that's atop Windows 7, where the compiling gets done, I think. It looks like it's already there in msys2/mingw.

This gives 5 ways on windows, some oriented to Win 10.
https://www.jamessturtevant.com/post...it-on-Windows/

Last fiddled with by kriesel on 2019-04-13 at 14:52
kriesel is offline   Reply With Quote
Old 2019-04-13, 17:47   #1078
SELROC
 

10100100000112 Posts
Default

Quote:
Originally Posted by preda View Post
Please try again now.

Note, the build now uses a file version.inc which contains the version between quotes, e.g.:
"v6.5-5-ga574d99-dirty"

This file is normally generated by:
echo "`git describe --long --dirty`" > version.inc

I'm not sure how this works on Windows, but if you get
git describe --long --dirty
to work, just put that string between quotes in version.inc

(you can see this in Makefile)

If you get a binary built, and publish it, please use a proper version with the right git hash (which would allow in the future to track down a result to the exact source code that generated it)

I don't know what it means, it seems that a string is missing,


echo "git describe --long --dirty" > version.inc
fatal: No names found, cannot describe anything.
echo Version: cat version.inc
Version: ""
  Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
mfakto: an OpenCL program for Mersenne prefactoring Bdot GPU Computing 1676 2021-06-30 21:23
GPUOWL AMD Windows OpenCL issues xx005fs GpuOwl 0 2019-07-26 21:37
Testing an expression for primality 1260 Software 17 2015-08-28 01:35
Testing Mersenne cofactors for primality? CRGreathouse Computer Science & Computational Number Theory 18 2013-06-08 19:12
Primality-testing program with multiple types of moduli (PFGW-related) Unregistered Information & Answers 4 2006-10-04 22:38

All times are UTC. The time now is 06:56.


Fri Aug 6 06:56:34 UTC 2021 up 14 days, 1:25, 1 user, load averages: 2.68, 2.65, 2.70

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.