200*200*200 = 8 Million elements with roughly as many nodes. The error message says that it's requesting ~95 MB which is well within reason when you consider that each piece of data needs to occupy several bytes, and each node and element have several pieces of data each. You're going to need a lot more memory than that once your equation systems and PETSc vectors are allocated...
Cody On Fri, Oct 25, 2013 at 9:34 AM, ernestol <[email protected]> wrote: > Hi all, > > I am changing my code from 2D to 3D. But I am having problens with the > memory usage. > I mannage to create an example that reproduce the error. As we can I > just generate the mesh and get all the memory. > The interesting part is that when I run the code (for Nelx,Nely and > Nelz>150) in 1 ,2 or 3 processors the code run completely. But in 4 or > more I have some memory issues. > I saw the parallel_mesh but the code didnt work even with it. Note sure > if I can use because the warning "Don't use this class unless you're > developing or debugging it." > I wonder how can I do with my code to solve bigger problens. > > Thanks! > > Ernesto > > CODE: > > #include <iostream> > #include <stdio.h> > > #include "libmesh/libmesh.h" > #include "libmesh/mesh.h" > #include "libmesh/mesh_generation.h" > #include "libmesh/equation_systems.h" > > using namespace libMesh; > using namespace std; > > int main (int argc, char** argv){ > LibMeshInit init (argc, argv); > Mesh mesh; > EquationSystems eq_sys(mesh); > int Nelx,Nely,Nelz; > Nelx = Nely = Nelz = 200; > cout << "Generating Mesh" << endl; > > > MeshTools::Generation::build_cube(mesh,Nelx,Nely,Nelz,0.,1.,0.,1.,0.,1.,HEX8); > cout << "Print Mesh Info" << endl; > mesh.print_info(); > return 0; > } > > The output is: > Generating Mesh > > > ===================================================================================== > = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES > = EXIT CODE: 9 > = CLEANING UP REMAINING PROCESSES > = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES > > ===================================================================================== > > And the following error > > Current memory used: 906046008 bytes > Maximum memory used: 985036960 bytes > ***Memory allocation failed for SetupCoarseGraph: adjncy. Requested > size: 95218200 bytes > > > > ------------------------------------------------------------------------------ > October Webinars: Code for Performance > Free Intel webinars can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most > from > the latest Intel processors and coprocessors. See abstracts and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk > _______________________________________________ > Libmesh-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libmesh-users > ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
