mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Factoring

Reply
 
Thread Tools
Old 2023-01-22, 17:16   #155
Denial140
 
Dec 2021

4410 Posts
Default

My understanding was that the process for building it for GPU is the same, expect for additional parameters to the configure step. If this is wrong, then that may well explain it.

I managed to get fully through INSTALL-ecm when not trying to add GPU capability.

Quote:
When I set the compiler to gcc (have tried gcc, gcc-10 and gcc-9 commands), the configure fails with "cuda.h present but cannot be compiled". I tried also to get gcc-8 as suggested in readme.gpu, but installing gcc-8 seems to uninstall the Nvidia toolkit (whether I use version 12.0 or 11.2 of the toolkit), and vice versa. If instead I set it to nvcc, I get a similar error for gmp.h. The only thing that gets past this stage is setting it to g++, which causes issues further down the line.
For this, it fails in the mentioned ways when running
Code:
./configure --enable-gpu --with-cgbn-include=../CGBN/include/cgbn CC="g++ -fpermissive" CFLAGS="-02 -pedantic -fomit-rame-pointer -m64 -mtune=skylake -march=broadwell"
, or when removing the --with-cgbn-include parameter and/or the CFLAGS.

Quote:
The configure works fine with g++, but make gives several implicit type conversion errors (presumably as a result of treating main.c as C++? This was the impression I got from google.) Adding -fpermissive bypasses these, but gives a couple of errors about definitions crossing label jumps in cudawrapper.c. After adding some variable declarations to account for this, I get stuck with the following errors:
This, and the code block below it, happened when running make after the above configure.
Denial140 is online now   Reply With Quote
Old 2023-01-22, 17:28   #156
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

24×281 Posts
Default

What arguments do you give ./configure when compiling ECM and what arguments do you give it when compiling for GPU capability?

(ps. surely CC="g++...." is plain wrong!)

Last fiddled with by paulunderwood on 2023-01-22 at 17:42
paulunderwood is offline   Reply With Quote
Old 2023-01-22, 18:36   #157
Denial140
 
Dec 2021

22·11 Posts
Default

I have successfully compiled with GPU capability and CGBN - the important thing I was missing was the line "egrep -w '(CC|CFLAGS)' config.log" in INSTALL-ecm to get the compiler options used to compile GMP. My initial attempts at adding these failed, as I had unwittingly recompiled GMP with g++, which seems to leave certain things missing given the errors I was getting. The successful line in the end was
Code:
./configure --enable-gpu --with-cgbn-include=../../gmp-ecm/CGBN/include/cgbn --with-cuda=/usr/local/cuda-12.0 CFLAGS="-O2 -pedantic -fomit-frame-pointer -m64 -mtune=skylake -march=broadwell"
You may well be right that CC="g++ -fpermissive" is wrong - I must admit I have no idea what I'm doing, but it did reduce the type conversion errors to warnings.

Last fiddled with by Denial140 on 2023-01-22 at 18:41
Denial140 is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTT faster than FFT? moytrage Software 50 2021-07-21 05:55
PRP on gpu is faster that on cpu indomit Information & Answers 4 2020-10-07 10:50
faster than LL? paulunderwood Miscellaneous Math 13 2016-08-02 00:05
My CPU is getting faster and faster ;-) lidocorc Software 2 2008-11-08 09:26
Faster than LL? clowns789 Miscellaneous Math 3 2004-05-27 23:39

All times are UTC. The time now is 13:24.


Wed Feb 8 13:24:43 UTC 2023 up 174 days, 10:53, 1 user, load averages: 0.65, 0.93, 1.04

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.

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