Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
c3c26dfc
Commit
c3c26dfc
authored
Aug 14, 2012
by
Thomas Witkowski
Browse files
Fixed memory bug in arh reader.
parent
5a800fbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/io/ArhReader.cc
View file @
c3c26dfc
...
...
@@ -110,7 +110,7 @@ namespace AMDiS {
TEST_EXIT
(
file
.
is_open
())
(
"Cannot open file %s
\n
"
,
filename
.
c_str
());
string
typeId
=
""
;
string
typeId
(
4
,
' '
)
;
uint32_t
nMacroElements
=
0
;
uint32_t
nValueVectors
=
0
;
uint32_t
nAllValues
=
0
;
...
...
AMDiS/src/io/ArhWriter.cc
View file @
c3c26dfc
...
...
@@ -58,6 +58,8 @@ namespace AMDiS {
}
#endif
exit
(
0
);
ofstream
file
;
file
.
open
(
filename
.
c_str
(),
ios
::
out
|
ios
::
binary
|
ios
::
trunc
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
c3c26dfc
...
...
@@ -84,6 +84,17 @@ namespace AMDiS {
MatAssemblyBegin
(
matIntInt
,
MAT_FINAL_ASSEMBLY
);
MatAssemblyEnd
(
matIntInt
,
MAT_FINAL_ASSEMBLY
);
if
(
printMatInfo
)
{
MatInfo
matInfo
;
MatGetInfo
(
matIntInt
,
MAT_GLOBAL_SUM
,
&
matInfo
);
MSG
(
"Matrix info:
\n
"
);
MSG
(
" memory usage: %e MB
\n
"
,
matInfo
.
memory
/
(
1024.0
*
1024.0
));
MSG
(
" mallocs: %d
\n
"
,
static_cast
<
int
>
(
matInfo
.
mallocs
));
MSG
(
" nz allocated: %d
\n
"
,
static_cast
<
int
>
(
matInfo
.
nz_allocated
));
MSG
(
" nz used: %d
\n
"
,
static_cast
<
int
>
(
matInfo
.
nz_used
));
MSG
(
" nz unneeded: %d
\n
"
,
static_cast
<
int
>
(
matInfo
.
nz_unneeded
));
}
// === Remove Dirichlet BC DOFs. ===
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.h
View file @
c3c26dfc
...
...
@@ -41,11 +41,13 @@ namespace AMDiS {
petscSolVec
(
PETSC_NULL
),
lastMeshNnz
(
0
),
zeroStartVector
(
false
),
alwaysCreateNnzStructure
(
false
)
alwaysCreateNnzStructure
(
false
),
printMatInfo
(
false
)
{
Parameters
::
get
(
"parallel->use zero start vector"
,
zeroStartVector
);
Parameters
::
get
(
"parallel->always create nnz structure"
,
alwaysCreateNnzStructure
);
Parameters
::
get
(
"parallel->print matrix info"
,
printMatInfo
);
}
void
fillPetscMatrix
(
Matrix
<
DOFMatrix
*>
*
mat
);
...
...
@@ -118,6 +120,10 @@ namespace AMDiS {
/// operators using DOFVectors from old timestep containing many zeros due to
/// some phase fields.
bool
alwaysCreateNnzStructure
;
/// If true, after parallel assembling, information about the matrix
/// are printed.
bool
printMatInfo
;
};
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment