ParallelStencil.jl icon indicating copy to clipboard operation
ParallelStencil.jl copied to clipboard

Can't work with Pluto.jl

Open Vcholerae1 opened this issue 1 year ago • 9 comments

I want to write code on Pluto.jl. But I found this issue. image

Vcholerae1 avatar Nov 03 '24 09:11 Vcholerae1

@Vcholerae1 Thanks for reporting the issue. Does this issue occur only when you try to rerun the notebook or already the first time when you run it?

omlins avatar Nov 04 '24 10:11 omlins

Hello @omlins

Thank you for your response!

I encountered this issue the very first time I ran the notebook.

Additionally, I’m experiencing another problem in Pluto.jl. When I use using ParallelStencil, it doesn’t automatically import CUDA. (This might be a design limitation of Pluto.jl, but I’m not entirely sure, as I’m still new to Julia😊). When I explicitly specify the CUDA dependency, running @init_parallel_stencil results in the following error:

Module Data from previous module initialization found in caller module (Main.var"workspace#12");'
module Data not created. Note: this warning is only shown in non-interactive mode.

then I can't using marco '@fill' to release the power of ParallelStencil.jl the warning message is like this

NotInitializedError: no ParallelStencil macro or function can be called before @init_parallel_stencil in each module (missing call in Main.var"workspace#14").

Stack trace
Here is what happened, the most recent locations are first:

check_initialized(caller::Module) @ init_parallel_stencil.jl:94
var"@fill"(__source__::LineNumberNode, __module__::Module, args::Vararg{Any}) @ init_parallel_stencil.jl:8
#macroexpand#66 @ expr.jl:122
macroexpand @ expr.jl:120

I am willing to help with testing related issues.

Vcholerae1 avatar Nov 04 '24 15:11 Vcholerae1

Could you please try once __init__() = @init_parallel_stencil(CUDA, Float64, 3) instead of just @init_parallel_stencil(CUDA, Float64, 3) ?

omlins avatar Nov 05 '24 17:11 omlins

@omlins I already tried that without success... got same error

albert-de-montserrat avatar Nov 05 '24 19:11 albert-de-montserrat

@omlins I got the same conclusion.

Vcholerae1 avatar Nov 06 '24 11:11 Vcholerae1

The root cause for the issue could be the same as in #167 . Waiting for a feedback from @timholy

omlins avatar Nov 08 '24 16:11 omlins

@Vcholerae1 : I've been able to ensure full compatibility with Revise.jl (#167 ) and released this in https://github.com/omlins/ParallelStencil.jl/releases/tag/v0.14.1

There is a good chance that the changes done could also have solved the compatibility issue with Pluto.jl. Could you please try again and report back?

omlins avatar Dec 11 '24 15:12 omlins

@omlins I have tested it and Pluto still has issues. Marco @init_marallel_strencil cannot be implicitly imported into CUDA as a dependency,the init macro does not work and @fill still cannot be used

Vcholerae1 avatar Dec 25 '24 10:12 Vcholerae1

@Vcholerae1 thanks for coming back to us.

@albert-de-montserrat could you please share the issue you opened on Pluto.jl this concerning?

omlins avatar Dec 26 '24 16:12 omlins