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.
This commit is contained in:
serbanmaerean 2018-04-26 17:50:14 -04:00 committed by Todd Gamblin
parent 0f35f00b6e
commit 963c103a67
2 changed files with 12 additions and 0 deletions

View file

@ -112,6 +112,12 @@ def fc_version(cls, fc):
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

View file

@ -113,6 +113,12 @@ def fc_version(cls, fc):
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