mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   GPU Computing (https://www.mersenneforum.org/forumdisplay.php?f=92)
-   -   How to run MFAKTC in Linux? (https://www.mersenneforum.org/showthread.php?t=21369)

Rodrigo 2016-06-11 16:21

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 [URL="http://www.netrunner.com/"]Netrunner[/URL] 16.

Using @Brain's [URL="http://www.mersenneforum.org/attachments/pdfs/GIMPS_GPU_Computing_Cheat_Sheet.pdf"]GPU Computing Cheat Sheet[/URL], I downloaded the Linux 64-bit version from [URL="http://www.mersenneforum.org/mfaktc/mfaktc-0.21/"]here[/URL], 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
[/CODE]So, what am I doing wrong (for there is no doubt of that :wink:) 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. :smile:

TIA

Rodrigo

airsquirrels 2016-06-11 16:42

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

Rodrigo 2016-06-11 21:09

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

Mark Rose 2016-06-11 23:09

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.

TheJudger 2016-06-11 23:25

Hi,
[LIST][*]downloaded the precompiled binary? CUDA runtime library included, e.g. start with [CODE]LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ./mfaktc.exe[/CODE]
[*]downloaded source? You need to install the CUDA toolkit which includes the CUDA runtime library. A properly configured toolkit adds this to the path.[/LIST]Oliver

Rodrigo 2016-06-12 00:37

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[/CODE]...?

Rodrigo

TheJudger 2016-06-12 00:59

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

Rodrigo 2016-06-12 02:19

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

Rodrigo

Rodrigo 2016-06-12 02:59

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![/CODE](Note: I had downloaded version MFAKTC 0.20.)

What's the next step?

Rodrigo

Rodrigo 2016-06-12 05:32

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[/CODE]Rodrigo

TheJudger 2016-06-12 10:38

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[LIST][*]go for [URL="http://mersenneforum.org/mfaktc/mfaktc-0.21/mfaktc-0.21.linux64.cuda65.tar.gz"]mfaktc 0.21[/URL][*]if the issue remains, please report the output of
[CODE]ldd ./mfaktc.exe
LD_LIBRARY_PATH="./lib:${LD_LIBRARY_PATH}" ldd ./mfaktc.exe[/CODE]
This won't solve the issue but this will show us which libraries are used.[/LIST]
Oliver


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

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