Compilation error - small_vector - no matching function for call to small_vector(std::size_t, dealii::Point<1, double>)

163 views
Skip to first unread message

JGM

unread,
Jun 20, 2018, 5:50:47 AM6/20/18
to deal.II User Group
Dear colleagues

I am trying to compile deal.ii.
My objective is to follow tutorials Step-12 and Step-33.

I have configured the build as:
$ cmake -DCMAKE_INSTALL_PREFIX=/home/jgaricano/bin/DEAL.II /home/jgaricano/Downloads/dealii-9.0.0 \
-DTRILINOS_DIR=/home/jgaricano/bin/TRILINOS \
-DDEAL_II_WITH_MPI=ON \
-DDEAL_II_ALLOW_AUTODETECTION=ON

The configuration reports 
BOOST_VERSION: 1.59.0

When issuing the command make, compilation stops when dealing with manifold_lib.
The error message is (see an excerpt below) is related to small_vector from boost.

Could you please help with this compilation error?
Thanks

Here the erro message:
[ 45%] Building CXX object source/grid/CMakeFiles/obj_grid_release.dir/manifold_lib.cc.o
/home/jgaricano/Downloads/dealii-9.0.0/source/grid/manifold_lib.cc: In instantiation of ‘void dealii::SphericalManifold<dim, spacedim>::get_new_points(const dealii::ArrayView<const dealii::Point<spacedim> >&, const dealii::ArrayView<const double>&, dealii::ArrayView<dealii::Point<spacedim> >) const [with int dim = 1; int spacedim = 1]’:
/home/jgaricano/bin/dealii-9.0.0/build/source/grid/manifold_lib.inst:12:17:   required from here
/home/jgaricano/Downloads/dealii-9.0.0/source/grid/manifold_lib.cc:559:114: error: no matching function for call to ‘boost::container::small_vector<dealii::Tensor<1, 1>, 100ul, boost::container::new_allocator<dealii::Tensor<1, 1> > >::small_vector(std::size_t, dealii::Point<1, double>)’
   boost::container::small_vector<Tensor<1, spacedim>, 100> directions(surrounding_points.size(),Point<spacedim>());
                                                                                                                  ^
/home/jgaricano/Downloads/dealii-9.0.0/source/grid/manifold_lib.cc:559:114: note: candidates are:
In file included from /home/jgaricano/Downloads/dealii-9.0.0/include/deal.II/grid/manifold_lib.h:25:0,
                 from /home/jgaricano/Downloads/dealii-9.0.0/source/grid/manifold_lib.cc:22:
/usr/local/include/boost/container/small_vector.hpp:515:4: note: boost::container::small_vector<T, N, Allocator>::small_vector(std::initializer_list<typename boost::container::small_vector_base<T, Allocator>::value_type>, const allocator_type&) [with T = dealii::Tensor<1, 1>; long unsigned int N = 100ul; Allocator = boost::container::new_allocator<dealii::Tensor<1, 1> >; typename boost::container::small_vector_base<T, Allocator>::value_type = dealii::Tensor<1, 1>; boost::container::small_vector<T, N, Allocator>::allocator_type = boost::container::small_vector_allocator<boost::container::new_allocator<dealii::Tensor<1, 1> > >]
    small_vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
    ^
/usr/local/include/boost/container/small_vector.hpp:515:4: note:   no known conversion for argument 1 from ‘std::size_t {aka long unsigned int}’ to ‘std::initializer_list<dealii::Tensor<1, 1> >’
/usr/local/include/boost/container/small_vector.hpp:510:4: note: boost::container::small_vector<T, N, Allocator>::small_vector(boost::container::small_vector<T, N, Allocator>&&, const allocator_type&) [with T = dealii::Tensor<1, 1>; long unsigned int N = 100ul; Allocator = boost::container::new_allocator<dealii::Tensor<1, 1> >; boost::container::small_vector<T, N, Allocator>::allocator_type = boost::container::small_vector_allocator<boost::container::new_allocator<dealii::Tensor<1, 1> > >]
    small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a)
    ^
/usr/local/include/boost/container/small_vector.hpp:510:4: note:   no known conversion for argument 1 from ‘std::size_t {aka long unsigned int}’ to ‘boost::container::small_vector<dealii::Tensor<1, 1>, 100ul, boost::container::new_allocator<dealii::Tensor<1, 1> > >&&’
/usr/local/include/boost/container/small_vector.hpp:506:4: note: boost::container::small_vector<T, N, Allocator>::small_vector(boost::container::small_vector<T, N, Allocator>&&) [with T = dealii::Tensor<1, 1>; long unsigned int N = 100ul; Allocator = boost::container::new_allocator<dealii::Tensor<1, 1> >]
    small_vector(BOOST_RV_REF(small_vector) other)
    ^
