Skip to content

Update htcondor.py#13

Open
steog88 wants to merge 2 commits intodberzano:masterfrom
steog88:patch-1
Open

Update htcondor.py#13
steog88 wants to merge 2 commits intodberzano:masterfrom
steog88:patch-1

Conversation

@steog88
Copy link
Copy Markdown

@steog88 steog88 commented Jun 13, 2016

I am proposing this change after some attempts working with the parallel queue in the Torino Cloud inftastructure. Nodes that require MPI and run on several virtual machines were not correctly treated by the previous code.

I am proposing this change after some attempts working with the parallel queue in the Torino Cloud inftastructure. Nodes that require MPI and run on several virtual machines were not correctly treated by the previous code.
@dberzano
Copy link
Copy Markdown
Owner

dberzano commented Jul 8, 2016

Hello @steog88, thanks for your contribution. I kindly ask you to address a number of points before merging this PR.

  • Please get rid of all the commented debug lines by completely deleting the lines.
  • Use spaces as the rest of the code does: item, item, item += item, item = item for instance
  • Why using an expensive regular expression to search a simple string. Do "requireswholemachine = true" in j.lower() which is much more pythonic
  • You can force n_hosts to float only once in your code (instead of twice)
  • Please get rid of the parentheses in the ifs (i.e. no if (a == b) but if a == b)
  • Rename out to something more meaningful (as n_waiting)

I like the -constraint which would make my original code simpler 👍

From what I see this should work both for the "whole machine" case and the non-whole machine one. Did you test it to make sure it's the case?

(This morning I woke up in --pedantic mode, sorry.)

Hi, thanks for the suggestions.
I hope to have addressed all the requirements.

Yes, I tested it with and without the "WholeMachine" case and it works.
@steog88
Copy link
Copy Markdown
Author

steog88 commented Jul 8, 2016

Hi, thanks for the suggestions.
I hope to have addressed all the requirements.

Yes, I tested it with and without the "WholeMachine" case and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants