Comments (6)
This looks like memory corruption from somewhere else, not from NewtonSolver
. Can you try building MFEM in debug mode (option MFEM_DEBUG=YES
) and run your code? In debug mode, the library performs some additional checks which may catch the issue. If this build runs with the same error, try running the code under valgrind -- that can also help you find memory related issues.
from mfem.
You were right, the valgrind one was an issue with the MPI implementation. Apparently with the docker image I was working on had Intel MPI (causing troubles), while OpenMPI v4.1 works.
Thanks for the suppression file as well, it'll help spotting the error in the code.
from mfem.
https://godbolt.org/z/8a3T6rEfa
works as expected
from mfem.
I know the NewtonSolver is not the problem, I've used it before and didn't have any problems. I was wondering If you have any idea of where the problem may come from in this case. Thanks again!
from mfem.
@v-dobrev Appreciate your help! I was already working in debug mode. I've experienced issues in the past using valgrind on MFEM in debug mode, but installing valgrind.3.22.0 seemed to solve that issue.
Running it on one of the parallel examples (ex1p) gives signal SIGILL on MPI::Init(), am I doing anything wrong?
mpirun -np 2 valgrind --tool=memcheck --verbose --trace-children=yes --leak-check=full --show-reachable=yes --track-
origins=yes --log-file=/home/euler/develop/valgrind-logs/test.log ./ex1p
==99063== at 0x65D7932: hwloc_list_special_objects (in /usr/local/lib/libhwloc.so.15.6.2)
==99063== by 0x65D7F75: hwloc_connect_special_levels (in /usr/local/lib/libhwloc.so.15.6.2)
==99063== by 0x65DDBA2: hwloc_topology_reconnect (in /usr/local/lib/libhwloc.so.15.6.2)
==99063== by 0x65E2AA4: hwloc_topology_load (in /usr/local/lib/libhwloc.so.15.6.2)
==99063== by 0x5123A1A: MPII_hwtopo_init (in /usr/local/lib/libmpi.so.12.3.0)
==99063== by 0x50B5AB7: MPII_Init_thread (in /usr/local/lib/libmpi.so.12.3.0)
==99063== by 0x50B577E: MPIR_Init_impl (in /usr/local/lib/libmpi.so.12.3.0)
==99063== by 0x4EC23A8: internal_Init (in /usr/local/lib/libmpi.so.12.3.0)
==99063== by 0x4EC2445: PMPI_Init (in /usr/local/lib/libmpi.so.12.3.0)
==99063== by 0x1690EE: mfem::Mpi::Init_(int*, char***) (source/mfem/mesh/../general/communication.hpp:79)
==99063== by 0x1675FF: mfem::Mpi::Init() (source/mfem/mesh/../general/communication.hpp:36)
==99063== by 0x165E4D: main (source/mfem/examples/ex1p.cpp:72)
from mfem.
My suspicion is that the valgrind + MPI issue is not mfem related. Can you try with a simple "hello world"-like MPI program?
We do nightly tests with valgrind + MPI and they do not show any issues. We do need to use a suppression file for some MPI-related issues and older hypre versions. Here's what it looks like:
{
MPI-related-write
Memcheck:Param
writev(vector[...])
fun:writev
}
{
MPI-related-syscall
Memcheck:Param
sched_setaffinity(mask)
fun:syscall
}
{
MPI_Init-memcpy
Memcheck:Overlap
fun:memcpy
fun:pmgr_allgather
fun:MPID_PSM_Init
fun:MPID_Init
fun:MPIR_Init
fun:main
}
{
OMPI_Init-param-getsockopt-optlen
Memcheck:Param
socketcall.getsockopt(optlen)
...
fun:ompi_mpi_init
fun:PMPI_Init*
}
{
OMPI_Init-param-getsockopt-optlen_out
Memcheck:Param
socketcall.getsockopt(optlen_out)
...
fun:ompi_mpi_init
fun:PMPI_Init*
}
{
OMPI_Init-param-setsockopt-optlen
Memcheck:Param
setsockopt(optlen)
...
fun:ompi_mpi_init
fun:PMPI_Init*
}
{
OMPI_Init-leak
Memcheck:Leak
...
fun:ompi_mpi_init
}
{
OMPI_Finalize-leak
Memcheck:Leak
...
fun:ompi_mpi_finalize
}
{
hypre-BoomerAMG-GaussElimSetup
Memcheck:Overlap
fun:memcpy
fun:ompi_ddt_copy_content_same_ddt
fun:ompi_coll_tuned_allgather_intra_bruck
fun:PMPI_Allgather
fun:hypre_GaussElimSetup
fun:hypre_BoomerAMGSetup
}
{
hypre-BoomerAMG_GMExpandInterp
Memcheck:Leak
match-leak-kinds: definite
fun:calloc
fun:hypre_CAlloc
fun:hypre_BoomerAMG_GMExpandInterp
fun:hypre_BoomerAMGSetup
}
What MPI implementation are you using? I had some issues with OpenMPI v5.0.x but v4.1.x should work fine. I'm not sure about MPICH, or other implementations.
from mfem.
Related Issues (20)
- Element integral HOT 3
- Best approach to implement electrostatic solver with divergence-free current density HOT 1
- Regarding implementation of Dirichlet conditions in Example 1 HOT 2
- Create `ParMesh` in cascading way HOT 2
- Applying Dirichlet DG Boundary condition to scalar in L2-space HOT 4
- Convert an RT space GridFunction to an ND space GridFunction HOT 2
- How to convert mfem:BlockVector to HypreParVector ?
- Some quesitons about the ImplicitSolve() from ex9p HOT 4
- Accelerate the assemble of ParLinearform
- On the use of GPUs for time dependent Non Linear problem HOT 1
- Problem with HypreBoomerAMG
- Memory leak with Memory move assignment operator? HOT 4
- Does ex18/ex18p: DG Euler Equations support 3D case? HOT 2
- Cuda-enabled Hypre singleton finalized after CUDA driver is shutting down
- 【bug】A bug with respect to the DG_FECollection HOT 1
- About building a NC mesh HOT 1
- Advice for Computing a Nullspace Projection in Parallel? HOT 1
- Feature: Support MatrixCoefficient in DGDiffusion with PA
- about NC meshing: "MFEM NC mesh v1.0", 3 questions
- How's the data assembled for DiffusionIntegrator's partial assembly in PADiffusionSetup2D<3> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mfem.