From: Dmitry K. <ka...@mc...> - 2013-06-06 16:36:45
|
It appears that --disable-mpi prevents MPI_Init() from being called by libMesh, which causes libMesh::COMM_WORLD to be left uninitialized, as far as I can determine. Since PETSc is being used, PETSC_COMM_WORLD is set to libMesh::COMM_WORLD and PetscInitialize() is called. Since MPI_Init() has not been called, at that stage PETSc expects PETSC_COMM_WORLD to be MPI_COMM_NULL, not the uninitialized libMesh::COMM_WORLD. Hence, the error you see. It seems to me that --disable-mpi in libMesh is a bad option when using PETSc :-) I'm not sure why using MPI cases a conflict with ParMetis for you. That issue seems to be closer to the root cause of you trouble. Dmitry. On Thu, Jun 6, 2013 at 11:09 AM, Andrew Davis <and...@gm...> wrote: > Hi, > > I'm using cmake to generate the Makefile so it is difficult to interpret, > but you are quite right about the PETSc DM issue; I completely forgot to > tell cmake where the PETSc libraries live. I added this to CMakeLists.txt > and re-complied my code and now I get this error (at runtime) when I > initialize libMesh: > > [-1]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [-1]PETSC ERROR: No support for this operation for this object type! > [-1]PETSC ERROR: You cannot set PETSC_COMM_WORLD if you have not > initialized MPI first! > [-1]PETSC ERROR: > ------------------------------------------------------------------------ > [-1]PETSC ERROR: > [-1]PETSC ERROR: See docs/changes/index.html for recent updates. > [-1]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [-1]PETSC ERROR: See docs/index.html for manual pages. > [-1]PETSC ERROR: > ------------------------------------------------------------------------ > [-1]PETSC ERROR: Libraries linked from > /Users/Andy/software/petsc/arch-darwin-c-debug/lib > [-1]PETSC ERROR: Configure run at Wed Jun 5 17:06:06 2013 > [-1]PETSC ERROR: Configure options --with-cc=gcc --with-fc=gfortran > --download-f-blas-lapack --download-mpich > [-1]PETSC ERROR: > ------------------------------------------------------------------------ > [-1]PETSC ERROR: PetscInitialize() line 676 in > /Users/Andy/software/petsc/src/sys/objects/pinit.c > [-1]PETSC ERROR: LibMeshInit() line 457 in > "unknowndirectory/"src/base/libmesh.C > > Could this be because I had to add the --disable-mpi flag to libMesh when I > configured? If I don't disable MPI when I configure libMesh the compiler > complains (at compile time): > > petsc/arch-darwin-c-debug/include/mpicxx.h:2723:34: error: declaration of C > function 'void Parmetis::MPI::Init(int&, char**&)' conflicts with > extern void Init(int &, char **& ); > > Thanks for your help, > Andy > > > On Thu, Jun 6, 2013 at 11:19 AM, John Peterson <jwp...@gm...> wrote: > >> On Thu, Jun 6, 2013 at 8:44 AM, Andrew Davis <and...@gm...> wrote: >> > Hi, >> > >> > I am trying to solve a nonlinear PDE with libMesh. I have installed >> > libmesh with petsc enabled and I have written a simple "hello world" >> > program that links with the library mesh_dbg, which complies fine. >> > However, at runtime I get the message: >> > >> > dyld: Symbol not found: _DM_CLASSID >> > Referenced from: /usr/local/lib/libmesh_dbg.0.dylib >> > Expected in: flat namespace >> > in /usr/local/lib/libmesh_dbg.0.dylib >> > Trace/BPT trap: 5 >> >> Might be a PETSc DM thing? >> >> What does your Makefile look like? >> >> -- >> John >> > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users |