I decided to start fresh.  Here is a little bit more detail:

I created the following directories:

/home/tobias/libMesh
/home/tobias/PETSc
/home/tobias/PETSc/petsc-install/

Extrated petsc-lite-3.6.2.tar.gz inside /home/tobias/PETSc
This created the directory

/home/tobias/PETSc/petsc-3.6.2/

Inside /home/tobias/PETSc/petsc-3.6.2/, I invoked

./configure --prefix=/home/tobias/PETSc/petsc-install/ --with-cc=gcc 
--with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich

The config.log file is attached as configure_PETSc.log

Then, still inside /home/tobias/PETSc/petsc-3.6.2/, I invoked

make all test

The screen output was:

...
...
=========================================
gmake[1]: Leaving directory `/home/tobias/PETSc/petsc-3.6.2'
Now to install the libraries do:
make PETSC_DIR=/home/tobias/PETSc/petsc-3.6.2 PETSC_ARCH=arch-linux2-c-debug 
install
=========================================
Running test examples to verify correct installation
Using PETSC_DIR=/home/tobias/PETSc/petsc-3.6.2 and 
PETSC_ARCH=arch-linux2-c-debug
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI 
process
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2 MPI 
processes
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI 
process
Completed test examples
=========================================
Now to evaluate the computer systems you plan use - do:
make PETSC_DIR=/home/tobias/PETSc/petsc-3.6.2 PETSC_ARCH=arch-linux2-c-debug 
streams NPMAX=<number of MPI processes you intend to use>


Then, I executed make install:

make install

The result was:

*** Using PETSC_DIR=/home/tobias/PETSc/petsc-3.6.2 
PETSC_ARCH=arch-linux2-c-debug ***
*** Copying PETSc to DESTDIR location: /home/tobias/PETSc/petsc-install  ***
====================================
Copy to DESTDIR /home/tobias/PETSc/petsc-install is now complete.
Before use - please copy/install over to specified prefix: 
/home/tobias/PETSc/petsc-install/
====================================
/usr/bin/gmake  --no-print-directory PETSC_ARCH=arch-linux2-c-debug 
PETSC_DIR=/home/tobias/PETSc/petsc-3.6.2 mpi4py-install petsc4py-install
gmake[1]: Nothing to be done for `mpi4py-install'.
gmake[1]: Nothing to be done for `petsc4py-install'.


To install libMesh:

Extrated libmesh-0.9.4.tar.gz inside /home/tobias/libMesh
This created the directory

/home/tobias/libMesh/libmesh-0.9.4/

Then, I created the follwing environment variables:

PETSC_DIR=/home/tobias/PETSc/petsc-install/
export PETSC_DIR
PETSC_ARCH=arch-linux2-c-debug
export PETSC_ARCH

Inside /home/tobias/libMesh/libmesh-0.9.4/, I configured as follows:

./configure PETSC_DIR=/home/tobias/PETSc/petsc-install/ 
PETSC_ARCH=arch-linux2-c-debug --enable-everything --enable-petsc


The summary was as follows:


----------------------------------- SUMMARY -----------------------------------

Package version.................... : libmesh-0.9.4

C++ compiler type.................. : gcc4.8
C++ compiler....................... : mpicxx
C compiler......................... : mpicc
Fortran compiler................... : mpif90
Build Methods...................... : dbg devel opt

CPPFLAGS...(dbg)................... : -DDEBUG -D_GLIBCXX_DEBUG 
-D_GLIBCXX_DEBUG_PEDANTIC
CXXFLAGS...(dbg)................... : -std=gnu++11 -O0 -felide-constructors -g 
-pedantic -W -Wall -Wextra -Wno-long-long -Wunused -Wpointer-arith -Wformat 
-Wparentheses -Woverloaded-virtual -fopenmp -std=gnu++11
CFLAGS.....(dbg)................... : -g -Wimplicit -fopenmp

CPPFLAGS...(devel)................. :
CXXFLAGS...(devel)................. : -std=gnu++11 -O2 -felide-constructors -g 
-pedantic -W -Wall -Wextra -Wno-long-long -Wunused -Wpointer-arith -Wformat 
-Wparentheses -Wuninitialized -funroll-loops -fstrict-aliasing 
-Woverloaded-virtual -Wdisabled-optimization -fopenmp -std=gnu++11
CFLAGS.....(devel)................. : -O2 -g -Wimplicit -funroll-loops 
-fstrict-aliasing -fopenmp

CPPFLAGS...(opt)................... : -DNDEBUG
CXXFLAGS...(opt)................... : -std=gnu++11 -O2 -felide-constructors 
-funroll-loops -fstrict-aliasing -Wdisabled-optimization -fopenmp -std=gnu++11
CFLAGS.....(opt)................... : -O2 -funroll-loops -fstrict-aliasing 
-fopenmp

Install dir........................ : /usr/local
Build user......................... : tobias
Build host......................... : usbosnavdev-ludwig
Build architecture................. : x86_64-unknown-linux-gnu
Git revision....................... : external

Library Features:
 library warnings................. : yes
 adaptive mesh refinement......... : yes
 blocked matrix/vector storage.... : no
 complex variables................ : no
 example suite.................... : yes
 ghosted vectors.................. : yes
 high-order shape functions....... : yes
 unique-id support................ : yes
 id size (boundaries)............. : 2 bytes
 id size (dofs)................... : 4 bytes
 id size (unique)................. : 8 bytes
 id size (processors)............. : 2 bytes
 id size (subdomains)............. : 2 bytes
 infinite elements................ : yes
 Dirichlet constraints............ : yes
 node constraints................. : yes
 parallel mesh.................... : no
 performance logging.............. : yes
 periodic boundary conditions..... : yes
 reference counting............... : yes
 shape function 2nd derivatives... : yes
 stack trace files................ : yes
 track node valence............... : yes
 variational smoother............. : yes
 xdr binary I/O................... : yes
 providing libMesh::CommWorld..... : yes ***LEGACY FEATURE***

Optional Packages:
 boost............................ : yes
 cppunit.......................... : no
 eigen............................ : yes
 exodus........................... : yes
    version....................... : v5.22
 fparser.......................... : yes
    build from version............ : release
 glpk............................. : no
 gmv.............................. : yes
 gzstream......................... : yes
 hdf5............................. : yes
 laspack.......................... : no
 libhilbert....................... : yes
 metis............................ : yes
 mpi.............................. : yes
 nanoflann........................ : yes
 nemesis.......................... : yes
    version....................... : v5.22
 netcdf........................... : yes
    version....................... : 4
 openmp........................... : yes
 parmetis......................... : yes
 petsc............................ : yes
    version....................... : 3.6.2
 slepc............................ : no
 pthreads......................... : yes
 qhull............................ : yes
 sfcurves......................... : no
 slepc............................ : no
 tbb.............................. : yes
 c++ threads...................... : yes
    flavor........................ : std::thread
 c++ rtti ........................ : yes
 tecio............................ : yes
 tecplot...(vendor binaries)...... : no
 tetgen........................... : yes
 triangle......................... : no
 trilinos......................... : no
 vtk.............................. : no

 libmesh_optional_INCLUDES........ : -I/usr/include/eigen3 -I/usr/include

 libmesh_optional_LIBS............ : -L/lib -lhdf5 -Wl,-rpath,/lib -lz 
-L/usr/lib -ltbb -ltbbmalloc

-------------------------------------------------------------------------------
Configure complete, now type 'make' and then 'make install'.

---------------------------------------------
--------- Done Configuring libMesh ----------
---------------------------------------------



Then, I executed make.

That failed, seemingly because it could not find the PETSc include file 
directory:

In file included from src/base/libmesh.C:62:0:
./include/libmesh/petsc_macro.h:93:19: fatal error: petsc.h: No such file or 
directory


Starting over, I called make as follows:

C_INCLUDE_PATH=/home/tobias/PETSc/petsc-install/include
export C_INCLUDE_PATH
CPLUS_INCLUDE_PATH=/home/tobias/PETSc/petsc-install/include
export CPLUS_INCLUDE_PATH
make


Not, I get this error:


 CXX      src/partitioning/libmesh_dbg_la-parmetis_partitioner.lo
In file included from /home/tobias/PETSc/petsc-install/include/mpi.h:2216:0,
        from ./contrib/parmetis/include/parmetis.h:17,
        from src/partitioning/parmetis_partitioner.C:40:
/home/tobias/PETSc/petsc-install/include/mpicxx.h:2737:34: error: declaration 
of C function 'void Parmetis::MPI::Init(int&, char**&)' conflicts with
extern void Init(int &, char **& );
                         ^
/home/tobias/PETSc/petsc-install/include/mpicxx.h:2736:13: error: previous 
declaration 'void Parmetis::MPI::Init()' here
extern void Init(void);
    ^
/home/tobias/PETSc/petsc-install/include/mpicxx.h:2739:45: error: declaration 
of C function 'int Parmetis::MPI::Init_thread(int&, char**&, int)' conflicts 
with
extern int Init_thread(int &, char **&, int );
                                    ^
/home/tobias/PETSc/petsc-install/include/mpicxx.h:2738:12: error: previous 
declaration 'int Parmetis::MPI::Init_thread(int)' here
extern int Init_thread(int);
   ^
src/partitioning/parmetis_partitioner.C: In member function 'virtual void 
libMesh::ParmetisPartitioner::_do_repartition(libMesh::MeshBase&, unsigned 
int)':
src/partitioning/parmetis_partitioner.C:141:3: error: 'MPI_Comm' was not 
declared in this scope
  MPI_Comm mpi_comm = mesh.comm().get();
  ^
src/partitioning/parmetis_partitioner.C:141:3: note: suggested alternative:
In file included from ./contrib/parmetis/include/parmetis.h:17:0,
        from src/partitioning/parmetis_partitioner.C:40:
/home/tobias/PETSc/petsc-install/include/mpi.h:279:13: note:   
'Parmetis::MPI_Comm'
typedef int MPI_Comm;
    ^
src/partitioning/parmetis_partitioner.C:141:12: error: expected ';' before 
'mpi_comm'
  MPI_Comm mpi_comm = mesh.comm().get();
   ^
src/partitioning/parmetis_partitioner.C:162:41: error: 'mpi_comm' was not 
declared in this scope
                               &mpi_comm);
                                ^
make[1]: *** [src/partitioning/libmesh_dbg_la-parmetis_partitioner.lo] Error 1
make[1]: Leaving directory `/home/tobias/libMesh/libmesh-0.9.4'
make: *** [all-recursive] Error 1




