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

[WIP] record the maximum memory used by LSF jobs #3327

Merged
merged 5 commits into from
Nov 24, 2020

Conversation

drkennetz
Copy link
Collaborator

Taking over @mr-c PR #2857 . This will currently log the command and max mem used by the command for an LSF job utilizing bjobs -l:

[2020-11-12T16:08:40-0600] [Thread-3  ] [I] [toil.batchSystems.lsf] [job ID 111913722, Command  _toil_worker CWLJob file:/research/rgs01/home/clusterHome/ dkennetz/toil_test/cwl/TEST kind-CWLJob/instance-shr9enqg --context gANjdG9pbC5iYXRjaFN5c3RlbXMuYWJzdHJhY3RCYXRjaFN5 c3RlbQpXb3JrZXJDbGVhbnVwQ29udGV4dApxACmBcQF9cQIoWBEAAAB3b3 JrZXJDbGVhbnVwSW5mb3EDY3RvaWwuYmF0Y2hTeXN0ZW1zLmFic3RyYWN0 QmF0Y2hTeXN0ZW0KV29ya2VyQ2xlYW51cEluZm8KcQRYPwAAAC9yZXNlYX JjaC9yZ3MwMS9ob21lL2NsdXN0ZXJIb21lL2RrZW5uZXR6L3RvaWxfdGVz dC9jd2wvd29ya2RpcnEFWCQAAAAxNWI5Mzg0Yi02NGJiLTQ0ODYtODFmZi 02YWU5MTI4MWFlYjlxBlgGAAAAYWx3YXlzcQeHcQiBcQlYBQAAAGFyZW5h cQpOdWIu] the maximum memory used was: 1 Gbytes
[2020-11-12T16:08:41-0600] [Thread-3  ] [I] [toil.batchSystems.lsf] [job ID 111913722, Command  _toil_worker CWLJob file:/research/rgs01/home/clusterHome/ dkennetz/toil_test/cwl/TEST kind-CWLJob/instance-shr9enqg --context gANjdG9pbC5iYXRjaFN5c3RlbXMuYWJzdHJhY3RCYXRjaFN5 c3RlbQpXb3JrZXJDbGVhbnVwQ29udGV4dApxACmBcQF9cQIoWBEAAAB3b3 JrZXJDbGVhbnVwSW5mb3EDY3RvaWwuYmF0Y2hTeXN0ZW1zLmFic3RyYWN0 QmF0Y2hTeXN0ZW0KV29ya2VyQ2xlYW51cEluZm8KcQRYPwAAAC9yZXNlYX JjaC9yZ3MwMS9ob21lL2NsdXN0ZXJIb21lL2RrZW5uZXR6L3RvaWxfdGVz dC9jd2wvd29ya2RpcnEFWCQAAAAxNWI5Mzg0Yi02NGJiLTQ0ODYtODFmZi 02YWU5MTI4MWFlYjlxBlgGAAAAYWx3YXlzcQeHcQiBcQlYBQAAAGFyZW5h cQpOdWIu] the maximum memory used was: 5.1 Gbytes
[2020-11-12T16:08:42-0600] [Thread-3  ] [I] [toil.batchSystems.lsf] [job ID 111913722, Command  _toil_worker CWLJob file:/research/rgs01/home/clusterHome/ dkennetz/toil_test/cwl/TEST kind-CWLJob/instance-shr9enqg --context gANjdG9pbC5iYXRjaFN5c3RlbXMuYWJzdHJhY3RCYXRjaFN5 c3RlbQpXb3JrZXJDbGVhbnVwQ29udGV4dApxACmBcQF9cQIoWBEAAAB3b3 JrZXJDbGVhbnVwSW5mb3EDY3RvaWwuYmF0Y2hTeXN0ZW1zLmFic3RyYWN0 QmF0Y2hTeXN0ZW0KV29ya2VyQ2xlYW51cEluZm8KcQRYPwAAAC9yZXNlYX JjaC9yZ3MwMS9ob21lL2NsdXN0ZXJIb21lL2RrZW5uZXR6L3RvaWxfdGVz dC9jd2wvd29ya2RpcnEFWCQAAAAxNWI5Mzg0Yi02NGJiLTQ0ODYtODFmZi 02YWU5MTI4MWFlYjlxBlgGAAAAYWx3YXlzcQeHcQiBcQlYBQAAAGFyZW5h cQpOdWIu] the maximum memory used was: 5.1 Gbytes

@drkennetz
Copy link
Collaborator Author

The random spaces in paths and text were introduced by copying.

Copy link
Member

@DailyDreaming DailyDreaming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drkennetz Is this still WIP? I'm approving and would be fine with merging as is.

One comment is below and also the parseMaxMem function doesn't seem to need to return anything, so I would consider removing the return statements.

src/toil/batchSystems/lsf.py Outdated Show resolved Hide resolved
@drkennetz
Copy link
Collaborator Author

@DailyDreaming I gave it a return because @mr-c said it might be useful to actually return from getJobExitCode in the future for provenance. It serves no purpose at the moment though, except as one less thing to think about if we decide to implement this change in the future.

I am happy to remove the return, and make the logging more verbose as suggested. It is no longer a WIP. I'll wait on your response before committing changes (potentially removing the return and updating logging).

src/toil/batchSystems/lsf.py Outdated Show resolved Hide resolved
@drkennetz
Copy link
Collaborator Author

Sorry for the delay, I have updated based on the recommendations here.

@DailyDreaming DailyDreaming merged commit d66cb8a into DataBiosphere:master Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants