Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc 13 (Trilinos, dealii and aspect) #5186

Closed
MFraters opened this issue Jul 6, 2023 · 6 comments
Closed

gcc 13 (Trilinos, dealii and aspect) #5186

MFraters opened this issue Jul 6, 2023 · 6 comments

Comments

@MFraters
Copy link
Member

MFraters commented Jul 6, 2023

I have been facing a range of issues trying to get trilinos, dealii and aspect to install with gcc 13 (which is the default on fedora), so I thought I would make an issue about it so that we can discuss it further.

  1. Trilinos: gcc 13 doesn't include cstdint anymore by default, see https://gcc.gnu.org/gcc-13/porting_to.html . I had to add it to both 'tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp' and '/tmp/unpack/Trilinos-trilinos-release-13-2-0/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp' in my candi folder, run make and make install and then I could continue building it with the candi script. They did recently merge a pull request to add it to Teuchos, but not to Kokkos yet, but maybe only the Teuchos is needed. I would need to test that and I could make an issue or pull reuqest when that is done.
  2. dealii: With dealii 9.4.2 I get an issue with cmake. I don't have the log at hand anymore, but I should be able to reproduce it later. With dealii-master I got the issue which is being addressed in fix compiling with newest deal.II master #5185.
  3. aspect: When I use the fixed trilinos and dealii master, aspect builds, but running the executable in any way results in a segmentation fault. Here is the gdb backtrace with aspect in debug mode:
gdb --ex r --args ./aspect 
GNU gdb (Gentoo 13.2 vanilla) 13.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./aspect...
Starting program: /home/m/programming/aspect/aspect/build-rl5/aspect 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffc13ff6c0 (LWP 18619)]
[New Thread 0x7fffc0bfe6c0 (LWP 18620)]
[New Thread 0x7fffb83fd6c0 (LWP 18621)]
[New Thread 0x7fffafbfc6c0 (LWP 18622)]
[New Thread 0x7fff9f3fb6c0 (LWP 18623)]
[New Thread 0x7fff96bfa6c0 (LWP 18624)]
[New Thread 0x7fff963f96c0 (LWP 18625)]
[New Thread 0x7fff85bf86c0 (LWP 18626)]
[New Thread 0x7fff7d3f76c0 (LWP 18627)]
[New Thread 0x7fff74bf66c0 (LWP 18628)]
[New Thread 0x7fff6c3f56c0 (LWP 18629)]
[New Thread 0x7fff63bf46c0 (LWP 18630)]
[New Thread 0x7fff5b3f36c0 (LWP 18631)]
[New Thread 0x7fff5abf26c0 (LWP 18632)]
[New Thread 0x7fff4a3f16c0 (LWP 18633)]

Thread 1 "aspect" received signal SIGSEGV, Segmentation fault.
0x00007ffff4bba64d in __static_initialization_and_destruction_0 ()
    at .../tmp/unpack/deal.II-master/include/deal.II/base/mpi.h:1732
