Skip to content

Commit

Permalink
Merge pull request #1803 from jrha/cleanup-metaconfig-slurm
Browse files Browse the repository at this point in the history
ncm-metaconfig: slurm: Fix wrapping and indentation in pan
  • Loading branch information
wpoely86 authored Dec 15, 2024
2 parents ec20d0d + 5dc913a commit 1641345
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 85 deletions.
36 changes: 22 additions & 14 deletions ncm-metaconfig/src/main/metaconfig/slurm/pan/schema_20.11.pan
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ https://slurm.schedmd.com

include 'pan/types';

type slurm_debuglevel = choice('quiet', 'fatal', 'error', 'info', 'verbose',
'debug', 'debug2', 'debug3', 'debug4', 'debug5');
type slurm_debuglevel = choice(
'quiet', 'fatal', 'error', 'info', 'verbose', 'debug', 'debug2', 'debug3', 'debug4', 'debug5'
);

type slurm_gres = {
'name' : string
Expand Down Expand Up @@ -176,8 +177,9 @@ type slurm_conf_health_check = {
};


type slurm_control_resourcelimits = choice( 'ALL', 'NONE', 'AS', 'CORE', 'CPU', 'DATA', 'FSIZE',
'MEMLOCK', 'NOFILE', 'NPROC', 'RSS', 'STACK');
type slurm_control_resourcelimits = choice(
'ALL', 'NONE', 'AS', 'CORE', 'CPU', 'DATA', 'FSIZE', 'MEMLOCK', 'NOFILE', 'NPROC', 'RSS', 'STACK'
);

type slurm_mpi_params = {
@{port or port range}
Expand Down Expand Up @@ -225,12 +227,14 @@ type slurm_conf_control = {
'CpuFreqDef' ? choice( 'Conservative', 'OnDemand', 'Performance', 'PowerSave')
'CpuFreqGovernors' ? choice('Conservative', 'OnDemand', 'Performance', 'PowerSave', 'UserSpace')
'CryptoType' ? choice("munge", "openssl")
'DebugFlags' ? choice( 'Backfill', 'BackfillMap', 'BGBlockAlgo', 'BGBlockAlgoDeep', 'BGBlockPick',
'DebugFlags' ? choice(
'Backfill', 'BackfillMap', 'BGBlockAlgo', 'BGBlockAlgoDeep', 'BGBlockPick',
'BGBlockWires', 'BurstBuffer', 'CPU_Bind', 'CpuFrequency', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS',
'DB_QUERY', 'DB_RESERVATION', 'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'Elasticsearch', 'Energy',
'ExtSensors', 'Federation', 'FrontEnd', 'Gres', 'HeteroJobs', 'Gang', 'JobContainer', 'License',
'NodeFeatures', 'NO_CONF_HASH', 'Power', 'Priority', 'Profile', 'Protocol', 'Reservation', 'SelectType',
'Steps', 'Switch', 'TimeCray', 'TraceJobs', 'Triggers')[]
'Steps', 'Switch', 'TimeCray', 'TraceJobs', 'Triggers'
)[]

'DefaultStorageHost' ? string
'DefaultStorageLoc' ? string
Expand Down Expand Up @@ -293,8 +297,9 @@ type slurm_conf_control = {
'MemLimitEnforce' ? boolean # yes/no
'MinJobAge' ? long(0..)
'MsgAggregationParams' ? slurm_msg_aggregation
'PrivateData' ? choice('accounts', 'cloud', 'events', 'jobs', 'nodes', 'partitions',
'reservations', 'usage', 'users')[]
'PrivateData' ? choice(
'accounts', 'cloud', 'events', 'jobs', 'nodes', 'partitions', 'reservations', 'usage', 'users'
)[]
'RoutePlugin' ? choice("default", "topology") # prefix=route/
'SallocDefaultCommand' ? string
'SbcastParameters' ? slurm_sbcast_parameters
Expand Down Expand Up @@ -404,8 +409,10 @@ type slurm_conf_job_priority = {
@{in minutes}
'PriorityCalcPeriod' ? long(0..)
'PriorityFavorSmall' ? boolean
'PriorityFlags' ? choice( 'ACCRUE_ALWAYS', 'CALCULATE_RUNNING', 'DEPTH_OBLIVIOUS', 'FAIR_TREE',
'INCR_ONLY', 'MAX_TRES', 'SMALL_RELATIVE_TO_TIME' )[]
'PriorityFlags' ? choice(
'ACCRUE_ALWAYS', 'CALCULATE_RUNNING', 'DEPTH_OBLIVIOUS', 'FAIR_TREE',
'INCR_ONLY', 'MAX_TRES', 'SMALL_RELATIVE_TO_TIME'
)[]
'PriorityParameters' ? dict
@{in minutes}
'PriorityMaxAge' ? long(0..)
Expand All @@ -427,8 +434,7 @@ type slurm_job_gather_params = {

type slurm_conf_accounting = {
'AccountingStorageBackupHost' ? string
'AccountingStorageEnforce' ? choice('associations', 'limits', 'nojobs', 'nosteps',
'qos', 'safe', 'wckeys', 'all')[]
'AccountingStorageEnforce' ? choice('associations', 'limits', 'nojobs', 'nosteps', 'qos', 'safe', 'wckeys', 'all')[]
'AccountingStorageHost' ? string
'AccountingStorageLoc' ? string
'AccountingStoragePass' ? string
Expand Down Expand Up @@ -692,8 +698,10 @@ type slurm_dbd_conf = {
'DbdHost' ? string
# TODO: must be equal to the AccountingStoragePort parameter in the slurm.conf
'DbdPort' ? long(0..)
'DebugFlags' ? choice('DB_ARCHIVE', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS', 'DB_QUERY', 'DB_RESERVATION',
'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'FEDERATION')[]
'DebugFlags' ? choice(
'DB_ARCHIVE', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS', 'DB_QUERY', 'DB_RESERVATION',
'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'FEDERATION'
)[]
'DebugLevel' ? slurm_debuglevel
'DebugLevelSyslog' ? slurm_debuglevel
'DefaultQOS' ? string
Expand Down
38 changes: 23 additions & 15 deletions ncm-metaconfig/src/main/metaconfig/slurm/pan/schema_21.08.pan
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ https://slurm.schedmd.com

include 'pan/types';

type slurm_debuglevel = choice('quiet', 'fatal', 'error', 'info', 'verbose',
'debug', 'debug2', 'debug3', 'debug4', 'debug5');
type slurm_debuglevel = choice(
'quiet', 'fatal', 'error', 'info', 'verbose', 'debug', 'debug2', 'debug3', 'debug4', 'debug5'
);

type slurm_gres = {
'name' : string
Expand Down Expand Up @@ -176,8 +177,9 @@ type slurm_conf_health_check = {
};


type slurm_control_resourcelimits = choice( 'ALL', 'NONE', 'AS', 'CORE', 'CPU', 'DATA', 'FSIZE',
'MEMLOCK', 'NOFILE', 'NPROC', 'RSS', 'STACK');
type slurm_control_resourcelimits = choice(
'ALL', 'NONE', 'AS', 'CORE', 'CPU', 'DATA', 'FSIZE', 'MEMLOCK', 'NOFILE', 'NPROC', 'RSS', 'STACK'
);

type slurm_mpi_params = {
@{port or port range}
Expand Down Expand Up @@ -240,12 +242,14 @@ type slurm_conf_control = {
'CpuFreqDef' ? choice( 'Conservative', 'OnDemand', 'Performance', 'PowerSave', 'SchedUtil')
'CpuFreqGovernors' ? choice('Conservative', 'OnDemand', 'Performance', 'PowerSave', 'UserSpace')
'CryptoType' ? choice("munge", "openssl")
'DebugFlags' ? choice( 'Backfill', 'BackfillMap', 'BGBlockAlgo', 'BGBlockAlgoDeep', 'BGBlockPick',
'DebugFlags' ? choice(
'Backfill', 'BackfillMap', 'BGBlockAlgo', 'BGBlockAlgoDeep', 'BGBlockPick',
'BGBlockWires', 'BurstBuffer', 'Cgroup', 'CPU_Bind', 'CpuFrequency', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS',
'DB_QUERY', 'DB_RESERVATION', 'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'Elasticsearch', 'Energy',
'ExtSensors', 'Federation', 'FrontEnd', 'Gres', 'HeteroJobs', 'Gang', 'JobAccountGather', 'JobContainer',
'License', 'NodeFeatures', 'NO_CONF_HASH', 'Power', 'Priority', 'Profile', 'Protocol', 'Reservation',
'Script', 'SelectType', 'Steps', 'Switch', 'TimeCray', 'TraceJobs', 'Triggers')[]
'Script', 'SelectType', 'Steps', 'Switch', 'TimeCray', 'TraceJobs', 'Triggers'
)[]

'DefaultStorageHost' ? string
'DefaultStorageLoc' ? string
Expand Down Expand Up @@ -306,8 +310,9 @@ type slurm_conf_control = {
'MailDomain' ? string
'MinJobAge' ? long(0..)
'MsgAggregationParams' ? slurm_msg_aggregation
'PrivateData' ? choice('accounts', 'cloud', 'events', 'jobs', 'nodes', 'partitions',
'reservations', 'usage', 'users')[]
'PrivateData' ? choice(
'accounts', 'cloud', 'events', 'jobs', 'nodes', 'partitions', 'reservations', 'usage', 'users'
)[]
'RoutePlugin' ? choice("default", "topology") # prefix=route/
'SallocDefaultCommand' ? string
'SbcastParameters' ? slurm_sbcast_parameters
Expand Down Expand Up @@ -427,12 +432,14 @@ type slurm_conf_job_priority = {
@{in minutes}
'PriorityCalcPeriod' ? long(0..)
'PriorityFavorSmall' ? boolean
'PriorityFlags' ? choice( 'ACCRUE_ALWAYS', 'CALCULATE_RUNNING', 'DEPTH_OBLIVIOUS', 'FAIR_TREE',
'INCR_ONLY', 'MAX_TRES', 'SMALL_RELATIVE_TO_TIME' )[]
'PriorityFlags' ? choice(
'ACCRUE_ALWAYS', 'CALCULATE_RUNNING', 'DEPTH_OBLIVIOUS', 'FAIR_TREE', 'INCR_ONLY', 'MAX_TRES',
'SMALL_RELATIVE_TO_TIME'
)[]
'PriorityParameters' ? dict
@{in minutes}
'PriorityMaxAge' ? long(0..)
'PriorityUsageResetPeriod' ? choice( 'NONE', 'NOW', 'DAILY', 'WEEKLY', 'MONTHLY', 'QUARTERLY', 'YEARLY')
'PriorityUsageResetPeriod' ? choice('NONE', 'NOW', 'DAILY', 'WEEKLY', 'MONTHLY', 'QUARTERLY', 'YEARLY')
'PriorityType' ? choice("basic", "multifactor")
'PriorityWeightAge' ? long(0..)
'PriorityWeightFairshare' ? long(0..)
Expand All @@ -450,8 +457,7 @@ type slurm_job_gather_params = {

type slurm_conf_accounting = {
'AccountingStorageBackupHost' ? string
'AccountingStorageEnforce' ? choice('associations', 'limits', 'nojobs', 'nosteps',
'qos', 'safe', 'wckeys', 'all')[]
'AccountingStorageEnforce' ? choice('associations', 'limits', 'nojobs', 'nosteps', 'qos', 'safe', 'wckeys', 'all')[]
'AccountingStorageHost' ? string
'AccountingStorageLoc' ? string
'AccountingStoragePass' ? string
Expand Down Expand Up @@ -715,8 +721,10 @@ type slurm_dbd_conf = {
'DbdHost' ? string
# TODO: must be equal to the AccountingStoragePort parameter in the slurm.conf
'DbdPort' ? long(0..)
'DebugFlags' ? choice('DB_ARCHIVE', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS', 'DB_QUERY', 'DB_RESERVATION',
'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'FEDERATION')[]
'DebugFlags' ? choice(
'DB_ARCHIVE', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS', 'DB_QUERY', 'DB_RESERVATION',
'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'FEDERATION'
)[]
'DebugLevel' ? slurm_debuglevel
'DebugLevelSyslog' ? slurm_debuglevel
'DefaultQOS' ? string
Expand Down
57 changes: 35 additions & 22 deletions ncm-metaconfig/src/main/metaconfig/slurm/pan/schema_23.02.pan
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ https://slurm.schedmd.com

include 'pan/types';

type slurm_debuglevel = choice('quiet', 'fatal', 'error', 'info', 'verbose',
'debug', 'debug2', 'debug3', 'debug4', 'debug5');
type slurm_debuglevel = choice(
'quiet', 'fatal', 'error', 'info', 'verbose',
'debug', 'debug2', 'debug3', 'debug4', 'debug5'
);

type slurm_debugflags = choice( 'Backfill', 'BackfillMap', 'BGBlockAlgo', 'BGBlockAlgoDeep', 'BGBlockPick',
'BGBlockWires', 'BurstBuffer', 'Cgroup', 'CPU_Bind', 'CpuFrequency', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS',
'DB_QUERY', 'DB_RESERVATION', 'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'Elasticsearch', 'Energy',
'ExtSensors', 'Federation', 'FrontEnd', 'Gres', 'HeteroJobs', 'Gang', 'JobAccountGather', 'JobContainer',
'License', 'NodeFeatures', 'NO_CONF_HASH', 'Power', 'Priority', 'Profile', 'Protocol', 'Reservation',
'Script', 'SelectType', 'Steps', 'Switch', 'TimeCray', 'TraceJobs', 'Triggers')[];
type slurm_debugflags = choice(
'Backfill', 'BackfillMap', 'BGBlockAlgo', 'BGBlockAlgoDeep', 'BGBlockPick',
'BGBlockWires', 'BurstBuffer', 'Cgroup', 'CPU_Bind', 'CpuFrequency', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS',
'DB_QUERY', 'DB_RESERVATION', 'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'Elasticsearch', 'Energy',
'ExtSensors', 'Federation', 'FrontEnd', 'Gres', 'HeteroJobs', 'Gang', 'JobAccountGather', 'JobContainer',
'License', 'NodeFeatures', 'NO_CONF_HASH', 'Power', 'Priority', 'Profile', 'Protocol', 'Reservation',
'Script', 'SelectType', 'Steps', 'Switch', 'TimeCray', 'TraceJobs', 'Triggers'
)[];


type slurm_gres = {
Expand Down Expand Up @@ -192,8 +196,10 @@ type slurm_conf_health_check = {
};


type slurm_control_resourcelimits = choice( 'ALL', 'NONE', 'AS', 'CORE', 'CPU', 'DATA', 'FSIZE',
'MEMLOCK', 'NOFILE', 'NPROC', 'RSS', 'STACK');
type slurm_control_resourcelimits = choice(
'ALL', 'NONE', 'AS', 'CORE', 'CPU', 'DATA', 'FSIZE',
'MEMLOCK', 'NOFILE', 'NPROC', 'RSS', 'STACK'
);

type slurm_mpi_params = {
@{port or port range}
Expand Down Expand Up @@ -292,8 +298,9 @@ type slurm_conf_control = {
'JobCredentialPublicCertificate' ? absolute_file_path
'JobFileAppend' ? boolean # 0/1
'JobRequeue' ? boolean # 0/1
'JobSubmitPlugins' ? choice('lua', 'pbs', 'all_partitions', 'require_timelimit', 'throttle',
'defaults', 'logging', 'partition')[]
'JobSubmitPlugins' ? choice(
'lua', 'pbs', 'all_partitions', 'require_timelimit', 'throttle', 'defaults', 'logging', 'partition'
)[]
'KillOnBadExit' ? boolean # 0/1
'LaunchType' ? choice( 'aprun', 'poe', 'runjob', 'slurm')
'LaunchParameters' ? slurm_launch_params
Expand Down Expand Up @@ -332,8 +339,9 @@ type slurm_conf_control = {
'MailDomain' ? string
'MinJobAge' ? long(0..)
'MsgAggregationParams' ? slurm_msg_aggregation
'PrivateData' ? choice('accounts', 'cloud', 'events', 'jobs', 'nodes', 'partitions',
'reservations', 'usage', 'users')[]
'PrivateData' ? choice(
'accounts', 'cloud', 'events', 'jobs', 'nodes', 'partitions', 'reservations', 'usage', 'users'
)[]
'RoutePlugin' ? choice("default", "topology") # prefix=route/
'SallocDefaultCommand' ? string
'SbcastParameters' ? slurm_sbcast_parameters
Expand Down Expand Up @@ -461,8 +469,10 @@ type slurm_conf_job_priority = {
@{in minutes}
'PriorityCalcPeriod' ? long(0..)
'PriorityFavorSmall' ? boolean
'PriorityFlags' ? choice( 'ACCRUE_ALWAYS', 'CALCULATE_RUNNING', 'DEPTH_OBLIVIOUS', 'FAIR_TREE',
'INCR_ONLY', 'MAX_TRES', 'SMALL_RELATIVE_TO_TIME' )[]
'PriorityFlags' ? choice(
'ACCRUE_ALWAYS', 'CALCULATE_RUNNING', 'DEPTH_OBLIVIOUS', 'FAIR_TREE',
'INCR_ONLY', 'MAX_TRES', 'SMALL_RELATIVE_TO_TIME'
)[]
'PriorityParameters' ? dict
@{in minutes}
'PriorityMaxAge' ? long(0..)
Expand All @@ -484,8 +494,7 @@ type slurm_job_gather_params = {

type slurm_conf_accounting = {
'AccountingStorageBackupHost' ? string
'AccountingStorageEnforce' ? choice('associations', 'limits', 'nojobs', 'nosteps',
'qos', 'safe', 'wckeys', 'all')[]
'AccountingStorageEnforce' ? choice('associations', 'limits', 'nojobs', 'nosteps', 'qos', 'safe', 'wckeys', 'all')[]
'AccountingStorageHost' ? string
'AccountingStorageLoc' ? string
'AccountingStoragePass' ? string
Expand Down Expand Up @@ -758,8 +767,10 @@ type slurm_dbd_conf = {
'DbdHost' ? string
# TODO: must be equal to the AccountingStoragePort parameter in the slurm.conf
'DbdPort' ? long(0..)
'DebugFlags' ? choice('DB_ARCHIVE', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS', 'DB_QUERY', 'DB_RESERVATION',
'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'FEDERATION')[]
'DebugFlags' ? choice(
'DB_ARCHIVE', 'DB_ASSOC', 'DB_EVENT', 'DB_JOB', 'DB_QOS', 'DB_QUERY', 'DB_RESERVATION',
'DB_RESOURCE', 'DB_STEP', 'DB_USAGE', 'DB_WCKEY', 'FEDERATION'
)[]
'DebugLevel' ? slurm_debuglevel
'DebugLevelSyslog' ? slurm_debuglevel
'DefaultQOS' ? string
Expand Down Expand Up @@ -828,8 +839,10 @@ type slurm_gres_per_node_conf = {
'Cores' ? long[]
'Count' ? long(0..)
'File' ? absolute_file_path
'Flags' ? choice('CountOnly', 'explicit', 'one_sharing', 'all_sharing', 'nvidia_gpu_env',
'amd_gpu_env', 'intel_gpu_env', 'opencl_env', 'no_gpu_env')[]
'Flags' ? choice(
'CountOnly', 'explicit', 'one_sharing', 'all_sharing', 'nvidia_gpu_env',
'amd_gpu_env', 'intel_gpu_env', 'opencl_env', 'no_gpu_env'
)[]
'Links' ? long(0..)[]
'Name' ? choice('gpu', 'mps', 'nic', 'shard')
'Type' ? string
Expand Down
Loading

0 comments on commit 1641345

Please sign in to comment.