Skip to content

Commit

Permalink
ensure sole tenancy for lammps (#69)
Browse files Browse the repository at this point in the history
* ensure sole tenancy for lammps

Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch authored Oct 3, 2023
1 parent f8dbe0e commit d414192
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/metrics/app/lammps.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ func (m *Lammps) SetOptions(metric *api.Metric) {
m.Summary = lammpsSummary
m.Container = lammpsContainer

// Ensure we set sole tenancy if desired
st, ok := metric.Options["soleTenancy"]
if ok && st.StrVal == "true" || st.StrVal == "yes" {
m.SoleTenancy = true
}

// Set user defined values or fall back to defaults
// This is a more manual approach that puts the user in charge of determining the entire command
// This more closely matches what we might do on HPC :)
Expand All @@ -63,7 +69,7 @@ func (m Lammps) Options() map[string]intstr.IntOrString {
values := map[string]intstr.IntOrString{
"command": intstr.FromString(m.Command),
"workdir": intstr.FromString(m.Workdir),
"soleTenacy": intstr.FromString("false"),
"soleTenancy": intstr.FromString("false"),
}
if m.SoleTenancy {
values["soleTenancy"] = intstr.FromString("true")
Expand Down

0 comments on commit d414192

Please sign in to comment.