1732          mpi_type_id_for_type = internal::MPIDataTypes::mpi_type_id(
(gdb) bt
#0  0x00007ffff4bba64d in __static_initialization_and_destruction_0 ()
    at .../tmp/unpack/deal.II-master/include/deal.II/base/mpi.h:1732
#1  0x00007ffff4bbafc5 in _GLOBAL__sub_I_mpi.cc(void) ()
    at .../tmp/unpack/deal.II-master/source/base/mpi.cc:1315
#2  0x00007ffff7fd002e in call_init (env=0x7fffffffd3e8, argv=0x7fffffffd3d8, argc=1, l=<optimized out>) at dl-init.c:70
#3  call_init (l=<optimized out>, argc=1, argv=0x7fffffffd3d8, env=0x7fffffffd3e8) at dl-init.c:26
#4  0x00007ffff7fd011c in _dl_init (main_map=0x7ffff7ffe2c0, argc=1, argv=0x7fffffffd3d8, env=0x7fffffffd3e8) at dl-init.c:117
#5  0x00007ffff7fe5900 in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#6  0x0000000000000001 in ?? ()
#7  0x00007fffffffd7e2 in ?? ()
#8  0x0000000000000000 in ?? ()

Building it all with gcc-12 works though on Gentoo. I think I also got this far with my fedora try yesterday and ran into the same issue. I at least got to the dealii issue, but I will have to check if I also ran aspect. I made a very simple mpi test program which works and I also tested the world builder (which has slightly more advanced MPI commands) and both had no issues with gcc-13 and the same mpi libraries. Any ideas?

@MFraters
Copy link
Member Author

MFraters commented Jul 6, 2023

A small update: I managed to compile trilinos with with gcc-13 only the change to Teuchos_BigUIntDecl.hpp in 13.2.0 and to compile 14.2.0. Wih 14.2.0 dealii compiles, but a 28 out of 34 test fail. Here is the last bit of the log for reference:

34/34 Test #33: quick_tests/umfpack.debug ...................................***Failed   10.32 sec
gmake[7]: *** [CMakeFiles/quick_tests.umfpack.debug.test.dir/build.make:78: umfpack.debug/output] Error 1
gmake[6]: *** [CMakeFiles/Makefile2:1759: CMakeFiles/quick_tests.umfpack.debug.test.dir/all] Error 2
gmake[5]: *** [CMakeFiles/Makefile2:1766: CMakeFiles/quick_tests.umfpack.debug.test.dir/rule] Error 2
gmake[4]: *** [Makefile:927: quick_tests.umfpack.debug.test] Error 2
Test quick_tests/umfpack.debug: RUN
===============================   OUTPUT BEGIN  ===============================
[ 33%] Building CXX object CMakeFiles/quick_tests.umfpack.debug.dir/umfpack.cc.o
[500%] Linking CXX executable umfpack.debug/umfpack.debug
[666%] Built target quick_tests.umfpack.debug
[700%] Generating umfpack.debug/output
quick_tests/umfpack.debug: BUILD successful.
quick_tests/umfpack.debug: RUN failed. ------ Return code 127
quick_tests/umfpack.debug: RUN failed. ------ Result:.../tmp/build-gcc13/deal.II-master/tests/quick_tests/umfpack.debug/failing_output
quick_tests/umfpack.debug: RUN failed. ------ Partial output:
.../tmp/build-gcc13/deal.II-master/tests/quick_tests/umfpack.debug/umfpack.debug: symbol lookup error: .../trilinos-release-14-2-0/lib/libstratimikosbelos.so.14: undefined symbol: _ZNK6Tpetra10DistObjectIfixNS_12KokkosCompat23KokkosDeviceWrapperNodeIN6Kokkos6SerialENS3_9HostSpaceEEEE11descriptionB5cxx11Ev


quick_tests/umfpack.debug: ******    RUN failed    *******

===============================    OUTPUT END   ===============================
Expected stage PASSED - aborting
CMake Error at .../tmp/build-gcc13/deal.II-master/share/deal.II/scripts/run_test.cmake:116 (message):
  *** abort




18% tests passed, 28 tests failed out of 34

Total Test time (real) =  19.79 sec

The following tests FAILED:
	  1 - quick_tests/affinity.debug (Failed)
	  2 - quick_tests/affinity.release (Failed)
	  3 - quick_tests/boost_zlib.debug (Failed)
	  4 - quick_tests/boost_zlib.release (Failed)
	  5 - quick_tests/hdf5.debug (Failed)
	  6 - quick_tests/hdf5.release (Failed)
	  7 - quick_tests/kokkos.debug (Failed)
	  8 - quick_tests/kokkos.release (Failed)
	  9 - quick_tests/lapack.debug (Failed)
	 10 - quick_tests/lapack.release (Failed)
	 12 - quick_tests/mpi.mpirun=2.debug (Failed)
	 14 - quick_tests/mpi.mpirun=2.release (Failed)
	 16 - quick_tests/p4est.mpirun=10.debug (Failed)
	 18 - quick_tests/p4est.mpirun=10.release (Failed)
	 20 - quick_tests/step-metis.mpirun=2.debug (Failed)
	 22 - quick_tests/step-metis.mpirun=2.release (Failed)
	 23 - quick_tests/step-trilinos.debug (Failed)
	 24 - quick_tests/step-trilinos.release (Failed)
	 25 - quick_tests/step.debug (Failed)
	 26 - quick_tests/step.release (Failed)
	 27 - quick_tests/sundials-ida.debug (Failed)
	 28 - quick_tests/sundials-ida.release (Failed)
	 29 - quick_tests/symengine.debug (Failed)
	 30 - quick_tests/symengine.release (Failed)
	 31 - quick_tests/tbb.debug (Failed)
	 32 - quick_tests/tbb.release (Failed)
	 33 - quick_tests/umfpack.debug (Failed)
	 34 - quick_tests/umfpack.release (Failed)
Errors while running CTest

@MFraters
Copy link
Member Author

MFraters commented Jul 6, 2023

I think this means that trilinos fixed compilation for gcc 13 in version 14.2.0, but it looks to me that they also changed something with their libraries which makes that dealii not able to call the correct functions at runtime. Unless I did something wrong ofcouse :)

I will now switch back to fedora to further investigate the issue there.

@bangerth
Copy link
Contributor

bangerth commented Jul 7, 2023

Is gcc 13 the default compiler on your system? The sort of thing you describe would happen if you compiled some of the dependencies with one compiler, and others with a different compiler.

@bangerth
Copy link
Contributor

Status?

@MFraters
Copy link
Member Author

Sorry for the late reply. On my main operating system I switched my system back to gcc-12 for the hackaton to have a working apect. I made sure my whole system was compiled with gcc-13, so there should not have been a dependency issue. On Fedora, gcc-13 is the default compiler, so I assume that they would have compiled everything with gcc-13.

@bangerth
Copy link
Contributor

bangerth commented Nov 1, 2023

I take it from your last comment that we can close this issue. Please reopen if I'm mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants