I’m writing here since I’m having an issue in memory allocation during MPI computation using PETSc.
The problem is the following one: I’m using the same script and the same amount of resources and increasing the mesh size (which I’m uploading with the command readmesh3) above a certain threshold (~ 1GB meshes) I get the following error (repeted for each mpi rank) right at the line with the command buildDmesh(Th):
***Failed to allocate memory for adjncy.
current line = 122 mpirank 131 / 350
Assertion fail : (nbv_surf)
line :1981, in file ../femlib/Mesh3dn.cpp
err code 6 , mpirank 131
I’m working on a cluster which is very big, using 175 GB of memory for each node (working now on 15 nodes) so it seems strange to me to have overcome the maximum available memory on the cluster nodes on which my simulation is currently running.
Is someone able to tell me where the problem can be, and how it can be solved?
Exactly! Everything works smoothly since the mesh size is below 1GB, once overcome that threshold the above mentioned error message appears. If it can help I have put a “cout” right after the buildDmesh command (if mpirank == 0) and the execution prints that cout line. Indeed the execution is never killed, but simply shows the error message and freeze without computing anything (also waiting several hours when for meshes slightly below 1GB in few minutes the first results were already computed)
the mesh is saved in .mesh format and exported from gmsh
Could you, by any chance, load a coarse mesh and then perform uniform mesh refinement? Or do you need to load an initial fine mesh to properly resolve, e.g., nonlinear boundaries?
Sorry for disturbing you again @prj , can you tell me how, in this case I can move my results to the ThPlt mesh since after the buildMat command Th is now refined and ThPlt no?
I was doing it since I need to compute integral values from the computed (distributed) variable. Is it possible to be done just keeping it distributed?
Yes, there are some examples in the folder examples/hpddm, using, e.g., the partition of unity. It depends on what you compute exactly, but you should not use the initial global mesh for something as trivial as computing integrals.
In my case I need to compute a power deposition arising from an electrical current distribution which is evaluated starting from the computed magntic vector potential (solving basically transient ampere law).
What I was doing since today was:
Computing the distributed solution (magnetic vector potential) from solving the algebraic system (sol=A*b^-1) defined on the distributed mesh
“Moving” the computed magnetic vector potential from distributed mesh to global one (ThPlt) with the following list of command:
Compute from the obtained [AgxS, AgyS, AgzS] and [Ag0xS, Ag0yS, Ag0zS] the information I need (i.e. Current distribution and deposited power) on the global mesh (ThPlt)
So what you reccomend is to avoid the step 2 and perform step 3 in a “distributed way”. Is that correct?
If this is the case, can you provide me a more precise reference within the folder you are mentioning where I can take inspiration?