diff options
author | serbanmaerean <serban@us.ibm.com> | 2018-04-26 17:50:14 -0400 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-04-26 14:50:14 -0700 |
commit | 963c103a67725f3c2fc4da64dd774085876fafca (patch) | |
tree | bb7a69de98d1409ed368dd7149d5f43390a2efab /lib | |
parent | 0f35f00b6e2e5e8d9f58ca8d899c84ca9da71fb8 (diff) | |
download | spack-963c103a67725f3c2fc4da64dd774085876fafca.tar.gz spack-963c103a67725f3c2fc4da64dd774085876fafca.tar.bz2 spack-963c103a67725f3c2fc4da64dd774085876fafca.tar.xz spack-963c103a67725f3c2fc4da64dd774085876fafca.zip |
XL Fortran compiler >= 16.0 is synced with C compiler version (#7887)
* Use reported version of IBM XL Fortran compiler for compiler versions >= 16.0.
Starting with the April 2018 release, the IBM XL C and Fortran compilers report the same version, 16.0. Consequently, there is no need to downgrade the Fortran compiler version to match that of the C compiler.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/compilers/xl.py | 6 | ||||
-rw-r--r-- | lib/spack/spack/compilers/xl_r.py | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py index 8fda5cb536..1e5ca52d33 100644 --- a/lib/spack/spack/compilers/xl.py +++ b/lib/spack/spack/compilers/xl.py @@ -112,6 +112,12 @@ class Xl(Compiler): older version of AIX and linux on power. """ fver = get_compiler_version(fc, '-qversion', r'([0-9]?[0-9]\.[0-9])') + if fver >= 16: + """Starting with version 16.1, the XL C and Fortran compilers + have the same version. So no need to downgrade the Fortran + compiler version to match that of the C compiler version. + """ + return str(fver) cver = float(fver) - 2 if cver < 10: cver = cver - 0.1 diff --git a/lib/spack/spack/compilers/xl_r.py b/lib/spack/spack/compilers/xl_r.py index 1afaa45e63..717d631873 100644 --- a/lib/spack/spack/compilers/xl_r.py +++ b/lib/spack/spack/compilers/xl_r.py @@ -113,6 +113,12 @@ class XlR(Compiler): older version of AIX and linux on power. """ fver = get_compiler_version(fc, '-qversion', r'([0-9]?[0-9]\.[0-9])') + if fver >= 16: + """Starting with version 16.1, the XL C and Fortran compilers + have the same version. So no need to downgrade the Fortran + compiler version to match that of the C compiler version. + """ + return str(fver) cver = float(fver) - 2 if cver < 10: cver = cver - 0.1 |