Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit c3c26dfc authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed memory bug in arh reader.

parent 5a800fbe
......@@ -110,7 +110,7 @@ namespace AMDiS {
("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;
......@@ -58,6 +58,8 @@ namespace AMDiS {
ofstream file;, ios::out | ios::binary | ios::trunc);
......@@ -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. ===
......@@ -41,11 +41,13 @@ namespace AMDiS {
Parameters::get("parallel->use zero start vector", zeroStartVector);
Parameters::get("parallel->always create nnz structure",
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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment