Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance systemtools.py to also support POWER systems #1044

Merged
merged 23 commits into from
Feb 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f3db58e
fix get_cpu_model in case /proc/cpuinfo doesn't list a model name
boegel Sep 12, 2014
b2ab456
enhance get_cpu_speed to also support determining CPU frequency on PO…
boegel Sep 12, 2014
b97f84f
Merge branch 'develop' into systemtools_fixes_power
boegel Feb 3, 2015
00bfdb5
clean up implementation of get_cpu_speed
boegel Feb 25, 2015
6f900a4
thoroughly test possible code paths in get_cpu_speed by mocking used …
boegel Feb 25, 2015
82f3b4a
clean up get_avail_core_count, enhance testing for it
boegel Feb 25, 2015
526c4fe
clean up get_cpu_vendor and enhance dedicated test for it
boegel Feb 25, 2015
793af55
clean up get_cpu_model and enhance dedicated test for it
boegel Feb 25, 2015
d6b33a0
enhance error message in get_glibc_version
boegel Feb 25, 2015
708de3e
moar systemtools testing via mocking used functions
boegel Feb 25, 2015
1a9f9a3
add get_cpu_family() function in systemtools.py + dedicated test for it
boegel Feb 25, 2015
b6f57c3
use get_cpu_family() rather than get_cpu_vendor() for picking optarch…
boegel Feb 25, 2015
c977b3e
use -mcpu=native for GCC/Clang on POWER
boegel Feb 25, 2015
9bde497
split up systemtools tests into smaller ones (native vs mocked)
boegel Feb 25, 2015
900b660
Merge branch 'develop' into systemtools_fixes_power
boegel Feb 25, 2015
0f8b583
re-add code that shouldn't have been removed in compiler.py
boegel Feb 25, 2015
297dea1
fix broken test
boegel Feb 25, 2015
11d199b
fix small remark
boegel Feb 25, 2015
eab3153
add support for letting get_cpu_vendor return IBM + code cleanup
boegel Feb 25, 2015
cdc875d
fix test_cpu_vendors test
boegel Feb 25, 2015
403acba
fix mocked version of os.path.exists in systemtools tests, only retur…
boegel Feb 25, 2015
06ec32a
fix remarks in systemtools.py
boegel Feb 26, 2015
7ff5511
use a single regex for obtaining model name
boegel Feb 26, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions easybuild/toolchains/compiler/clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,38 +53,38 @@ class Clang(Compiler):
'loop-vectorize': ['fvectorize'],
'basic-block-vectorize': ['fslp-vectorize'],
'optarch':'march=native',

# Clang's options do not map well onto these precision modes. The flags enable and disable certain classes of
# optimizations.
#
# -fassociative-math: allow re-association of operands in series of floating-point operations, violates the
# ISO C and C++ language standard by possibly changing computation result.
# -freciprocal-math: allow optimizations to use the reciprocal of an argument rather than perform division.
# -fsigned-zeros: do not allow optimizations to treat the sign of a zero argument or result as insignificant.
# -fhonor-infinities: disallow optimizations to assume that arguments and results are not +/- Infs.
# -fhonor-nans: disallow optimizations to assume that arguments and results are not +/- NaNs.
# -ffinite-math-only: allow optimizations for floating-point arithmetic that assume that arguments and results
# are not NaNs or +-Infs (equivalent to -fno-honor-nans -fno-honor-infinities)
# -funsafe-math-optimizations: allow unsafe math optimizations (implies -fassociative-math, -fno-signed-zeros,
# -freciprocal-math).
# -ffast-math: an umbrella flag that enables all optimizations listed above, provides preprocessor macro
# __FAST_MATH__.
#
# Using -fno-fast-math is equivalent to disabling all individual optimizations, see
# http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?view=markup (lines 2100 and following)
#
# 'strict', 'precise' and 'defaultprec' are all ISO C++ and IEEE complaint, but we explicitly specify details
# flags for strict and precise for robustness against future changes.
'strict': ['fno-fast-math'],
'precise': ['fno-unsafe-math-optimizations'],
'defaultprec': [],
'loose': ['ffast-math', 'fno-unsafe-math-optimizations'],
'veryloose': ['ffast-math'],
# Clang's options do not map well onto these precision modes. The flags enable and disable certain classes of
# optimizations.
#
# -fassociative-math: allow re-association of operands in series of floating-point operations, violates the
# ISO C and C++ language standard by possibly changing computation result.
# -freciprocal-math: allow optimizations to use the reciprocal of an argument rather than perform division.
# -fsigned-zeros: do not allow optimizations to treat the sign of a zero argument or result as insignificant.
# -fhonor-infinities: disallow optimizations to assume that arguments and results are not +/- Infs.
# -fhonor-nans: disallow optimizations to assume that arguments and results are not +/- NaNs.
# -ffinite-math-only: allow optimizations for floating-point arithmetic that assume that arguments and results
# are not NaNs or +-Infs (equivalent to -fno-honor-nans -fno-honor-infinities)
# -funsafe-math-optimizations: allow unsafe math optimizations (implies -fassociative-math, -fno-signed-zeros,
# -freciprocal-math).
# -ffast-math: an umbrella flag that enables all optimizations listed above, provides preprocessor macro
# __FAST_MATH__.
#
# Using -fno-fast-math is equivalent to disabling all individual optimizations, see
# http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?view=markup (lines 2100 and following)
#
# 'strict', 'precise' and 'defaultprec' are all ISO C++ and IEEE complaint, but we explicitly specify details
# flags for strict and precise for robustness against future changes.
'strict': ['fno-fast-math'],
'precise': ['fno-unsafe-math-optimizations'],
'defaultprec': [],
'loose': ['ffast-math', 'fno-unsafe-math-optimizations'],
'veryloose': ['ffast-math'],
}

