mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Blogorrhea > masser

Reply
 
Thread Tools
Old 2022-02-26, 21:32   #1
masser
 
masser's Avatar
 
Jul 2003
Behind BB

22×499 Posts
Default Make me smart: Mfakto; Ubuntu; AMD RX470

I bought a used AMD RX 470 on ebay and struggled to get it working with mfakto.

I will record here what ultimately worked, but I suspect the collective wisdom of the forum will be able to help me improve these steps.

1. Create a USB stick Ubuntu installer by following Ernst' instructions here. In order to make progress with subsequent software (both mfakto and gpuowl attempted) installs, I chose the Ubuntu 20.04.4 LTS (Focal Fossa) Server Install image. With the desktop Ubuntu image, some issue with AMD Polaris GPUs and ubuntu made it difficult to get working screen output.

2. Continue following Ernst' instructions to install some of the basic software development tools, plus rocm-dev.
Quote:
1 sudo passwd root
2 sudo apt update
3 sudo apt install -y build-essential clinfo git libgmp-dev libncurses5 libnuma-dev python ssh openssh-server
11 echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
12 sudo apt update && sudo apt install rocm-dev
3. Long story short, AMD only "partially supports" Polaris GPUs now (470/480/570/580/590), so things get hairy at this point. I found the following post, describing how to get OpenCL working in Ubuntu 20.04 with an RX570 and followed the instructions.

3a. Install ROCm 4.5.2
Quote:
17 sudo apt list --installed | grep wget gnupg2
18 sudo apt-get update
19 sudo apt-get install wget gnupg2
20 sudo usermod -a -G video $LOGNAME
21 sudo usermod -a -G render $LOGNAME
24 wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
25 echo 'deb [arch=amd64] https://repo.radeon.com/amdgpu/21.40.2/ubuntu focal main' | sudo tee /etc/apt/sources.list.d/amdgpu.list
26 sudo apt-get update
27 sudo apt install amdgpu-dkms
28 sudo reboot
29 echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/4.5.2/ ubuntu main' | sudo tee /etc/apt/sources.list.d/rocm.list
30 sudo apt-get update
32 sudo apt install rocm-hip-sdk rocm-opencl-sdk
The opencl-sdk seemed necessary here; wasn't sure about the hip sdk.

3b. After the steps here (as proposed in the link above), clinfo finally gave sensible results.
Quote:
35 tar -xvf amdgpu-pro-21.10-1247438-ubuntu-20.04.tar.xz
36 mkdir extractions
37 dpkg -x amdgpu-pro-21.10-1247438-ubuntu-20.04/opencl-orca-amdgpu-pro-icd_21.10-1247438_amd64.deb extractions
38 dpkg -x amdgpu-pro-21.10-1247438-ubuntu-20.04/ocl-icd-libopencl1-amdgpu-pro_21.10-1247438_amd64.deb extractions
44 sudo mkdir /opt/myopencl
45 sudo mkdir /opt/myopencl/lib
47 sudo mv extractions/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl12cl64.so /opt/myopencl/lib/
48 sudo mv extractions/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl-orca64.so /opt/myopencl/lib/
49 sudo mv extractions/opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1.2 /opt/myopencl/lib/
50 sudo mv extractions/opt/amdgpu-pro/lib/x86_64-linux-gnu/libOpenCL.so.1 /opt/myopencl/lib/
52 sudo vim /etc/OpenCL/vendors/myopencl.icd
53 cat /etc/OpenCL/vendors/myopencl.icd
56 /opt/rocm-4.5.2/opencl/bin/clinfo
57 /opt/rocm-4.5.2/bin/rocminfo
I then did another reboot and checked that clinfo still worked.

4. Compile and try mfakto v.0.15-pre7.

Quote:
66 mkdir mfakto
67 cd mfakto/
68 mv ~/mfakto-0.15pre7-src.zip .
70 sudo apt install unzip
71 unzip mfakto-0.15pre7-src.zip
72 cd mfakto-master/
73 cd src/
79 vim Makefile [COMMENT: edit this line: AMD_APP_DIR = /opt/rocm-4.5.2/opencl]
80 make [COMMENT: still didn't work, use the link below]
81 ld -lOpenCL --verbose
82 ls /opt/rocm-4.5.2/opencl/lib/
83 sudo ln -s /opt/rocm-4.5.2/opencl/lib/libOpenCL.so.1.2 /usr/lib/libOpenCL.so
84 make [SUCCESS!]
86 cd ../
87 ./mfakto [SUCCESS, but need work!]
88 vim worktodo.txt
89 ./mfakto [SUCCESS!]
All of the above seems particularly onerous. Any suggestions for improvement?
masser is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
TF with mfakto win 0.14 Yoshi24517 GPU Computing 5 2017-04-01 18:01
BSOD with "Smart Assignment" Pegos Software 6 2017-01-16 17:41
RX470 and RX460 announced VictordeHolland GPU Computing 0 2016-07-30 13:05
How to tell mfakto to use IGP? Rodrigo GPU Computing 22 2013-03-23 02:25
How Do I Make Mprime Work In Ubuntu?? hesdeadjim Software 4 2010-01-01 19:03

All times are UTC. The time now is 14:53.


Thu Jun 8 14:53:49 UTC 2023 up 294 days, 12:22, 0 users, load averages: 2.21, 1.50, 1.24

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.

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