-
Notifications
You must be signed in to change notification settings - Fork 42
remhos changes #1141
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
Open
rfhaque
wants to merge
5
commits into
develop
Choose a base branch
from
remhos
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
remhos changes #1141
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
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 hidden or 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 |
|---|---|---|
|
|
@@ -31,10 +31,17 @@ class Remhos( | |
| variant( | ||
| "version", | ||
| default="gpu-opt", | ||
| values=("develop", "latest", "gpu-fom", "gpu-opt", "1.0"), | ||
| values=("develop", "latest", "1.0"), | ||
| description="app version", | ||
| ) | ||
|
|
||
| variant( | ||
| "gpu-aware-mpi", | ||
| default=False, | ||
| values=(True, False), | ||
| description="Use GPU-aware MPI", | ||
| ) | ||
|
|
||
| maintainers("rfhaque") | ||
|
|
||
| def compute_applications_section(self): | ||
|
|
@@ -77,8 +84,18 @@ def compute_applications_section(self): | |
|
|
||
| if self.spec.satisfies("+cuda") or self.spec.satisfies("+rocm"): | ||
| self.add_experiment_variable("n_gpus", "{n_resources}", True) | ||
| if self.spec.satisfies("+gpu-aware-mpi"): | ||
| self.add_experiment_variable("gam", "--gpu-aware-mpi") | ||
| else: | ||
| self.add_experiment_variable("gam", "--no-gpu-aware-mpi") | ||
| else: | ||
| self.add_experiment_variable("n_ranks", "{n_resources}", True) | ||
|
|
||
| def compute_package_section(self): | ||
| self.add_package_spec(self.name, [f"remhos{self.determine_version()} +metis"]) | ||
| gam = "~gpu-aware-mpi" | ||
| if self.spec.satisfies("+cuda") or self.spec.satisfies("+rocm"): | ||
| if self.spec.satisfies("+gpu-aware-mpi"): | ||
| gam = "+gpu-aware-mpi" | ||
| self.add_package_spec( | ||
| self.name, [f"remhos{self.determine_version()} +metis {gam}"] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nhanford Do you think this is a reasonable way to pass on gpu aware requirements? |
||
| ) | ||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -24,12 +24,11 @@ class Remhos(MakefilePackage, CudaPackage, ROCmPackage): | |
| license("BSD-2-Clause") | ||
|
|
||
| version("develop", branch="master") | ||
| version("gpu-fom", branch="gpu-fom") | ||
| version("gpu-opt", branch="gpu-opt") | ||
| version("1.0", sha256="e60464a867fe5b1fd694fbb37bb51773723427f071c0ae26852a2804c08bbb32") | ||
|
|
||
| variant("metis", default=True, description="Enable/disable METIS support") | ||
| variant("caliper", default=False, description="Enable/disable Caliper support") | ||
| variant("gpu-aware-mpi", default=False, description="Enable GPU aware MPI") | ||
|
|
||
| depends_on("c", type="build") | ||
| depends_on("cxx", type="build") | ||
|
|
@@ -43,8 +42,6 @@ class Remhos(MakefilePackage, CudaPackage, ROCmPackage): | |
| depends_on("zlib+optimize+pic~shared") | ||
| depends_on("mfem@develop", when="@develop") | ||
| depends_on("[email protected]:", when="@1.0") | ||
| depends_on("mfem@develop", when="@gpu-fom") | ||
| depends_on("mfem@develop", when="@gpu-opt") | ||
| depends_on("mfem+caliper", when="+caliper") | ||
| depends_on("mfem cxxstd=17") | ||
|
|
||
|
|
@@ -62,14 +59,22 @@ class Remhos(MakefilePackage, CudaPackage, ROCmPackage): | |
| depends_on(f"mfem cuda_arch={arch}", when=f"cuda_arch={arch}") | ||
| depends_on("mfem +cuda+mpi", when="+cuda") | ||
| depends_on("mfem +rocm+mpi", when="+rocm") | ||
| depends_on("mfem +umpire", when="+cuda") | ||
| depends_on("mfem +umpire", when="+rocm") | ||
|
|
||
| depends_on("hypre +rocm +mpi", when="+rocm") | ||
| depends_on("hypre +rocm+mpi", when="+rocm") | ||
| requires("+rocm", when="^hypre+rocm") | ||
| for target in ("none", "gfx803", "gfx900", "gfx906", "gfx908", "gfx90a", "gfx942"): | ||
| depends_on(f"hypre amdgpu_target={target}", when=f"amdgpu_target={target}") | ||
| depends_on(f"mfem amdgpu_target={target}", when=f"amdgpu_target={target}") | ||
|
|
||
| depends_on("hypre+gpu-aware-mpi", when="^cray-mpich+gtl") | ||
| depends_on("hypre+umpire", when="+cuda") | ||
| depends_on("hypre+umpire", when="+rocm") | ||
| depends_on("hypre+gpu-aware-mpi", when="+gpu-aware-mpi") | ||
|
|
||
| def setup_run_environment(self, env): | ||
| if "+gpu-aware-mpi" in self.spec: | ||
| env.set("MFEM_GPU_AWARE_MPI", "1") | ||
|
|
||
| def setup_build_environment(self, env): | ||
| if "+cuda" in self.spec: | ||
|
|
||
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.
@nhanford Do we want a variant on this?