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

Adding warning message for demo server #975

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/aiidalab_qe/app/submission/global_settings/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def check_resources(self):
return

pw_code_model = self.get_model("quantumespresso.pw")
protocol = self.input_parameters.get("workchain", {}).get("protocol", "fast")

if not self.input_structure or not pw_code_model.selected:
return # No code selected or no structure, so nothing to do
Expand Down Expand Up @@ -143,6 +144,15 @@ def check_resources(self):
}

alert_message = ""
if (
on_localhost and protocol == "precise" and localhost_cpus < 4
): # This means that we are in a small deployment.
alert_message += (
f"Warning: The selected protocol is {protocol}, which is computationally demanding to run on localhost. "
f"Consider the following: <ul>"
+ suggestions["change_configuration"]
+ "</ul>"
)
Comment on lines +147 to +155
Copy link
Member

Choose a reason for hiding this comment

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

Hey @mikibonacci. I didn't notice it in the review, but what is localhost_cpus? It doesn't exist. What should be the logic here? Also, one of the tests failed?

if large_system and estimated_CPUs > num_cpus:
# This part is in common between Warnings 1 (2):
# (not) on localhost, big system and few cpus
Expand Down
Loading