Goals and ContextHi all. First off, thanks for such a great project.
My goal is to build a simulation environment for rodpump artificial lift systems such as those found in oil and gas production. This is a simple fourbar linkage that converts a motor's rotation motion in to a linear motion suitable for articulating a positive displacement pump.
Currently I am focused on using the model to understand acclerations at various locations of the model when the system is driven with a constant speed motor. The intent is to continuing addding elements to the model (induction motor, elastic rod string, subsurface pump, etc.) but currently it is a very simple ridgid body model.
Issue
Getting to the purpose of this post: I am consistently running in to segmentation faults when adding specific links to my simulation system.
Chrono source lines referenced in backtrace:
- ChSystem.cpp#L1428
- ChSystem.cpp#L1489
- ChTimestepper.cpp#L486: V's Eigen::Matrix has member "m_data" pointing to zero
- ChState.h#L125
- ... Large call stack in Eigen
- Call to SIMD instructions: "_mm512_load_pd (void const *__P)": Segmentation fault (core dumped): data at __P is "V" from ChTimestepper.cpp#L486 and is zero
Link Constraints That Trigger Segmentation Fault:
- ChLinkLockRevolute
- ChLinkLockPointLine
- ChLinkMateFix
Links Constraints That Work Just Fine:
- ChLinkRevolute
- ChLinkLockLock
- ChLinkDistance
Question
Pretty straight forward: what am I doing incorrectly here? I am fairly certain that it is a bug/misunderstanding on my part in how I am setting up the system and not necessarily an issue in chrono library code.
Any help or direction would be very greatly appreciated. I've spent about 16 hours in total trying to resolve the issue with little progress to a solution or understanding.
I have no idea how or why a zero value is sneaking in to the time stepper's V member and ultimately being passed to _mm512_load_pd.
Source
This is a closed-source project, so I can't link to a repository, but here are units of my code that I believe are relevant.
The following are useful for the domain language referenced in the source files:
Development Environment Details
My development environment is a containerized Ubuntu 22.04 system. External build dependencies are managed using conan 2. Targeting C++20.
Key compile flags are: "-m64 -g -std=c++20 -m64 -fopenmp -march=native"
See "Compiler Commands JSON" below for full compiler flag details.
Additional Resources and Information
Kevin