Skip to content

Fixed OpenBLAS compilation error on POWER8 with GCC 7.#4783

Merged
adamjstewart merged 2 commits intospack:developfrom
katherlee:power8_fix
Aug 5, 2017
Merged

Fixed OpenBLAS compilation error on POWER8 with GCC 7.#4783
adamjstewart merged 2 commits intospack:developfrom
katherlee:power8_fix

Conversation

@katherlee
Copy link
Copy Markdown
Contributor

@katherlee katherlee commented Jul 16, 2017

Bug present in versions 0.2.18 and 0.2.19, and should be fixed in any future releases. Patch created from OpenMathLib/OpenBLAS#1098. Fixes #4782.

@katherlee katherlee changed the title Fixed compilation error on POWER8 with GCC 7. Fixed OpenBLAS compilation error on POWER8 with GCC 7. Jul 16, 2017
Copy link
Copy Markdown
Member

@davydden davydden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that's a huge patch....

Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you at least restrict patching only to the cases that were giving a failure?


# Fixes compilation error on POWER8 with GCC 7
# https://github.com/xianyi/OpenBLAS/pull/1098
patch('power8.patch', when='@0.2.18:0.2.19')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just my opinion: for a patch as big as this one I think we should consider adding a conflict on ppc64 (or whatever is the right platform) instead of patching the library. This is just to maintain the claim that we are working on pristine sources.

In any case (i.e. if people disagree with the above), I think patching should be done only when we are building on power8 and with gcc@7:

patch('power8.patch', when='@0.2.18:0.2.19 %[email protected]: target=ppc64')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is necessary to add a conflict for older versions which don't have PowerPC support. According to OpenMathLib/OpenBLAS#1078 the asm code before patching was simply broken, so I would prefer patching affected versions whenever building on a PowerPC. The patch was created from an merged official PR so I would say it doesn't conflict with the claim of yours.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch was created from an merged official PR so I would say it doesn't conflict with the claim of yours.

This statement is kind of debatable. Think of this counter-example: I could prepare a patch that goes from 0.2.18 to 0.2.19 and apply it whenever you build 0.2.18. I don't think I can claim I am using [email protected] pristine sources at that point.

I understand that it is better to fix something rather than just saying it doesn't work, but 7k lines are really a lot. That's why I asked other people what they think about it. Imo the best solution would be:

  • a new openblas release from upstream
  • conflicts for target=ppc64 %[email protected]: for older versions

but that's outside of our direct control. Another thing that could work is to just rely on openblas@develop.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. And it seems the next official release is underway. Let's what other people think.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Jul 17, 2017

@katherlee I cc'ed @adamjstewart and @lee218llnl just to know what they think about this (as openblas is probably one of the most used packages).

@adamjstewart
Copy link
Copy Markdown
Member

Hmm, I understand that this is a large patch, and I understand the desire to be working from clean source, but isn't this the classic case when a patch is required? This patch (shouldn't/isn't supposed to) change any behavior. It fixes a bug in compilation. Thus the patched source (should) behave identically. It's still the same release, with a bug fix in it. And since it has been merged into develop, that's a strong argument for its safety and validity.

I guess we need to have a more general conversation here. Should we always encourage people to use develop instead of adding patches? Aside from the length, I don't find this patch particularly controversial, and I don't see any reason to restrict it to certain platforms or compilers if it has been merged into develop.

@lee218llnl
Copy link
Copy Markdown
Contributor

I don't have a strong opinion here, but I tend to be pragmatic and like to fix things when they are broken (and only for the cases they are broken). I also have no problem with the size of the patch. Perhaps this would be best raised in a concall to establish a general best practices. All said, my vote for this PR is to do the patching, but only on PPC64 with gcc.

@alalazo alalazo dismissed their stale review July 19, 2017 15:58

Fine with me. The patch has been restricted to ppc64 with gcc.

@adamjstewart adamjstewart merged commit 41361cf into spack:develop Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenBLAS compilation error with GCC 7 on POWER8

5 participants