-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@eval
considered harmful
#3555
Comments
@simone-silvestri are you sure it's a good idea to use |
I just needed an example and I have some old data from last year. I am purely interested in the time it takes until the first time step completes. The issues I identified so far with the use of |
Ok if its just for a quick test rather than extended work, that makes sense |
Thank you @simone-silvestri This enables: JuliaGPU/GPUCompiler.jl#557 (comment) which is a great win for running massively parallel simulations. |
epic |
Trying to use OceanScalingTest.jl from @simone-silvestri as a benchmark for TTFTS (Time-To-First-Time-Step) I came across this delightful error:
Caused by
@eval
. Note that@eval
uses the current module and not the module the user is calling this function from.This means we are trying to modify the Oceananigans after it has already been closed. This is imcompatible with precompilation since we are unable to track and restore this modification.
My intuition is that you probably just want a dictionary for these kind of globals, maybe even within the model?
Instead of using global variables.
Oceananigans.jl/src/Grids/latitude_longitude_grid.jl
Lines 554 to 555 in 00f028b
The use-case is shown in simone-silvestri/OceanScalingTests.jl#8 where one wants to use
PrecompileTools
to cache important functions.The text was updated successfully, but these errors were encountered: