Trouble building dealii with p4est - undeclared variables in scope

50 views
Skip to first unread message

Chris Coutinho

unread,
Dec 1, 2016, 10:56:13 AM12/1/16
to deal.II User Group
Hello deal.ii users,

I'm having trouble building dealii 8.4.2 with p4est support on OpenSUSE Leap 42.2, kernel 4.4.27-2-default, gcc/g++/gfortran version 4.8.5, openmpi 1.10.3 (MPI 3.0)

I have successfully built deal.ii with MPI, PETSC, and METIS support and ran a few examples without a problem. Then I noticed that for few of the example problems, Trilinos and/or p4est also required, so I built version 12.10.1 of Trilinos from source as well as versions 0.3.4.1 - 1.1 of p4est using the steps contained in the deal.ii README which worked fine - now the problem is building deal.ii

I used the following command successfully to build dealii (note Trilinos and p4est are OFF)

> rm -rf * && \
cmake
\
-DDEAL_II_WITH_MPI:BOOL=ON \
-DDEAL_II_WITH_PETSC:BOOL=ON \
-DDEAL_II_WITH_TRILINOS:BOOL=ON \
-DDEAL_II_WITH_METIS:BOOL=ON \
-DDEAL_II_WITH_P4EST:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/home/redclient04/Software/INSTALL \
.. 2>&1 | tee cmake.log && \
make
-j20 2>&1 | tee make.log && \
make test
2>&1 | tee test.log


With only p4est enabled, and P4EST_DIR pointing to the DEBUG folder of version 0.3.4.1, I get the following errors associated with undeclared variables in scope. The rest of the output can be found in the attached make.log:


.
.
[ 32%] Building CXX object source/fe/CMakeFiles/obj_fe.debug.dir/fe.cc.o
/home/redclient04/Software/dealii/source/distributed/tria.cc:302:9: error: ‘p4est_connectivity_join_faces’ was not declared in this scope
       = p4est_connectivity_join_faces;
         ^
/home/redclient04/Software/dealii/source/distributed/tria.cc:677:9: error: ‘p8est_connectivity_join_faces’ was not declared in this scope
       = p8est_connectivity_join_faces;
         ^
.
.

There seems to be an error in how I installed p4est, but I just downloaded the released tarballs and used the dealii script (link) to install it on my system. I tried building deal with p4est versions 0.3.4.1 - 1.1. Although some were more verbose than others, they all gave more or less the same error - some variable not being declared in the scope. Specifically, the command I used to build p4est 0.3.4.1 is:

> ./p4est-setup-dealii.sh p4est-0.3.4.1.tar.gz /home/redclient04/Software/p4est/p4est-0.3.4.1
> export P4EST_DIR=/home/redclient04/Software/p4est/p4est-0.3.4.1/DEBUG


Can anyone give me an idea of what may have gone wrong in my workflow?

A quick rundown of what cmake was able to put together can be see in this summary. A more detailed output of cmake is attached as cmake.log

###
#
#  deal.II configuration:
#        CMAKE_BUILD_TYPE:       DebugRelease
#        BUILD_SHARED_LIBS:      ON
#        CMAKE_INSTALL_PREFIX:   /home/redclient04/Software/INSTALL
#        CMAKE_SOURCE_DIR:       /home/redclient04/Software/dealii
#                                (version 8.4.2, shortrev 0752c81)
#        CMAKE_BINARY_DIR:       /home/redclient04/Software/dealii/build5
#        CMAKE_CXX_COMPILER:     GNU 4.8.5 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 set up with external dependencies
#        DEAL_II_WITH_BOOST set up with external dependencies
#        DEAL_II_WITH_BZIP2 set up with external dependencies
#        DEAL_II_WITH_CXX11 = ON
#      ( DEAL_II_WITH_CXX14 = OFF )
#        DEAL_II_WITH_HDF5 set up with external dependencies
#        DEAL_II_WITH_LAPACK set up with external dependencies
#        DEAL_II_WITH_METIS set up with external dependencies
#        DEAL_II_WITH_MPI set up with external dependencies
#        DEAL_II_WITH_MUPARSER set up with external dependencies
#        DEAL_II_WITH_NETCDF set up with external dependencies
#      ( DEAL_II_WITH_OPENCASCADE = OFF )
#        DEAL_II_WITH_P4EST set up with external dependencies
#        DEAL_II_WITH_PETSC set up with external dependencies
#      ( DEAL_II_WITH_SLEPC = OFF )
#        DEAL_II_WITH_THREADS set up with external dependencies
#        DEAL_II_WITH_TRILINOS set up with external dependencies
#        DEAL_II_WITH_UMFPACK set up with external dependencies
#        DEAL_II_WITH_ZLIB set up with external dependencies
#
#  Component configuration:
#      ( DEAL_II_COMPONENT_DOCUMENTATION = OFF )
#        DEAL_II_COMPONENT_EXAMPLES
#      ( DEAL_II_COMPONENT_PACKAGE = OFF )
#      ( DEAL_II_COMPONENT_PARAMETER_GUI = OFF )
#
#  Detailed information (compiler flags, feature configuration) can be found in detailed.log
#
#  Run  $ make info  to print a help message with a list of top level targets
#
###


