On Fri, 13 Mar 2009, Tim Kroeger wrote:
Okay, good to know. Well, I will try to track all refinement steps in order to make the problem faster reproducible.
I did this now, and it reproduces the crash.Let me tell you briefly about the refinement/coarsening steps of my application: They occur at five different places in the code, which for some reason I would like to call SV1, SV2, PO1, PO2, and ES. Some of them only refine, some only coarsen, some do both. Some of them are performed several times. Here is a list:
SV1 6 times only refine SV2 6 times only coarsen after the last: Mesh::contract() PO1 7 times only refine after the last: Creation of EquationSystems PO2 1 time only refine ES 3 times possibly both 3rd time triggers the crashI attached a test program; it reads a file that you can download from my homepage (www.mevis.de/~tim/ref-flags.gz; unzipping makes it become ~5MB). The program initializes the same base grid as my application and then reads in all the refinement flags from the file. The points at which the mesh is contracted and the EquationSystem object is created are hardcoded.
Could you please check whether this enables you the reproduce the crash? You need to run the program on 8 processors (with ghosted enabled of course). I used METHOD=devel, but I guess it will crash in the other modes as well.
By the way, I observed another very strange thing: If I change the values of {x,y,z}{min,max} of the start grid (as in the comments of the test program), it crashes already on the first refinement step and at a completely different point, that is in elem.h, line 1744. (That's the assert in Elem::compute_key() with four arguments.) That does not make any sense at all to me.
Anyway, complete confusion is a good state to start vacations with, isn't it? (-:
Best Regards, Tim -- Dr. Tim Kroeger tim.kroe...@mevis.fraunhofer.de Phone +49-421-218-7710 tim.kroe...@cevis.uni-bremen.de Fax +49-421-218-4236 Fraunhofer MEVIS, Institute for Medical Image Computing Universitaetsallee 29, 28359 Bremen, Germany
#include <iostream> #include <math.h> #include "libmesh.h" #include "mesh.h" #include "mesh_generation.h" #include "mesh_refinement.h" #include "elem.h" #include "equation_systems.h" #include "linear_implicit_system.h" #include "transient_system.h" static void refine_according_to_file(Mesh& mesh, std::istream& f) { std::string caption; f >> caption; std::cout << "Read refinement flags for " << caption << std::endl; MeshBase::element_iterator elem_it = mesh.active_elements_begin(); const MeshBase::element_iterator elem_end = mesh.active_elements_end(); for (; elem_it != elem_end; ++elem_it) { unsigned int v = 0; f >> v; (*elem_it)->set_refinement_flag(static_cast<Elem::RefinementState>(v)); } std::cout << "Process refinement for " << caption << std::endl; MeshRefinement meshRefinement(mesh); meshRefinement.refine_and_coarsen_elements(); std::cout << "Finished refinement for " << caption << std::endl; } int main (int argc, char** argv) { LibMeshInit init (argc, argv); Mesh mesh (3); MeshTools::Generation::build_cube(mesh, 7,6,4, -32.0,-24.0,-32.0, 24.01,24.0,32.0, HEX8); /* Use this version instead to get a very strange behaviour: MeshTools::Generation::build_cube(mesh, 7,6,4, 0.0,0.0,0.0, 1.0,1.0,1.0, HEX8); */ std::ifstream f("ref-flags"); for(unsigned int i=0; i<12; i++) { refine_according_to_file(mesh,f); } std::cout << "Contract mesh" << std::endl; mesh.contract(); for(unsigned int i=0; i<7; i++) { refine_according_to_file(mesh,f); } EquationSystems es(mesh); es.add_system<TransientLinearImplicitSystem>("s"); es.get_system<TransientLinearImplicitSystem>("s").add_variable("v"); std::cout << "Init EquationSystems" << std::endl; es.init(); for(unsigned int i=0; i<4; i++) { refine_according_to_file(mesh,f); std::cout << "Reinit EquationSystems" << std::endl; es.reinit(); } return 0; }
------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel