Hi John, After a second check I think the bug that led to seg fault lies in the LibmeshInit class, perhaps its constructor. As the updated error message shows below, line 328 of libmesh.C is "command_line.reset (new GetPot (argc, argv));", which creates a GetPot object.
Also FYI, line 295 of my user code main_RealHeart.cpp is "LibMeshInit init (argc, argv);". ==15661== Invalid read of size 8 ==15661== at 0x6D675C9: GetPot::parse_command_line(int, char const* const*, char const*) (getpot.h:558) ==15661== by 0x6D67312: _ZN6GetPotC9EiPKPKcS1_ (getpot.h:536) ==15661== by 0x6D6746D: GetPot::GetPot(int, char const* const*, char const*) (getpot.h:65536) ==15661== by 0x6D76B97: _ZN7libMesh11LibMeshInitC9EiPKPKcP19ompi_communicator_t (libmesh.C:328) ==15661== by 0x6D793BD: libMesh::LibMeshInit::LibMeshInit(int, char const* const*, ompi_communicator_t*) (libmesh.C:0) ==15661== by 0x4387B0: main (main_RealHeart.cpp:295) ==15661== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==15661== ==15661== Process terminating with default action of signal 11 (SIGSEGV) ==15661== Access not within mapped region at address 0x0 ==15661== at 0x6D675C9: GetPot::parse_command_line(int, char const* const*, char const*) (getpot.h:558) ==15661== by 0x6D67312: _ZN6GetPotC9EiPKPKcS1_ (getpot.h:536) ==15661== by 0x6D6746D: GetPot::GetPot(int, char const* const*, char const*) (getpot.h:65536) ==15661== by 0x6D76B97: _ZN7libMesh11LibMeshInitC9EiPKPKcP19ompi_communicator_t (libmesh.C:328) ==15661== by 0x6D793BD: libMesh::LibMeshInit::LibMeshInit(int, char const* const*, ompi_communicator_t*) (libmesh.C:0) ==15661== by 0x4387B0: main (main_RealHeart.cpp:295) ==15661== ==15661== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 10 from 5) ==15661== malloc/free: in use at exit: 488 bytes in 4 blocks. ==15661== malloc/free: 4 allocs, 0 frees, 488 bytes allocated. ==15661== For counts of detected errors, rerun with: -v ==15661== searching for pointers to 4 not-freed blocks. ==15661== checked 7,830,480 bytes. Thanks, Dafang On 04/30/2014 11:55 PM, Dafang Wang wrote: > Hi John, > > What the line 292 of my main_RealHeart.cpp does is to append > "--keep-cout" after other command-line input options. This line of > code should be fine, because I commented this line out and still got > the seg fault error. > > Thanks, > Dafang > > On 04/30/2014 05:24 PM, John Peterson wrote: >> >> >> >> On Wed, Apr 30, 2014 at 3:08 PM, Dafang Wang <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi, >> >> I got a segfault error when running my libmesh program on a single >> thread (but on a cluster). What is odd is that the same code ran >> well on >> two other computers (one is cluster and the other a desktop). The >> segfault error has to do with LibmeshInit() and ostream, which is >> also >> odd to me. >> >> The version of libmesh I am using is 0.9.2.2. >> >> Any suggestions will be greatly appreciated. The error is >> described below. >> >> >> ==13923== by 0x6D76ECB: >> _ZN7libMesh11LibMeshInitC9EiPKPKcP19ompi_communicator_t >> (libmesh.C:356) >> >> >> >> In the 0.9.2.2 tagged version, line 356 of libmesh.C is >> >> libmesh_assert(remote_elem); >> >> I don't think that line could cause a segfault... are you running in >> debug mode? >> >> ==13923== by 0x439AF8: main (main_RealHeart.cpp:292) >> ==13923== Address 0x0 is not stack'd, malloc'd or (recently) free'd >> >> >> What's on line 292 of your main_RealHeart.cpp file? >> >> -- >> John > > -- > Dafang Wang, Ph.D > Postdoctoral Fellow > Institute of Computational Medicine > Department of Biomedical Engineering > Johns Hopkins University > Hackerman Hall Room 218 > Baltimore, MD, 21218 -- Dafang Wang, Ph.D Postdoctoral Fellow Institute of Computational Medicine Department of Biomedical Engineering Johns Hopkins University Hackerman Hall Room 218 Baltimore, MD, 21218 ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
