Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Shengli Xu <shengli.xu@gm...>  20070703 04:08:56
Attachments:
Message as HTML

Dear Libmesh users: The problem is runned on my pc with uniprocessor. I use libmesh0.5.0. My problem is "Out of memory". There are six EquationSystems in my program. Each system have 116424 dofs. The first and second system can be solved, but the memory is used up with these two systems. When solving the third system, the error is "Out of memory, This could be due to allocating too large an object or bleeding by not properly destroying unneeded objects." The reason is the memory is used up. Maybe there are two ways to solve. The program solves the stokes flow, The brick element with 20 nodes is used. One is that Can I save memory with some Petsc solve options such as "pc_type ilu"? When I solve the 2D stokes with Q84 element, the option "pc_type ilu pc_ilu_levels 4" is very efficient. But in 3D model, the error is "Out of memeory" at solving the first system "Load case x". The other is Can I free some memory when one system is solved such as the global stiffness matrix? The system and it's result are needed for the later compute, so the system can not be cleared. The following is the output with "malloc_log", the computer has 2G memory: Input the file name of FE model data The FE model file is:FE3d20.unv Mesh Information: mesh_dimension()=3 spatial_dimension()=3 n_nodes()=35721 n_elem()=8000 n_local_elem()=8000 n_active_elem()=8000 n_subdomains()=1 n_processors()=1 processor_id()=0 Computing Load Case X Initinalize the Equation ... Apply periodic boundary condition... Input file of periodic b.c. node PeribcFile=peri3d20.txt p2num=3363 EquationSystems n_systems()=1 System "Stokes_Darcy_x" Type "LinearImplicit" Variables="u" "v" "w" "p" Finite Element Types="0" "0" "0" "0" Approximation Orders="2" "2" "2" "1" n_dofs()=116424 n_local_dofs()=116424 n_constrained_dofs()=11163 n_vectors()=3 Assembly Stiffness matrix... Linear solver converged at step: 1236, final residual: 3.31545e16 Output the result to file ... Compute Load Case Y Apply periodic boundary condition... Input file of periodic b.c. node PeribcFile=peri3d20.txt p2num=3363 EquationSystems n_systems()=1 System "Stokes_Darcy_y" Type "LinearImplicit" Variables="u" "v" "w" "p" Finite Element Types="0" "0" "0" "0" Approximation Orders="2" "2" "2" "1" n_dofs()=116424 n_local_dofs()=116424 n_constrained_dofs()=11163 n_vectors()=3 Assembly Stiffness matrix... Load Cast y: Unit body force in the Y direction Linear solver converged at step: 1738, final residual: 3.51292e16 Compute Load Case Z Apply periodic boundary condition... Input file of periodic b.c. node PeribcFile=peri3d20.txt p2num=3363 EquationSystems n_systems()=1 System "Stokes_Darcy_z" Type "LinearImplicit" Variables="u" "v" "w" "p" Finite Element Types="0" "0" "0" "0" Approximation Orders="2" "2" "2" "1" n_dofs()=116424 n_local_dofs()=116424 n_constrained_dofs()=11163 n_vectors()=3 Assembly Stiffness matrix... Load Case z Linear solver converged at step: 1774, final residual: 3.1481e16 Define the system of adjoint for k11 Apply periodic boundary condition... Input file of periodic b.c. node PeribcFile=peri3d20.txt p2num=3363 Adjoint X for k11 Linear solver converged at step: 1748, final residual: 5.28781e16 Define the system of adjoint for k22 Apply periodic boundary condition... Input file of periodic b.c. node PeribcFile=peri3d20.txt p2num=3363  Petsc Release Version 2.3.0, Patch 21, April, 26, 2005 See docs/changes/index.html for recent updates. See docs/faq.html for hints about trouble shooting. See docs/index.html for manual pages.  ./Perm3dObj2 on a linuxgnu named xu420 by xsl Tue Jul 3 22:56:30 2007 Libraries linked from /usr/lib/petscdir/2.3.0/lib/linuxgnu Configure run at Wed May 3 12:56:30 2006 Configure options withshared withdynamic withcc=gcc withfc=g77 withdebugging=0 withmpidir=/usr/lib/mpich withmpishared=1 withblaslib=lblas3 withlapacklib=llapack3  [0]PETSC ERROR: PetscMallocAlign() line 62 in src/sys/src/memory/mal.c [0]PETSC ERROR: Out of memory. This could be due to allocating [0]PETSC ERROR: too large an object or bleeding by not properly [0]PETSC ERROR: destroying unneeded objects. [0] Maximum memory PetscMalloc()ed 2822299876 maximum size of entire process 0 [0] Memory usage sorted by function [0] 2812 ClassPerfLogCreate() [0] 812 ClassRegLogCreate() [0] 6012 EventPerfLogCreate() [0] 12000 EventPerfLogEnsureSize() [0] 812 EventRegLogCreate() [0] 1600 EventRegLogRegister() [0] 8854000 ISCreateGeneral() [0] 2328480 ISInvertPermutation_General() [0] 2440 KSPCreate() [0] 460 KSPCreate_GMRES() [0] 40000 KSPSetResidualHistory() [0] 83920 KSPSetUp_GMRES() [0] 14092 MatCreate() [0] 2028 MatCreate_SeqAIJ() [0] 1177696432 MatDuplicate_SeqAIJ() [0] 3725600 MatILUFactorSymbolic_SeqAIJ() [0] 3725600 MatLUFactorNumeric_SeqAIJ() [0] 3725600 MatMarkDiagonal_SeqAIJ() [0] 2328480 MatOrdering_Natural() [0] 2353530080 MatSeqAIJSetPreallocation_SeqAIJ() [0] 2328500 Mat_CheckInode() [0] 1600 PCCreate() [0] 700 PCCreate_ILU() [0] 16 PetscCommDuplicate() [0] 28728 PetscDLLibraryAppend() [0] 28672 PetscDLLibraryOpen() [0] 69632 PetscDLLibraryRetrieve() [0] 188 PetscDLLibrarySym() [0] 7464 PetscFListAdd() [0] 52164 PetscMapCreate() [0] 1656 PetscMapCreate_MPI() [0] 19560 PetscObjectStateIncrease() [0] 220 PetscOptionsGetEList() [0] 16 PetscPushSignalHandler() [0] 28720 PetscStrallocpy() [0] 426496 PetscStrreplace() [0] 96 PetscTokenCreate() [0] 524 StackCreate() [0] 788 StageLogCreate() [0] 121632 VecCreate() [0] 168581952 VecCreate_Seq() [0] 2172 VecCreate_Seq_Private() [0] 564 VecDuplicateVecs_Default() [0] 3726960 VecScatterCreate() [0]PETSC ERROR: Memory requested 293259916! [0]PETSC ERROR: PetscTrMallocDefault() line 188 in src/sys/src/memory/mtr.c [0]PETSC ERROR: MatDuplicate_SeqAIJ() line 2798 in src/mat/impls/aij/seq/aij.c [0]PETSC ERROR: MatILUFactorSymbolic_SeqAIJ() line 883 in src/mat/impls/aij/seq/aijfact.c [0]PETSC ERROR: MatILUFactorSymbolic() line 4312 in src/mat/interface/matrix.c [0]PETSC ERROR: PCSetUp_ILU() line 779 in src/ksp/pc/impls/factor/ilu/ilu.c [0]PETSC ERROR: PCSetUp() line 798 in src/ksp/pc/interface/precon.c [0]PETSC ERROR: KSPSetUp() line 234 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: KSPSolve() line 332 in src/ksp/ksp/interface/itfunc.c [0]PETSC ERROR: User provided function() line 288 in unknowndirectory/src/numerics/petsc_linear_solver.C p0_4480: p4_error: : 1  Best regards, Yours sincerely ShengliXu Department of Engineering Mechanics State Key Laboratory of Structural Analysis for Industrial Equipment Dalian University of Technology Dalian, 116023, P. R. China Email:shengli@... shengli.xu.xu@... ========================== 
From: Roy Stogner <roystgnr@ic...>  20070703 04:43:50

On Tue, 3 Jul 2007, Shengli Xu wrote: > One is that Can I save memory with some Petsc solve options such as > "pc_type ilu"? When I solve the 2D stokes with Q84 element, the option > "pc_type ilu pc_ilu_levels 4" is very efficient. The ILU preconditioner takes memory, and the more levels of fill you use, the more memory it should take. > The other is Can I free some memory when one system is solved such as the > global stiffness matrix? The system and it's result are needed for the later > compute, so the system can not be cleared. I think ImplicitSystem::get_matrix("System Matrix") should give you a reference to the stiffness matrix, and SparseMatrix::clear() should free the memory it uses. You can check the Class Docs webpage if I've misremembered.  Roy 
Sign up for the SourceForge newsletter:
No, thanks