Config does not link with Petsc,trilinos

254 views
Skip to first unread message

Michael Raba

unread,
Nov 29, 2013, 1:07:44 PM11/29/13
to dea...@googlegroups.com
Hello all, I'm having trouble building examples. I think I'm not configuring correctly

cmake -DCMAKE_INSTALL_PREFIX=/home/mikey/deal.II ../deal.II -DTRILINOS_DIR=/home/mikey/trilinos-11.4.3-Source/

It seems deal.II isn't linking with several things. What am I doing wrong?

Thanks in advance,

Michael

#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#      ( DEAL_II_WITH_64BIT_INDICES = OFF )
#      ( DEAL_II_WITH_ARPACK = OFF )
#        DEAL_II_WITH_BOOST set up with bundled packages
#        DEAL_II_WITH_FUNCTIONPARSER set up with bundled packages
#      ( DEAL_II_WITH_HDF5 = OFF )
#        DEAL_II_WITH_LAPACK set up with external dependencies
#      ( DEAL_II_WITH_METIS = OFF )
#      ( DEAL_II_WITH_MPI = OFF )
#      ( DEAL_II_WITH_MUMPS = OFF )
#      ( DEAL_II_WITH_NETCDF = OFF )
#      ( DEAL_II_WITH_P4EST = OFF )
#      ( DEAL_II_WITH_PETSC = OFF )
#      ( DEAL_II_WITH_SLEPC = OFF )
#        DEAL_II_WITH_THREADS set up with bundled packages
#      ( DEAL_II_WITH_TRILINOS = OFF )
#        DEAL_II_WITH_UMFPACK set up with bundled packages
#        DEAL_II_WITH_ZLIB set up with external dependencies
#


Matthias Maier

unread,
Nov 29, 2013, 1:14:53 PM11/29/13
to dea...@googlegroups.com
Hi,

Am 29. Nov 2013, 19:07 schrieb Michael Raba <michae...@gmail.com>:

> Hello all, I'm having trouble building examples. I think I'm not
> configuring correctly
>
> cmake -DCMAKE_INSTALL_PREFIX=/home/mikey/deal.II ../deal.II
> -DTRILINOS_DIR=/home/mikey/trilinos-11.4.3-Source/
~~~~~~~~~~~~~~~~~~~~~~
Have you configured, built and installed trilinos as is explained in
[1]? If yes, please specify the install directory of trilinos, not the
source directory.

After that reconfigure with [2]:

cmake -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=<correct path> .

It might be necessary to enable MPI (if you have configured trilinos
with mpi support). In this case:

cmake -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=<correct path> .

> # Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
> # ( DEAL_II_WITH_MPI = OFF )
> # ( DEAL_II_WITH_TRILINOS = OFF )

After that TRILINOS and/or MPI should be enabled.

Best,
Matthias


[1] http://www.dealii.org/developer/external-libs/trilinos.html

[2] cmake does autodetection only in the first run, on subsequent runs
the feature toggles DEAL_II_WITH_* have to be changed by hand.

Michael Raba

unread,
Nov 29, 2013, 2:05:32 PM11/29/13
to dea...@googlegroups.com
I've changed to the correct Trilinos directory and configured it per [1] so I get

-- Found TRILINOS: 

but Trilinos doesn't seem to be configured correctly.. In the config

cmake -D Trilinos_ENABLE_Sacado=ON \
      -D Trilinos_ENABLE_Stratimikos=ON \
      -D CMAKE_BUILD_TYPE=RELEASE \
      -D CMAKE_CXX_FLAGS="-g -O3" \
      -D CMAKE_C_FLAGS="-g -O3" \
      -D CMAKE_FORTRAN_FLAGS="-g -O5" \
      -D Trilinos_EXTRA_LINK_FLAGS="-lgfortran" \
      -D CMAKE_VERBOSE_MAKEFILE=FALSE \
      -D Trilinos_VERBOSE_CONFIGURE=FALSE \
      -D TPL_ENABLE_MPI=ON \
      -D BUILD_SHARED_LIBS=ON \
      -D CMAKE_INSTALL_PREFIX:PATH=$HOME/share/trilinos \
      ..

I changed the last line per instruction I've changed PATH=$HOME/share/trilinos \ to the correct Directory.

Is Trilinos configured correctly?

Thanks in advance,

Michael



