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

Unity build is broken #13881

Closed
tamiko opened this issue Jun 1, 2022 · 4 comments · Fixed by #13885
Closed

Unity build is broken #13881

tamiko opened this issue Jun 1, 2022 · 4 comments · Fixed by #13885

Comments

@tamiko
Copy link
Member

tamiko commented Jun 1, 2022

For the upcoming 9.4 release we should fix our unity build again :-)

https://cdash.dealii.43-1.org/viewBuildError.php?buildid=2195

@kronbichler
Copy link
Member

I cannot reproduce on my two configurations, one with gcc-11, MPI-3.1, no Trilinos, no PETSc, the other with clang-14, MPI-3.1, Trilinos, PETSc but none of the more special libraries. It must be a combination of some particular library/feature or compiler.

@drwells
Copy link
Member

drwells commented Jun 1, 2022

I can reproduce this - I am working on a fix.

@drwells
Copy link
Member

drwells commented Jun 1, 2022

https://github.com/petsc/petsc/blob/27c9ef7be839ca1f58a90cb820253679fac370b3/include/petsclog.h#L460-L462

defines

#define MPI_Send_c(buf,count,datatype,dest,tag,comm) \
  ((petsc_send_ct++,0) || PetscMPITypeSize((count),(datatype),(&petsc_send_len)) || MPI_Send_c((buf),(count),(datatype),(dest),(tag),(comm)))

so its not possible to define a function with that name after including a PETSc header - we will always get errors resulting from macros. More generally, the big mpi library is not compatible with PETSc for this reason so this problem extends past the issue of unity builds.

This snippet always fails to compile:

#include <petsclog.h>

#include <deal.II/base/mpi_large_count.h>

int main() {}

@bangerth
Copy link
Member

bangerth commented Jun 1, 2022

Ugh, what a moronic system for them to use...

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

Successfully merging a pull request may close this issue.

4 participants