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

Allowing SGE schedulers to use the plugin #41

Merged
merged 3 commits into from
Dec 8, 2020

Conversation

JPchico
Copy link

@JPchico JPchico commented Nov 30, 2020

The plugin could not work as the get_inputs_common added submission options which are incompatible for the SGE scheduler. Now it checks which scheduler is provided and sets options which correspond to a serial simulation. Fixes #40

Copy link
Member

@PhilippRue PhilippRue left a comment

Choose a reason for hiding this comment

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

Thanks @JPchico. I left two minor comments. The rest looks fine to me.

@@ -331,7 +337,9 @@ def get_inputs_common(calculation, code, remote, structure, options, label, desc

if code:
inputs.code = code

_sched = load_computer(code.computer.label).scheduler_type
Copy link
Member

Choose a reason for hiding this comment

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

Why is load_computer needed? Does code.computer not give you the computer already?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, you are right, I copied this from some other function where I wanted to load the computer for some tests. I have changed it as you recommed.

# Total number of mpi processes
'tot_num_mpiprocs': 16,
# Name of the parallel environment
'parallel_env': 'mpi',
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you can put a comment here to tell that this is for a SGE scheduler?

Copy link
Author

Choose a reason for hiding this comment

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

Sure thing, added now a check for whether the code is in an SGE or SLURM/PBS machine. And added some reasonable options

@JPchico
Copy link
Author

JPchico commented Dec 1, 2020

I have added the changes that you requested @PhilippRue , plus some smaller formatting issues.

Copy link
Member

@PhilippRue PhilippRue left a comment

Choose a reason for hiding this comment

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

Thanks @JPchico. Everything looks good for me

@PhilippRue
Copy link
Member

@JPchico I will merge this in tomorrow if there is nothing to add

@JPchico
Copy link
Author

JPchico commented Dec 7, 2020

@PhilippRue I think this is fine, I have not seen any other issue cropping up in my tests.

@PhilippRue PhilippRue merged commit eac3adf into JuDFTteam:develop Dec 8, 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.

2 participants