/usr/local/include/boost/container/small_vector.hpp:506:4: note:   candidate expects 1 argument, 2 provided
/usr/local/include/boost/container/small_vector.hpp:502:4: note: boost::container::small_vector<T, N, Allocator>::small_vector(const boost::container::small_vector<T, N, Allocator>&, const allocator_type&) [with T = dealii::Tensor<1, 1>; long unsigned int N = 100ul; Allocator = boost::container::new_allocator<dealii::Tensor<1, 1> >; boost::container::small_vector<T, N, Allocator>::allocator_type = boost::container::small_vector_allocator<boost::container::new_allocator<dealii::Tensor<1, 1> > >]
    small_vector(const small_vector &other, const allocator_type &a)
(not all shown)
...

Bruno Turcksin

unread,
Jun 20, 2018, 7:59:43 AM6/20/18
to deal.II User Group
Hi,

Can you post the detailed.log file.

Best,

Bruno

JGM

unread,
Jun 20, 2018, 8:33:37 AM6/20/18
to deal.II User Group
Dear Bruno,

These are the contents of file detailed.log:
###
#
#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      ON
#        CMAKE_INSTALL_PREFIX:   /home/jgaricano/bin/DEAL.II
#        CMAKE_SOURCE_DIR:       /home/jgaricano/Downloads/dealii-9.0.0
#                                (version 9.0.0)
#        CMAKE_BINARY_DIR:       /home/jgaricano/bin/dealii-9.0.0/build
#        CMAKE_CXX_COMPILER:     GNU 4.9.2 on platform Linux x86_64
#                                /usr/bin/c++
#        CMAKE_C_COMPILER:       /usr/bin/cc
#        CMAKE_Fortran_COMPILER: /usr/bin/gfortran
#        CMAKE_GENERATOR:        Unix Makefiles
#
#  Base configuration (prior to feature configuration):
#        DEAL_II_CXX_FLAGS:            -pedantic -fPIC -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wsynth -Wsign-compare -Wswitch -Woverloaded-virtual -Wno-deprecated-declarations -Wno-literal-suffix -fopenmp-simd -std=c++11
#        DEAL_II_CXX_FLAGS_RELEASE:    -O2 -funroll-loops -funroll-all-loops -fstrict-aliasing -Wno-unused-local-typedefs
#        DEAL_II_CXX_FLAGS_DEBUG:      -Og -ggdb -Wa,--compress-debug-sections
#        DEAL_II_LINKER_FLAGS:         -Wl,--as-needed -rdynamic -fuse-ld=gold
#        DEAL_II_LINKER_FLAGS_RELEASE: 
#        DEAL_II_LINKER_FLAGS_DEBUG:   -ggdb
#        DEAL_II_DEFINITIONS:          
#        DEAL_II_DEFINITIONS_RELEASE:  
#        DEAL_II_DEFINITIONS_DEBUG:    DEBUG
#        DEAL_II_USER_DEFINITIONS:     
#        DEAL_II_USER_DEFINITIONS_REL: 
#        DEAL_II_USER_DEFINITIONS_DEB: DEBUG
#        DEAL_II_INCLUDE_DIRS          
#        DEAL_II_USER_INCLUDE_DIRS:    
#        DEAL_II_BUNDLED_INCLUDE_DIRS: 
#        DEAL_II_LIBRARIES:            m
#        DEAL_II_LIBRARIES_RELEASE:    
#        DEAL_II_LIBRARIES_DEBUG:      
#        DEAL_II_COMPILER_VECTORIZATION_LEVEL: 1
#
#  Configured Features (DEAL_II_ALLOW_BUNDLED = ON, DEAL_II_ALLOW_AUTODETECTION = OFF):
#      ( DEAL_II_WITH_64BIT_INDICES = OFF )
#      ( DEAL_II_WITH_ADOLC = OFF )
#      ( DEAL_II_WITH_ARPACK = OFF )
#      ( DEAL_II_WITH_ASSIMP = OFF )
#        DEAL_II_WITH_BOOST set up with external dependencies
#            BOOST_VERSION = 1.59.0
#            BOOST_CXX_FLAGS = -Wno-unused-local-typedefs
#            BOOST_INCLUDE_DIRS = /usr/local/include
#            BOOST_USER_INCLUDE_DIRS = /usr/local/include
#            BOOST_LIBRARIES = /usr/local/lib/libboost_serialization.so;/usr/local/lib/libboost_system.so;/usr/local/lib/libboost_thread.so;pthread
#      ( DEAL_II_WITH_CUDA = OFF )
#      ( DEAL_II_WITH_CXX14 = OFF )
#      ( DEAL_II_WITH_CXX17 = OFF )
#      ( DEAL_II_WITH_GMSH = OFF )
#      ( DEAL_II_WITH_GSL = OFF )
#      ( DEAL_II_WITH_HDF5 = OFF )
#      ( DEAL_II_WITH_LAPACK = OFF )
#      ( DEAL_II_WITH_METIS = OFF )
#        DEAL_II_WITH_MPI set up with external dependencies
#            MPI_VERSION = 3.0
#            MPI_C_COMPILER = /usr/local/bin/mpicc
#            MPI_CXX_COMPILER = /usr/local/bin/mpicxx
#            MPI_Fortran_COMPILER = /usr/local/bin/mpif90
#            MPI_CXX_FLAGS = 
#            MPI_LINKER_FLAGS = -Wl,-rpath  -Wl,/usr/local/lib  -Wl,--enable-new-dtags
#            MPI_INCLUDE_DIRS = /usr/local/include
#            MPI_USER_INCLUDE_DIRS = /usr/local/include
#            MPI_LIBRARIES = /usr/local/lib/libmpi_cxx.so;/usr/local/lib/libmpi_usempif08.so;/usr/local/lib/libmpi_usempi_ignore_tkr.so;/usr/local/lib/libmpi_mpifh.so;/usr/local/lib/libmpi.so
#      ( DEAL_II_WITH_MUPARSER = OFF )
#      ( DEAL_II_WITH_NANOFLANN = OFF )
#      ( DEAL_II_WITH_NETCDF = OFF )
#      ( DEAL_II_WITH_OPENCASCADE = OFF )
#      ( DEAL_II_WITH_P4EST = OFF )
#      ( DEAL_II_WITH_PETSC = OFF )
#      ( DEAL_II_WITH_SCALAPACK = OFF )
#      ( DEAL_II_WITH_SLEPC = OFF )
#      ( DEAL_II_WITH_SUNDIALS = OFF )
#      ( DEAL_II_WITH_THREADS = OFF )
#      ( DEAL_II_WITH_TRILINOS = OFF )
#      ( DEAL_II_WITH_UMFPACK = OFF )
#      ( DEAL_II_WITH_ZLIB = OFF )
#
#  Component configuration:
#      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
#        DEAL_II_COMPONENT_EXAMPLES
#      ( DEAL_II_COMPONENT_PACKAGE = OFF )
#      ( DEAL_II_COMPONENT_PYTHON_BINDINGS = OFF )
#
###


