mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GpuOwl (https://www.mersenneforum.org/forumdisplay.php?f=171)
-   -   Problems building "v7.2-69-g23c14a1" with gcc 10.2.0 (https://www.mersenneforum.org/showthread.php?t=26635)

drkirkby 2021-03-22 16:54

Problems building "v7.2-69-g23c14a1" with gcc 10.2.0
 
I am running CentOs 7.8 on a Dell 7920 with an Nvdia 2100 graphics card.



I cloned the git repository of gpuowl yesterday, and built gcc 10.2.0, as my gcc was too old. But I run into a problem - see below. I'm not a C++ programmer, so don't know what to look for to be honest.



[dkirkby@jackdaw gpuowl]$ make
echo "`git describe --tags --long --dirty --always`" > version.new
diff -q -N version.new version.inc >/dev/null || mv version.new version.inc
echo Version: `cat version.inc`
Version: "v7.2-69-g23c14a1"
g++ -MT ProofCache.o -MMD -MP -MF .d/ProofCache.Td -Wall -g -O3 -std=gnu++17 -c -o ProofCache.o ProofCache.cpp
g++ -MT Proof.o -MMD -MP -MF .d/Proof.Td -Wall -g -O3 -std=gnu++17 -c -o Proof.o Proof.cpp
g++ -MT Pm1Plan.o -MMD -MP -MF .d/Pm1Plan.Td -Wall -g -O3 -std=gnu++17 -c -o Pm1Plan.o Pm1Plan.cpp
g++ -MT B1Accumulator.o -MMD -MP -MF .d/B1Accumulator.Td -Wall -g -O3 -std=gnu++17 -c -o B1Accumulator.o B1Accumulator.cpp
g++ -MT Memlock.o -MMD -MP -MF .d/Memlock.Td -Wall -g -O3 -std=gnu++17 -c -o Memlock.o Memlock.cpp
g++ -MT log.o -MMD -MP -MF .d/log.Td -Wall -g -O3 -std=gnu++17 -c -o log.o log.cpp
g++ -MT GmpUtil.o -MMD -MP -MF .d/GmpUtil.Td -Wall -g -O3 -std=gnu++17 -c -o GmpUtil.o GmpUtil.cpp
GmpUtil.cpp: In function ‘std::string GCD(u32, const std::vector<unsigned int>&, u32)’:
GmpUtil.cpp:104:25: error: ‘gcd’ was not declared in this scope
104 | mpz_class resultGcd = gcd((mpz_class{1} << exp) - 1, w - sub);
| ^~~
make: *** [GmpUtil.o] Error 1

M344587487 2021-03-22 17:15

Looks like the GMP dependency has not been met, "yum install gmp-devel" might do the trick but that's just a guess.

drkirkby 2021-03-23 12:55

[QUOTE=M344587487;574376]Looks like the GMP dependency has not been met, "yum install gmp-devel" might do the trick but that's just a guess.[/QUOTE]
That does not do it - the gmp development package is already installed.

[CODE][root@jackdaw dkirkby]# yum install gmp-devel
Loaded plugins: fastestmirror, langpacks
<snip>
Package 1:gmp-devel-6.0.0-15.el7.x86_64 already installed and latest version
Nothing to do
[root@jackdaw dkirkby]#

[/CODE]


I've noticed in the past that one version of gcc will compile a program, and another one will not. Can anyone suggest a version of gcc that is known to work? If so, I can compile that.

Xyzzy 2021-03-23 13:09

[URL]https://www.mersenneforum.org/showthread.php?p=547488#post547488[/URL]

[URL]https://www.mersenneforum.org/showthread.php?p=547516#post547516[/URL]

drkirkby 2021-03-26 08:04

[QUOTE=Xyzzy;574420][URL]https://www.mersenneforum.org/showthread.php?p=547488#post547488[/URL]

[URL]https://www.mersenneforum.org/showthread.php?p=547516#post547516[/URL][/QUOTE]


Thank you. It seems at least I will need to install another GMP then. I'm not moving to CentOS 8.x due to the policy changes from Redhat, and I need to run CentOS, Redhat or Suse Enterprise for a bit of commercial software.



It would really helpl if gpuowl used autoconf/automake to detect the systems capabilites and report missing libraries, version of gcc that are too old etc. Most software would catch these problems. There's not a readme file to indicate what one needs.

Xyzzy 2021-03-26 13:36

[URL="https://www.theregister.com/2021/01/20/red_hat_amends_developer_license/"]https://arstechnica.com/gadgets/2021/01/centos-is-gone-but-rhel-is-now-free-for-up-to-16-production-servers/[/URL]

M344587487 2021-03-26 19:54

[QUOTE=drkirkby;574566]Thank you. It seems at least I will need to install another GMP then. I'm not moving to CentOS 8.x due to the policy changes from Redhat, and I need to run CentOS, Redhat or Suse Enterprise for a bit of commercial software.[/QUOTE]Any chance of using virtualisation to have your cake and eat it too? The commercial software could run in a CentOS/RedHat/whatever VM (easily if the software is not GPU-accelerated) with say a modern Debian 11 host, and for ease gpuowl should probably run on the host (with VFIO the GPU could be passed to a VM but it's finicky). Alternatively you could spin up a VM solely to compile gpuowl with a modern toolchain without having the dice roll of breaking the base system by installing multiple potentially incompatible toolchains around each other. My eyes have recently been opened to QEMU/KVM virtualisation using libvirt (virt-manager/virsh/oVirt for management), if the hardware is relatively modern to allow the use of KVM a guest VM runs at practically native speed.

UBR47K 2021-03-27 12:25

[QUOTE=drkirkby;574566]
It would really helpl if gpuowl used autoconf/automake to detect the systems capabilites and report missing libraries, version of gcc that are too old etc. Most software would catch these problems. There's not a readme file to indicate what one needs.[/QUOTE]

I agree that they should be mentioned in the docs but autoconf is overkill for a project with so few dependencies (you get an idea what's missing when it errors out during build).

Afaik, gpuowl doesn't have any requirements for GCC, it already provides some workarounds for older gcc versions when possible. GCC 8.x and above should have no issues compiling it.

Aramis Wyler 2021-05-17 03:26

Can't get it to make right.
 
I pulled down the gpuowl code because I wanted to upgrade. I pulled down the master branch, did a make, added worktodo.txt and config.txt files, and fired her up. It worked fine, but it said it was on version 6.11. Thinking master might not be on the 7 branch, I deleted the folder, explicitly pulled down the 7.2 zip file, exploded it into my gpuowl folder, did a mek clean (it rm'd a bunch of .o files) and a make. It made again as 6.11. Do I have to upgrade something to make it at 7.2, and can a number running at 6.11 be resumed at 7.2?




aramis@home:~/gpuowl$ make clean
rm -f ProofCache.o Proof.o Pm1Plan.o B1Accumulator.o Memlock.o log.o GmpUtil.o Worktodo.o common.o main.o Gpu.o clwrap.o Task.o Saver.o timeutil.o Args.o state.o Signal.o FFTConfig.o AllocTrac.o gpuowl-wrap.o sha3.o md5.o gpuowl gpuowl-win.exe
aramis@home:~/gpuowl$ make
echo "`git describe --tags --long --dirty --always`" > version.new
diff -q -N version.new version.inc >/dev/null || mv version.new version.inc
echo Version: `cat version.inc`
Version: "v6.11-380-g79ea0cc-dirty"

paulunderwood 2021-05-17 05:17

In a new directory, use [C]git clone https://github.com/preda/gpuowl.git[/C] Then [C]make[/C].

Aramis Wyler 2021-05-17 05:33

ty that worked.


All times are UTC. The time now is 02:39.

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