PHAREHUB / PHARE

💫 Parallel Hybrid Particle In Cell code with Adaptive mesh REfinement
https://phare.readthedocs.io
GNU General Public License v3.0
71 stars 24 forks source link

MPI segfaults with min/max patch size == domain size #330

Closed PhilipDeegan closed 4 years ago

PhilipDeegan commented 4 years ago
==13160==  Access not within mapped region at address 0x70
==13160==    at 0x64786F0: std::vector<std::shared_ptr<SAMRAI::hier::PatchData>, std::allocator<std::shared_ptr<SAMRAI::hier::PatchData> > >::operator[](unsigned long) const (stl_vector.h:951)
==13160==    by 0x6462424: SAMRAI::hier::Patch::getPatchData(int) const (Patch.h:160)
==13160==    by 0x688EEE7: auto PHARE::amr::ResourcesManager<PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >::getTimes<PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > > >(PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >&, SAMRAI::hier::Patch const&) const (resources_manager.h:248)
==13160==    by 0x6890E56: PHARE::amr::HybridHybridMessengerStrategy<PHARE::solver::HybridModel<PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> >, PHARE::core::Electromag<PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double> >, PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::Electrons<PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > > >, PHARE::amr::SAMRAI_Types>, PHARE::amr::RefinementParams<PHARE::core::ParticleArray<1ul>, PHARE::amr::Splitter<PHARE::core::DimConst<1ul>, PHARE::core::InterpConst<1ul>, PHARE::core::RefinedParticlesConst<2ul> > > >::firstStep(PHARE::solver::IPhysicalModel<PHARE::amr::SAMRAI_Types>&, SAMRAI::hier::PatchLevel&, std::shared_ptr<SAMRAI::hier::PatchHierarchy> const&, double) (hybrid_hybrid_messenger_strategy.h:385)
==13160==    by 0x688FF93: PHARE::amr::HybridMessenger<PHARE::solver::HybridModel<PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> >, PHARE::core::Electromag<PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double> >, PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::Electrons<PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > > >, PHARE::amr::SAMRAI_Types> >::firstStep(PHARE::solver::IPhysicalModel<PHARE::amr::SAMRAI_Types>&, SAMRAI::hier::PatchLevel&, std::shared_ptr<SAMRAI::hier::PatchHierarchy> const&, double) (hybrid_messenger.h:156)
==13160==    by 0x68B5AC6: PHARE::solver::MultiPhysicsIntegrator<PHARE::amr::MessengerFactory<PHARE::solver::MHDModel<PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> >, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::amr::SAMRAI_Types>, PHARE::solver::HybridModel<PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> >, PHARE::core::Electromag<PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double> >, PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::Electrons<PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > > >, PHARE::amr::SAMRAI_Types>, PHARE::amr::RefinementParams<PHARE::core::ParticleArray<1ul>, PHARE::amr::Splitter<PHARE::core::DimConst<1ul>, PHARE::core::InterpConst<1ul>, PHARE::core::RefinedParticlesConst<2ul> > > >, PHARE::solver::LevelInitializerFactory<PHARE::solver::HybridModel<PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> >, PHARE::core::Electromag<PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double> >, PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::Electrons<PHARE::core::Ions<PHARE::core::IonPopulation<PHARE::core::ParticleArray<1ul>, PHARE::core::VecField<PHARE::core::NdArrayVector<1ul, double>, PHARE::core::HybridQuantity, double>, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > >, PHARE::core::GridLayout<PHARE::core::GridLayoutImplYee<1ul, 1ul> > > >, PHARE::amr::SAMRAI_Types> >, PHARE::amr::SAMRAI_Types>::advanceLevel(std::shared_ptr<SAMRAI::hier::PatchLevel> const&, std::shared_ptr<SAMRAI::hier::PatchHierarchy> const&, double, double, bool, bool, bool) (multiphysics_integrator.h:379)
==13160==    by 0x6A2BD62: SAMRAI::algs::TimeRefinementIntegrator::advanceRecursivelyForRefinedTimestepping(int, double) (TimeRefinementIntegrator.C:777)
==13160==    by 0x6A2BE1E: SAMRAI::algs::TimeRefinementIntegrator::advanceRecursivelyForRefinedTimestepping(int, double) (TimeRefinementIntegrator.C:799)
==13160==    by 0x6A2A5AE: SAMRAI::algs::TimeRefinementIntegrator::advanceHierarchy(double, bool) (TimeRefinementIntegrator.C:318)
==13160==    by 0x64631CE: PHARE::amr::Integrator::advance(double) (integrator.h:103)
==13160==    by 0x656A8D6: PHARE::Simulator<1ul, 1ul, 2ul>::advance(double) (simulator.h:154)
==13160==    by 0x65B9D7D: pybind11::cpp_function::cpp_function<void, PHARE::Simulator<1ul, 1ul, 2ul>, double, pybind11::name, pybind11::is_method, pybind11::sibling>(void (PHARE::Simulator<1ul, 1ul, 2ul>::*)(double), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(PHARE::Simulator<1ul, 1ul, 2ul>*, double)#1}::operator()(PHARE::Simulator<1ul, 1ul, 2ul>*, double) const (pybind11.h:78)
PhilipDeegan commented 4 years ago

executed with:

valgrind --trace-children=yes mpirun -n 2 python3 tests/simulator/diagnostics.py
PhilipDeegan commented 4 years ago

replaced by https://github.com/PHAREHUB/PHARE/issues/331