Skip to content

Commit

Permalink
resolving memory issues on some machines
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit76 committed Mar 25, 2022
1 parent 63d11d3 commit 6060be5
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions utils/integral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -674,16 +674,21 @@ void readIntegralsCholeskyAndInitializeDeterminantStaticVariables(string fcidump

dataset_chol = H5Dopen(file, "/chol", H5P_DEFAULT);
status = H5Dread(dataset_chol, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, eri);
for (int n = 0; n < nchol; n++) {
MatrixXd cholMat = MatrixXd::Zero(norbs, norbs);
for (int i = 0; i < norbs; i++) {
for (int j = 0; j < norbs; j++) {
cholMat(i, j) = eri[n * norbs * norbs + i * norbs + j];
for (int p = 0; p < commsize; p++) {
if (commrank == p) {
for (int n = 0; n < nchol; n++) {
MatrixXd cholMat = MatrixXd::Zero(norbs, norbs);
for (int i = 0; i < norbs; i++) {
for (int j = 0; j < norbs; j++) {
cholMat(i, j) = eri[n * norbs * norbs + i * norbs + j];
}
}
chol.push_back(cholMat);
}
delete [] eri;
}
chol.push_back(cholMat);
MPI_Barrier(MPI_COMM_WORLD);
}
delete [] eri;

coreE = 0.;
double energy_core[1];
Expand Down

0 comments on commit 6060be5

Please sign in to comment.