-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix code for xps, xas, and update the code resources (#711)
This PR updates the codes and resources of the plugins - Fix the code for XAS and XPS - Update the resources for the builder
- Loading branch information
1 parent
d13acbd
commit 83e5928
Showing
6 changed files
with
44 additions
and
39 deletions.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from aiida import orm | ||
|
||
|
||
def set_component_resources(component, code_info): | ||
"""Set the resources for a given component based on the code info.""" | ||
if code_info: # Ensure code_info is not None or empty | ||
component.metadata.options.resources = { | ||
"num_machines": code_info["nodes"], | ||
"num_mpiprocs_per_machine": code_info["ntasks_per_node"], | ||
"num_cores_per_mpiproc": code_info["cpus_per_task"], | ||
} | ||
if "parallelization" in code_info: | ||
component.parallelization = orm.Dict(dict=code_info["parallelization"]) |
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