Dear orekit community,
I have been trying to use the orekit python-wrapper in a python script to propagate multiple orbits (thousands) using the NumericalPropagator.
The results of the propagation is then used for something else within the python code. The whole code works fine for a few propagations + post-processing at a time.
My code is pretty straight forward and was taken from an example in the orekit python-wrapper tutorial. I have just added a loop around it.
However for some reason, after several iterations I get from the JVM:
pv = [propagator.propagate(tt).getPVCoordinates() for tt in t] ## PV is the resulting Satellite position vector
orekit.JavaError: <super: <class ‘JavaError’>, >
Java stacktrace:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.hipparchus.geometry.euclidean.threed.Vector3D.negate(Vector3D.java:394)
at org.orekit.utils.AngularCoordinates.revert(AngularCoordinates.java:428)
at org.orekit.frames.Transform.getInverse(Transform.java:454)
at org.orekit.frames.Frame.getTransformTo(Frame.java:267)
at org.orekit.forces.gravity.HolmesFeatherstoneAttractionModel.acceleration(HolmesFeatherstoneAttractionModel.java:1037)
at org.orekit.forces.ForceModel.addContribution(ForceModel.java:90)
at org.orekit.propagation.numerical.NumericalPropagator$Main.computeDerivatives(NumericalPropagator.java:502)
at org.orekit.propagation.integration.AbstractIntegratedPropagator$ConvertedMainStateEquations.computeDerivatives(AbstractIntegratedPropagator.java:672)
at org.hipparchus.ode.ExpandableODE.computeDerivatives(ExpandableODE.java:134)
at org.hipparchus.ode.AbstractIntegrator.computeDerivatives(AbstractIntegrator.java:265)
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:257)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:464)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:410)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:393)
I have tried moving the orekit.initVM in and out of the loop besides using some memory options but that error was still thrown at some point.
Would you know if it might be related to memory issue within the python code or is there something happening in the orekit-wrapper? Is there a function I should use to force re-initialize the JVM at the end of the loop?
Thanks a lot for any tips you may have!
Cheers.