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

Warnings on master #15643

Closed
luca-heltai opened this issue Jul 4, 2023 · 2 comments
Closed

Warnings on master #15643

luca-heltai opened this issue Jul 4, 2023 · 2 comments

Comments

@luca-heltai
Copy link
Member

Compiling on master (2050f26) on my mac intel with mpich gives 13 warnings of -Wtype-safety:

[279/615] Building CXX object source/lac/CMakeFiles/object_lac_debug.dir/affine_constraints.cc.o
In file included from ../source/lac/affine_constraints.cc:17:
../include/deal.II/lac/affine_constraints.templates.h:296:28: warning: argument type 'const std::vector<char>::value_type *' (aka 'const char *') doesn't match specified 'MPI' type tag that requires 'char *' [-Wtype-safety]
          const int ierr = MPI_Isend(i.second.data(),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/deal.II.app/Contents/Resources/Dependencies/include/petsclog.h:475:163: note: expanded from macro 'MPI_Isend'
      (PetscAddLogDouble(&petsc_isend_ct, &petsc_isend_ct_th, 1) || PetscMPITypeSize((count), (datatype), &(petsc_isend_len), &(petsc_isend_len_th)) || MPI_Isend((buf), (count), (datatype), (dest), (tag), (comm), (request)))
                                                                                                                                                                  ^~~~~           ~~~~~~~~~~
../include/deal.II/lac/affine_constraints.templates.h:490:15: note: in instantiation of function template specialization 'dealii::internal::compute_locally_relevant_constraints<double>' requested here
    internal::compute_locally_relevant_constraints(*this,
              ^
../include/deal.II/lac/affine_constraints.templates.h:296:28: warning: argument type 'const std::vector<char>::value_type *' (aka 'const char *') doesn't match specified 'MPI' type tag that requires 'char *' [-Wtype-safety]
          const int ierr = MPI_Isend(i.second.data(),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/deal.II.app/Contents/Resources/Dependencies/include/petsclog.h:475:163: note: expanded from macro 'MPI_Isend'
      (PetscAddLogDouble(&petsc_isend_ct, &petsc_isend_ct_th, 1) || PetscMPITypeSize((count), (datatype), &(petsc_isend_len), &(petsc_isend_len_th)) || MPI_Isend((buf), (count), (datatype), (dest), (tag), (comm), (request)))
                                                                                                                                                                  ^~~~~           ~~~~~~~~~~
../include/deal.II/lac/affine_constraints.templates.h:490:15: note: in instantiation of function template specialization 'dealii::internal::compute_locally_relevant_constraints<float>' requested here
    internal::compute_locally_relevant_constraints(*this,
              ^
../include/deal.II/lac/affine_constraints.templates.h:296:28: warning: argument type 'const std::vector<char>::value_type *' (aka 'const char *') doesn't match specified 'MPI' type tag that requires 'char *' [-Wtype-safety]
          const int ierr = MPI_Isend(i.second.data(),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/deal.II.app/Contents/Resources/Dependencies/include/petsclog.h:475:163: note: expanded from macro 'MPI_Isend'
      (PetscAddLogDouble(&petsc_isend_ct, &petsc_isend_ct_th, 1) || PetscMPITypeSize((count), (datatype), &(petsc_isend_len), &(petsc_isend_len_th)) || MPI_Isend((buf), (count), (datatype), (dest), (tag), (comm), (request)))
                                                                                                                                                                  ^~~~~           ~~~~~~~~~~
../include/deal.II/lac/affine_constraints.templates.h:490:15: note: in instantiation of function template specialization 'dealii::internal::compute_locally_relevant_constraints<std::complex<double>>' requested here
    internal::compute_locally_relevant_constraints(*this,
              ^
../include/deal.II/lac/affine_constraints.templates.h:296:28: warning: argument type 'const std::vector<char>::value_type *' (aka 'const char *') doesn't match specified 'MPI' type tag that requires 'char *' [-Wtype-safety]
          const int ierr = MPI_Isend(i.second.data(),
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/deal.II.app/Contents/Resources/Dependencies/include/petsclog.h:475:163: note: expanded from macro 'MPI_Isend'
      (PetscAddLogDouble(&petsc_isend_ct, &petsc_isend_ct_th, 1) || PetscMPITypeSize((count), (datatype), &(petsc_isend_len), &(petsc_isend_len_th)) || MPI_Isend((buf), (count), (datatype), (dest), (tag), (comm), (request)))
                                                                                                                                                                  ^~~~~           ~~~~~~~~~~
../include/deal.II/lac/affine_constraints.templates.h:490:15: note: in instantiation of function template specialization 'dealii::internal::compute_locally_relevant_constraints<std::complex<float>>' requested here
    internal::compute_locally_relevant_constraints(*this,
              ^
4 warnings generated.
[281/615] Building CXX object source/dofs/CMakeFiles/object_dofs_debug.dir/dof_handler_policy.cc.o
../source/dofs/dof_handler_policy.cc:3698:59: warning: argument type 'const types::global_dof_index *' (aka 'const unsigned int *') doesn't match specified 'MPI' type tag that requires 'unsigned int *' [-Wtype-safety]
        const int                       ierr = MPI_Exscan(&n_locally_owned_dofs,
                                                          ^~~~~~~~~~~~~~~~~~~~~
source/dofs/dof_handler_policy.inst:24:17: note: in instantiation of member function 'dealii::internal::DoFHandlerImplementation::Policy::ParallelDistributed<1, 1>::distribute_dofs' requested here
 template class ParallelDistributed< 1 ,
                ^
../source/dofs/dof_handler_policy.cc:3698:59: warning: argument type 'const types::global_dof_index *' (aka 'const unsigned int *') doesn't match specified 'MPI' type tag that requires 'unsigned int *' [-Wtype-safety]
        const int                       ierr = MPI_Exscan(&n_locally_owned_dofs,
                                                          ^~~~~~~~~~~~~~~~~~~~~
source/dofs/dof_handler_policy.inst:47:17: note: in instantiation of member function 'dealii::internal::DoFHandlerImplementation::Policy::ParallelDistributed<1, 2>::distribute_dofs' requested here
 template class ParallelDistributed< 1 ,
                ^
../source/dofs/dof_handler_policy.cc:3698:59: warning: argument type 'const types::global_dof_index *' (aka 'const unsigned int *') doesn't match specified 'MPI' type tag that requires 'unsigned int *' [-Wtype-safety]
        const int                       ierr = MPI_Exscan(&n_locally_owned_dofs,
                                                          ^~~~~~~~~~~~~~~~~~~~~
source/dofs/dof_handler_policy.inst:70:17: note: in instantiation of member function 'dealii::internal::DoFHandlerImplementation::Policy::ParallelDistributed<1, 3>::distribute_dofs' requested here
 template class ParallelDistributed< 1 ,
                ^
../source/dofs/dof_handler_policy.cc:3698:59: warning: argument type 'const types::global_dof_index *' (aka 'const unsigned int *') doesn't match specified 'MPI' type tag that requires 'unsigned int *' [-Wtype-safety]
        const int                       ierr = MPI_Exscan(&n_locally_owned_dofs,
                                                          ^~~~~~~~~~~~~~~~~~~~~
source/dofs/dof_handler_policy.inst:116:17: note: in instantiation of member function 'dealii::internal::DoFHandlerImplementation::Policy::ParallelDistributed<2, 2>::distribute_dofs' requested here
 template class ParallelDistributed< 2 ,
                ^
../source/dofs/dof_handler_policy.cc:3698:59: warning: argument type 'const types::global_dof_index *' (aka 'const unsigned int *') doesn't match specified 'MPI' type tag that requires 'unsigned int *' [-Wtype-safety]
        const int                       ierr = MPI_Exscan(&n_locally_owned_dofs,
                                                          ^~~~~~~~~~~~~~~~~~~~~
source/dofs/dof_handler_policy.inst:139:17: note: in instantiation of member function 'dealii::internal::DoFHandlerImplementation::Policy::ParallelDistributed<2, 3>::distribute_dofs' requested here
 template class ParallelDistributed< 2 ,
                ^
../source/dofs/dof_handler_policy.cc:3698:59: warning: argument type 'const types::global_dof_index *' (aka 'const unsigned int *') doesn't match specified 'MPI' type tag that requires 'unsigned int *' [-Wtype-safety]
        const int                       ierr = MPI_Exscan(&n_locally_owned_dofs,
                                                          ^~~~~~~~~~~~~~~~~~~~~
source/dofs/dof_handler_policy.inst:208:17: note: in instantiation of member function 'dealii::internal::DoFHandlerImplementation::Policy::ParallelDistributed<3, 3>::distribute_dofs' requested here
 template class ParallelDistributed< 3 ,
              
....

                ^
In file included from ../source/distributed/tria_base.cc:19:
../include/deal.II/base/mpi.templates.h:461:37: warning: argument type 'const std::vector<char>::value_type *' (aka 'const char *') doesn't match specified 'MPI' type tag that requires 'char *' [-Wtype-safety]
                  const auto ierr = MPI_Send(temp.data(),
                                    ^~~~~~~~~~~~~~~~~~~~~
/Applications/deal.II.app/Contents/Resources/Dependencies/include/petsclog.h:495:158: note: expanded from macro 'MPI_Send'
      (PetscAddLogDouble(&petsc_send_ct, &petsc_send_ct_th, 1) || PetscMPITypeSize((count), (datatype), (&petsc_send_len), (&petsc_send_len_th)) || MPI_Send((buf), (count), (datatype), (dest), (tag), (comm)))
                                                                                                                                                             ^~~~~           ~~~~~~~~~~
../include/deal.II/base/mpi.templates.h:494:47: note: in instantiation of function template specialization 'dealii::Utilities::MPI::reduce<std::vector<unsigned int>>' requested here
          const auto result = Utilities::MPI::reduce<T>(vec, comm, combiner);
                                              ^
../include/deal.II/base/mpi.templates.h:508:30: note: in instantiation of function template specialization 'dealii::Utilities::MPI::all_reduce<std::vector<unsigned int>>' requested here
      return Utilities::MPI::all_reduce<std::vector<T>>(
                             ^
../source/distributed/tria_base.cc:377:28: note: in instantiation of function template specialization 'dealii::Utilities::MPI::compute_set_union<unsigned int>' requested here
    return Utilities::MPI::compute_set_union(
                           ^
13 warnings generated.
@fdrmrc
Copy link
Contributor

fdrmrc commented Jul 5, 2023

@luca-heltai It has been recently discussed here: pmodels/mpich#6496

@luca-heltai
Copy link
Member Author

Not our fault. :)

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