最初の現象
[chibi@rhel8 ~]$ cd ~/NVIDIA_CUDA-11.3_Samples/2_Graphics
[chibi@rhel8 2_Graphics]$ ls
Mandelbrot simpleGL simpleGLES_screen simpleVulkanMMAP
bindlessTexture simpleGLES simpleTexture3D volumeFiltering
marchingCubes simpleGLES_EGLOutput simpleVulkan volumeRender
[chibi@rhel8 2_Graphics]$ cd Mandelbrot
[chibi@rhel8 Mandelbrot]$ make
>>> WARNING – libGL.so not found, refer to CUDA Getting Started Guide
for how to find and install them. <<<
>>> WARNING – libGLU.so not found, refer to CUDA Getting Started Guide
for how to find and install them. <<<
>>> WARNING – gl.h not found, refer to CUDA Getting Started Guide for
how to find and install them. <<<
>>> WARNING – glu.h not found, refer to CUDA Getting Started Guide for
how to find and install them. <<<
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
--threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot.o -c Mandelbrot.cpp
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
--threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot_cuda.o -c Mandelbrot_cuda.cu
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
--threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot_gold.o -c Mandelbrot_gold.cpp
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -m64 -gencode
arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode
arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode
arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode
arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode
arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode
arch=compute_86,code=compute_86 -o Mandelbrot Mandelbrot.o
Mandelbrot_cuda.o Mandelbrot_gold.o -L/usr/lib64/nvidia -lGL -lGLU -lglut
[@] mkdir -p ../../bin/x86_64/linux/release
[@] cp Mandelbrot ../../bin/x86_64/linux/release
[chibi@rhel8 Mandelbrot]$ ./Mandelbrot
-bash: ./Mandelbrot: そのようなファイルやディレクトリはありません
[chibi@rhel8 Mandelbrot]$
対応策 その1 sudo dnf install freeglut
[chibi@rhel8 Mandelbrot]$ sudo dnf install freeglut
Updating Subscription Management repositories.
メタデータの期限切れの最終確認: 0:28:53 時間前の 2021年05月05日 05時34分
26秒 に 実施しました。
依存関係が解決しました。
================================================================================
パッケージ Arch バージョン リポジト
リー サイズ
================================================================================
インストール:
freeglut x86_64 3.0.0-8.el8 rhel-8-for-x86_64-appstream-rpms
191 k
トランザクションの概要
================================================================================
インストール 1 パッケージ
ダウンロードサイズの合計: 191 k
インストール済みのサイズ: 661 k
これでよろしいですか? [y/N]: y
パッケージのダウンロード:
freeglut-3.0.0-8.el8.x86_64.rpm 463 kB/s | 191 kB 00:00
——————————————————————————–
合計 462 kB/s | 191 kB 00:00
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
準備 : 1/1
インストール :
freeglut-3.0.0-8.el8.x86_64 1/1
scriptletの実行中:
freeglut-3.0.0-8.el8.x86_64 1/1
検証 :
freeglut-3.0.0-8.el8.x86_64 1/1
Installed products updated.
インストール済み:
freeglut-3.0.0-8.el8.x86_64
完了しました!
[chibi@rhel8 Mandelbrot]$ make
>>> WARNING – libGL.so not found, refer to CUDA Getting Started Guide
for how to find and install them. <<<
>>> WARNING – libGLU.so not found, refer to CUDA Getting Started Guide
for how to find and install them. <<<
>>> WARNING – gl.h not found, refer to CUDA Getting Started Guide for
how to find and install them. <<<
>>> WARNING – glu.h not found, refer to CUDA Getting Started Guide for
how to find and install them. <<<
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
--threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot.o -c Mandelbrot.cpp
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
--threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot_cuda.o -c Mandelbrot_cuda.cu
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
--threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot_gold.o -c Mandelbrot_gold.cpp
[@] /usr/local/cuda-11.3/bin/nvcc -ccbin g++ -m64 -gencode
arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode
arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode
arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode
arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode
arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode
arch=compute_86,code=compute_86 -o Mandelbrot Mandelbrot.o
Mandelbrot_cuda.o Mandelbrot_gold.o -L/usr/lib64/nvidia -lGL -lGLU -lglut
[@] mkdir -p ../../bin/x86_64/linux/release
[@] cp Mandelbrot ../../bin/x86_64/linux/release
[chibi@rhel8 Mandelbrot]$
これでもNG
対応策その2
sudo dnf install freeglut-devel これでmakeに成功しました。
[chibi@rhel8 Mandelbrot]$ sudo dnf search freeglut
[sudo] chibi のパスワード:
Updating Subscription Management repositories.
メタデータの期限切れの最終確認: 0:37:18 時間前の 2021年05月05日 05時34分
26秒 に 実施しました。
=========================== 名前 完全一致: freeglut
============================
freeglut.x86_64 : A freely licensed alternative to the GLUT library
freeglut.i686 : A freely licensed alternative to the GLUT library
========================== 名前 & 概要 一致: freeglut
==========================
freeglut-devel.x86_64 : Freeglut developmental libraries and header files
freeglut-devel.i686 : Freeglut developmental libraries and header files
[chibi@rhel8 Mandelbrot]$ sudo dnf install freeglut-devel
Updating Subscription Management repositories.
メタデータの期限切れの最終確認: 0:37:52 時間前の 2021年05月05日 05時34分
26秒 に 実施しました。
依存関係が解決しました。
================================================================================
パッケージ Arch バージョン リポジト
リー サイズ
================================================================================
インストール:
freeglut-devel x86_64 3.0.0-8.el8 rhel-8-for-x86_64-appstream-rpms
121 k
依存関係のインストール:
gl-manpages noarch 1.1-15.20161227.el8
rhel-8-for-x86_64-appstream-rpms 1.2 M
libdrm-devel x86_64 2.4.101-1.el8
rhel-8-for-x86_64-appstream-rpms 157 k
libglvnd-core-devel
x86_64 1:1.2.0-6.el8
rhel-8-for-x86_64-appstream-rpms 25 k
libglvnd-devel x86_64 1:1.2.0-6.el8
rhel-8-for-x86_64-appstream-rpms 184 k
mesa-libGL-devel x86_64 20.1.4-1.el8
rhel-8-for-x86_64-appstream-rpms 51 k
mesa-libGLU x86_64 9.0.0-15.el8 rhel-8-for-x86_64-appstream-rpms
185 k
mesa-libGLU-devel x86_64 9.0.0-15.el8
rhel-8-for-x86_64-appstream-rpms 15 k
トランザクションの概要
================================================================================
インストール 8 パッケージ
ダウンロードサイズの合計: 1.9 M
インストール済みのサイズ: 4.4 M
これでよろしいですか? [y/N]: y
パッケージのダウンロード:
(1/8): mesa-libGLU-devel-9.0.0-15.el8.x86_64.rp 49 kB/s | 15 kB 00:00
(2/8): gl-manpages-1.1-15.20161227.el8.noarch.r 2.8 MB/s | 1.2 MB 00:00
(3/8): libglvnd-devel-1.2.0-6.el8.x86_64.rpm 1.0 MB/s | 184 kB 00:00
(4/8): mesa-libGLU-9.0.0-15.el8.x86_64.rpm 525 kB/s | 185 kB 00:00
(5/8): freeglut-devel-3.0.0-8.el8.x86_64.rpm 182 kB/s | 121 kB 00:00
(6/8): libglvnd-core-devel-1.2.0-6.el8.x86_64.r 130 kB/s | 25 kB 00:00
(7/8): mesa-libGL-devel-20.1.4-1.el8.x86_64.rpm 225 kB/s | 51 kB 00:00
(8/8): libdrm-devel-2.4.101-1.el8.x86_64.rpm 372 kB/s | 157 kB 00:00
——————————————————————————–
合計 1.7 MB/s | 1.9 MB 00:01
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
準備 : 1/1
インストール :
libdrm-devel-2.4.101-1.el8.x86_64 1/8
インストール :
libglvnd-core-devel-1:1.2.0-6.el8.x86_64 2/8
インストール :
libglvnd-devel-1:1.2.0-6.el8.x86_64 3/8
インストール :
mesa-libGL-devel-20.1.4-1.el8.x86_64 4/8
インストール :
mesa-libGLU-9.0.0-15.el8.x86_64 5/8
インストール :
gl-manpages-1.1-15.20161227.el8.noarch 6/8
インストール :
mesa-libGLU-devel-9.0.0-15.el8.x86_64 7/8
インストール :
freeglut-devel-3.0.0-8.el8.x86_64 8/8
scriptletの実行中:
freeglut-devel-3.0.0-8.el8.x86_64 8/8
検証 :
gl-manpages-1.1-15.20161227.el8.noarch 1/8
検証 :
mesa-libGLU-devel-9.0.0-15.el8.x86_64 2/8
検証 :
freeglut-devel-3.0.0-8.el8.x86_64 3/8
検証 :
mesa-libGLU-9.0.0-15.el8.x86_64 4/8
検証 :
libglvnd-devel-1:1.2.0-6.el8.x86_64 5/8
検証 :
libglvnd-core-devel-1:1.2.0-6.el8.x86_64 6/8
検証 :
mesa-libGL-devel-20.1.4-1.el8.x86_64 7/8
検証 :
libdrm-devel-2.4.101-1.el8.x86_64 8/8
Installed products updated.
インストール済み:
freeglut-devel-3.0.0-8.el8.x86_64 gl-manpages-1.1-15.20161227.el8.noarch
libdrm-devel-2.4.101-1.el8.x86_64
libglvnd-core-devel-1:1.2.0-6.el8.x86_64
libglvnd-devel-1:1.2.0-6.el8.x86_64 mesa-libGL-devel-20.1.4-1.el8.x86_64
mesa-libGLU-9.0.0-15.el8.x86_64 mesa-libGLU-devel-9.0.0-15.el8.x86_64
完了しました!
[chibi@rhel8 Mandelbrot]$ make
/usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
–threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot.o -c Mandelbrot.cpp
nvcc warning : The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_35’,
‘sm_37’ and ‘sm_50’ architectures are deprecated, and may be removed in
a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
–threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot_cuda.o -c Mandelbrot_cuda.cu
nvcc warning : The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_35’,
‘sm_37’ and ‘sm_50’ architectures are deprecated, and may be removed in
a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/local/cuda-11.3/bin/nvcc -ccbin g++ -I../../common/inc -m64
–threads 0 -gencode arch=compute_35,code=sm_35 -gencode
arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode
arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode
arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode
arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode
arch=compute_86,code=sm_86 -gencode arch=compute_86,code=compute_86 -o
Mandelbrot_gold.o -c Mandelbrot_gold.cpp
nvcc warning : The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_35’,
‘sm_37’ and ‘sm_50’ architectures are deprecated, and may be removed in
a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
/usr/local/cuda-11.3/bin/nvcc -ccbin g++ -m64 -gencode
arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode
arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode
arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode
arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode
arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode
arch=compute_86,code=compute_86 -o Mandelbrot Mandelbrot.o
Mandelbrot_cuda.o Mandelbrot_gold.o -L/usr/lib64/nvidia -lGL -lGLU -lglut
nvcc warning : The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_35’,
‘sm_37’ and ‘sm_50’ architectures are deprecated, and may be removed in
a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
mkdir -p ../../bin/x86_64/linux/release
cp Mandelbrot ../../bin/x86_64/linux/release
Mandelbrot の表示に成功
[chibi@rhel8 Mandelbrot]$ ./Mandelbrot