run time error with multiple cores
Running opal-x on multiple cores on merlin gives the error:
READ of size 8 at 0x2b6a844c33c8 thread T0
#0 0xd16534 in MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}::operator()(int, double&, double&, double&) const (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0xd16534)
#1 0xdf2a48 in void Kokkos::Impl::CombinedReductionFunctorWrapperImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >::operator()<unsigned long&, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double>&>(unsigned long&, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double>&) const (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0xdf2a48)
#2 0xdd1d03 in std::enable_if<std::is_void<void>::value, void>::type Kokkos::Impl::ParallelReduce<Kokkos::Impl::CombinedFunctorReducer<Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2$
#3 0xfb89b1 in Kokkos::Impl::ParallelReduce<Kokkos::Impl::CombinedFunctorReducer<Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double> >::Reducer, void>, Kokkos$
#4 0x2b6a676f83f1 in GOMP_parallel /var/tmp/gsell/gcc-12.3.0/src/libgomp/parallel.c:178
#5 0xdad223 in Kokkos::Impl::ParallelReduce<Kokkos::Impl::CombinedFunctorReducer<Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::Open #0 0xd16534 in MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}::operator()(int, double&, double&, double&) const (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0xd16534)
#1 0xdf2a48 in void Kokkos::Impl::CombinedReductionFunctorWrapperImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >::operator()<unsigned long&, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double>&>(unsigned long&, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double>&) const (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0xdf2a48)
#2 0xdd1d03 in std::enable_if<std::is_void<void>::value, void>::type Kokkos::Impl::ParallelReduce<Kokkos::Impl::CombinedFunctorReducer<Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2$
#3 0xfb89b1 in Kokkos::Impl::ParallelReduce<Kokkos::Impl::CombinedFunctorReducer<Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double> >::Reducer, void>, Kokkos$
#4 0x2baa25e613f1 in GOMP_parallel /var/tmp/gsell/gcc-12.3.0/src/libgomp/parallel.c:178
#5 0xdad223 in Kokkos::Impl::ParallelReduce<Kokkos::Impl::CombinedFunctorReducer<Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::FunctorAnalysis<Kokkos::Impl::FunctorPatternInterface::REDUCE, Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double> >::Reducer, void>, Kokkos$
#6 0xd8537c in Kokkos::Impl::ParallelReduceAdaptor<Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> > >::execute_impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Kokkos::RangePolicy<Kokkos::OpenMP> const&, Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&,$
#7 0xd5f1e7 in std::enable_if<!(Kokkos::Impl::ParallelReduceAdaptor<Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> > >::is_array_reduction&&std::is_pointer<Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> > >::value), void>::type $
#8 0xd3fdd8 in std::enable_if<Kokkos::is_execution_policy<Kokkos::RangePolicy<KMP>, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducerValueImpl<std::integer_sequence<unsigned long, 0ul, 1ul, 2ul>, double, double, double> >::Reducer, void>, Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::OpenMP>::execute() const (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0xdad223)
#6 0xd8537c in Kokkos::Impl::ParallelReduceAdaptor<Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> > >::execute_impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Kokkos::RangePolicy<Kokkos::OpenMP> const&, Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&,$
#7 0xd5f1e7 in std::enable_if<!(Kokkos::Impl::ParallelReduceAdaptor<Kokkos::RangePolicy<Kokkos::OpenMP>, Kokkos::Impl::CombinedReductionFunctorWrapper<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >, Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> > >::is_array_reduction&&std::is_pointer<Kokkos::Impl::CombinedReducer<Kokkos::HostSpace, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> > >::value), void>::type $
#8 0xd3fdd8 in std::enable_if<Kokkos::is_execution_policy<Kokkos::RangePolicy<Kokkos::OpenMP> >::value, void>::type Kokkos::parallel_reduce<Kokkos::RangePolicy<Kokkos::OpenMP>, MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Kokkos::RangePolicy<Kokkos::OpenMP> const&, MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2} const&, Kokkos::Sum<double, Kokkos::HostSpace>&&, Kokkos::Sum<double, Kokkos::HostSpace>&&, Kokkos::Sum<double, Kokkos::HostSpace>&&) (/ps$
#9 0xd2d7fe in void Kokkos::parallel_reduce<MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2}, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace>, Kokkos::Sum<double, Kokkos::HostSpace> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>)::{lambda(int, double&, double&, double&)#2} const&, Kokkos::Sum<double, Kokkos::HostSpace>&&, Kokkos::Sum<double, Kokkos::HostSpace>&&, Kokkos::Sum<double, Kokkos::HostSpace>&&) /psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/_deps/kokkos-src/core/src/impl/Kokkos_Combined_Reducer.hpp:603
#10 0xd1bf2c in MultiVariateGaussian::generateParticles(unsigned long&, ippl::Vector<double, 3u>) (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0xd1bf2c)
#11 0xce933d in TrackRun::execute() /psi/home/sadr_m/opal-x/downloads/opal-x/src/Track/TrackRun.cpp:343
#12 0x7ba7c5 in OpalParser::execute(Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:133
#13 0x7bbe4b in OpalParser::parseAction(Statement&) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:164
#14 0x7b8610 in OpalParser::parse(Statement&) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:87
#15 0xcb21f3 in SimpleStatement::execute(Parser const&) /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/SimpleStatement.cpp:46
#16 0x7c9553 in OpalParser::run() const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:587
#17 0x8b87e7 in TrackCmd::execute() /psi/home/sadr_m/opal-x/downloads/opal-x/src/Track/TrackCmd.cpp:225
#18 0x7ba7c5 in OpalParser::execute(Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:133
#19 0x7bbe4b in OpalParser::parseAction(Statement&) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:164
#20 0x7b8610 in OpalParser::parse(Statement&) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:87
#21 0xcb21f3 in SimpleStatement::execute(Parser const&) /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/SimpleStatement.cpp:46
#22 0x7c9553 in OpalParser::run() const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:587
#23 0x7ca646 in OpalParser::run(TokenStream*) const /psi/home/sadr_m/opal-x/downloads/opal-x/src/OpalParser/OpalParser.cpp:612
#24 0x468e62 in main /psi/home/sadr_m/opal-x/downloads/opal-x/src/Main.cpp:354
#25 0x2baa292b9554 in __libc_start_main (/lib64/libc.so.6+0x22554)
#26 0x4627d4 (/psi/home/sadr_m/opal-x/downloads/opal-x/build_openmp/src/opalx+0x4627d4)
I think the problem is with the parallel reduce used in Gaussian.hpp and MultiVariateGaussian.hpp