Thanks! That helps a lot.

I have reinstalled with GCC and everything seems to be compiling.  However,
the issue may not have been the compiler.  I realized I haven't updated
libmesh in a while.  I did a "git pull" on my Ubuntu machine (where
everything was previously working fine) and ran into some issues.

I had to change the lines

auto mesh = make_shared<libMesh::Mesh>();
libMesh::MeshTools::Generation::build_square(*mesh, Nx, Ny, 0.0, Lx, 0.0,
Ly, libMesh::QUAD9);

to

auto mesh = make_shared<libMesh::Mesh>(libMesh::Parallel::Communicator());
libMesh::MeshTools::Generation::build_square(*mesh, Nx, Ny, 0.0, Lx, 0.0,
Ly, libMesh::QUAD9);

I then create

 auto eqnsystem = make_shared<libMesh::EquationSystems>(*mesh);

I then create and add a system (using code that worked before).  However,
doing this caused a runtime seg. fault at the line

eqnsystem->get_system(paraName).init();

Part of the Valgrind output is

==11300== Process terminating with default action of signal 11 (SIGSEGV)
==11300==  Access not within mapped region at address 0x0
==11300==    at 0xB46AE01:
libMesh::DofMap::distribute_dofs(libMesh::MeshBase&) (in
/scratch1/local/lib/libmesh_opt.so.0.0.0)
==11300==    by 0xB97A825: libMesh::System::init_data() (in
/scratch1/local/lib/libmesh_opt.so.0.0.0)
==11300==    by 0xB97AB48: libMesh::System::init() (in
/scratch1/local/lib/libmesh_opt.so.0.0.0)

Does anyone know what I am doing wrong?  I have done my best to simplify my
code.  It is actually much more complicated - I am trying to use libMesh
inside some MCMC tools my group has written.

Thanks,
Andy


On Tue, Sep 2, 2014 at 10:21 AM, John Peterson <[email protected]> wrote:

> On Tue, Sep 2, 2014 at 8:09 AM, Cody Permann <[email protected]>
> wrote:
> > Andrew,
> >
> > You can use just about any gcc/clang version on the Mac, just not the one
> > that ships on the system, it's in poor shape.
>
> Just want to reiterate that this is not true for clang on Mavericks.
> Note that there is no GCC on mavericks, /usr/bin/gcc is clang.
>
> $ /usr/bin/g++ --version
> Configured with: --prefix=/Library/Developer/CommandLineTools/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
> Target: x86_64-apple-darwin13.3.0
> Thread model: posix
>
> --
> John
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> Libmesh-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to