mersenneforum.org  

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

Reply
 
Thread Tools
Old 2016-06-11, 16:21   #1
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

947 Posts
Default How to run MFAKTC in Linux?

Last night I decided to see how to run MFAKTC on a Linux machine, but ran into an obstacle that I hope you will help with.

For purposes of this experiment, I wanted to use an Nvidia GT630 on Netrunner 16.

Using @Brain's GPU Computing Cheat Sheet, I downloaded the Linux 64-bit version from here, then extracted the files. The README.TXT makes it sound like it's a simple matter of typing "./mfaktc.exe", but this seems to be true only for the Windows version. (It's possible that I've forgotten some part of what I needed to do to get MFAKTC going in Windows.)

In Windows, you can extract the archives to their own directory in no particular place (I have it in the Downloads folder) and MFAKTC runs in the DOS box from there without a hitch. But following the same procedure in Netrunner, I keep getting this error:

Code:
 
error while loading shared libraries: libcudart.so.4: cannot open shared object file: No such file or directory
So, what am I doing wrong (for there is no doubt of that ) and what do I need to do to fix it?

I don't remember it being so difficult to get MFAKTC working in Windows, but then it's been a while.

I spent some time researching this on the Web, but ran into quite a variety of ideas of varying degrees of exoticism. As a Linux noob, I figured the wisest course would be to ask people who know.

TIA

Rodrigo

Last fiddled with by Rodrigo on 2016-06-11 at 16:31 Reason: conciseness, correction
Rodrigo is offline   Reply With Quote
Old 2016-06-11, 16:42   #2
airsquirrels
 
airsquirrels's Avatar
 
"David"
Jul 2015
Ohio

11×47 Posts
Default

Do you have CUDA installed on this machine?

If so, you may need to run the following first:

export LD_LIBRARY_PATH=/usr/local/cuda/lib64
airsquirrels is offline   Reply With Quote
Old 2016-06-11, 21:09   #3
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

947 Posts
Default

Is that something that would need to be installed in addition to what comes with the MFAKTC tar.gz?

It's been a while since I added a new machine for TF purposes, and never a Linux machine 'til now.

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2016-06-11, 23:09   #4
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013
https://pedan.tech/

24×199 Posts
Default

First question, do you have the Nvidia driver installed?

You also need to have the CUDA libraries installed. They are often packaged separately in distributions, so you may need to install a second package.

As AirSquirrels alluded to, you need to have the CUDA libraries in your library path. I recommend making sure the directory they are installed in is listed in a file inside /etc/ld.so.conf.d . Then run `ldconfig` as root.
Mark Rose is offline   Reply With Quote
Old 2016-06-11, 23:25   #5
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

5·223 Posts
Default

Hi,
  • downloaded the precompiled binary? CUDA runtime library included, e.g. start with
    Code:
    LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ./mfaktc.exe
  • downloaded source? You need to install the CUDA toolkit which includes the CUDA runtime library. A properly configured toolkit adds this to the path.
Oliver
TheJudger is offline   Reply With Quote
Old 2016-06-12, 00:37   #6
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

947 Posts
Default

I do have the latest Nvidia driver (352.63) for that distribution.

And it was the precompiled binary that I downloaded.

Where to add the line...

Code:
LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ./mfaktc.exe
...?

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2016-06-12, 00:59   #7
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

100010110112 Posts
Default

Hi Rodrigo,

that is just an example of a command. E.g. run in your shell in the directory where you untared the tarball.

Oliver
TheJudger is offline   Reply With Quote
Old 2016-06-12, 02:19   #8
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

947 Posts
Default

Ah, thanks very much, Oliver. I'll try that.

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2016-06-12, 02:59   #9
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

16638 Posts
Default

UPDATE: There has been progress. MFAKTC started, and it ran fine with the -h switch.

But when I tried to perform the self-test, it aborted with the following message:

Code:
ERROR: CUDA runtime version must match the CUDA toolkit version used during compile!
(Note: I had downloaded version MFAKTC 0.20.)

What's the next step?

Rodrigo
Rodrigo is offline   Reply With Quote
Old 2016-06-12, 05:32   #10
Rodrigo
 
Rodrigo's Avatar
 
Jun 2010
Pennsylvania

947 Posts
Default

Addendum to the above post:

In case it helps, here's the information relating to the installed CUDA version:

Code:
binary compiled for CUDA      4.20
CUDA runtime version          0.0
CUDA driver version           4390.89
Rodrigo
Rodrigo is offline   Reply With Quote
Old 2016-06-12, 10:38   #11
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

5×223 Posts
Default

Hi Rodrigo,

this looks like the wrong CUDA runtime library is used. And Nvidia says using the wrong runtime library is not supported in any way, even reading the version of the runtime library doesn't work...

So next I would
  • go for mfaktc 0.21
  • if the issue remains, please report the output of
    Code:
    ldd ./mfaktc.exe
    LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ldd ./mfaktc.exe
    This won't solve the issue but this will show us which libraries are used.

Oliver
TheJudger is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mfaktc, linux & laptop temperatures ric GPU Computing 8 2017-08-31 20:01
mfaktc on Linux and misfit on Windows bgbeuning GPU Computing 3 2016-01-25 05:20
mfaktc on a Mac bayanne GPU Computing 0 2013-10-18 09:59
mfaktc (0.20) fairsky Software 9 2013-09-24 12:58
mfaktc tichy GPU Computing 4 2010-12-03 21:51

All times are UTC. The time now is 15:26.


Fri Jul 7 15:26:24 UTC 2023 up 323 days, 12:54, 0 users, load averages: 1.15, 1.13, 1.10

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.

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