サブロウ丸

Sabrou-mal サブロウ丸

主にプログラミングと数学

Master mind in Rust; part 3 型エイリアス

今回やること 型エイリアス コード 前の記事: Master mind in Rust; part 2 Cargoビルドツール - Sabrou-mal サブロウ丸 次の記事: TBA 今回やること 型エイリアスを使って、コードの可読性をあげる 型エイリアス Rustでは、型エイリアスを使って、型に別名…

Master mind in Rust; part 2 Cargoビルドツール

今回やること Cargo インストール プロジェクトの作成 まとめ コード 関連 前の記事: Master mind in Rust; part 1 - Sabrou-mal サブロウ丸 次の記事: master mind by rust; part 3 型エイリアス - Sabrou-mal サブロウ丸 今回やること Cargoビルドツールで…

Master mind in Rust; part 1

これからRustでmaster mindというボードゲームの実装をしていきます。以前C++で実装したもののRust版ですね。なるべく標準でシンプルな実装を目指します。C++版はこちら↓↓ master mind ( マスターマインド ) とは 実装 用語 全体の流れ 全体のコード policy …

Rust: 所有権

所有権と借用 ルール 例 借用 コピー OptionとResult型 Option型 Result型 Rustについての勉強ログ。 所有権と借用 RustはC/C++並みの高速化をもちながら、メモリ安全性を担保するように設計されたプログラミング言語です。C/C++ではユーザーがメモリ確保と…

master mind by C++ まとめ

レポジトリ 記事一覧

Summarize ibstat information of all servers in multi-node environment

ibstat command provides us detailed information about the InfiniBand adapter connected to the server. I'd like to share a script that outputs the ibstat information of all servers in a multi-node environment in CSV format. import subproces…

マルチノード環境においてibstat 情報をcsv形式にまとめる

ibstat はコンピュータに接続されている InfiniBand アダプタの詳しい情報を表示します。 マルチノード環境において全てのマシンのibstat情報をcsv形式で表示するスクリプトを共有します。 import subprocess import csv import sys username = "YOUR_USERNA…

gurobipy.GurobiError: Version number is 11.0, license is for version 10.0

I encountered the following error when attempting to run GUROBI via gurobipy interface. gurobipy.GurobiError: Version number is 11.0, license is for version 10.0 Resolved by: pip install gurobipy==10.0.3 In my environment, python installed…

gurobipy.GurobiError: Version number is 11.0, license is for version 10.0

gurobipy経由でGUROBIを実行しようとしたときのエラー。 gurobipy.GurobiError: Version number is 11.0, license is for version 10.0 pip install gurobipy==10.0.3 で解決。gurobipy v11.0がインストールされていたので、ライセンスに合わせてバージョン…

Read and Docs: How to fix "Config validation error in build.os. Value build not found."

Recently, I encountered a build error whiling using the Read the Docs service. The error message displayed was as follows. Error Config validation error in build.os. Value build not found. After some investigation, I discovered that the ro…

Read and Docs: Config validation error in build.os. Value build not found.

Read the Docsでの次のようなビルドエラー。 Error Config validation error in build.os. Value build not found. 次の変更で対処できました。 github.com

Benders DecompositionのGurobipy実装例

Benders Decomposition(ベンダー分解)は問題を二つのmain, sub問題に分割することで問題を解きやすくするテクニックです。次のような性質がある問題に有効です。Kohji Nishimuraさんの「双対変数を直感的に理解したい」から引用しています。 決定変数にyが一…

分散深層学習に現れる最適化

本記事は数理最適化 Advent Calendar 2023の18日目の記事です。分散深層学習に使われる最適化について紹介します。 分散深層学習は、複数の計算ユニット(GPU、CPUなど)を活用して深層学習モデルを訓練する手法のことで、特にLLMのような巨大モデルの訓練に…

データセンタトラフィックの推移

Networking, Cisco Visual."Forecast and methodology, 2010-2015." White paper. (2011). Networking, Cisco Visual. "Cisco global cloud index: Forecast and methodology, 2016–2021." White paper. Cisco Public, San Jose 1 (2016). を元に可視化。 ta…

GUROBIのログについて

Gurobiのログに出てくる項目について。 Nodes | Current Node | Objective Bounds | Work Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time Nodes: 解探索の過程で考慮されたノード数。これは分枝限定法で生成される。 Expl: 既に探索…

NetworkxでKautzグラフを構築する。

igraph経由で行うと楽です。 pythonパッケージ↓ import igraph as ig # m = the size of the alphabet minus one # n = the length of the strings minus one # total nodes = (m+1)m^n # degree = m G = ig.Graph.Kautz(3, 1) nx_G = G.to_networkx() # con…

サーベイ: Efficient MPI-AllReduce for large-scale deep learning on GPU-clusters (2021)

