This repository was archived by the owner on Feb 26, 2025. It is now read-only.
forked from spack/spack
-
Couldn't load subscription status.
- Fork 16
Add NVHPC/21.11 and CUDA/11.5.1 #1392
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
98b0dcc
Add NVHPC 21.11 release (only x86_64 linux)
pramodk a05de0d
Enable [email protected]
pramodk ade11ed
Add other platforms
pramodk 8853d9c
enable cuda 11.5.0
pramodk 329024c
Fix syntax.
olupton 6002e2a
Remove CMAKE_C_FLAGS from coreneuron recipe.
olupton ee8f024
CUDA: add v11.5.1 (spack/spack#27689)
fspiga 30798b4
Prefer CUDA 11.5.1 to match HPC-SDK 21.11.
olupton b71ea24
Run module purge just before makelocalrc.
olupton 8a2bddf
fixup
olupton 218e425
Maybe it will work?
olupton d560eab
appease flake8
olupton 953ba1a
Add -mno-abm for [email protected].
olupton 66318a3
Drop the -tp skylake part.
olupton d6145b5
-mno-abm for [email protected] for neuron too.
olupton d824a7c
fixup
olupton 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
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 |
|---|---|---|
|
|
@@ -64,6 +64,7 @@ spack: | |
| - [email protected] +cuda cuda_arch=70 +omp_tsan +python ^[email protected] | ||
| - [email protected] install_type=network | ||
| - [email protected] | ||
| - [email protected] | ||
| - [email protected]_64 | ||
| - bison | ||
| - blender | ||
|
|
@@ -75,6 +76,7 @@ spack: | |
| - [email protected] | ||
| - [email protected] | ||
| - [email protected] | ||
| - [email protected] | ||
| - [email protected] | ||
| - darshan-runtime | ||
| - darshan-util | ||
|
|
||
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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import argparse | ||
| import spack | ||
| from spack.config import config | ||
|
|
||
| parser = argparse.ArgumentParser( | ||
| description="Add C/C++ compiler flags to Spack configuration." | ||
| ) | ||
| parser.add_argument( | ||
| "--scope", default="user", help="Configuration scope to read/write." | ||
| ) | ||
| parser.add_argument("--compiler-spec", type=str, help="Compiler spec to modify.") | ||
| parser.add_argument( | ||
| "--fields", | ||
| type=str, | ||
| nargs="+", | ||
| help="Which type of flags to write.", | ||
| default=["cflags", "cxxflags"], | ||
| choices=["cflags", "cxxflags", "cppflags", "fflags", "ldflags", "ldlibs"], | ||
| ) | ||
| parser.add_argument( | ||
| "flags", type=str, nargs="+", help="Compiler flags to set in the configuration." | ||
| ) | ||
| args = parser.parse_args() | ||
| flags_str = " ".join(args.flags) | ||
| compiler_configs = config.get("compilers", scope=args.scope) | ||
| for compiler_config in compiler_configs: | ||
| compiler_spec = spack.spec.Spec(compiler_config["compiler"]["spec"]) | ||
| if compiler_spec.satisfies(args.compiler_spec): | ||
| compiler_flags = compiler_config["compiler"].get("flags", {}) | ||
| for field in args.fields: | ||
| compiler_flags[field] = flags_str | ||
| compiler_config["compiler"]["flags"] = compiler_flags | ||
| config.update_config("compilers", compiler_configs, scope=args.scope) |
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 |
|---|---|---|
|
|
@@ -126,6 +126,10 @@ def get_flags(self): | |
| flags = '-xHost -qopt-report=5' | ||
| if '+knl' in spec: | ||
| flags = '-xMIC-AVX512 -qopt-report=5' | ||
| # NVHPC 21.11 detects ABM support and defines __ABM__, which breaks | ||
| # Random123 compilation | ||
| if spec.satisfies('%[email protected]'): | ||
| flags += ' -mno-abm' | ||
| # when pdt is used for instrumentation, the gcc's unint128 extension | ||
| # is activated from random123 which results in compilation error | ||
| if '+profile' in spec: | ||
|
|
@@ -142,7 +146,6 @@ def get_cmake_args(self): | |
|
|
||
| options =\ | ||
| ['-DCORENRN_ENABLE_SPLAYTREE_QUEUING=ON', | ||
| '-DCMAKE_C_FLAGS=%s' % flags, | ||
| '-DCMAKE_CXX_FLAGS=%s' % flags, | ||
| '-DCORENRN_ENABLE_REPORTING=%s' | ||
| % ('ON' if '+report' in spec else 'OFF'), | ||
|
|
@@ -155,6 +158,11 @@ def get_cmake_args(self): | |
| '-DPYTHON_EXECUTABLE=%s' % spec["python"].command.path | ||
| ] | ||
|
|
||
| # Versions after this only used C++, but we might still need C | ||
| # flags if mod2c is being built as a submodule. | ||
olupton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if spec.satisfies('@:1.0.0.20210708') or spec.satisfies('~nmodl'): | ||
| options.append('-DCMAKE_C_FLAGS=%s' % flags) | ||
|
|
||
| if spec.satisfies('+caliper'): | ||
| options.append('-DCORENRN_ENABLE_CALIPER_PROFILING=ON') | ||
|
|
||
|
|
||
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 |
|---|---|---|
|
|
@@ -143,6 +143,7 @@ def cmake_enable_option(spec_requiremement): | |
| "+rx3d", | ||
| "+coreneuron", | ||
| "+tests"]] | ||
| compilation_flags = [] | ||
| if self.spec.variants['model_tests'].value != ("None",): | ||
| args.append('-DNRN_ENABLE_MODEL_TESTS=' + ",".join( | ||
| model for model in self.spec.variants["model_tests"].value)) | ||
|
|
@@ -156,8 +157,8 @@ def cmake_enable_option(spec_requiremement): | |
| args.append("-DPYTHON_EXECUTABLE:FILEPATH=" | ||
| + self.spec["python"].command.path) | ||
| if "+debug" in self.spec: | ||
| args.append("-DCMAKE_C_FLAGS=-g -O0") | ||
| args.append("-DCMAKE_CXX_FLAGS=-g -O0") | ||
| compilation_flags += ['-g', '-O0'] | ||
| # Remove default flags (RelWithDebInfo etc.) | ||
| args.append("-DCMAKE_BUILD_TYPE=Custom") | ||
| if "+mod-compatibility" in self.spec: | ||
| args.append("-DNRN_ENABLE_MOD_COMPATIBILITY:BOOL=ON") | ||
|
|
@@ -167,6 +168,13 @@ def cmake_enable_option(spec_requiremement): | |
| args.append('-DNRN_DYNAMIC_UNITS_USE_LEGACY=ON') | ||
| if "+coreneuron" in self.spec: | ||
| args.append('-DCORENEURON_DIR=' + self.spec["coreneuron"].prefix) | ||
| # NVHPC 21.11 detects ABM support and defines __ABM__, which breaks | ||
| # Random123 compilation | ||
| if self.spec.satisfies('%[email protected]'): | ||
| compilation_flags.append('-mno-abm') | ||
| compilation_flags = ' '.join(compilation_flags) | ||
| args.append("-DCMAKE_C_FLAGS=" + compilation_flags) | ||
| args.append("-DCMAKE_CXX_FLAGS=" + compilation_flags) | ||
| return args | ||
|
|
||
| # Create symlink in share/nrn/lib for the python libraries | ||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.