ACCESS-NRI / spack-config

Shared spack configuration
Apache License 2.0
1 stars 0 forks source link

concretizer.yaml: set granularity to generic #4

Closed harshula closed 1 year ago

harshula commented 1 year ago

https://spack.readthedocs.io/en/latest/build_settings.html#concretizer-options :

The granularity option can take two possible values: microarchitectures and generic. If set to:

concretizer: targets: granularity: microarchitectures

Spack will consider all the microarchitectures known to archspec to label nodes for compatibility. If instead the option is set to:

concretizer: targets: granularity: generic

Spack will consider only generic microarchitectures. For instance, when running on an Haswell node, Spack will consider haswell as the best target in the former case and x86_64_v3 as the best target in the latter case.

With granularity set to generic, we get: export SPACK_TARGET_ARGS='-march=pentium4 -mtune=generic';

With granularity set to microarchitectures, we get: export SPACK_TARGET_ARGS='-march=cascadelake -mtune=cascadelake';

Configuration:

$ git config blame compilers
compilers.yaml:54        - compiler:
compilers.yaml:55            spec: intel@2019.5.281
compilers.yaml:56            paths:
compilers.yaml:57              cc: /apps/intel-ct/wrapper/icc
compilers.yaml:58              cxx: /apps/intel-ct/wrapper/icpc
compilers.yaml:59              f77: /apps/intel-ct/wrapper/ifort
compilers.yaml:60              fc: /apps/intel-ct/wrapper/ifort
compilers.yaml:61            flags: {}
compilers.yaml:62            operating_system: rocky8
compilers.yaml:63            target: x86_64
compilers.yaml:64            modules:
compilers.yaml:65            - intel-compiler/2019.5.281
compilers.yaml:66            environment: {}
compilers.yaml:67            extra_rpaths: []
harshula commented 1 year ago

The new spack_config mechanism in https://github.com/ACCESS-NRI/spack_config/tree/access-om2 should fix this.

harshula commented 1 year ago

Implemented in PR https://github.com/ACCESS-NRI/spack_config/pull/6