Rest of the configlog:
-- Check whether the found trilinos package contains all required modules:
-- Found Amesos
-- Found Epetra
-- Found Ifpack
-- Found AztecOO
-- Found Sacado
-- Found Teuchos
-- Could not find a sufficient Trilinos installation: Trilinos has to be configured with the same MPI configuration as deal.II.
-- DEAL_II_WITH_TRILINOS has unmet external dependencies.
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_arpack.cmake
-- Could NOT find ARPACK (missing:  ARPACK_LIBRARY) 
-- DEAL_II_WITH_ARPACK has unmet external dependencies.
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_boost.cmake
-- Could NOT find Boost
-- DEAL_II_WITH_BOOST has unmet external dependencies.
-- DEAL_II_WITH_BOOST successfully set up with bundled packages.
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_functionparser.cmake
-- No module available for finding functionparser externally.
-- DEAL_II_WITH_FUNCTIONPARSER has unmet external dependencies.
-- DEAL_II_WITH_FUNCTIONPARSER successfully set up with bundled packages.
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_hdf5.cmake
-- Found HDF5: /usr/lib/libhdf5_hl.so;/usr/lib/libhdf5.so  
-- Insufficient hdf5 installation found: hdf5 has to be configured with the same MPI configuration as deal.II.
-- DEAL_II_WITH_HDF5 has unmet external dependencies.
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_mumps.cmake
-- DEAL_II_WITH_MUMPS has unmet configuration requirements: DEAL_II_WITH_MPI has to be set to "ON".
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_netcdf.cmake
-- Could NOT find NETCDF (missing:  _output NETCDF_CPLUSPLUS_LIBRARY NETCDF_C_LIBRARY NETCDF_INCLUDE_DIR) 
-- DEAL_II_WITH_NETCDF has unmet external dependencies.
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_p4est.cmake
-- DEAL_II_WITH_P4EST has unmet configuration requirements: DEAL_II_WITH_MPI has to be set to "ON".
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_slepc.cmake
-- DEAL_II_WITH_SLEPC has unmet configuration requirements: DEAL_II_WITH_PETSC has to be set to "ON".
-- 
-- Include /home/mikey/deal.II/cmake/configure/configure_zlib.cmake
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.7") 
-- All external dependencies for DEAL_II_WITH_ZLIB are fullfilled.
-- DEAL_II_WITH_ZLIB successfully set up with external dependencies.
-- 
-- Configuring done. Proceed to target definitions now.
-- Found Perl: /usr/bin/perl (found version "5.14.2") 
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
###
#
#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      ON
#        CMAKE_INSTALL_PREFIX:   /home/mikey/deal.II
#        CMAKE_SOURCE_DIR:       /home/mikey/deal.II (Version 8.0.0)
#        CMAKE_BINARY_DIR:       /home/mikey/deal.II
#        CMAKE_CXX_COMPILER:     GNU 4.7.3 on platform Linux x86_64
#                                /usr/bin/c++
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#      ( DEAL_II_WITH_64BIT_INDICES = OFF )
#      ( DEAL_II_WITH_ARPACK = OFF )
#        DEAL_II_WITH_BOOST set up with bundled packages
#        DEAL_II_WITH_FUNCTIONPARSER set up with bundled packages
#      ( DEAL_II_WITH_HDF5 = OFF )
#        DEAL_II_WITH_LAPACK set up with external dependencies
#      ( DEAL_II_WITH_METIS = OFF )
#      ( DEAL_II_WITH_MPI = OFF )
#      ( DEAL_II_WITH_MUMPS = OFF )
#      ( DEAL_II_WITH_NETCDF = OFF )
#      ( DEAL_II_WITH_P4EST = OFF )
#      ( DEAL_II_WITH_PETSC = OFF )
#      ( DEAL_II_WITH_SLEPC = OFF )
#        DEAL_II_WITH_THREADS set up with bundled packages
#      ( DEAL_II_WITH_TRILINOS = OFF )
#        DEAL_II_WITH_UMFPACK set up with bundled packages
#        DEAL_II_WITH_ZLIB set up with external dependencies
#
#  Component configuration:
#        DEAL_II_COMPONENT_COMPAT_FILES
#      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
#        DEAL_II_COMPONENT_EXAMPLES
#        DEAL_II_COMPONENT_MESH_CONVERTER
#      ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )
#
# Detailed information (compiler flags, feature configuration) can be found in detailed.log
#
###
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mikey/deal.II
 

Matthias Maier

