diff options
author | Simone Riva | 2017-06-15 13:23:48 +0200 |
---|---|---|
committer | Simone Riva | 2017-06-15 13:23:48 +0200 |
commit | aa4e17349058fba0c47635df43320e0da9f232b0 (patch) | |
tree | 9b49498c3e18f19eccfc6bd19b718595a1553fd8 | |
parent | 06ec3f56034a066dc2211352c0a072a4469c43ca (diff) | |
download | aur-aa4e17349058fba0c47635df43320e0da9f232b0.tar.gz |
1.13.0-2
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | intel.py | 142 |
3 files changed, 60 insertions, 90 deletions
@@ -1,7 +1,7 @@ pkgbase = python-numpy-mkl pkgdesc = Scientific tools for Python compiled with intel mkl pkgver = 1.13.0 - pkgrel = 1 + pkgrel = 2 url = http://numpy.scipy.org/ arch = i686 arch = x86_64 @@ -27,7 +27,7 @@ pkgbase = python-numpy-mkl sha256sums = dbbaaf3e86d0d138d42c61b1243d580bd6351088f0bcf2e44a7374c4559a1845 sha256sums = 86cd68a695a5e1d76f8e53cda70c888c4ed04349f15c8096d4492e346e7187e1 sha256sums = 882f2717deca0fd6a2e2384aac2dc7973c566f9cd2ba46777c3b5ffdffa814df - sha256sums = f2c6fa043b8c888f6df672a6031c3a4917909230236b725c6ce7e924a6d01462 + sha256sums = 98da2098f512f2e69d72e58cf1675c9125aef6f7118fce0d985b2c817312e12d sha256sums = a3faf52563f265b8adbb912c6acf969787a9d423e960c877ea9abd128976f814 sha256sums = 257adf2130c2cde081da61ac38d3fbce0c352d9b4af206d89d7a7e77c54b264a sha256sums = 257adf2130c2cde081da61ac38d3fbce0c352d9b4af206d89d7a7e77c54b264a @@ -8,7 +8,7 @@ pkgname="python-numpy-mkl" true && pkgname=('python-numpy-mkl' 'python2-numpy-mkl') #pkgname=('python-numpy') pkgver=1.13.0 -pkgrel=1 +pkgrel=2 pkgdesc="Scientific tools for Python compiled with intel mkl" arch=('i686' 'x86_64') license=('custom') @@ -23,7 +23,7 @@ source=( https://github.com/numpy/numpy/archive/v${pkgver}.tar.gz sha256sums=( 'dbbaaf3e86d0d138d42c61b1243d580bd6351088f0bcf2e44a7374c4559a1845' '86cd68a695a5e1d76f8e53cda70c888c4ed04349f15c8096d4492e346e7187e1' '882f2717deca0fd6a2e2384aac2dc7973c566f9cd2ba46777c3b5ffdffa814df' - 'f2c6fa043b8c888f6df672a6031c3a4917909230236b725c6ce7e924a6d01462' + '98da2098f512f2e69d72e58cf1675c9125aef6f7118fce0d985b2c817312e12d' 'a3faf52563f265b8adbb912c6acf969787a9d423e960c877ea9abd128976f814' '257adf2130c2cde081da61ac38d3fbce0c352d9b4af206d89d7a7e77c54b264a' '257adf2130c2cde081da61ac38d3fbce0c352d9b4af206d89d7a7e77c54b264a' @@ -1,8 +1,8 @@ # http://developer.intel.com/software/products/compilers/flin/ +from __future__ import division, absolute_import, print_function import sys -from numpy.distutils.cpuinfo import cpu from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file @@ -10,16 +10,22 @@ compilers = ['IntelFCompiler', 'IntelVisualFCompiler', 'IntelItaniumFCompiler', 'IntelItaniumVisualFCompiler', 'IntelEM64VisualFCompiler', 'IntelEM64TFCompiler'] + def intel_version_match(type): # Match against the important stuff in the version string return simple_version_match(start=r'Intel.*?Fortran.*?(?:%s).*?Version' % (type,)) + class BaseIntelFCompiler(FCompiler): def update_executables(self): f = dummy_fortran_file() self.executables['version_cmd'] = ['<F77>', '-FI', '-V', '-c', f + '.f', '-o', f + '.o'] + def runtime_library_dir_option(self, dir): + return '-Wl,-rpath="%s"' % dir + + class IntelFCompiler(BaseIntelFCompiler): compiler_type = 'intel' @@ -40,64 +46,22 @@ class IntelFCompiler(BaseIntelFCompiler): } pic_flags = ['-fPIC'] - module_dir_switch = '-module ' # Don't remove ending space! + module_dir_switch = '-module ' # Don't remove ending space! module_include_switch = '-I' - def get_flags(self): - v = self.get_version() - if v >= '10.0': - # Use -fPIC instead of -KPIC. - pic_flags = ['-fPIC'] - else: - pic_flags = ['-KPIC'] - opt = pic_flags + ["-cm"] - return opt - def get_flags_free(self): - return ["-FR"] + return ['-FR'] - def get_flags_opt(self): - return ['-O3 -xHost -openmp'] + def get_flags(self): + return ['-fPIC'] - def get_flags_arch(self): + def get_flags_opt(self): # Scipy test failures with -O2 v = self.get_version() - opt = [] - if cpu.has_fdiv_bug(): - opt.append('-fdiv_check') - if cpu.has_f00f_bug(): - opt.append('-0f_check') - if cpu.is_PentiumPro() or cpu.is_PentiumII() or cpu.is_PentiumIII(): - opt.extend(['-tpp6']) - elif cpu.is_PentiumM(): - opt.extend(['-tpp7','-xB']) - elif cpu.is_Pentium(): - opt.append('-tpp5') - elif cpu.is_PentiumIV() or cpu.is_Xeon(): - opt.extend(['-tpp7','-xW']) - if v and v <= '7.1': - if cpu.has_mmx() and (cpu.is_PentiumII() or cpu.is_PentiumIII()): - opt.append('-xM') - elif v and v >= '8.0': - if cpu.is_PentiumIII(): - opt.append('-xK') - if cpu.has_sse3(): - opt.extend(['-xP']) - elif cpu.is_PentiumIV(): - opt.append('-xW') - if cpu.has_sse2(): - opt.append('-xN') - elif cpu.is_PentiumM(): - opt.extend(['-xB']) - if (cpu.is_Xeon() or cpu.is_Core2() or cpu.is_Core2Extreme()) and cpu.getNCPUs()==2: - opt.extend(['-xT']) - if cpu.has_sse3() and (cpu.is_PentiumIV() or cpu.is_CoreDuo() or cpu.is_CoreSolo()): - opt.extend(['-xP']) - - if cpu.has_sse2(): - opt.append('-arch SSE2') - elif cpu.has_sse(): - opt.append('-arch SSE') - return opt + mpopt = 'openmp' if v and int(v.split('.')[0]) < 15 else 'qopenmp' + return ['-xhost -fp-model strict -O1 -{}'.format(mpopt)] + + def get_flags_arch(self): + return [] def get_flags_linker_so(self): opt = FCompiler.get_flags_linker_so(self) @@ -111,9 +75,10 @@ class IntelFCompiler(BaseIntelFCompiler): opt.remove('-shared') except ValueError: idx = 0 - opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup', '-Wl,-framework,Python'] + opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup'] return opt + class IntelItaniumFCompiler(IntelFCompiler): compiler_type = 'intele' compiler_aliases = () @@ -133,6 +98,7 @@ class IntelItaniumFCompiler(IntelFCompiler): 'ranlib' : ["ranlib"] } + class IntelEM64TFCompiler(IntelFCompiler): compiler_type = 'intelem' compiler_aliases = () @@ -144,7 +110,7 @@ class IntelEM64TFCompiler(IntelFCompiler): executables = { 'version_cmd' : None, - 'compiler_f77' : [None, "-FI", "-w90", "-w95"], + 'compiler_f77' : [None, "-FI"], 'compiler_fix' : [None, "-FI"], 'compiler_f90' : [None], 'linker_so' : ['<F90>', "-shared"], @@ -152,15 +118,21 @@ class IntelEM64TFCompiler(IntelFCompiler): 'ranlib' : ["ranlib"] } + def get_flags(self): + return ['-fPIC'] + + def get_flags_opt(self): # Scipy test failures with -O2 + v = self.get_version() + mpopt = 'openmp' if v and int(v.split('.')[0]) < 15 else 'qopenmp' + return ['-fp-model strict -O1 -{}'.format(mpopt)] + def get_flags_arch(self): - opt = [] - if cpu.is_PentiumIV() or cpu.is_Xeon(): - opt.extend(['-tpp7', '-xW']) - return opt + return [''] # Is there no difference in the version string between the above compilers # and the Visual compilers? + class IntelVisualFCompiler(BaseIntelFCompiler): compiler_type = 'intelv' description = 'Intel Visual Fortran Compiler for 32-bit apps' @@ -176,46 +148,39 @@ class IntelVisualFCompiler(BaseIntelFCompiler): executables = { 'version_cmd' : None, - 'compiler_f77' : [None,"-FI","-w90","-w95"], - 'compiler_fix' : [None,"-FI","-4L72","-w"], + 'compiler_f77' : [None], + 'compiler_fix' : [None], 'compiler_f90' : [None], - 'linker_so' : ['<F90>', "-shared"], + 'linker_so' : [None], 'archiver' : [ar_exe, "/verbose", "/OUT:"], 'ranlib' : None } compile_switch = '/c ' - object_switch = '/Fo' #No space after /Fo! - library_switch = '/OUT:' #No space after /OUT:! - module_dir_switch = '/module:' #No space after /module: + object_switch = '/Fo' # No space after /Fo! + library_switch = '/OUT:' # No space after /OUT:! + module_dir_switch = '/module:' # No space after /module: module_include_switch = '/I' def get_flags(self): - opt = ['/nologo','/MD','/nbs','/Qlowercase','/us'] + opt = ['/nologo', '/MD', '/nbs', '/names:lowercase', '/assume:underscore'] return opt def get_flags_free(self): - return ["-FR"] + return [] def get_flags_debug(self): - return ['/4Yb','/d2'] + return ['/4Yb', '/d2'] def get_flags_opt(self): - return ['/O1'] + return ['/O1'] # Scipy test failures with /O2 def get_flags_arch(self): - opt = [] - if cpu.is_PentiumPro() or cpu.is_PentiumII(): - opt.extend(['/G6','/Qaxi']) - elif cpu.is_PentiumIII(): - opt.extend(['/G6','/QaxK']) - elif cpu.is_Pentium(): - opt.append('/G5') - elif cpu.is_PentiumIV(): - opt.extend(['/G7','/QaxW']) - if cpu.has_mmx(): - opt.append('/QaxM') - return opt + return ["/arch:IA32", "/QaxSSE3"] + + def runtime_library_dir_option(self, dir): + raise NotImplementedError + class IntelItaniumVisualFCompiler(IntelVisualFCompiler): compiler_type = 'intelev' @@ -223,24 +188,28 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler): version_match = intel_version_match('Itanium') - possible_executables = ['efl'] # XXX this is a wild guess + possible_executables = ['efl'] # XXX this is a wild guess ar_exe = IntelVisualFCompiler.ar_exe executables = { 'version_cmd' : None, - 'compiler_f77' : [None,"-FI","-w90","-w95"], - 'compiler_fix' : [None,"-FI","-4L72","-w"], + 'compiler_f77' : [None, "-FI", "-w90", "-w95"], + 'compiler_fix' : [None, "-FI", "-4L72", "-w"], 'compiler_f90' : [None], - 'linker_so' : ['<F90>',"-shared"], + 'linker_so' : ['<F90>', "-shared"], 'archiver' : [ar_exe, "/verbose", "/OUT:"], 'ranlib' : None } + class IntelEM64VisualFCompiler(IntelVisualFCompiler): compiler_type = 'intelvem' description = 'Intel Visual Fortran Compiler for 64-bit apps' - version_match = simple_version_match(start='Intel\(R\).*?64,') + version_match = simple_version_match(start=r'Intel\(R\).*?64,') + + def get_flags_arch(self): + return [''] if __name__ == '__main__': @@ -250,3 +219,4 @@ if __name__ == '__main__': compiler = new_fcompiler(compiler='intel') compiler.customize() print(compiler.get_version()) + |