Hi, many thanks, this works. Could you please create me some login to the wiki,
so that I can create a faq for this? In the meantime, this is my line:
config/configure.py --with-cc=gcc --with-cxx=g++ --with-fc=g77
--with-mpi-dir=/usr/lib/mpich/ --with-debugging=1 --with-shared
Ondrej
On Sun, Jan 01, 2006 at 03:54:17PM -0600, John Peterson wrote:
> This is definitely getting to be a FAQ. LibMesh will try to
> get its MPI configuration from PETSc if you have petsc. We
> need a way of disabling MPI in libmesh if it is disabled in
> PETSc...
>
> For the moment, if you do have MPI try building petsc with MPI,
> but configuring it with the following options:
>
> ./config/configure.py --with-cc=gcc --with-cxx=g++ --with-fc=g77 \
> --with-blas-lapack-dir=/cfdlab/Intel/MKL/mkl \
> --with-mpi-dir=/cfdlab/Mpi/1.2.7 --with-debugging=1 \
> --with-shared -RSHCOMMAND=ssh
>
> Of course, replace the directories with your directories. The key
> is to force PETSc to use g++/g77 instead of the mpiCC and mpif77
> wrapper compilers. Good luck!
>
>
>
> -John
>
>
>
> Ondrej Certik writes:
> > Hello, I wasn't able to compile libmesh (tried cvs, 0.5.0) with petsc (tried
> > 2.2.1, 2.3.0) on debian sid on amd64. It compiles ok without petsc.
> > I tried a lot of combinations (different versions, with mpi, without...) but
> > all give more or less the same kind of errors, so I guess we can concentrate on
> > this setup:
> >
> > libmesh cvs, petsc 2.3.0, gcc-4.0:
> >
> > cvs -d:pserver:anonymous@... co libmesh
> > cd libmesh
> > cd contrib
> > wget ftp://ftp.mcs.anl.gov/pub/petsc/petsc-lite.tar.gz
> > tar xzf petsc-lite.tar.gz
> > cd petsc-2.3.0
> > export PETSC_ARCH=linux
> > export PETSC_DIR=`pwd`
> > config/configure.py --with-mpi=0
> > make
> > cd ..
> > ./configure
> > make
> >
> > am I doing something wrong here? It stops here:
> >
> > src/mesh/mesh_communication.C: In member function 'void
> > MeshCommunication::broadcast_bcs(MeshBase&, BoundaryInfo&) const':
> > src/mesh/mesh_communication.C:418: error: 'MPI_UNSIGNED_SHORT' was not declared
> > in this scope
> >
> > The problem is, that the file include/base/libmesh_config.h contains
> >
> > #define HAVE_MPI 1
> >
> > (it doesn't help passing --disable-mpi to ./configure). Basically, we have 2
> > options - either I comment the line HAVE_MPI in libmesh_config.h, or I define
> > MPI_UNSIGNED_SHORT somewhere (the problem is in mesh_communication.C and in
> > some other file I forgot which). Let's put this line for example to
> > include/mesh/mesh_base.h:
> >
> > #define MPI_UNSIGNED_SHORT sizeof(unsigned short)
> >
> > Then the make compiles libmesh without errors (well, I have to disable
> > parmetis, which complains like this:
> >
> > --- Building Parmetis ------------------------
> > make[2]: Entering directory
> > `/home/ondra/libmesh/cvslibmesh/libmesh/contrib/parmetis/Lib'
> > Compiling C (in optimized mode) akwayfm.c...
> > In file included from ././stdheaders.h:26,
> > from ./parmetislib.h:19,
> > from akwayfm.c:14:
> > /home/ondra/libmesh/cvslibmesh/libmesh/contrib/petsc-2.3.0/include/mpiuni/mpi.h:
> > 61:23: error: petscconf.h: No such file or directory
> > make[2]: *** [akwayfm.x86_64-unknown-linux-gnu.opt.o] Error 1
> >
> > ), but
> >
> > make run_examples
> >
> > fails in ex0:
> >
> > ***************************************************************
> > * Running Example ./ex0
> > ***************************************************************
> >
> > --------------------------------------------------------------------------
> > Petsc Release Version 2.3.0, Patch 43, 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.
> > -----------------------------------------------------------------------
> > Libraries linked from
> > /home/ondra/libmesh/cvslibmesh/libmesh/contrib/petsc-2.3.0/lib/linux
> > Configure run at Sun Jan 1 14:23:17 2006
> > Configure options --with-mpi=0 --with-shared=0
> > -----------------------------------------------------------------------
> > [-1]PETSC ERROR: PetscInitialize() line 399 in src/sys/src/objects/pinit.c
> > [-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: User provided function() line 166 in
> > unknowndirectory/src/base/libmesh.C
> >
> > So I guess the problem was, that petsc was compiled without MPI, but libmesh
> > with MPI, so I uncomment the HAVE_MPI in libmesh_config, then I got:
> >
> > /home/ondra/libmesh/cvslibmesh/libmesh/include/numerics/petsc_vector.h: In
> > member function 'void PetscVector<T>::init(unsigned int, unsigned int, bool)':
> > /home/ondra/libmesh/cvslibmesh/libmesh/include/numerics/petsc_vector.h:523:
> > error: 'COMM_WORLD' is not a member of 'libMesh'
> > /home/ondra/libmesh/cvslibmesh/libmesh/include/numerics/petsc_vector.h:525:
> > error: 'COMM_WORLD' is not a member of 'libMesh'
> >
> > and a lots of errors like that. The problem is obvious - the COMM_WORLD in the
> > namespace libMesh is defined only if we have HAVE_MPI defined. So I guess I
> > cannot compile the libmesh without MPI at all (if I tried to fake it somehow,
> > there were other errors with MPI - it seems to me, that I need MPI enabled in
> > libmesh in order to use petsc).
> >
> > So I didn't succeed without MPI, let's try with it. If I compile petsc with mpi
> > and try libmesh, I get an error right at the beginning, that it cannot find
> > mpi.h - although I passed an option to configure --with-mpi=/usr/lib/mpich
> > (which contains the mpi.h). I am a beginner with MPI, and I don't need it. Is
> > it possible to compile libmesh without MPI? If not, could please someone give
> > me a hint how to compile it with MPI? I would be glad to compile libmesh anyhow
> > with petsc (and later with slepc). I think I am doing something wrong, maybe
> > the petsc should be compiled differently?
> >
> > BTW 1:
> > if you want to use slepc 2.3.0, you need to make some changes in Make.common
> > around the line 291:
> > comment the line 291, change another line to:
> > SLEPC_LIB = $(SLEPC_DIR)/lib/$(PETSC_ARCH)
> >
> > BTW 2: do only me have these problems with cvs?
> >
> > ondra@...$ cvs -d:pserver:anonymous@... co libmesh
> > cvs checkout: CVS password file /home/ondra/.cvspass does not exist - creating
> > a new file
> > cvs [checkout aborted]: end of file from server (consult above messages if any)
> >
> > This happens maybe 30 times in a row, the 31st try starts downloading...
> >
> > Ondrej
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> > for problems? Stop! Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > Libmesh-users mailing list
> > Libmesh-users@...
> > https://lists.sourceforge.net/lists/listinfo/libmesh-users
>
> --
> John W. Peterson
> The University of Texas at Austin
>
>
> Web: http://www.cfdlab.ae.utexas.edu
> Phone: 512-619-6534 (H) | 512-471-4069 (W)
> email: peterson@...
|