Any advice would be much appreciated.

Cheers,
Chris





make.log
cmake.log

Bruno Turcksin

unread,
Dec 1, 2016, 1:54:53 PM12/1/16
to deal.II User Group
Chris,


On Thursday, December 1, 2016 at 10:56:13 AM UTC-5, Chris Coutinho wrote:
With only p4est enabled, and P4EST_DIR pointing to the DEBUG folder of version 0.3.4.1, I get the following errors associated with undeclared variables in scope. The rest of the output can be found in the attached make.log:

I haven't used the script in a while but I don't think it's necessary to point to the DEBUG folder.


> ./p4est-setup-dealii.sh p4est-0.3.4.1.tar.gz /home/redclient04/Software/p4est/p4est-0.3.4.1
> export P4EST_DIR=/home/redclient04/Software/p4est/p4est-0.3.4.1/DEBUG

Can you try export P4EST_DIR=/home/redclient04/Software/p4est/p4est-0.3.4.1

Best,

Bruno

Chris Coutinho

unread,
Dec 2, 2016, 5:08:20 AM12/2/16
to deal.II User Group
Hi Bruno,

Setting p4est_dir to the entire p4est-x.x.x.x directory doesn't change anything - it still fails with variables undefined in the current scope. See attached cmake and make logs for detailed output, but I don't noticed any difference.

Regards,
Chris
cmake.log
make.log

Bruno Turcksin

unread,
Dec 2, 2016, 8:28:25 AM12/2/16
to dea...@googlegroups.com
Chris,

