0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows10にWSLを入れてUbuntu上でベンチマークを走らせる

Last updated at Posted at 2019-07-06

YAMADABenchmarkSuiteをWindows10から動かす方法。

まず、Windows10に備わったWSLを使えるようにしてUbuntuパッケージを導入する下準備をする。
Windows 10でLinuxを使うを参考に
管理者権限で起動したコンソールからPowerShellを使って
PS C:\Windows\System32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
そして、再起動。
Microsoft StoreからUbuntuをインストールする。
ほとんど何も入ってないので、開発環境は自分でインストールする必要がある。
UbuntuはDebian系のパッケージ管理を採用しているのでaptitudeを入れておく。
sudo を使って管理者権限を得て、コンソールからアプリをインストール。

# apt-get install aptitude

# aptitude
操作は、u で最新のデータに更新、 Uでアップグレード準備、Gを2回叩いてアップグレード実行。終わったらENTERキーを叩いてメニューに戻り、
qで終了指示、本当にやっていいかYes・Noを聞かれるのでカーソルキーでYesを選んでENTERを叩くと終了。

カレントディレクトリに作業用の src のディレクトリを掘り、
$ cd
$ mkdir src
$ cd src
gitのファイルを格納するディレクトリも堀り、
$ mkdir git
$ cd git
gitをセットアップ。
$ git init
そして、githubからYAMADABenchmarkSuiteをダウンロードしてクローンを作る。
$ git clone https://github.com/telmin/YAMADABenchmarkSuite.git
使用言語はC++なのでg++のコンパイラとmakeが必要。
# apt-get install g++ make
加えて、HPC向けの演算ライブラリがそれぞれのベンチマークに必要。
fftは fftw3-dev ライブラリが
gemmには libblas-dev libopenblas-dev ライブラリが必要。
# apt-get install fftw3-dev libblas-dev libopenblas-dev
準備ができたら、それぞれのディレクトリに降りて make するとベンチマーク用の実行形式が生成される。
$ cd YAMADABenchmarkSuite
$ cd fft
$ make
$ ls
Makefile fftw fftw.cpp
$ ./fftw

$ cd ..
$ cd gemm
$ make
$ ls
Makefile dgemm.hpp flops_calc.hpp main.cpp sgemm.cpp sgemm.o dgemm.cpp dgemm.o gemms main.o sgemm.hpp timer.hpp
$ ./gemms

$ cd ..
$ cd stream
$ make
$ ls
HISTORY.txt LICENSE.txt Makefile READ.ME parsearg.hpp stream.cpp stream_cxx.out

$ for i in 1 2 4 8 16 32 64; do echo $i ; ./stream_cxx.out --numtimes 50 --arraysize \$i\M ; done

$ cd ..

追記:2024/07/31
Debian 12.6(for Raspberry Pi 64bit)においては fftw3-dev は libfftw3-dev といったパッケージ名に変更された模様。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?