netlib-lapack: changed handling of XL and clang compilers for the PPC64LE.#8311
netlib-lapack: changed handling of XL and clang compilers for the PPC64LE.#8311serbanmaerean wants to merge 3 commits intospack:developfrom
Conversation
make it build with clang+xlf.
|
@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, |
There was a problem hiding this comment.
You definitely don't want this. This will bypass Spack's compiler wrappers and use the compiler directly. Try using spack_f77 instead.
There was a problem hiding this comment.
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.
|
@becker33: can you help @serbanmaerean use our compiler flags interface for this? I think this is a good candidate. |
|
@becker33 can you pls let me know what compiler flags interface I need to use? Thanks so much. |
alalazo
left a comment
There was a problem hiding this comment.
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:') |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
This needs to be revisited to comply with the changes in #3206
|
Closing since there was no reply since November, but feel free to reopen if you think it should be reconsidered. |
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.