slimgroup / JUDI.jl

Julia Devito inversion.
https://slimgroup.github.io/JUDI.jl
MIT License
94 stars 29 forks source link

Optimal checkpointing #261

Open kerim371 opened 6 days ago

kerim371 commented 6 days ago

Hi,

I'm trying to use optimal_checkpointing to save memory. As I understand this option is aimed to recompute wavefields instead of keeping them in RAM or on the hardware.

It seems that when I use this option my RAM memory is loaded only for 5-10% and the computations run about 10 times longer. Is it really optimized? Is there a way to control how much checkpoints is used or huw much memory is used during computations?

image

mloubout commented 4 days ago

It is fairly optimized yes but it will take longer by a bit. There is some option in pyrevolve to control the memory but it's a bit of a pain to expose it to the user

kerim371 commented 4 days ago

It seems I can change n_checkpoints directly in J_adjoint in source code. As I understand it should work faster if n_checkpoints is big enough. Also if n_checkpoints == nt_comp then the perfomance should be almost equal when JUDIOptions::optimal_checkpointing = false right?