-
Notifications
You must be signed in to change notification settings - Fork 1
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
Task/all of us/basic blt testing #18
base: master
Are you sure you want to change the base?
Conversation
…m's but has all the Axom specific stuff ripped out
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.
Is this waiting on anything before merging? Or can we merge sooner and update/patch as needed?
view: false | ||
concretization: separately | ||
specs: | ||
- blttest |
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.
One thing I've been wondering is how we can support multiple specs within an environment, e.g. when we add more compilers.
Would we do something like:
spack:
concretization: separately
specs:
- blttest%[email protected]
- blttest%[email protected]
Or would we have one environment per compiler/spec ?
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.
One thing I've been wondering is how we can support multiple specs within an environment, e.g. when we add more compilers.
Would we do something like:
spack: concretization: separately specs: - blttest%[email protected] - blttest%[email protected]Or would we have one environment per compiler/spec ?
You could use Spack stacks (https://spack-tutorial.readthedocs.io/en/latest/tutorial_stacks.html), where you'd define specs and define compilers and Spack would build each spec with each compiler.
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.
You can see a relatively simple example at https://github.com/LLNL/radiuss-spack-testing/blob/dahlgren1/add-care-env/spack-environments/care/spack.yaml. Specifically the definitions starting at line 29/30 and matrix at lines 46-48.
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.
I think there is value in testing individual spack envs - since that is most likely how users will build when developing. But again, that is tied to my deployment model where I use a config to dial everything in to deploy with a specific set of features on a specific platform, and then I use multiple configs when I need more than one deployments (for example, cuda only, vs openmp only). Maybe thats not an important goal for the blt testing.
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.
You can also specify multiple matrix
s. There's a somewhat simple example at https://github.com/mpbelhorn/olcf-spack-environments/blob/develop/hosts/lyra/envs/base/spack.yaml.
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.
FWIW. Just a few suggestions.
if ((self.compiler.fc is not None) | ||
and ("gfortran" in self.compiler.fc) | ||
and ("clang" in self.compiler.cxx)): | ||
libdir = pjoin(os.path.dirname( |
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.
Spack folks prefer using join_path
provided by Spack instead of os.path.join
.
|
||
if (self.compiler.fc is not None) and ("xlf" in self.compiler.fc): | ||
# Grab lib directory for the current fortran compiler | ||
libdir = pjoin(os.path.dirname( |
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.
Same join_path
suggestion as above.
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.
There's another at line 225.
if self.run_tests is False: | ||
options.append('-DENABLE_TESTS=OFF') | ||
else: | ||
options.append('-DENABLE_TESTS=ON') |
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.
Could you not simply:
if self.run_tests is False: | |
options.append('-DENABLE_TESTS=OFF') | |
else: | |
options.append('-DENABLE_TESTS=ON') | |
options.append(self.define('ENABLE_TESTS', self.run_tests)) |
@run_after('build') | ||
@on_package_attributes(run_tests=True) | ||
def build_test(self): |
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.
Could you not just override the check
method (and skip the directives) since Spack automatically calls check
after the build
phase when inheriting from CMakePackage
(unless you override build_time_test_callbacks
)?
_roots = ["/usr/tce/packages/gcc/gcc-4.9.3", | ||
"/usr/tce/packages/gcc/gcc-4.9.3/gnu"] | ||
_subdirs = ["lib64", | ||
"lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3"] |
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.
Why not use join_path
here instead of explicitly entering /
in the paths?
if not spec.satisfies('cuda_arch=none'): | ||
cuda_arch = spec.variants['cuda_arch'].value[0] | ||
entries.append(cmake_cache_string( | ||
"CMAKE_CUDA_ARCHITECTURES", | ||
cuda_arch)) |
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.
I realize using spec.satisfies()
for this check is common for RADIUSS packages, but I believe you could do something like the following:
if not spec.satisfies('cuda_arch=none'): | |
cuda_arch = spec.variants['cuda_arch'].value[0] | |
entries.append(cmake_cache_string( | |
"CMAKE_CUDA_ARCHITECTURES", | |
cuda_arch)) | |
cuda_arch = spec.variants['cuda_arch'].value | |
if cuda_arch != 'none': | |
entries.append(cmake_cache_string( | |
"CMAKE_CUDA_ARCHITECTURES", | |
cuda_arch[0])) |
No description provided.