Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

The performance of the OpenBlas library decreases when running in multi-threaded environments

オープン
#5,469 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp, linux
領域
performance

調査の方向性

まず、提供された C++ の例を Ubuntu 24.04 上で OpenBLAS 0.3.26 とともに再現します。複素行列の式と、報告されているスレッド設定も含めてください。シングルスレッドとマルチスレッドでの実行時間およびシステムコール時間を比較します。劣化の原因を特定するか、それを回避するために必要な条件と構成を文書化できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

hello,
C++programs run on Ubuntu 24.04 using the OpenBlas library. The function execution time is less than 1ms on a single thread, but it increases several times on multiple threads, and the system call time also increases.
The openblas library is installed using the apt tool, and the default settings are as follows:
OpenBLAS 0.3.26 NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64

The single thread time is less than 1ms, and opening 8 threads can achieve a maximum of 10ms and a minimum of about 1ms.
The thread function contains a loop traversal operation. Delete the following line of code, and the multi-threaded performance is similar to that of a single thread.
arma::cx_mat pmusic = ss * nnn_md * ss.ht();
Among them, nnn_md is a complex matrix of 15 * 15,ss is a complex matrix 1*15
then,how to solve the problem of multi-threaded performance degradation?
int main()
{
openblas_set_num_threads(1);
int current_threads = openblas_get_num_threads();
printf("current thread num is %d\n", current_threads);
for (int i = 0; i < 1;++i)
{
std::thread t1(processfunction);
t1.detach();
}
while (1)
{
}
}

主要言語
C
スター
7.6k
フォーク
1.7k
平均マージ
1日 6時間
マージ済み PR(30日)
46

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenMathLib/OpenBLAS のほかの issue

OpenMathLib/OpenBLAS の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。