________________________________
Von: John Peterson <jwpeter...@gmail.com>
Gesendet: Mittwoch, 4. November 2015 17:19
An: tschroeder
Cc: libmesh-users
Betreff: Re: [Libmesh-users] Neumann boundary problem for Laplace equation



On Wed, Nov 4, 2015 at 2:49 PM, tschroeder 
<tschroe...@daad-alumni.de<mailto:tschroe...@daad-alumni.de>> wrote:

You were right:


The mistake was in the PETSC_DIR variable.


configuring this way



 ./configure PETSC_DIR=/home/tobias/PETSc/petsc-3.6.2 
PETSC_ARCH=arch-linux2-c-debug --enable-everything --enable-petsc --enable-mpi 
> log.txt

gives me, among other errors, the messages below.

Makefile_config_petsc:1: /home/tobias/PETSc/petsc-3.6.2/conf/variables: No such 
file or directory
make: *** No rule to make target 
`/home/tobias/PETSc/petsc-3.6.2/conf/variables'.  Stop.
Makefile_config_petsc:1: /home/tobias/PETSc/petsc-3.6.2/conf/variables: No such 
file or directory
make: *** No rule to make target 
`/home/tobias/PETSc/petsc-3.6.2/conf/variables'.  Stop.

This is why I ended up using the incorrect PESC_DIR value:

It looks like your PETSC_DIR is not arranged in the usual way for installed 
PETScs.  When you built PETSc, did you configure with a --prefix and run make 
install when it was done?  You'll want to set PETSC_DIR to the directory you 
choose for the prefix in order to get libmesh to find PETSc correctly.

--
John
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to