I don't know why it doesn't work :-( Here is what you can try:
- reinstall p4est and check that there are no error during the
compilation. The most probable reason for your error is that something
went wrong during the compilation of p4est.
- use candi to install everything (https://github.com/dealii/candi).
- use the development version of deal.II These functions are not
called in tria.cc anymore.

Sorry

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/vuvu6lxAEEQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Chris Coutinho

unread,
Dec 2, 2016, 9:36:24 AM12/2/16
to deal.II User Group
Howdy Bruno,

Thanks for the quick reply.

Something could have gone wrong when building p4est, but I'm not 100% certain because the config file is full of contradictory messages. For example, when checking c compiler validity, it uses some options that work and others that produce errors, but I think it's because different compilers (gcc, icc, etc...) have those options - not an error in gcc itself. For example, this snippet produces correct results as well as errors:

.
.
configure:3902: checking for C compiler version
configure:3911: mpicc --version >&5
gcc (SUSE Linux) 6.2.1 20161121 [gcc-6-branch revision 242657]
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3922: $? = 0
configure:3911: mpicc -v >&5
Using built-in specs.
COLLECT_GCC=/home/redclient04/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada,go --enable-offload-targets=hsa --enable-checking=release --with-gxx-include-dir=/usr/include/c++/6 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --with-default-libstdcxx-abi=gcc4-compatible --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-6 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 6.2.1 20161121 [gcc-6-branch revision 242657] (SUSE Linux) 
configure:3922: $? = 0
configure:3911: mpicc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3922: $? = 1
configure:3911: mpicc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3922: $? = 1
configure:3942: checking whether the C compiler works
configure:3964: mpicc -O2 -DSC_LOG_PRIORITY=SC_LP_ESSENTIAL  conftest.c  >&5
configure:3968: $? = 0
configure:4017: result: yes
.
.

So by looking through the p4est config.log file, I'm not able to discern if there is a build error or not. For instance, this part when compiling 'conftest.c' somewhat farther down seems suspicious. Initially its able to compile, but then it initiates the same command again and it fails (bold to emphasize):

.
.
configure:6560: mpicc -c -O2 -DSC_LOG_PRIORITY=SC_LP_ESSENTIAL conftest.c >&5
configure:6563: $? = 0
configure:7273: checking how to run the C preprocessor
configure:7304: mpicc -E -DSC_LOG_PRIORITY=SC_LP_ESSENTIAL conftest.c
configure:7304: $? = 0
configure:7318: mpicc -E -DSC_LOG_PRIORITY=SC_LP_ESSENTIAL conftest.c
conftest.c:17:28: fatal error: ac_nonexistent.h: No such file or directory
 #include <ac_nonexistent.h>
                            ^
compilation terminated.
configure:7318: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "p4est"
| #define PACKAGE_TARNAME "p4est"
| #define PACKAGE_VERSION "0.3.4.1"
| #define PACKAGE_STRING "p4est 0.3.4.1"
.
.


What do you think, is this a p4est build error? It's not immediately clear from the build output if this is an issue or not.
config.log

Bruno Turcksin

unread,
Dec 2, 2016, 9:44:31 AM12/2/16
to dea...@googlegroups.com
2016-12-02 9:36 GMT-05:00 Chris Coutinho <chrisbc...@gmail.com>:
> What do you think, is this a p4est build error? It's not immediately clear
> from the build output if this is an issue or not.
Yes, it is hard to say but I don't think that these errors are really
a problem but now I remember one time I installed p4est and everything
seemed fine but later I had some problems. You can check that the
installation was successful by going into p4est build directory and
type make check. If some tests don't pass there is a problem.

Bruno

Chris Coutinho

unread,
Dec 2, 2016, 10:49:32 AM12/2/16
to dea...@googlegroups.com
I think you're right about my p4est build, there is something wrong with how it's linking to and/or using Lua, see attached. I will have to investigate this further.



check.log

Wolfgang Bangerth

unread,
Dec 2, 2016, 6:26:44 PM12/2/16
to dea...@googlegroups.com

Chris,

> I used the following command successfully to build dealii (note Trilinos and
> p4est are OFF)
>
> |
>>rm -rf *&&\
> cmake \
> -DDEAL_II_WITH_MPI:BOOL=ON \
> -DDEAL_II_WITH_PETSC:BOOL=ON \
> -DDEAL_II_WITH_TRILINOS:BOOL=ON \
> -DDEAL_II_WITH_METIS:BOOL=ON \
> -DDEAL_II_WITH_P4EST:BOOL=OFF \

So you explicitly disable the use of p4est in deal.II...


> /home/redclient04/Software/dealii/source/distributed/tria.cc:302:9: error:
> ‘p4est_connectivity_join_faces’ was not declared in this scope
> = p4est_connectivity_join_faces;
> ^
> /home/redclient04/Software/dealii/source/distributed/tria.cc:677:9: error:
> ‘p8est_connectivity_join_faces’ was not declared in this scope
> = p8est_connectivity_join_faces;
> ^

...after which I am confused why you get to compile this line at all. Is
DEAL_II_WITH_P4EST defined in your $BUILD/include/deal.II/base/config.h file?
If so, why?

It is confusing to me that although you explicitly disabled p4est in the cmake
call, the cmake log still shows that it was enabled...

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Chris Coutinho

unread,
Dec 3, 2016, 5:01:15 AM12/3/16
to deal.II User Group, bang...@colostate.edu
Hello Wolfgang,

You're right, that isn't as clear as I intended. What I tried to do was show the line I used that 'worked' (i.e. compiles and I can run example problems), with what doesn't if I only change the option for p4est from 'OFF' to 'ON'. The issue I'm having is from changing that one option.

I was trying to show that this is was specifically a p4est issue, and not with something else.

Thanks for asking,

Chris
Reply all
Reply to author
Forward
0 new messages