Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slurm6. Automagicaly set nodeset.name from module id. #2068

Merged
merged 3 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions community/examples/hpc-slurm6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,23 @@ deployment_groups:
settings:
local_mount: /home

- id: debug_nodeset
- id: dbugns
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [network]
settings:
name: ns1
node_count_dynamic_max: 4
machine_type: n2-standard-2
enable_placement: false # the default is: true

- id: debug_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [debug_nodeset, homefs]
use: [dbugns, homefs]
settings:
partition_name: debug
exclusive: false # allows nodes to stay up after jobs are done
is_default: true

- id: compute_nodeset
- id: compns
source: community/modules/compute/schedmd-slurm-gcp-v6-nodeset
use: [network]
settings:
Expand All @@ -64,7 +63,7 @@ deployment_groups:

- id: compute_partition
source: community/modules/compute/schedmd-slurm-gcp-v6-partition
use: [compute_nodeset, homefs]
use: [compns, homefs]
settings:
partition_name: compute

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ No modules.
| <a name="input_machine_type"></a> [machine\_type](#input\_machine\_type) | Compute Platform machine type to use for this partition compute nodes. | `string` | `"c2-standard-60"` | no |
| <a name="input_metadata"></a> [metadata](#input\_metadata) | Metadata, provided as a map. | `map(string)` | `{}` | no |
| <a name="input_min_cpu_platform"></a> [min\_cpu\_platform](#input\_min\_cpu\_platform) | The name of the minimum CPU platform that you want the instance to use. | `string` | `null` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the nodeset. | `string` | `"ghpc"` | no |
| <a name="input_name"></a> [name](#input\_name) | Name of the nodeset. | `string` | n/a | yes |
mr0re1 marked this conversation as resolved.
Show resolved Hide resolved
| <a name="input_node_conf"></a> [node\_conf](#input\_node\_conf) | Map of Slurm node line configuration. | `map(any)` | `{}` | no |
| <a name="input_node_count_dynamic_max"></a> [node\_count\_dynamic\_max](#input\_node\_count\_dynamic\_max) | Maximum number of dynamic nodes allowed in this partition. | `number` | `1` | no |
| <a name="input_node_count_static"></a> [node\_count\_static](#input\_node\_count\_static) | Number of nodes to be statically created. | `number` | `0` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@
spec:
requirements:
services: []
ghpc:
inject_module_id: name
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
variable "name" {
description = "Name of the nodeset."
type = string
default = "ghpc"

validation {
condition = can(regex("^[a-z](?:[a-z0-9]{0,5})$", var.name))
error_message = "Nodeset name (var.name) must begin with a letter, be fully alphanumeric and be 6 characters or less. Regexp: '^[a-z](?:[a-z0-9]{0,5})$'."
error_message = <<EOT
Nodeset name (var.name) must begin with a letter, be fully alphanumeric and be 6 characters or less.
Got "${var.name}" (set to module id by default).
mr0re1 marked this conversation as resolved.
Show resolved Hide resolved
EOT
}
}

Expand Down