Conversation
This comment has been minimized.
This comment has been minimized.
|
@scheibelp this is the architecture PR we were discussing. It still needs a bunch of work, especially for ARM architectures. |
63bcc18 to
be15bb7
Compare
|
@mamelara yes this branch is in active development. |
|
@tgamblin @becker33 The last commit adds micro-architecture information to the spec YAML file and tries to maintain backward compatibility. For instance spec:
- zlib:
version: 1.2.11
arch:
platform: linux
platform_os: ubuntu18.04
target:
name: broadwell
vendor: GenuineIntel
features:
- adx
- aes
- avx
- avx2
- bmi1
- bmi2
- f16c
- fma
- mmx
- movbe
- pclmulqdq
- popcnt
- rdrand
- rdseed
- sse
- sse2
- sse4_1
- sse4_2
- ssse3
generation: 0
parents:
- haswell
compiler:
name: gcc
version: 9.0.1
namespace: builtin
parameters:
optimize: true
pic: true
shared: true
cflags: []
cppflags: []
cxxflags: []
fflags: []
ldflags: []
ldlibs: []
hash: os3djb57dqdzhaqsl2n7iefz3gwombyiwhile for spec:
- zlib:
version: 1.2.11
arch:
platform: linux
platform_os: ubuntu18.04
target: x86_64
compiler:
name: gcc
version: 9.0.1
namespace: builtin
parameters:
optimize: true
pic: true
shared: true
cflags: []
cppflags: []
cxxflags: []
fflags: []
ldflags: []
ldlibs: []
hash: tn4qvs7g6r45dipq6kvg4ggs6rts3m7s |
|
The last commit introduces checks on the compiler to ensure it can optimize for the requested architecture: $ spack spec hdf5 target=icelake %[email protected]
Input spec
--------------------------------
hdf5%[email protected] arch=linux-None-icelake
Concretized
--------------------------------
==> Error: cannot produce optimized binary for micro-architecture "icelake" with [email protected] [supported compiler versions are 8:]At the moment Spack errors out if the required target is not supported and we have info on the compiler in the JSON file. An alternative behavior would be to just print a warning and don't pass any optimization flag (my personal preference goes on the current behavior). If we don't have information on the compiler Spack will proceed and avoid using any optimization flag, for instance: $ spack spec hdf5 target=icelake %clang
Input spec
--------------------------------
hdf5%clang arch=linux-None-icelake
Concretized
--------------------------------
[email protected]%[email protected]~cxx~debug~fortran~hl+mpi+pic+shared~szip~threadsafe arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected]~cuda+cxx_exceptions fabrics=none ~java~legacylaunchers~memchecker~pmi schedulers=none ~sqlite3~thread_multiple+vt arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected]~cairo~cuda~gl+libxml2~nvml+pci+shared arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,c0a408fbffb7255fcc75e26bd8edab116fc81d216bfd18b473668b7739a4158e,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 +sigsegv arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected]~python arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected]+optimize+pic+shared arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected]+cpanm patches=0eac10ed90aeb0459ad8851f88081d439a4e41978e586ec743069e8b059370ac +shared+threads arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected]~symlinks~termlib arch=linux-ubuntu18.04-icelake
^[email protected]%[email protected] arch=linux-ubuntu18.04-icelakewill concretize but won't use any |
I agree with the current behavior -- if we say the binary is for This probably also means that when the target isn't specified, Spack should scale it back to somethign that's good for the selected compiler. e.g., if you say |
|
@alalazo @becker33: high level comment: we should allow the default target to be overridden somehow, I guess in |
|
I can only comment that we have to compile to the lower common instruction set between AMD and Intel server chips. I believe this is K2(?) |
3c89366 to
fed4916
Compare
60b064f to
28b2d96
Compare
981a25e to
4ae1faf
Compare
Since spack#3206, 'spec.architecture.target' returned the microarchitecture target rather than the architecture family. This causes QT 4 to fail to build because it's expecting something like 'x86_64' rather than 'broadwell'. See spack#12914 Erorr message: ``` ==> [2019-09-26-09:37:33.834286] './configure' '-prefix' '/rnsdhpc/code/spack/opt/spack/clang/qt/aguusfi' '-v' '-opensource' '-no-opengl' '-release' '-confirm-license' '-optimized-qmake' '-no-pch' '-no-freetype' '-no-openssl' '-no-sql-db2' '-no-sql-ibase' '-no-sql-oci' '-no-sql-tds' '-no-sql-mysql' '-no-sql-odbc' '-no-sql-psql' '-no-sql-sqlite' '-no-sql-sqlite2' '-shared' '-no-openvg' '-no-nis' '-nomake' 'examples' '-nomake' 'tools' '-no-dbus' '-no-framework' '-fast' '-no-declarative-debug' '-no-gtkstyle' '-no-webkit' '-no-phonon' '-arch' 'broadwell' '-nomake' 'demos' '-cocoa' '-platform' 'unsupported/macx-clang-libc++' '-sdk' '/var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/xcode-select/clang/10.0.1-apple/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' Determining system architecture... (Darwin:18.7.0:x86_64) 'macosx' is supported System architecture: 'macosx' Unknown architecture: "broadwell". Supported architectures: x86[i386] ppc x86_64 ppc64 arm armv6 armv7 ```
Since spack#3206, 'spec.architecture.target' returned the microarchitecture target rather than the architecture family. This causes QT 4 to fail to build because it's expecting something like 'x86_64' rather than 'broadwell'. See spack#12914 Erorr message: ``` ==> [2019-09-26-09:37:33.834286] './configure' '-prefix' '/rnsdhpc/code/spack/opt/spack/clang/qt/aguusfi' '-v' '-opensource' '-no-opengl' '-release' '-confirm-license' '-optimized-qmake' '-no-pch' '-no-freetype' '-no-openssl' '-no-sql-db2' '-no-sql-ibase' '-no-sql-oci' '-no-sql-tds' '-no-sql-mysql' '-no-sql-odbc' '-no-sql-psql' '-no-sql-sqlite' '-no-sql-sqlite2' '-shared' '-no-openvg' '-no-nis' '-nomake' 'examples' '-nomake' 'tools' '-no-dbus' '-no-framework' '-fast' '-no-declarative-debug' '-no-gtkstyle' '-no-webkit' '-no-phonon' '-arch' 'broadwell' '-nomake' 'demos' '-cocoa' '-platform' 'unsupported/macx-clang-libc++' '-sdk' '/var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/xcode-select/clang/10.0.1-apple/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' Determining system architecture... (Darwin:18.7.0:x86_64) 'macosx' is supported System architecture: 'macosx' Unknown architecture: "broadwell". Supported architectures: x86[i386] ppc x86_64 ppc64 arm armv6 armv7 ```
fixes spack#13073 Since spack#3206 was merged bootstrapping environment-modules was using the architecture of the current host or the best match supported by the default compiler. The former case is an issue since shell integration was looking for a spec targeted at the host microarchitecture. This commit fixes the problem by: 1. Bootstrapping an en modules targeted at generic architectures 2. Looking for generic targets in shell integration scripts
fixes spack#13005 This commit fixes an issue with the name of the root directory for module file hierarchies. Since spack#3206 the root folder was named after the microarchitecture used for the spec, which is too specific and not backward compatible for lmod hierarchies. Here we compute the root folder name using the target family instead of the target name itself and we add target information in the 'whatis' portion of the module file.
#13121) fixes #13005 This commit fixes an issue with the name of the root directory for module file hierarchies. Since #3206 the root folder was named after the microarchitecture used for the spec, which is too specific and not backward compatible for lmod hierarchies. Here we compute the root folder name using the target family instead of the target name itself and we add target information in the 'whatis' portion of the module file.
…13105) fixes #13073 Since #3206 was merged bootstrapping environment-modules was using the architecture of the current host or the best match supported by the default compiler. The former case is an issue since shell integration was looking for a spec targeted at the host microarchitecture. 1. Bootstrap an env modules targeted at generic architectures 2. Look for generic targets in shell integration scripts 3. Add a new entry in Travis to test shell integration
spack#13121) fixes spack#13005 This commit fixes an issue with the name of the root directory for module file hierarchies. Since spack#3206 the root folder was named after the microarchitecture used for the spec, which is too specific and not backward compatible for lmod hierarchies. Here we compute the root folder name using the target family instead of the target name itself and we add target information in the 'whatis' portion of the module file.
…pack#13105) fixes spack#13073 Since spack#3206 was merged bootstrapping environment-modules was using the architecture of the current host or the best match supported by the default compiler. The former case is an issue since shell integration was looking for a spec targeted at the host microarchitecture. 1. Bootstrap an env modules targeted at generic architectures 2. Look for generic targets in shell integration scripts 3. Add a new entry in Travis to test shell integration
Resolves #2379
Allow spack to detect target at a finer granularity.
Moves toward using the granularity of the -march option for the gnu compiler toolchain.
Modifications to be done to add the feature
packages.yamlallow for setting a generic target at any scope.platform.machine()and avoid failures due to the architecture not being present in the list of known onescompilers.yamlare just representing an arch family - not micro-architectures. The rationale is that if a compiler can emit code forx86_64it can also emit specialized code for anyx86_64micro-architecture it knows about. The benefits are that:compilers.yamlis not exploding due to over-specialization.x86_64continue to use a string for backward compatibility.targets.jsonTests to be added to the suite
packages.yamlcan set the target at any scopellnl.util.cpu.MicroArchitecture, including partial orderingyamlconfiguration even in Python 2spack findworks properly (was broken by 43d5e97 but not caught by unit tests)