-
Notifications
You must be signed in to change notification settings - Fork 22
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
‘Implementing new models’ example doesn’t run on GPU #251
Comments
Hi Emma, The problem is that since the BGC model is being put into GPU kernels, it needs to be using Adapt
import Adapt: adapt_structure
Adapt.adapt_structure(to, bgc::NutrientPhytoplankton) = NutrientPhytoplankton(adapt(to, bgc.sinking_velocity)) These docs kind of explain why adapts are needed. |
Perhaps we should add this method to the documentation page as a little bit at the end about running on GPU. You can do this if you want or I can add it to #252 |
Thanks Jago, that's sorted it! I'm happy to try and write a paragraph for the documentation. While we're here, I can't get the example to run on the GPU if I include
then I get a similar error to before:
I tried doing something similar with but that didn't seem to work. Is there something else I need to do to get |
Okay thank you, that sounds good! For the |
Ahh okay, yes that all works now, thanks so much! I'll have a go at writing something for the documentation |
Hello,
I’ve been trying to run the column model example from the ‘Implementing new models’ documentation but haven't been able to get it to run on a GPU.
This is a trimmed down version of the example which produces an error:
And this is the error message I get:
I was wondering what needs to be changed in the example to get it to run on a GPU? The problem seems to be to do with
sinking_velocity
being a Field.Thank you
The text was updated successfully, but these errors were encountered: