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

clamp not working right #1649

Closed
johrstrom opened this issue Dec 8, 2021 · 1 comment · Fixed by #1671
Closed

clamp not working right #1649

johrstrom opened this issue Dec 8, 2021 · 1 comment · Fixed by #1671
Assignees
Labels
bug Existing functionality not working as expected component/batch_connect
Milestone

Comments

@johrstrom
Copy link
Contributor

This function clamp doesn't work right.

function clamp(previous, previousBoundary, currentBoundary, comparator){

  1. Take an app like jupyter that has 28 cores for owens and 48 cores for pitzer.
  2. enable this javascript
  3. choose pitzer and the max becomes 48
  4. set # of cores to 47
  5. change to owens cluster

expected behaviour at this point is that cores should be set to 28 not 47. If one chooses 48 in step 4 or skips step 4 it works. But it doesn't seem to be making the right comparisons.

@johrstrom johrstrom added bug Existing functionality not working as expected component/batch_connect labels Dec 8, 2021
@osc-bot osc-bot added this to the Backlog milestone Dec 8, 2021
@johrstrom johrstrom added this to the 2.1 milestone Dec 8, 2021
@ghost ghost deleted a comment from johrstrom Dec 8, 2021
@johrstrom
Copy link
Contributor Author

It also seems like clamp needs to be outside of the [min,max] loop. There's another bug here where you clamp the max, then you clamp a second time.

So you end up shifting left (current value > new max) and then shifting right (current value < new min) when the current value is at the maximum.

@ghost ghost assigned johrstrom Dec 20, 2021
@ghost ghost closed this as completed in #1671 Dec 20, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality not working as expected component/batch_connect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants