segmentation fault
Hello,
I am simulating the penetration of a spiral pile into sandy soil. Initially, I created a model ground within a cylindrical tank and waited for equilibrium to be achieved. Once the unbalanced forces reached the desired threshold, I saved the state using O.save(initialState)
.
Next, I used the initialState
in a different script to simulate the spiral pile's penetration into the ground. When the pile reached a certain penetration depth, I attempted to save the simulation's current state using O.save(secondState)
. However, when the specified depth is reached, the simulation terminates unexpectedly with a segmentation fault. While the secondState
file is saved, it cannot be reloaded and displays an error: "gzip error: iostream error."
I’ve attached the simplest code I used for this simulation.
#loading the initialstate
from yade import qt
import os.path
secondState = str('Penetration_1m_per_sec') + "_.yade.gz"
savedState = os.path.exists(secondState)
# Define the saved state filename
initialState = "Model_ground_stable_state_with_high_initial_height_1_.yade.gz"
# Check if the saved state file exists
if os.path.exists(initialState):
print(f"Loading saved state from {initialState}...")
try:
O.load(initialState)
print("Saved state loaded successfully.")
except Exception as e:
print(f"Error loading saved state: {e}")
else:
print(f"Saved state file '{initialState}' does not exist.")
exit()
#saving the secondState
if pile_depth >= 0.05:
print(f"Pile penetration-displacement condition met {pile_depth}.")
phase += 1
penetration= False
O.pause()
O.save(secondState)
print(f"Simulation state saved to: {secondState}")
Thank you