Cheers,

J.

Bruno Turcksin

unread,
Jun 20, 2018, 4:42:09 PM6/20/18
to dea...@googlegroups.com
Can you to reconfigure (and recompile) deal.II with the following option -D DEAL_II_FORCE_BUNDLED_BOOST=ON

Best

Bruno

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/DbZfMrdIC7w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

JGM

unread,
Jun 25, 2018, 6:02:40 AM6/25/18
to deal.II User Group
Hi,


I did as suggested, but then I got the error message reported below.
Additionally, I found something odd: I had to execute twice the command:
$cmake -DCMAKE_INSTALL_PREFIX=/home/jgaricano/bin/DEAL.II /home/jgaricano/Downloads/dealii-9.0.0 -DTRILINOS_DIR=/home/jgaricano/bin/TRILINOS -DDEAL_II_WITH_MPI=ON -DDEAL_II_FORCE_BUNDLED_BOOST=ON-DDEAL_II_ALLOW_AUTODETECTION=ON

to have the configuration to acknowledge trilinos, i.e. to get the message:
...
DEAL_II_WITH_TRILINOS set up with external dependencies
...

Error message:
...
[ 33%] Building CXX object source/lac/CMakeFiles/obj_lac_release.dir/scalapack.cc.o
[ 33%] Building CXX object source/lac/CMakeFiles/obj_lac_release.dir/scalapack.cc.o
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc: In member function ‘void dealii::ScaLAPACKMatrix<NumberType>::save_parallel(const char*, const std::pair<unsigned int, unsigned int>&) const’:
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1830:60: error: there are no arguments to ‘H5Pset_dxpl_mpio’ that depend on a template parameter, so a declaration of ‘H5Pset_dxpl_mpio’ must be available [-fpermissive]
   status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_INDEPENDENT);
                                                            ^
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1830:60: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc: In instantiation of ‘void dealii::ScaLAPACKMatrix<NumberType>::save_parallel(const char*, const std::pair<unsigned int, unsigned int>&) const [with NumberType = double]’:
/home/jgaricano/bin/dealii-9.0.0/build/source/lac/scalapack.inst:10:16:   required from here
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1765:71: error: ‘H5Pset_fapl_mpio’ was not declared in this scope
   status = H5Pset_fapl_mpio(plist_id, tmp.grid->mpi_communicator, info);
                                                                       ^
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1830:60: error: ‘H5Pset_dxpl_mpio’ was not declared in this scope
   status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_INDEPENDENT);


/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc: In instantiation of ‘void dealii::ScaLAPACKMatrix<NumberType>::load_parallel(const char*) [with NumberType = double]’:
/home/jgaricano/bin/dealii-9.0.0/build/source/lac/scalapack.inst:10:16:   required from here
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:2088:61: warning: unused parameter ‘filename’ [-Wunused-parameter]
 void ScaLAPACKMatrix<NumberType>::load_parallel(const char *filename)
                                                             ^
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc: In instantiation of ‘void dealii::ScaLAPACKMatrix<NumberType>::save_parallel(const char*, const std::pair<unsigned int, unsigned int>&) const [with NumberType = float]’:
/home/jgaricano/bin/dealii-9.0.0/build/source/lac/scalapack.inst:20:16:   required from here
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1765:71: error: ‘H5Pset_fapl_mpio’ was not declared in this scope
   status = H5Pset_fapl_mpio(plist_id, tmp.grid->mpi_communicator, info);
                                                                       ^
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1830:60: error: ‘H5Pset_dxpl_mpio’ was not declared in this scope
   status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_INDEPENDENT);
                                                            ^
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc: In instantiation of ‘void dealii::ScaLAPACKMatrix<NumberType>::load_parallel(const char*) [with NumberType = float]’:
/home/jgaricano/bin/dealii-9.0.0/build/source/lac/scalapack.inst:20:16:   required from here
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:2088:61: warning: unused parameter ‘filename’ [-Wunused-parameter]
 void ScaLAPACKMatrix<NumberType>::load_parallel(const char *filename)
                                                             ^
source/lac/CMakeFiles/obj_lac_release.dir/build.make:330: recipe for target 'source/lac/CMakeFiles/obj_lac_release.dir/scalapack.cc.o' failed
make[2]: *** [source/lac/CMakeFiles/obj_lac_release.dir/scalapack.cc.o] Error 1
CMakeFiles/Makefile2:1575: recipe for target 'source/lac/CMakeFiles/obj_lac_release.dir/all' failed
make[1]: *** [source/lac/CMakeFiles/obj_lac_release.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2


Best,
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.

Bruno Turcksin

unread,
Jun 25, 2018, 8:20:10 AM6/25/18
to dea...@googlegroups.com
Hi,

2018-06-25 6:02 GMT-04:00 JGM <jgar...@gmail.com>:

I did as suggested, but then I got the error message reported below.
Additionally, I found something odd: I had to execute twice the command:
$cmake -DCMAKE_INSTALL_PREFIX=/home/jgaricano/bin/DEAL.II /home/jgaricano/Downloads/dealii-9.0.0 -DTRILINOS_DIR=/home/jgaricano/bin/TRILINOS -DDEAL_II_WITH_MPI=ON -DDEAL_II_FORCE_BUNDLED_BOOST=ON-DDEAL_II_ALLOW_AUTODETECTION=ON
You usually want to reconfigure in a new directory because cmake keeps a cache that is not always updated.

[ 33%] Building CXX object source/lac/CMakeFiles/obj_lac_release.dir/scalapack.cc.o
[ 33%] Building CXX object source/lac/CMakeFiles/obj_lac_release.dir/scalapack.cc.o
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc: In member function ‘void dealii::ScaLAPACKMatrix<NumberType>::save_parallel(const char*, const std::pair<unsigned int, unsigned int>&) const’:
/home/jgaricano/Downloads/dealii-9.0.0/source/lac/scalapack.cc:1830:60: error: there are no arguments to ‘H5Pset_dxpl_mpio’ that depend on a template parameter, so a declaration of ‘H5Pset_dxpl_mpio’ must be available [-fpermissive]
This is a problem with scalapack that was not compiled with a parallel version of HDF5. If you don't need scalapack just turn it off -DDEAL_II_WITH_SCALAPACK=OFF otherwise, you need to recompile it and link it with parallel HDF5.

Best,

Bruno

Denis Davydov

unread,
Jun 26, 2018, 12:33:22 AM6/26/18
to deal.II User Group
Nope, Scalapack does not know anything about HDF5. It's our wrappers that have extra functionality to load/save parallel dense matrices with HDF5. 

This chunk of the code is being wrapped in 

#  ifndef DEAL_II_WITH_HDF5

and given that HDF5 is disabled (according to the post above), i guess it's a remainder of un-clean build directory.


Denis.

 

Best,

Bruno
Reply all
Reply to author
Forward
0 new messages