clang has problems with int64_t in combination with Kokkos
It seams that src/Types/IpplTypes.h the use of
namespace ippl {
namespace detail {
typedef uint64_t size_type;
}
}
is problematics and lead to the following error:
/Users/adelmann/IPPL/include/Kokkos_Serial.hpp:610:9: error: cannot initialize a member subobject of type 'const Kokkos::Impl::ParallelReduce<(lambda at /Users/adelmann/IPPL/tmp/src/ippl/src/Particle/ParticleBase.hpp:204:32), Kokkos::RangePolicyKokkos::Serial, Kokkos::Max, Kokkos::Serial>::pointer_type' (aka 'unsigned long *const') with an rvalue of type 'Kokkos::View<unsigned long long, Kokkos::HostSpace>::pointer_type' (aka 'unsigned long long *') m_result_ptr(reducer.view().data()) { ^ ~~~~~~~~~~~~~~~~~~~~~ /Users/adelmann/IPPL/include/Kokkos_Parallel_Reduce.hpp:873:9: note: in instantiation of member function 'Kokkos::Impl::ParallelReduce<(lambda at /Users/adelmann/IPPL/tmp/src/ippl/src/Particle/ParticleBase.hpp:204:32), Kokkos::RangePolicyKokkos::Serial, Kokkos::Max, Kokkos::Serial>::ParallelReduce' requested here closure(functor, inner_policy, ^ /Users/adelmann/IPPL/include/Kokkos_Parallel_Reduce.hpp:1116:70: note: in instantiation of member function 'Kokkos::Impl::ParallelReduceAdaptor<Kokkos::RangePolicyKokkos::Serial, (lambda at /Users/adelmann/IPPL/tmp/src/ippl/src/Particle/ParticleBase.hpp:204:32), Kokkos::Max>::execute' requested here Impl::ParallelReduceAdaptor<policy_type, FunctorType, ReturnType>::execute( ^ /Users/adelmann/IPPL/tmp/src/ippl/src/Particle/ParticleBase.hpp:203:17: note: in instantiation of function template specialization 'Kokkos::parallel_reduce<(lambda at /Users/adelmann/IPPL/tmp/src/ippl/src/Particle/ParticleBase.hpp:204:32), Kokkos::Max>' requested here Kokkos::parallel_reduce("Reduce in ParticleBase::destroy()", destroyNum, ^ /Users/adelmann/IPPL/tmp/src/ippl/src/Particle/ParticleSpatialLayout.hpp:173:15: note: in instantiation of member function 'ippl::ParticleBase<ippl::ParticleSpatialLayout<double, 3>>::destroy' requested here pdata.destroy(invalid, invalidCount); ^ /Users/adelmann/IPPL/tmp/src/ippl/test/particle/TestScatter.cpp:93:8: note: in instantiation of function template specialization 'ippl::ParticleSpatialLayout<double, 3>::update<Bunch<ippl::ParticleSpatialLayout<double, 3>>>' requested here pl.update(bunch, bunchBuffer);
I am building for
Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.5.0