Skip to content
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

DJ4Earth runtime activity required #858

Closed
swilliamson7 opened this issue May 18, 2023 · 2 comments
Closed

DJ4Earth runtime activity required #858

swilliamson7 opened this issue May 18, 2023 · 2 comments

Comments

@swilliamson7
Copy link
Collaborator

swilliamson7 commented May 18, 2023

On the same code as Michel discussed here #796, specifically the code in file explicit_solver in https://github.com/DJ4Earth/DJ-barotropic-gyre, I'm having issues running my checkpointing loop in main_energy_1_chkp.jl. Specifically, I'm getting the following error:

julia> include("main_energy_1_chkp.jl")
warning: didn't implement memmove, using memcpy as fallback which can result in errors
warning: didn't implement memmove, using memcpy as fallback which can result in errors
┌ Warning: TODO forward zero-set of arraycopy used memset rather than runtime type
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/BxfIW/src/utils.jl:56
┌ Warning: TODO forward zero-set of arraycopy used memset rather than runtime type
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/BxfIW/src/utils.jl:56
┌ Warning: TODO forward zero-set of arraycopy used memset rather than runtime type
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/BxfIW/src/utils.jl:56
┌ Warning: TODO forward zero-set of arraycopy used memset rather than runtime type
└ @ Enzyme.Compiler ~/.julia/packages/GPUCompiler/BxfIW/src/utils.jl:56
ERROR: LoadError: Enzyme execution failed.
Mismatched activity for:   %value_phi11 = phi {} addrspace(10)* [ %488, %L499 ], [ %475, %L487 ], [ %475, %L482 ], [ %475, %L470 ] const val:   %475 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %474 unordered, align 8, !dbg !415, !tbaa !91, !invariant.load !4, !nonnull !4, !dereferenceable !74, !align !75
Type tree: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,-1]:Integer, [-1,8]:Integer, [-1,9]:Integer, [-1,10]:Integer, [-1,11]:Integer, [-1,12]:Integer, [-1,13]:Integer, [-1,14]:Integer, [-1,15]:Integer, [-1,16]:Integer, [-1,17]:Integer, [-1,18]:Integer, [-1,19]:Integer, [-1,20]:Integer, [-1,21]:Integer, [-1,22]:Integer, [-1,23]:Integer, [-1,24]:Integer, [-1,25]:Integer, [-1,26]:Integer, [-1,27]:Integer, [-1,28]:Integer, [-1,29]:Integer, [-1,30]:Integer, [-1,31]:Integer, [-1,32]:Integer, [-1,33]:Integer, [-1,34]:Integer, [-1,35]:Integer, [-1,36]:Integer, [-1,37]:Integer, [-1,38]:Integer, [-1,39]:Integer}
Please open an issue, and either rewrite this variable to not be conditionally active or use Enzyme.API.runtimeActivity!(true) as a workaround for now

Stacktrace:
 [1] checkbounds
   @ ./abstractarray.jl:666
 [2] view
   @ ./subarray.jl:177
 [3] comp_advection
   @ ~/Documents/GitHub/eddy-stresses/src/compute_time_deriv.jl:118

Stacktrace:
 [1] throwerr(cstr::Cstring)
   @ Enzyme.Compiler ~/.julia/packages/Enzyme/XRIu1/src/compiler.jl:2823
in expression starting at /Users/swilliamson/Documents/GitHub/eddy-stresses/src/main_energy_1_chkp.jl:150

for parameters in the checkpointing loop that previously worked. This happened for just a 10 by 10 grid, so the problem is really small. I also successfully ran the same code maybe a week and a half ago, so I think it was something recent. I'm using Enzyme v0.11.1#main and Julia version 1.8.5, but the same thing happened when I moved to not using Enzyme main. To recreate the issue just run include("main_energy_1_chkp.jl"), the choices I set should already be there

This could just be me doing something silly, and am happy to provide more info if needed!

@wsmoses
Copy link
Member

wsmoses commented May 18, 2023

For now, can you turn on Enzyme.API.runtimeActivity!(true) and see if that continues?

@swilliamson7
Copy link
Collaborator Author

That got rid of the error message! Seems to be running now

@wsmoses wsmoses changed the title Enzyme execution failure DJ4Earth runtime activity required Aug 18, 2023
@wsmoses wsmoses closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants