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

When I tried to import a function in REPL, I got an error that it could not be imported. #13

Open
Search-Enemy opened this issue Mar 20, 2024 · 1 comment

Comments

@Search-Enemy
Copy link

Under julia1.10.0 version, I successfully ran the readme code.
But when reading the source code, there is such a line of instructions in diffusion.jl in src: import ..compute_meltfraction_ps!, ..compute_dϕdT_ps!, ..compute_density_ps!, ..compute_heatcapacity_ps!,
..compute_conductivity_ps!,..compute_radioactive_heat_ps!, .. compute_latent_heat_ps!,

I tried to execute this instruction in the REPL, but encountered the warning WARNING: could not import Main.compute_meltfraction_ps! into Main, which prevented me from executing @parallel (1:Nx, 1:Nz) compute_meltfraction_ps!(Arrays. ϕ, Mat_tup, Phases, args1).
I want to know what is the reason and in which package these functions exist? Thank you Professor Boris.

@boriskaus
Copy link
Owner

Dear @Search-Enemy (interesting username; I initially thought this was spam).

These are functions that come from GeoParams for which we provided wrappers to ParallelStencil. ParallelsStencil is used to allow the code to run (much faster) on a GPU (graphics cards). A disadvantage is that it needs to be initialised before running and as such, it is generally not recommended to directly run this in the REPL.

Instead, I recommend that you customise your setup by modifying some of the routines here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants