You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initial runs for the LOBSTER model has been done. The total runtime (excluding compilation) and total memory allocated on a host are shown in the graphs below.
The GPU run with I/O did not reach the same grid size as without I/O. This is because I was running them in my home directory and reached the 50 Gb quota 😅 . We should probably rerun the last two points with rds storage.
EDIT: Actually given that the rds is the performant filesystem we should rerun all the I/O runs with rds... it is likely that we will see a performance difference (i.e. rds should be faster).
I has some issues with the scaling runs wrt number of particles. The calculations (both CPU and GPU) seemed to crash rather randomly with not very helpful error messages e.g.:
Was this with the kelp particles or just normal particles?
That would be SugerKelpParticles (so kelp particles).
Set up here in the script.
Originally there were only 5 initialised at different depths. Now the number is arbitrary with, but I kept the range of depths the same. I was thinking the problem may stem from that?
How many particles are you going up to? That error is from the carbon chemistry solve (and we so far haven't found a good way to catch errors which occur inside GPU kernels). If the number of particles is very large then it might be making the DIC leave the "normal" range which the chemistry model can cope with, or possibly its taking all the nutrients and making the phytoplankton go negative (although I'd expect an error from the light attenuation model if it is that).
The aim is of course as much as possible ;-)
But the errors appeared for:
1024 particles on CPU
128 particles on GPU
If I understand what you are saying the problems may arise from the concentration of the particles, right?
In that case perhaps a simple solution would be to distribute them in x and y axis as well?
The other suspicious thing in the modification I made are the scalefactors I think. If I understand correctly they set a 'weight' of each particle... in that case I should have probably decreased it when increasing the number of particles to keep the total quantity of the kelp constant?
But following the discussion during today’s meeting we should rerun it with CPU and GPU on the same grid size.
I would say that the conclusion is that for the LOBSTER model there is no difference in behaviour between CPU and GPU calculation (other than total runtime).
I have a question, I've been using the sugar kelp particles and it makes simple runs a lot slower. When I @profile nothing stands out, do you have any suggestions what to look for?
I have a question, I've been using the sugar kelp particles and it makes simple runs a lot slower. When I @Profile nothing stands out, do you have any suggestions what to look for?
It is very difficult to say anything without seeing the case or the profile data. Just couple of things that first come to mind:
Did you try to side-by-side compere @profile results from a run with and without particles? If all functions would scale by the same amount it would be very weird... something must increase more and it should contain clues about what is going on.
I assume you are talking about the Profiling.@profile and a CPU run? Maybe trying a GPU run and using CUDA.@profile external=false could be helpful by checking if it is only CPU problem or it effects GPU as well. In the latter case CUDA's macro will give results on a higher granularity (kernels basically), which for me is always easier to interpret.
Could it be that particles introduce extra I/O? I am thinking that with the Julia's sampling profiler no samples should collected when inside the system calls and perhaps no samples are collected when inside I/O operations... this is just a speculation though. I haven't verified that it indeed behaves like that.
Did you try to side-by-side compere @profile results from a run with and without particles? If all functions would scale by the same amount it would be very weird... something must increase more and it should contain clues about what is going on.
Thank you for this suggestion, it turns out that it spends a significant extra time computing the tendencies for the kelp timestepping because they involve a root finding (which I forgot happened) so its quite a long operation so I guess this is to be expected
@jagoosw, where is the root finding happening? I wonder if there is a way that we can avoid that (even if it introduces additional assumptions).
They have a very complicated formulation for photosynthesis which requires solving for a parameter, I have tried replacing the find_zero with an inhouse newton raphson and it seems to be a lot faster (since it converges in ~10 steps). I'm working on it in #308
Activity
Mikolaj-A-Kowalski commentedon Aug 22, 2025
The following comments in #262 are really relevant to this issue:
#262 (comment)
#262 (comment)
Mikolaj-A-Kowalski commentedon Aug 22, 2025
The initial runs for the LOBSTER model has been done. The total runtime (excluding compilation) and total memory allocated on a host are shown in the graphs below.
The raw data in CSV files contains extra details (e.g. total GC time):
cpu_scaling_io.csv
cpu_scaling_noio.csv
gpu_scaling_io.csv
gpu_scaling_noio.csv
The GPU run with I/O did not reach the same grid size as without I/O. This is because I was running them in my
homedirectory and reached the 50 Gb quota 😅 . We should probably rerun the last two points withrdsstorage.EDIT: Actually given that the
rdsis the performant filesystem we should rerun all the I/O runs with rds... it is likely that we will see a performance difference (i.e.rdsshould be faster).Mikolaj-A-Kowalski commentedon Aug 22, 2025
I has some issues with the scaling runs wrt number of particles. The calculations (both CPU and GPU) seemed to crash rather randomly with not very helpful error messages e.g.:
On GPU with CUDA:
On CPU:
jagoosw commentedon Aug 22, 2025
Was this with the kelp particles or just normal particles?
Mikolaj-A-Kowalski commentedon Aug 26, 2025
That would be
SugerKelpParticles(so kelp particles).Set up here in the script.
Originally there were only 5 initialised at different depths. Now the number is arbitrary with, but I kept the range of depths the same. I was thinking the problem may stem from that?
jagoosw commentedon Aug 27, 2025
How many particles are you going up to? That error is from the carbon chemistry solve (and we so far haven't found a good way to catch errors which occur inside GPU kernels). If the number of particles is very large then it might be making the DIC leave the "normal" range which the chemistry model can cope with, or possibly its taking all the nutrients and making the phytoplankton go negative (although I'd expect an error from the light attenuation model if it is that).
Mikolaj-A-Kowalski commentedon Aug 28, 2025
The aim is of course as much as possible ;-)
But the errors appeared for:
If I understand what you are saying the problems may arise from the concentration of the particles, right?
In that case perhaps a simple solution would be to distribute them in x and y axis as well?
The other suspicious thing in the modification I made are the
scalefactorsI think. If I understand correctly they set a 'weight' of each particle... in that case I should have probably decreased it when increasing the number of particles to keep the total quantity of the kelp constant?Mikolaj-A-Kowalski commentedon Aug 28, 2025
It seems to have been the total weight indeed!
Makes the calculation not crash (on a GPU) will check a CPU shortly (EDIT: CPU is a go 🎆 )
jagoosw commentedon Aug 28, 2025
Changing the scale factor is a good solution!
Mikolaj-A-Kowalski commentedon Aug 29, 2025
Here is the result for the scaling with the number of kelp particles:

But following the discussion during today’s meeting we should rerun it with CPU and GPU on the same grid size.
Mikolaj-A-Kowalski commentedon Oct 24, 2025
I would say that the conclusion is that for the LOBSTER model there is no difference in behaviour between CPU and GPU calculation (other than total runtime).
jagoosw commentedon Oct 24, 2025
I have a question, I've been using the sugar kelp particles and it makes simple runs a lot slower. When I
@profilenothing stands out, do you have any suggestions what to look for?Mikolaj-A-Kowalski commentedon Oct 24, 2025
It is very difficult to say anything without seeing the case or the profile data. Just couple of things that first come to mind:
@profileresults from a run with and without particles? If all functions would scale by the same amount it would be very weird... something must increase more and it should contain clues about what is going on.Profiling.@profileand a CPU run? Maybe trying a GPU run and usingCUDA.@profile external=falsecould be helpful by checking if it is only CPU problem or it effects GPU as well. In the latter caseCUDA's macro will give results on a higher granularity (kernels basically), which for me is always easier to interpret.jagoosw commentedon Oct 29, 2025
Thank you for this suggestion, it turns out that it spends a significant extra time computing the tendencies for the kelp timestepping because they involve a root finding (which I forgot happened) so its quite a long operation so I guess this is to be expected
johnryantaylor commentedon Oct 29, 2025
@jagoosw, where is the root finding happening? I wonder if there is a way that we can avoid that (even if it introduces additional assumptions).
jagoosw commentedon Oct 29, 2025
They have a very complicated formulation for photosynthesis which requires solving for a parameter, I have tried replacing the
find_zerowith an inhouse newton raphson and it seems to be a lot faster (since it converges in ~10 steps). I'm working on it in #308AdelekeBankole commentedon Jan 21, 2026
Runtime scaling for PISCES