Skip to content

netlib-lapack: changed handling of XL and clang compilers for the PPC64LE.#8311

Closed
serbanmaerean wants to merge 3 commits intospack:developfrom
serbanmaerean:fix-ibm-clang/netlib-lapack
Closed

netlib-lapack: changed handling of XL and clang compilers for the PPC64LE.#8311
serbanmaerean wants to merge 3 commits intospack:developfrom
serbanmaerean:fix-ibm-clang/netlib-lapack

Conversation

@serbanmaerean
Copy link
Copy Markdown
Contributor

On CORAL, LLVM will use the XL Fortran compiler and I need to apply a change for the xl_r compiler to the clang compiler to make netlib-lapack build w/clang+xlf.

I split the xl_r patch in two: one specific to xl_r, that removes the -qfixed flag from Fortran compile options; and one that fixes the CBLAS use of default mangling definitions.

@serbanmaerean
Copy link
Copy Markdown
Contributor Author

@davydden @adamjstewart can you pls review this pull request? thx.

self.compiler.name == 'clang'):
# use F77 compiler if IBM XL or clang
cmake_args.extend([
'-DCMAKE_Fortran_COMPILER=%s' % self.compiler.f77,
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.

You definitely don't want this. This will bypass Spack's compiler wrappers and use the compiler directly. Try using spack_f77 instead.

Copy link
Copy Markdown
Contributor Author

@serbanmaerean serbanmaerean May 30, 2018

Choose a reason for hiding this comment

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

The reason for imposing the compiler is that on CORAL we'll use clang+xlf and not clang+flang; also, that was the reason I forced it only for linux-rhel7-ppc64le architecture.

I think it's better to add the xlf compiler in compilers/clang.py, but don't know how to select the patform for ppc64le. For example, in that file, there is the following code:

 55     if sys.platform == 'darwin':
 56         # Use default wrappers for fortran, in case provided in
 57         # compilers.yaml
 58         link_paths['f77'] = 'clang/gfortran'
 59         link_paths['fc'] = 'clang/gfortran'
 60     else:
 61         link_paths['f77'] = 'clang/flang'
 62         link_paths['fc'] = 'clang/flang''

That's where I wanted to add the link_paths for f77 and fc to be clang/xl_r, but how do I select only for linux-rhel7-ppc64le? sys.platform is set to 'linux2' on my test system. Is that specific to this platform?--I don't have Linux on Intel.

This change requires another change to the compilers/clang.py file
to use the IBM XL Fortran compiler on CORAL systems.
@tgamblin
Copy link
Copy Markdown
Member

tgamblin commented Jun 1, 2018

@becker33: can you help @serbanmaerean use our compiler flags interface for this? I think this is a good candidate.

Copy link
Copy Markdown
Member

@tgamblin tgamblin left a comment

Choose a reason for hiding this comment

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

I think this should use the compiler flags interface, which @becker33 can help with.

@serbanmaerean
Copy link
Copy Markdown
Contributor Author

@becker33 can you pls let me know what compiler flags interface I need to use? Thanks so much.

@djfitzgerald
Copy link
Copy Markdown
Contributor

djfitzgerald commented Jun 12, 2018

Note that this is related to #8388, #8389, #8391, #8392, #8393, and #8394. We may need to change our fixes for each depending on how @serbanmaerean and @becker33 implement their fix.

@djfitzgerald
Copy link
Copy Markdown
Contributor

@tgamblin @becker33 Has there been any update on this?

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.

Feel free to modify the PR according to review, if still relevant, or close it if not an issue anymore.

patch('ibm-xl.patch', when='@3.7: %xl')
patch('ibm-xl.patch', when='@3.7: %xl_r')
patch('ibm-xl.patch', when='@3.7:')
patch('cblas-cmake-fix.patch', when='@3.7:')
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.

Why is this applied regardless to compiler?

if (self.compiler.name == 'xl' or
self.compiler.name == 'xl_r' or
self.compiler.name == 'clang'):
# use F77 compiler if IBM XL or clang
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.

This needs to be revisited to comply with the changes in #3206

@alalazo alalazo changed the title Changed handling of XL and clang compilers for the PPC64LE. netlib-lapack: changed handling of XL and clang compilers for the PPC64LE. Mar 27, 2020
@alalazo
Copy link
Copy Markdown
Member

alalazo commented Mar 27, 2020

Closing since there was no reply since November, but feel free to reopen if you think it should be reconsidered.

@alalazo alalazo closed this Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants