*Goals and Context*
Hi 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.

These always lead to a segmentation fault with the same backtrace. Full GDB 
backtrace here <https://pastebin.com/6VnMbjz5>

*Chrono source lines referenced in backtrace:*

   1. ChSystem.cpp#L1428 
   
<https://github.com/projectchrono/chrono/blob/8.0.0/src/chrono/physics/ChSystem.cpp#L1428>
   2. ChSystem.cpp#L1489 
   
<https://github.com/projectchrono/chrono/blob/8.0.0/src/chrono/physics/ChSystem.cpp#L1489>
   3. ChTimestepper.cpp#L486 
   
<https://github.com/projectchrono/chrono/blob/8.0.0/src/chrono/timestepper/ChTimestepper.cpp#L486>:
 
   V's Eigen::Matrix has member "m_data" pointing to zero
   4. ChState.h#L125 
   
<https://github.com/projectchrono/chrono/blob/8.0.0/src/chrono/timestepper/ChState.h#L125>
   5. ... Large call stack in Eigen
   6. 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.
   
   - Chrono System Setup <https://pastebin.com/MDt2ASNB>
   - Collaborating Units <https://pastebin.com/uv7HapMn>

The following are useful for the domain language referenced in the source 
files:
   
   - Rodpump Diagram <https://imgur.com/a/6kERlvb>
   - Simulation Model Visualization (missing constraint on polished rod) 
   <https://imgur.com/a/X5f9Vnj>

*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.


   - Ubuntu 22.04 Docker Image 
   
<https://hub.docker.com/layers/library/ubuntu/22.04/images/sha256-bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb?context=explore>
   - GCC 11.4.0 <https://packages.ubuntu.com/jammy/gcc>
   - Conan version 2.0.17 <https://pypi.org/project/conan/2.0.17/>
   - Project Chrono 8.0.0 
   <https://github.com/projectchrono/chrono/tree/8.0.0>
   - Eigen 3.4.0 <https://conan.io/center/recipes/eigen?version=3.4.0>
   - Irrlicht 1.8.5 <https://packages.ubuntu.com/jammy/libirrlicht-dev>

*Additional Resources and Information*

   - Chrono System Hierarchy <https://pastebin.com/Y5Jp3rgS>
   - Project CMake Configuration Output <https://pastebin.com/7CT1bfzC>
   - Executable CMakeLists.txt <https://pastebin.com/aYd3zk3j>
   - Chrono CMake Build Configuration <https://pastebin.com/xnmF0uEA>
   - Compiler Commands JSON <https://pastebin.com/k838XyWG>

Thanks!

Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/e3abbb39-8212-479a-b191-62fccb3f8e39n%40googlegroups.com.

Reply via email to