@article{thao2021efficient, title={Efficient MPI-AllReduce for large-scale deep learning on GPU-clusters}, author={Thao Nguyen, Truong and Wahib, Mohamed and Takano, Ryousei}, journal={Concurrency and Computation: Practice and Experience},…

floptで双対問題の作成とその求解

本稿ではfloptを用いて双対問題の作成のその求解を行います。 双対問題 実装 制約を不等式に変換 ラグランジュ関数の生成 双対問題の作成 線形計画法の双対問題 双対問題 min f(x) s.t. g_i(x) <= 0 (for all i) x is continuous vector このような問題の場…

floptで単体法(Simplex)実装

本稿では、floptモデリングツールで定義した線形計画問題に対し単体法を実行して解の取得を行います。Wikipediaにある問題を例に実装してみましょう。 主問題の定義 単体法(Simplex) 等式制約に変換 線形計画の形式に変換 基底変数と非基底変数の設定 Step1:…

サーベイ: On Optimizing the Communication of Model Parallelism

@article{zhuang2023optimizing, title={On optimizing the communication of model parallelism}, author={Zhuang, Yonghao and Zheng, Lianmin and Li, Zhuohan and Xing, Eric and Ho, Qirong and Gonzalez, Joseph and Stoica, Ion and Zhang, Hao and Z…

fzf フィルタコマンド

便利かもしれない(?)、フィルタコマンドのfzfの軽い紹介 install mac brew install fzf ubuntu apt-get install fzf 実行方法 標準出力をパイプさせる。 例えば下記の通り。あとは検索ワードを打ち込むと画面上で絞り込まれる。 ls | fzf 他には様々なレ…

flopt v0.5.6; Coordinate Descent

flopt v0.5.6で座標降下法(Coordinate Descent)の実行方法を示します。 2 x2 + y2 + xy の関数について、xとyの変数の片方のみを交互に移動させて局所最適解を目指します。 prob.solve(optimized_variables=[x[0]]) のようにoptimized_variablesに最適化対象…

集団通信の可視化方法について

故きを温ねて新しきを知る Fast Multi-GPU collectives with NCCL NCCL: Collective Operations Collective communication: theory, practice, and experience A Generalization of the Allreduce Operation TACCL: Guiding Collective Algorithm Synthesis …

サーベイ: Synthesizing Optimal Collective Algorithms (2021)

Cai, Zixian, et al. "Synthesizing optimal collective algorithms." Proceedings of the 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. 2021. どんなもの? 詳細 論文メタ情報 AI向けハードウェア DGX-1 Gigabyte Z52 …

SIGCOMM 2022 abstracts of posters

26 (Online): Deep or Statistical: An Empirical Study of Traffic Predictions on Multiple Time Scales 49 (On-site): Network-Accelerated Cluster Scheduler 63 (On-site): Mind the Cost of Telemetry Data Analysis 65 (Online): PipeDevice: A Hardw…

サーベイ: 次世代光インターコネクトでの MPI 通信に関する研究 (2007)

滝澤真一朗, 遠藤敏夫, and 松岡聡. "次世代光インターコネクトでの MPI 通信に関する研究." コンピュータ ソフトウェア 26.3 (2009): 3_5-3_19. 概要 背景 どんなもの? 技術や手法のキモはどこ? どうやって有効だと検証した? OCS経路選択アルゴリズム Switc…

サーベイ: How Optical Technologies Can Innovate Intra Data Center Networks

Sato, Ken-ichi. "How optical technologies can innovate intra data center networks." 2021 International Conference on Computer Communications and Networks (ICCCN). IEEE, 2021. paper: https://ieeexplore.ieee.org/document/9522206 光スイッチを…

サーベイ: Blink: Fast and Generic Collectives for Distributed ML (2020)

Wang, Guanhua, et al. "Blink: Fast and generic collectives for distributed ml." Proceedings of Machine Learning and Systems 2 (2020): 172-186. Microsoft + インターン? [paper] 概要 どんなもの? 与えられたトポロジに適した集団通信アルゴリズ…

flopt v0.5.6:

flopt v.0.5.6を公開しました。 ソルバ開発の目線だとJacobian, Hessian用のAPIが一番使う機会が多いですかね? ユーザー目線だとprob.solve(optimized_variables=variable_list)が最も使えそうな気がします。 Update 1. problem type estimator API 問題の…

SCIP version 8.0.3 コンパイル + おまけでpulpから実行

SCIP: https://www.scipopt.org/は言わずと知れたLP、MIPソルバ。 このプロジェクトにはfscip: https://ug.zib.de/も同封されています。これはSCIPのスレッド並列版ソルバです。 Environment Ubuntu 18.04.2 LTS Build unzip scipoptsuite-8.0.3.zip cd scip…