Tudat / tudat

NOTE: This Tudat version is no longer supported. See https://docs.tudat.space/en/stable/ and https://github.com/tudat-team/tudat-bundle for the new version
BSD 3-Clause "New" or "Revised" License
87 stars 143 forks source link

SPICE Thread Safety #541

Closed Sceki closed 5 years ago

Sceki commented 5 years ago

Hello,

I do not know if this can be considered appropriate here, in case not, feel free to close the issue.

I have tried to apply a parallelization scheme for the fitness computation using pagmo and tudat, however SPICE returns an error due to the fact that it is not thread-safe. Is there a mechanism to make SPICE usable with parallelization schemes?

Kind regards, Giacomo

DominicDirkx commented 5 years ago

Hi Giacomo,

Unfortunately, this is a fundamental problem when using Spice. You can circumvent it by calling all required Spice functions before entering the parallelized phase of your code. Most likely this is limited to ephemerides, gravitational coefficients and body radii,

Best,

DOminic

Sceki commented 5 years ago

Hello,

Since the whole optimization is parallelized, and I need the relative position of different celestial bodies at certain epochs (which depend on the variables passed to the fitness), I am afraid I cannot do that.

But thanks anyway for the tip!

Kind regards, Giacomo

DominicDirkx commented 5 years ago

Hi Giacomo,

That's not necessarilly true, you can initialize interpolators from Spice data before running the optimization, and then call these interpolators during the optimization runs,

Dominic

Sceki commented 5 years ago

Hello.

Okay, I will try to see if that would actually be worthy or not. Thanks.

Kind regards, Giacomo