def use_mkl():
set_compiler(
cmd = 'ifort',
prefix = '',
infix = '_mp_',
suffix = '_',
debug = """
-g
-traceback
-gen-interfaces
-warn all
-check all
-fpe0
-ftrapuv
-I/opt/intel/mkl/include
""",
release = """
-fast
-I/opt/intel/mkl/include
""",
link = """
-L/opt/intel/mkl/lib/intel64
-lmkl_intel_lp64
-lmkl_core
-lmkl_sequential
-lpthread
-lm
""",
error_regex = '(error #|ld:)',
warning_regex = '(warning #|remark #)',
)
# needed to load mkl
# see: https://answers.launchpad.net/dolfin/+question/205219
import ctypes
ctypes.CDLL('libmkl_rt.so', ctypes.RTLD_GLOBAL)
评论列表
文章目录