Core Specialization Plugin Programmer Guide

Overview

This document describes the Slurm core specialization plugins and the APIs that defines them. It is intended as a resource to programmers wishing to write their own Slurm core specialization plugin. This is version 100 of the API.
このドキュメントでは、Slurmコア特殊化プラグインとそれらを定義するAPIについて説明します。独自のSlurmコア特殊化プラグインを作成したいプログラマーへのリソースとして意図されています。これはAPIのバージョン100です。

Slurm core specialization plugins must conform to the Slurm Plugin API with the following specifications:
Slurmコア特殊化プラグインは、次の仕様のSlurmプラグインAPIに準拠する必要があります。

const char plugin_name[]="full text name"

A free-formatted ASCII text string that identifies the plugin.
プラグインを識別する自由形式のASCIIテキスト文字列。

const char plugin_type[]="major/minor"

The major type must be "core_spec". The minor type can be any suitable name for the type of core specialization package. The following core specialization plugins are included in the Slurm distribution
メジャータイプは「core_spec」である必要があります。マイナータイプは、コア専門化パッケージのタイプに適した任意の名前にすることができます。Slurmディストリビューションには、次のコア専門化プラグインが含まれています

  • cray_aries — Use Cray XC APIs to enforce core specialization.
    cray_aries — Cray XC APIを使用してコア専門化を適用します。
  • none — Can be configured to log calls to its functions, but otherwise does nothing.
    none —関数への呼び出しを記録するように構成できますが、それ以外の場合は何もしません。

Slurm can be configured to use multiple core specialization plugins if desired.
Slurmは、必要に応じて複数のコア特殊化プラグインを使用するように構成できます。

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. 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からプラグインをロードしようとすると、エラーが発生します。指定されていない場合、プラグインはSlurmコマンドとデーモンによって任意のバージョンから読み込まれる可能性がありますが、プラグイン関数の引数の変更やプラグインで使用される他のSlurm関数の変更が原因で障害を診断することが困難になる場合があります。

NOTE: These functions all accept as an argument the job step's container ID (as set by the proctrack plugin). Each job step will have a different container ID. Since a job may execute multiple job steps sequentially and/or in parallel; these functions will be called once for each job step on each compute node.
注:これらの関数はすべて、(proctrackプラグインによって設定された)ジョブステップのコンテナーIDを引数として受け入れます。各ジョブステップには異なるコンテナーIDがあります。ジョブは複数のジョブステップを順次および/または並行して実行できるため、これらの関数は、各計算ノードのジョブステップごとに1回呼び出されます。

API Functions

All of the following functions are required. Functions which are not implemented must 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. 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().
注:これらのinitおよびfini関数は、dlopen(3)システムライブラリで説明されているものと同じではありません。Cランタイムシステムは、これらのシンボルを独自の初期化用にco-optします。システムの_init()はSlurm init()の前に呼び出され、Slurm fini()はシステムの_fini()の前に呼び出されます。

int core_spec_p_set(uint64_t cont_id, uint16_t core_count)

Description:
This function is called by the slurmstepd daemon after the job step's tasks have been forked and exec'ed, and immediately before they are released from a held state. Note that each job step will have a different container ID. Note that since a job may execute multiple job steps sequentially and/or in parallel; this function will be called once for each job step on each compute node.
この関数は、ジョブステップのタスクがforkされてexecされた後、および保留状態から解放される直前に、slurmstepdデーモンによって呼び出されます。各ジョブステップには異なるコンテナーIDがあることに注意してください。ジョブは複数のジョブステップを順次および/または並行して実行する可能性があるため、注意してください。この関数は、各計算ノードのジョブステップごとに1回呼び出されます。

Arguments:
cont_id (input) the job step's container ID as set by the proctrack plugin.
cont_id(入力)proctrackプラグインによって設定されたジョブステップのコンテナID。

core_count (input) number of specialized cores to be reserved for the job.
core_count(入力)ジョブ用に予約される専用コアの数。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

int core_spec_p_clear(uint64_t cont_id)

Description:
This function is called by the slurmstepd daemon after the job step's tasks have all exited. Note that each job step will have a different container ID. Note that since a job may execute multiple job steps sequentially and/or in parallel; this function will be called once for each job step on each compute node.
この関数は、ジョブステップのタスクがすべて終了した後に、slurmstepdデーモンによって呼び出されます。各ジョブステップには異なるコンテナーIDがあることに注意してください。ジョブは複数のジョブステップを順次および/または並行して実行する可能性があるため、注意してください。この関数は、各計算ノードのジョブステップごとに1回呼び出されます。

Arguments:
cont_id (input) the job step's container ID as set by the proctrack plugin.
cont_id(入力)proctrackプラグインによって設定されたジョブステップのコンテナID。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

int core_spec_p_suspend(uint64_t cont_id, uint16_t core_count)

Description:
This function is called by the slurmstepd daemon immediately after the job step's tasks have all been sent a SIGSTOP signal. Note that each job step will have a different container ID. Note that since a job may execute multiple job steps sequentially and/or in parallel; this function will be called once for each job step on each compute node.
この関数は、ジョブステップのタスクすべてにSIGSTOPシグナルが送信された直後に、slurmstepdデーモンによって呼び出されます。各ジョブステップには異なるコンテナーIDがあることに注意してください。ジョブは複数のジョブステップを順次および/または並行して実行する可能性があるため、注意してください。この関数は、各計算ノードのジョブステップごとに1回呼び出されます。

Arguments:
cont_id (input) the job step's container ID as set by the proctrack plugin.
cont_id(入力)proctrackプラグインによって設定されたジョブステップのコンテナID。

core_count (input) number of specialized cores to be reserved for the job.
core_count(入力)ジョブ用に予約される専用コアの数。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

int core_spec_p_resume(uint64_t cont_id, uint16_t core_count)

Description:
This function is called by the slurmstepd daemon immediately before the job step's tasks will all be sent a SIGCONT signal. Note that each job step will have a different container ID. Note that since a job may execute multiple job steps sequentially and/or in parallel; this function will be called once for each job step on each compute node.
この関数は、ジョブステップのタスクすべてにSIGCONTシグナルが送信される直前に、slurmstepdデーモンによって呼び出されます。各ジョブステップには異なるコンテナーIDがあることに注意してください。ジョブは複数のジョブステップを順次および/または並行して実行する可能性があるため、注意してください。この関数は、各計算ノードのジョブステップごとに1回呼び出されます。

Arguments:
cont_id (input) the job step's container ID as set by the proctrack plugin.
cont_id(入力)proctrackプラグインによって設定されたジョブステップのコンテナID。

core_count (input) number of specialized cores to be reserved for the job.
core_count(入力)ジョブ用に予約される専用コアの数。

Returns:
SLURM_SUCCESS on success, or
SLURM_ERROR on failure.

Last modified 27 March 2015