Topology Plugin Programmer Guide
Overview
This document describes Slurm topology plugin and the API that
defines them.
It is intended as a resource to programmers wishing to write their own
Slurm topology plugin.
このドキュメントでは、Slurmトポロジプラグインとそれらを定義するAPIについて説明します。独自のSlurmトポロジプラグインを作成したいプログラマへのリソースとして意図されています。
Slurm topology plugins are Slurm plugins that implement
convey system topology information so that Slurm is able to
optimize resource allocations and minimize communication overhead.
The plugins must conform to the Slurm Plugin API with the following
specifications:
Slurmトポロジプラグインは、システムトポロジ情報を伝達するSlurmプラグインで、Slurmがリソース割り当てを最適化し、通信オーバーヘッドを最小限に抑えることができます。プラグインは、次の仕様のSlurm Plugin APIに準拠している必要があります。
const char plugin_type[]
The major type must be "topology."
The minor type specifies the type of topology mechanism.
We recommend, for example:
主なタイプは「トポロジー」でなければなりません。マイナータイプは、トポロジメカニズムのタイプを指定します。たとえば、次のことをお勧めします。
- 3d_torus — Optimize placement for a three dimensional torus.
3d_torus — 3次元トーラスの配置を最適化します。 - none — No topology information.
none —トポロジー情報はありません。 - tree — Optimize placement based upon a hierarchy of network
switches.
ツリー—ネットワークスイッチの階層に基づいて配置を最適化します。
const char plugin_name[]
Some descriptive name for the plugin.
There is no requirement with respect to its format.
プラグインの説明的な名前。その形式に関して要件はありません。
const uint32_t plugin_version
If specified, identifies the version of Slurm used to build this plugin and
any attempt to load the plugin from a different version of Slurm will result
in an error.
指定した場合、このプラグインのビルドに使用されたSlurmのバージョンを識別し、異なるバージョンのSlurmからプラグインをロードしようとすると、エラーが発生します。
If not specified, then the plugin may be loaded by Slurm commands and
daemons from any version, however this may result in difficult to diagnose
failures due to changes in the arguments to plugin functions or changes
in other Slurm functions used by the plugin.
指定されていない場合、プラグインはSlurmコマンドとデーモンによって任意のバージョンから読み込まれる可能性がありますが、プラグイン関数の引数の変更やプラグインで使用される他のSlurm関数の変更が原因で、障害の診断が困難になる可能性があります。
The actions performed by these plugins vary widely.
In the case of 3d_torus, the nodes in configuration file
are re-ordered so that nodes which are nearby in the one-dimensional
table are also nearby in logical three-dimensional space.
これらのプラグインによって実行されるアクションは大きく異なります。3d_torusの場合、構成ファイル内のノードは、1次元テーブルで近くにあるノードが論理3次元空間でも近くになるように並べ替えられます。
In the case of tree, a tabled is built to reflect network
topology and that table is later used by the select plugin
to optimize placement.
ツリーの場合、テーブルはネットワークトポロジを反映するように構築され、そのテーブルは後で配置を最適化するために選択プラグインによって使用されます。
Note carefully, however, the versioning discussion below.
ただし、以下のバージョン管理の説明に注意してください。
Data Objects
The implementation must maintain (though not necessarily directly export) an
enumerated errno to allow Slurm to discover
as practically as possible the reason for any failed API call.
実装は、列挙されたerrnoを維持する必要があります(必ずしも直接エクスポートする必要はありません)。これにより、SlurmがAPI呼び出しの失敗の理由を可能な限り実際に発見できるようになります。
Plugin-specific enumerated integer values may be used when appropriate.
プラグイン固有の列挙整数値は、適切な場合に使用できます。
These values must not be used as return values in integer-valued
functions in the API.
The proper error return value from integer-valued functions is SLURM_ERROR.
The implementation should endeavor to provide useful and pertinent
information by whatever means is practical.
これらの値は、APIの整数値関数の戻り値として使用しないでください。整数値関数からの適切なエラー戻り値はSLURM_ERRORです。実装は、実用的であるどんな手段によっても有用で適切な情報を提供するよう努めるべきです。
Successful API calls are not required to reset any errno to a known value.
However, the initial value of any errno, prior to any error condition
arising, should be SLURM_SUCCESS.
errnoを既知の値にリセットするために、成功したAPI呼び出しは必要ありません。ただし、エラー状態が発生する前のerrnoの初期値はSLURM_SUCCESSである必要があります。
API Functions
The following functions must appear.
Functions which are not implemented should be stubbed.
次の関数が表示されます。実装されていない関数はスタブする必要があります。
int init (void)
Description:
Called when the plugin is loaded, before any other functions are
called. Put global initialization here.
プラグインがロードされたとき、他の関数が呼び出される前に呼び出されます。ここにグローバル初期化を配置します。
Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.
void fini (void)
Description:
Called when the plugin is removed. Clear any allocated storage here.
プラグインが削除されたときに呼び出されます。ここで割り当て済みのストレージをすべてクリアします。
Returns: None.
Note: These init and fini functions are not the same as those
described in the dlopen (3) system library.
注:これらのinitおよびfini関数は、dlopen(3)システムライブラリで説明されているものと同じではありません。
The C run-time system co-opts those symbols for its own initialization.
The system _init() is called before the Slurm
init(), and the Slurm
fini() is called before the system's
_fini().
Cランタイムシステムは、これらのシンボルを独自の初期化用にco-optします。システムの_init()はSlurm init()の前に呼び出され、Slurm fini()はシステムの_fini()の前に呼び出されます。
int topo_build_config(void);
Description: Generate topology information.
説明:トポロジー情報を生成します。
Returns: SLURM_SUCCESS or
SLURM_ERROR on failure.
戻り値:失敗した場合はSLURM_SUCCESSまたはSLURM_ERROR。
bool topo_generate_node_ranking(void)
Description: Determine if this plugin will
reorder the node records based upon each job's node rank field.
説明:このプラグインが各ジョブのノードランクフィールドに基づいてノードレコードを並べ替えるかどうかを決定します。
Returns: true if node reording is supported,
false otherwise.
ノードのリオーディングがサポートされている場合はtrue、そうでない場合はfalse
int topo_get_node_addr(char* node_name, char** paddr, char** ppatt);
Description: Get Topology address of a given node.
説明:特定のノードのトポロジアドレスを取得します。
Arguments:
node_name (input) name of the targeted node
node_name(入力)対象ノードの名前
paddr (output) returns the topology address of the node and connected
switches. If there are multiple switches at some level in the hierarchy, they
will be represented using Slurm's hostlist expression (e.g. "s0" and "s1" are
reported as "s[0-1]"). Each level in the hierarchy is separated by a period.
The last element will always be the node's name (i.e. "s0.s10.nodename")
paddr(出力)は、ノードと接続されているスイッチのトポロジアドレスを返します。階層のあるレベルに複数のスイッチがある場合、それらはSlurmのホストリスト式を使用して表されます(たとえば、「s0」と「s1」は「s [0-1]」として報告されます)。階層の各レベルはピリオドで区切られています。最後の要素は常にノードの名前になります(つまり "s0.s10.nodename")
ppatt (output) returns the pattern of the topology address. Each level
in the hierarchy is separated by a period. The final element will always be
"node" (i.e. "switch.switch.node")
ppatt(出力)は、トポロジーアドレスのパターンを返します。階層の各レベルはピリオドで区切られています。最後の要素は常に「ノード」(つまり「switch.switch.node」)になります
Returns: SLURM_SUCCESS or
SLURM_ERROR on failure.
戻り値:失敗した場合はSLURM_SUCCESSまたはSLURM_ERROR。
Last modified 27 March 2015