Thank you for your suggestion Prof. Bangerth. I was able to pinpoint the
problem in my code. I am trying to write all the stress and strain
components to the output *vtu files. Below is how initialize the variables
needed for that before filling them up with quadrature point history. The
lines of code in red are where the memory error is arising from. Is there a
better way of handling this process, or am I making some fundamental
mistake?
//Output stress and strain componenets
std::vector<std::vector<Vector<double>>> history_field_stress(dim,
std::vector<Vector<double>>(dim)),
local_history_values_at_qpoints(dim, std::vector<Vector<double>>(dim)),
local_history_fe_values(dim, std::vector<Vector<double>>(dim));
std::vector<std::vector< Vector<double>>> history_field_strain(dim,
std::vector<Vector<double>>(dim));
for (unsigned int i=0; i<dim; i++)
for (unsigned int j=0; j<dim; j++)
{
history_field_stress[i][j].reinit(history_dof_handler.n_dofs());
local_history_values_at_qpoints[i][j].reinit(qf_cell.size());
local_history_fe_values[i][j].reinit(history_fe.dofs_per_cell);
history_field_strain[i][j].reinit(history_dof_handler.n_dofs());
}
Thanks in advance,
Raghunandan.
On Friday, August 19, 2022 at 2:35:48 PM UTC-5 Wolfgang Bangerth wrote:
> On 8/19/22 13:29, Raghunandan Pratoori wrote:
> >
> > I am trying to run a simulation with grid refine factor 7. I know this
> is
> > significantly large and any improper code will raise memory issues. I am
> in
> > fact getting memory issues after completion of first time step and I am
> not
> > able to pin point where I probably am making a mistake.
>
> Raghunandan:
> somewhere in your code, there is a place where something wants to allocate
> 134
> MB of memory, but your system does not have this much memory left. You
> need to
> find out where this is, either by strategically placing print statements
> into
> your code to see how far it runs, or (better!) by running the program in a
> debugger.
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> www: http://www.math.colostate.edu/~bangerth/
>
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/9394451e-b300-4348-9d69-db43186dff0bn%40googlegroups.com.