Repository navigation
Fix Python build for AOCC compiler - #28708
Conversation
…error while building Python IndexError: string index out of range python recently made ensurepip as default varient for all python versions, it was observed that AOCC-3.2.0 compiler was failing while compiling ensurepip module in Python code
Can you give more context? I would love to fix this if possible. I think a better solution would be to add: conflicts('+ensurepip', when='%aocc') |
|
Can you give more context? I would love to fix this if possible. |
|
With conflict change, I noticed Concretizer uses 'gcc' instead of 'aocc' compiler for amdblis product Could you please help to explain the reason? |
|
I don't see amdblis in that DAG |
Accidently I copied python spec output. |
|
Thanks, that's because our concretizer currently prioritizes the number of non-default variants above compiler mismatches. @alalazo I wonder if it makes sense to have greater priority for compiler mismatches than we currently have. |
It's hard to think at all possible combinations, but I am pretty sure that will cause a lot of other weird issues e.g. variants being flipped so that compilers can be matched etc. |
|
In the current situation where I understand:
Then I would request to consider my initial change request i.e., |
|
The problem with the initial change request is that |
|
As the impact of AOCC compiler issue is huge on AMD libraries and associated applications can we restore the |
|
@becker33 is it possible to change a variant default based on compiler? Does this work: variant('ensurepip', default=True)
variant('ensurepip', default=False, when='%aocc')
@alalazo yes, this is exactly the behavior that we want in this situation. I would assume that ABI compatibility and compiler consistency would be our top priority. I do want to make sure that we avoid changing the default compiler and concretizing everything with GCC instead of AOCC though. Overall, I'm still leaning towards the current solution (just waiting for that newline to be removed before merging). There are far more users who use pip than there are users who use AOCC. For users who use AOCC, they can always use: $ spack install python~ensurepip %aoccor add: packages:
python:
variants: ~ensurepipto their |
|
Removing |
…6 April 2022 09:39:56 AM EST
|
Please note, in the new commit we have removed below line: and added following section: as we found above flag is not related to the bug that's causing the failure, but it runs some additional passes and modifies the code and perhaps the buggy code pattern is disturbed hence the error is suppressed. |
|
On our system, the proposed fix worked for |
…m enable-gvn-sink=true" With the new flag python build with AOCC compiler is working fine for both python@3.9.0 and python@3.10.3 versions.
New commit done: Changes: With the new flag python build with AOCC compiler is working fine for both python@3.9.0 and python@3.10.3 versions. |
|
Tried 3.10.4, 3.9.12, 3.8.13, 3.7.13, 3.6.15 and 2.7.17 with the new flags, all of them built successfully and passed all or most of the python test suite. |
Thanks for certifying the solution. This will help for quick approval. |
| # https://github.com/spack/spack/pull/28708 | ||
| if self.spec.satisfies('%aocc@3.2.0', strict=True): | ||
| if name == 'cflags': | ||
| flags.extend(['-mllvm','-disable-indvar-simplify=true']) |
There was a problem hiding this comment.
| flags.extend(['-mllvm','-disable-indvar-simplify=true']) | |
| flags.extend(['-mllvm', '-disable-indvar-simplify=true']) |
This should fix the style tests
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
Disable new varient ensurepip for AOCC compiler to prevent following error while building Python in spack environment:
IndexError: string index out of range
Python recently made ensurepip as default varient for all python versions, it was observed that AOCC-3.2.0 compiler was failing while compiling ensurepip module in Python code
Below is the associated commit which mandate ensurepip as default varient :
commit ffb3f3a
Author: Wouter Deconinck wdconinc@gmail.com
Date: Sat Jan 22 21:55:56 2022 -0600
Fixes #29115