escript Revision_
MKL.h
Go to the documentation of this file.
1
2/*****************************************************************************
3*
4* Copyright (c) 2003-2020 by The University of Queensland
5* http://www.uq.edu.au
6*
7* Primary Business: Queensland, Australia
8* Licensed under the Apache License, version 2.0
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12* Development 2012-2013 by School of Earth Sciences
13* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14* Development from 2019 by School of Earth and Environmental Sciences
15**
16*****************************************************************************/
17
18
19/****************************************************************************/
20
21/* Paso: interface to intel MKL sparse solver */
22
23/****************************************************************************/
24
25/* Copyrights by ACcESS Australia 2006 */
26/* Author: Lutz Gross, l.gross@uq.edu.au */
27
28/****************************************************************************/
29
30#ifndef __PASO_MKL_H__
31#define __PASO_MKL_H__
32
33#include "SparseMatrix.h"
34
35namespace paso {
36
37#ifdef ESYS_INDEXTYPE_LONG
38#define ES_PARDISO pardiso_64
39#define ES_MKL_INT MKL_INT64
40#else
41#define ES_PARDISO pardiso
42#define ES_MKL_INT MKL_INT
43#endif
44
45#ifdef ESYS_HAVE_MKL
46#include <mkl_pardiso.h>
47#endif
48
49
50#define MKL_ERROR_NO 0
51#define MKL_MTYPE_REAL_SYM -2
52#define MKL_MTYPE_REAL_UNSYM 11
53
54#define MKL_REORDERING_MINIMUM_DEGREE 0
55#define MKL_REORDERING_NESTED_DISSECTION 2
56#define MKL_REORDERING_NESTED_DISSECTION_OMP 3
57#define MKL_PHASE_SYMBOLIC_FACTORIZATION 11
58#define MKL_PHASE_FACTORIZATION 22
59#define MKL_PHASE_SOLVE 33
60#define MKL_PHASE_RELEASE_MEMORY -1
61
62
63void PASO_DLL_API MKL_free(SparseMatrix<double>* A);
64void PASO_DLL_API MKL_free(SparseMatrix<cplx_t>* A);
65
66void PASO_DLL_API MKL_solve(SparseMatrix_ptr<double> A, double* out, double* in, index_t reordering,
67 dim_t numRefinements, bool verbose);
68void PASO_DLL_API MKL_solve(SparseMatrix_ptr<cplx_t> A, cplx_t* out, cplx_t* in, index_t reordering,
69 dim_t numRefinements, bool verbose);
70
71} // namespace paso
72
73#endif // __PASO_MKL_H__
74
index_t dim_t
Definition DataTypes.h:66
int index_t
type for array/matrix indices used both globally and on each rank
Definition DataTypes.h:61
Definition BiCGStab.cpp:25
void MKL_solve(SparseMatrix_ptr< double > A, double *out, double *in, index_t reordering, dim_t numRefinements, bool verbose)
Definition MKL.cpp:66
boost::shared_ptr< SparseMatrix< T > > SparseMatrix_ptr
Definition SparseMatrix.h:37
void MKL_free(SparseMatrix< double > *A)
Definition MKL.cpp:35
#define PASO_DLL_API
Definition paso/src/system_dep.h:29