Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Backofen, Rainer
amdis
Commits
bd724c08
Commit
bd724c08
authored
16 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
* Pardiso Solver
parent
a9c641bc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AMDiS/src/PardisoSolver.cc
+47
-1
47 additions, 1 deletion
AMDiS/src/PardisoSolver.cc
with
47 additions
and
1 deletion
AMDiS/src/PardisoSolver.cc
+
47
−
1
View file @
bd724c08
...
...
@@ -4,6 +4,7 @@
#ifdef HAVE_MKL
#include
<mkl.h>
#include
<mkl_pardiso.h>
namespace
AMDiS
{
...
...
@@ -120,7 +121,7 @@ namespace AMDiS {
iparm
[
0
]
=
1
;
// No solver default
iparm
[
1
]
=
2
;
// Fill-in reordering from METIS
iparm
[
2
]
=
1
;
// Number of threads
iparm
[
2
]
=
mkl_get_max_threads
()
;
// Number of threads
iparm
[
7
]
=
2
;
// Max numbers of iterative refinement steps
iparm
[
9
]
=
13
;
// Perturb the pivot elements with 1e-13
iparm
[
10
]
=
1
;
// Use nonsymmetric permutation and scaling MPS
...
...
@@ -151,7 +152,52 @@ namespace AMDiS {
PARDISO
(
pt
,
&
maxfct
,
&
mnum
,
&
mtype
,
&
phase
,
&
n
,
a
,
ia
,
ja
,
&
idum
,
&
nRhs
,
iparm
,
&
msglvl
,
&
ddum
,
&
ddum
,
&
error
);
TEST_EXIT
(
error
==
0
)(
"Intel MKL Pardiso error during symbolic factorization: %d
\n
"
,
error
);
// Numerical factorization
phase
=
22
;
PARDISO
(
pt
,
&
maxfct
,
&
mnum
,
&
mtype
,
&
phase
,
&
n
,
a
,
ia
,
ja
,
&
idum
,
&
nRhs
,
iparm
,
&
msglvl
,
&
ddum
,
&
ddum
,
&
error
);
TEST_EXIT
(
error
==
0
)(
"Intel MKL Pardiso error during numerical factorization: %d
\n
"
,
error
);
// Back substitution and iterative refinement
phase
=
33
;
iparm
[
7
]
=
2
;
// Max numbers of iterative refinement steps
PARDISO
(
pt
,
&
maxfct
,
&
mnum
,
&
mtype
,
&
phase
,
&
n
,
a
,
ia
,
ja
,
&
idum
,
&
nRhs
,
iparm
,
&
msglvl
,
bvec
,
xvec
,
&
error
);
TEST_EXIT
(
error
==
0
)(
"Intel MKL Pardiso error during solution: %d
\n
"
,
error
);
// Termination and release of memory
phase
=
-
1
;
PARDISO
(
pt
,
&
maxfct
,
&
mnum
,
&
mtype
,
&
phase
,
&
n
,
a
,
ia
,
ja
,
&
idum
,
&
nRhs
,
iparm
,
&
msglvl
,
&
ddum
,
&
ddum
,
&
error
);
// Copy and resort solution.
for
(
int
i
=
0
;
i
<
x
->
getSize
();
i
++
)
{
DOFVector
<
double
>::
Iterator
it
(
x
->
getDOFVector
(
i
),
USED_DOFS
);
int
counter
=
0
;
for
(
it
.
reset
();
!
it
.
end
();
it
++
,
counter
++
)
{
*
it
=
xvec
[
counter
*
nComponents
+
i
];
}
}
// Calculate and print the residual.
*
p
=
*
x
;
*
p
*=
-
1.0
;
matVec
->
matVec
(
NoTranspose
,
*
p
,
*
r
);
*
r
+=
*
b
;
this
->
residual
=
norm
(
r
);
MSG
(
"Residual: %e
\n
"
,
this
->
residual
);
free
(
a
);
free
(
ja
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment