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

Add shifter capability to the cctbx.xfel GUI #526

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

JBlaschke
Copy link
Contributor

Thanks to the help (and patience) of @asmit3 I was able to add the ability to submit shifter jobs (using slurm) on NERSC's systems. This is in anticipation of the upcoming data collection at LCLS. I was able to test this on Cori, using a limited data set provided by @asmit3. Further tests to follow.

This PR adds a "shifter" option to the cctbx.xfel gui -- this is really just slurm but with a few more bells and whistles.

I am currently tracking down why the GUI is laggy when running through nx.

@JBlaschke
Copy link
Contributor Author

@bkpoon -- I implemented those typos you pointed out on hangouts.

Copy link
Contributor

@phyy-nx phyy-nx left a comment

Choose a reason for hiding this comment

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

Some minor tweaks requested. Also, are the libtbx queuing system changes needed? I don't think the XFEL submission system goes through libtbx.easy_mp except for local model.

@@ -266,7 +266,8 @@ def get_submission_id(result, method):
submission_id = "".join(result.stdout_lines).strip()
print(submission_id)
return submission_id
elif method == 'slurm':
elif method == 'slurm' or method == "shifter":
# Assumign that all shifter instances are running on NERSC (slurm) systems
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: Assumign -> Assuming

self.params.mp.env_script = [self.env_script.ctr.GetValue()]
self.params.mp.nproc = int(self.nproc.ctr.GetValue())
if self.mp_option.ctr.GetStringSelection() == 'shifter':
print("follows a")
Copy link
Contributor

Choose a reason for hiding this comment

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

Needed print?

self.params.mp.shifter.sbatch_script_template = self.shifter_sbatch_template.ctr.GetValue() \
if len(self.shifter_sbatch_template.ctr.GetValue()) > 0 else None

print ("asdasdfsd: " + self.params.mp.shifter.sbatch_script_template)
Copy link
Contributor

Choose a reason for hiding this comment

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

Needed print?

xfel/util/mp.py Outdated
def customize_for_method(self):
# template for sbatch.sh
self.sbatch_template = self.params.shifter.sbatch_script_template
print(self.params.shifter.sbatch_script_template)
Copy link
Contributor

Choose a reason for hiding this comment

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

Needed print?

sb.write(self.sbatch_contents)
sb.write("\n")
sb.close()
print(self.sbatch_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Needed print?

sr.write(self.srun_contents)
sr.write("\n")
sr.close()
print(self.srun_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Needed print?

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

2 participants