unread,
Nov 29, 2013, 2:31:26 PM11/29/13
to dea...@googlegroups.com
Hi,

> Is Trilinos configured correctly?

Yes.

Please read carefully:

>
> Rest of the configlog:
> [...]
> -- Could not find a sufficient Trilinos installation: Trilinos has to
> be configured with the same MPI configuration as deal.II.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please reconfigure deal.II with enabled MPI support:

>
> It might be necessary to enable MPI (if you have configured trilinos
> with mpi support). In this case:
>
> cmake -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=<correct path> .

Best,
Matthias

Michael Raba

unread,
Nov 29, 2013, 2:40:14 PM11/29/13
to dea...@googlegroups.com
Thanks, Matthais! 

Is this considered a successful build? Thanks in advance

Michael


#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      ON
#        CMAKE_INSTALL_PREFIX:   /home/mikey/deal.II
#        CMAKE_SOURCE_DIR:       /home/mikey/deal.II (Version 8.0.0)
#        CMAKE_BINARY_DIR:       /home/mikey/deal.II
#        CMAKE_CXX_COMPILER:     GNU 4.7.3 on platform Linux x86_64
#                                /usr/bin/c++
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = ON):
#      ( DEAL_II_WITH_64BIT_INDICES = OFF )
#      ( DEAL_II_WITH_ARPACK = OFF )
#        DEAL_II_WITH_BOOST set up with bundled packages
#        DEAL_II_WITH_FUNCTIONPARSER set up with bundled packages
#        DEAL_II_WITH_HDF5 set up with external dependencies
#        DEAL_II_WITH_LAPACK set up with external dependencies
#      ( DEAL_II_WITH_METIS = OFF )
#        DEAL_II_WITH_MPI set up with external dependencies
#      ( DEAL_II_WITH_MUMPS = OFF )
#      ( DEAL_II_WITH_NETCDF = OFF )
#      ( DEAL_II_WITH_P4EST = OFF )
#      ( DEAL_II_WITH_PETSC = OFF )
#      ( DEAL_II_WITH_SLEPC = OFF )
#        DEAL_II_WITH_THREADS set up with bundled packages
#        DEAL_II_WITH_TRILINOS set up with external dependencies
#        DEAL_II_WITH_UMFPACK set up with bundled packages
#        DEAL_II_WITH_ZLIB set up with external dependencies
#

Matthias Maier

unread,
Nov 29, 2013, 2:42:05 PM11/29/13
to dea...@googlegroups.com

Am 29. Nov 2013, 20:40 schrieb Michael Raba <michae...@gmail.com>:

> Thanks, Matthais!
>
> Is this considered a successful build? Thanks in advance

Looks good. Now, build and install via

$ make -j<n> install

Best,
Matthias

Michael Raba

unread,
Nov 29, 2013, 2:48:31 PM11/29/13
to dea...@googlegroups.com
When I did sudo make install i got


Then I saw your instruction and I got

mikey@mikey-VirtualBox ~/deal.II $ make -j<n> install 
bash: n: No such file or directory


Michael

Jean-Paul Pelteret

unread,
Nov 29, 2013, 3:26:46 PM11/29/13
to dea...@googlegroups.com
The "-j<n>" is to enable a multithreaded build process. What Matthias was suggesting is that you install using a command such as "make -j2 install" to use 2 threads when compiling, "make -j4 install" to use 4 etc.

Michael Raba

unread,
Nov 29, 2013, 8:44:54 PM11/29/13
to dea...@googlegroups.com
What is n supposed to be? It gets further along the install before exiting with Error 2 for larger n.
n=2
n=1000

Bruno Turcksin

unread,
Nov 29, 2013, 9:12:29 PM11/29/13
to dea...@googlegroups.com
Michael,


On Friday, November 29, 2013 7:44:54 PM UTC-6, Michael Raba wrote:
What is n supposed to be? It gets further along the install before exiting with Error 2 for larger n.
The n is for the number of processors you want to use to compile deal.II. I don't think that you have 1000 processors on your machine so it won't compile faster with such a large number. The error that you see looks like a problem with Trilinos. The path looks suspicious to me. Please make sure that: /home/mikey/trilinos-11.4.3-Source/bau/home/mikey/trilinos/lib exist and is not empty. If it is then you have given a wrong path to deal.II. If it is not then try to install deal.II in a fresh directory.

Best

Bruno
Reply all
Reply to author
Forward
0 new messages