Building issue: undefined reference to SolutionTransfer

52 views
Skip to first unread message

Jie Cheng

unread,
Jan 29, 2018, 5:00:58 PM1/29/18
to deal.II User Group
Hi everyone

I am trying to build deal.II on a cluster with x86_64 architecture, Scientific Linux 6.9 (Carbon), gcc 7.2.0 and openmpi 3.0.0. (Yes, I am building dealii everywhere, as our entire research group just began to use dealii.) This time, I got linking error related to SolutionTransfer as follows:

Linking CXX executable ../bin/step-15.release
CMakeFiles/step-15.release.dir/step-15/step-15.cc.o: In function `Step15::MinimalSurfaceProblem<2>::refine_mesh()':
step-15.cc:(.text._ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv[_ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv]+0x1c0): undefined reference to `dealii::SolutionTransfer<2, dealii::Vector<double>, dealii::DoFHandler<2, 2> >::SolutionTransfer(dealii::DoFHandler<2, 2> const&)'
step-15.cc:(.text._ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv[_ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv]+0x1cf): undefined reference to `dealii::SolutionTransfer<2, dealii::Vector<double>, dealii::DoFHandler<2, 2> >::prepare_for_coarsening_and_refinement(dealii::Vector<double> const&)'
step-15.cc:(.text._ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv[_ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv]+0x206): undefined reference to `dealii::SolutionTransfer<2, dealii::Vector<double>, dealii::DoFHandler<2, 2> >::interpolate(dealii::Vector<double> const&, dealii::Vector<double>&) const'
step-15.cc:(.text._ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv[_ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv]+0x273): undefined reference to `dealii::SolutionTransfer<2, dealii::Vector<double>, dealii::DoFHandler<2, 2> >::~SolutionTransfer()'
step-15.cc:(.text._ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv[_ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv]+0x2d7): undefined reference to `dealii::SolutionTransfer<2, dealii::Vector<double>, dealii::DoFHandler<2, 2> >::~SolutionTransfer()'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/step-15.release] Error 1
make[1]: *** [examples/CMakeFiles/step-15.release.dir/all] Error 2
make: *** [all] Error 2

The source code is the latest up to Jan 27. Everything else seems to be fine: I am able to run step-18, but not step-15 because the latter uses SolutionTransfer. The error message does not provide any information, I don't know where to start debugging. I've attached my building logs. Any advice is appreciated!

P.S. dealii was built with: cmake ../dealii -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DDEAL_II_WITH_CXX14=ON -DDEAL_II_WITH_LAPACK=ON -DLAPACK_DIR=../lapack-build -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_P4EST=ON -DP4EST_DIR=../p4est-1.1/local -DDEAL_II_WITH_PETSC=ON -DPETSC_ARCH=arch-linux2-c-opt -DPETSC_DIR=../petsc-3.8.2

P.P.S. lapack, p4est, PETSc (including MUMPS and scalapack) are all built from source.

Thank you
Jie




detailed.log
summary.log

Wolfgang Bangerth

unread,
Jan 30, 2018, 11:48:42 PM1/30/18
to dea...@googlegroups.com, Jie Cheng

> I am trying to build deal.II on a cluster with x86_64 architecture, Scientific
> Linux 6.9 (Carbon), gcc 7.2.0 and openmpi 3.0.0. (Yes, I am building dealii
> everywhere, as our entire research group just began to use dealii.) This time,
> I got linking error related to SolutionTransfer as follows:
>
> Linking CXX executable ../bin/step-15.release
> CMakeFiles/step-15.release.dir/step-15/step-15.cc.o: In function
> `Step15::MinimalSurfaceProblem<2>::refine_mesh()':
> step-15.cc:(.text._ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv[_ZN6Step1521MinimalSurfaceProblemILi2EE11refine_meshEv]+0x1c0):
> undefined reference to `dealii::SolutionTransfer<2, dealii::Vector<double>,

This is strange. SolutionTransfer is used in a number of tutorial programs,
for example step-26. Can you link that file?


> The source code is the latest up to Jan 27. Everything else seems to be fine:
> I am able to run step-18, but not step-15 because the latter uses
> SolutionTransfer. The error message does not provide any information, I don't
> know where to start debugging. I've attached my building logs. Any advice is
> appreciated!

The function should have been produced from the file
source/numeric/solution_transfer.cc. What happens if you do
touch /path/to/sources-of-dealii/source/numerics/solution_transfer.cc
cd /path/to/your/build/directory
make -j1 install
I can only imagine that the build of this file failed for some reason (out of
memory?) and the commands above just force a re-build.


> P.S. dealii was built with: cmake ../dealii -DBUILD_SHARED_LIBS=OFF
> -DCMAKE_BUILD_TYPE=Release -DDEAL_II_WITH_CXX14=ON -DDEAL_II_WITH_LAPACK=ON
> -DLAPACK_DIR=../lapack-build -DDEAL_II_WITH_MPI=ON -DDEAL_II_WITH_P4EST=ON
> -DP4EST_DIR=../p4est-1.1/local -DDEAL_II_WITH_PETSC=ON
> -DPETSC_ARCH=arch-linux2-c-opt -DPETSC_DIR=../petsc-3.8.2

You are building with static (i.e., without shared) libraries. This is
uncommon these days? What are you reasons for doing so? It will take forever
for you to link any application. It will also take enormous amounts of disk
space if you build multiple applications.

Best
W.

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

Jie Cheng

unread,
Apr 23, 2018, 8:49:51 PM4/23/18
to deal.II User Group
Hi Wolfgang

Sorry for not updating this issue for so long. I've been developing on my local machine until recently I started to test my code on cluster again. This issue has not been resolved, linking to SolutionTransfer will fail if I build static library (solution_transfer is compiled). But now I tried to build shared libraries instead. I did a minimum build of dealii (using all of the default building options), configuration, compiling and linking went smoothly without any error. But I could not run any tutorial, all of them gave me segmentation fault immediately (no useful info, only segment fault). I was not even able to run a "hello world" problem if I link it with dealii. Building in debug mode did not help. I completely have no clue how this could happen. Can you please point me a direction to understand the problem?

The source code I used is up-to-date (SHA: 3d0c7ab699dace76);
System is Scientific Linux 6.9 (Carbon)
gcc version is 7.3.0

I've attached my CMakeCache and summary.log.

Thank you!
Jie


CMakeCache.txt
summary.log

Timo Heister

unread,
Apr 24, 2018, 12:01:02 PM4/24/18
to dea...@googlegroups.com
can you post your detailed.log?

If a tutorial like step-1 crashes, please
1. check the dynamic libraries by doing "ldd step-1" and post the
output. Maybe you have conflicting libraries you are linking.
2. run under gdb: "gdb step-1" then "run" then "backtrace" to see
where you crash.
> --
> The deal.II project is located at https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dealii.org_&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=TjzN-LMQUtQJoM1bxgcw94aP7tCtQ2r10bl2qQSpDPw&s=POnss3ormS1XXiqg54YqF_mukzlGpflHaAItgpvWE3Y&e=
> For mailing list/forum options, see
> https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_forum_dealii-3Fhl-3Den&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=TjzN-LMQUtQJoM1bxgcw94aP7tCtQ2r10bl2qQSpDPw&s=GYouR_JzJGhPjFcghkqeOFIAY5ZDJ9D4zi4F_JqIRlo&e=
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com.
> For more options, visit https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIBaQ&c=Ngd-ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=4k7iKXbjGC8LfYxVJJXiaYVu6FRWmEjX38S7JmlS9Vw&m=TjzN-LMQUtQJoM1bxgcw94aP7tCtQ2r10bl2qQSpDPw&s=rxGsQICkV6INJ7F-q3Zq9rk0AX9DimjYhTfWbSoLGIg&e=.



--
Timo Heister
http://www.math.clemson.edu/~heister/

Jie Cheng

unread,
Apr 25, 2018, 1:35:32 AM4/25/18
to dea...@googlegroups.com
Hi Timo

Thanks for your help! I disabled DEAL_II_WITH_THREADS and now it runs fine! Just out of curiosity, what do I lose with it disabled? What additional library do I need to build if I want to have it? (Internet is banned on the cluster I use, everything has to be built from source.)

Best
Jie

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/Ea-kSSnwLYg/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.
Reply all
Reply to author
Forward
0 new messages