Closed donnaaboise closed 6 years ago
I written a preliminary version of this code, which compiles and runs. However, the results are rather suspect (read : blowing up). I've wrote a fortran version of update_q, just to be sure the problem is not with the CUDA code. Doesn't help. Probably a simple issue that can be cleaned up by looking carefully at the argument lists.
I changed to using a fixed time step (see cuda.ini) and it looks like the fortran version of the code is at least working and compares identically with the non-CUDA version.
We now have a good start of a wrap function in C. Should work for now.
This should be fairly straightforward, and will allow us to call the step2 as a CUDA C kernel.
See : fc2d_cudaclaw5_step2_wrap.f
Currently, the code has allocation for a large work array (which is commented out). But I think we may want to use this array and allocate it on the GPU. In this case, we may also want to keep the indices into this array.
The main purpose of step2 is to compute the interfaces "fluxes"
fp
,fm
,gp
,gm
. These are then used to updateqold
. Scott has already written the update for the GPU, using@scottaiton has already written the update routine. This could eventually be incorporated into the step2 routine.