-
Notifications
You must be signed in to change notification settings - Fork 17
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
Enhanced computational resource widget with resource setup #566
Merged
Merged
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9d952b9
add new ComputationalResourcesWidget with nodes and cpus
superstar54 b7d1752
use new widget in submission
superstar54 85d888c
update test
superstar54 4664bcf
fix test for pdos
superstar54 63a6a35
fix code not exist when setting
superstar54 4edf38b
Merge branch 'feature/new_computational_resource_widget' of https://g…
superstar54 38f5db2
backward compatibility for v2023.11
superstar54 4ec0817
change name to QEAppComputationalResourcesWidget, and add blocker if …
superstar54 97c48ec
only add blocker for selected codes
superstar54 cb1ac30
update doc, ingore hidden codes
superstar54 e180ec4
Merge branch 'main' into feature/new_computational_resource_widget
superstar54 3e429a9
use composite method, add override for parallelization
superstar54 80727e5
fix test
superstar54 e9314c2
Merge branch 'main' into feature/new_computational_resource_widget
superstar54 c7f1f59
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 2dbfc3d
Merge branch 'main' into feature/new_computational_resource_widget
superstar54 5ee2b24
Merge branch 'main' into feature/new_computational_resource_widget
superstar54 a25abe4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f8d6a85
delete empty resource.py file
superstar54 029e957
update XAS plugin
superstar54 56ab9bb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ad0c844
add setup resource detail
superstar54 4a0cb83
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 14e6f7c
rename PwCodeResourceSetupWidget, add test
superstar54 9a70a27
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 724982b
Merge branch 'main' into feature/new_computational_resource_widget
superstar54 5720107
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] e81ece7
Merge branch 'main' into feature/new_computational_resource_widget
AndresOrtegaGuerrero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +0,0 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Widgets for the submission of bands work chains. | ||
|
||
Authors: AiiDAlab team | ||
""" | ||
import ipywidgets as ipw | ||
|
||
|
||
class ResourceSelectionWidget(ipw.VBox): | ||
"""Widget for the selection of compute resources.""" | ||
|
||
title = ipw.HTML( | ||
"""<div style="padding-top: 0px; padding-bottom: 0px"> | ||
<h4>Resources</h4> | ||
</div>""" | ||
) | ||
prompt = ipw.HTML( | ||
"""<div style="line-height:120%; padding-top:0px"> | ||
<p style="padding-bottom:10px"> | ||
Specify the resources to use for the pw.x calculation. | ||
</p></div>""" | ||
) | ||
|
||
def __init__(self, **kwargs): | ||
extra = { | ||
"style": {"description_width": "150px"}, | ||
"layout": {"min_width": "180px"}, | ||
} | ||
self.num_nodes = ipw.BoundedIntText( | ||
value=1, step=1, min=1, max=1000, description="Nodes", **extra | ||
) | ||
self.num_cpus = ipw.BoundedIntText( | ||
value=1, step=1, min=1, description="CPUs", **extra | ||
) | ||
|
||
super().__init__( | ||
children=[ | ||
self.title, | ||
ipw.HBox( | ||
children=[self.prompt, self.num_nodes, self.num_cpus], | ||
layout=ipw.Layout(justify_content="space-between"), | ||
), | ||
] | ||
) | ||
|
||
def reset(self): | ||
self.num_nodes.value = 1 | ||
self.num_cpus.value = 1 | ||
|
||
|
||
class ParallelizationSettings(ipw.VBox): | ||
"""Widget for setting the parallelization settings.""" | ||
|
||
title = ipw.HTML( | ||
"""<div style="padding-top: 0px; padding-bottom: 0px"> | ||
<h4>Parallelization</h4> | ||
</div>""" | ||
) | ||
prompt = ipw.HTML( | ||
"""<div style="line-height:120%; padding-top:0px"> | ||
<p style="padding-bottom:10px"> | ||
Specify the number of k-points pools for the calculations. | ||
</p></div>""" | ||
) | ||
|
||
def __init__(self, **kwargs): | ||
extra = { | ||
"style": {"description_width": "150px"}, | ||
"layout": {"min_width": "180px"}, | ||
} | ||
self.npools = ipw.BoundedIntText( | ||
value=1, step=1, min=1, max=128, description="Number of k-pools", **extra | ||
) | ||
super().__init__( | ||
children=[ | ||
self.title, | ||
ipw.HBox( | ||
children=[self.prompt, self.npools], | ||
layout=ipw.Layout(justify_content="space-between"), | ||
), | ||
] | ||
) | ||
|
||
def reset(self): | ||
self.npools.value = 1 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This update should also affect the other plugins right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If other plugins use the same
pw
code as therelax
workchain, yes.