COMPILER_OPTIMAL_ARCHITECTURE_OPTION = {
systemtools.INTEL : 'march=native',
systemtools.AMD : 'march=native'
systemtools.AMD : 'march=native',
systemtools.POWER: 'mcpu=native', # no support for march=native on POWER
}

COMPILER_CC = 'clang'
Expand Down
43 changes: 21 additions & 22 deletions easybuild/toolchains/compiler/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,30 @@ class Gcc(Compiler):

COMPILER_FAMILY = TC_CONSTANT_GCC
COMPILER_UNIQUE_OPTS = {
'loop': (False, "Automatic loop parallellisation"),
'f2c': (False, "Generate code compatible with f2c and f77"),
'lto':(False, "Enable Link Time Optimization"),
}
'loop': (False, "Automatic loop parallellisation"),
'f2c': (False, "Generate code compatible with f2c and f77"),
'lto':(False, "Enable Link Time Optimization"),
}
COMPILER_UNIQUE_OPTION_MAP = {
'i8': 'fdefault-integer-8',
'r8': 'fdefault-real-8',
'unroll': 'funroll-loops',
'f2c': 'ff2c',
'loop': ['ftree-switch-conversion', 'floop-interchange',
'floop-strip-mine', 'floop-block'],
'lto':'flto',
'optarch':'march=native',
'openmp':'fopenmp',
'strict': ['mieee-fp', 'mno-recip'],
'precise':['mno-recip'],
'defaultprec':[],
'loose': ['mrecip', 'mno-ieee-fp'],
'veryloose': ['mrecip=all', 'mno-ieee-fp'],
}
'i8': 'fdefault-integer-8',
'r8': 'fdefault-real-8',
'unroll': 'funroll-loops',
'f2c': 'ff2c',
'loop': ['ftree-switch-conversion', 'floop-interchange', 'floop-strip-mine', 'floop-block'],
'lto': 'flto',
'openmp': 'fopenmp',
'strict': ['mieee-fp', 'mno-recip'],
'precise':['mno-recip'],
'defaultprec':[],
'loose': ['mrecip', 'mno-ieee-fp'],
'veryloose': ['mrecip=all', 'mno-ieee-fp'],
}

COMPILER_OPTIMAL_ARCHITECTURE_OPTION = {
systemtools.INTEL : 'march=native',
systemtools.AMD : 'march=native'
}
systemtools.AMD : 'march=native',
systemtools.INTEL : 'march=native',
systemtools.POWER: 'mcpu=native', # no support for march=native on POWER
}

COMPILER_CC = 'gcc'
COMPILER_CXX = 'g++'
Expand Down
Loading