nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

JITlib doesn't clean up #1726

Closed mzarrawork closed 3 months ago

mzarrawork commented 4 months ago

How we use trick here at KSC SLS: We put various trick simulations onto our linux box, and some are newer versions of the trick simulation. Then we run our simulation. We can go back and forth with the older or newer version.

The issue occurs when we switch because certain objects don't exist between the two simulations and the makefiles don't regenerate the .so, .o, and .d.

There is also a bug in the jitlib input file that ruins the clean up of the .d file (double output then you append the dependency file name). So that needs to be fixed regardless.

We essentially want trick to clean up the jitlib folder or recompile properly. I can see a use case where someone would want to not have to wait for a recompile via JIT per shutdown and starting back up of a simulation, so cleaning the jitlib folder out might not be a good idea during shutdowns. So basically, there has to be a way for trick to either "understand" that this is a newer version of the simulation and clean up jitlib folder and recompile or just be able to recompile. Or maybe a flag we set when executing S_main or an environment variable to force trick to do a clean before trick does a make in JIT.

hchen99 commented 4 months ago

Thanks for reporting. We'll be looking into this.

hchen99 commented 3 months ago

@mzarrawork The path for the .d file is fixed for clean target in the Makefile.input in the branch for this issue. Feel free to give it a try to see if it is what you're expecting

In terms of "The issue occurs when we switch because certain objects don't exist between the two simulations and the makefiles don't regenerate the .so, .o, and .d.":