opm-common icon indicating copy to clipboard operation
opm-common copied to clipboard

Making BlackOilFluidState GPU friendly

Open kjetilly opened this issue 1 year ago • 4 comments

This is in draft at the moment. Essentially this adds decorators to the functions and eventually will add support non-static fluidsystem-objects.

kjetilly avatar Feb 10 '25 10:02 kjetilly

Is there any relation between this work and PR #4427?

bska avatar Feb 10 '25 11:02 bska

Is there any relation between this work and PR #4427?

Yes, in the sense that the BlackOilFluidState object will eventually use the non-static variant of the BlackOilFluidSystem developed in that pull-request, but this PR will work without 4427 (or at least, that is the goal for now).

kjetilly avatar Feb 10 '25 11:02 kjetilly

Jenkins build this opm-simulators=5971 please

kjetilly avatar Feb 11 '25 12:02 kjetilly

Jenkins build this opm-simulators=5971 please

kjetilly avatar Feb 11 '25 19:02 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Aug 14 '25 09:08 kjetilly

I do not at a first glance see any issues with this PR. Decorators introduced, throws use the GPU friendly macro, non-static BOFS is used with appropriate ctor etc.

Looks good to me.

multitalentloes avatar Aug 14 '25 11:08 multitalentloes

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Aug 14 '25 12:08 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Aug 14 '25 13:08 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Aug 14 '25 13:08 kjetilly

jenkins build this opm-simulators=5971 serial rocm hipify please

bska avatar Aug 14 '25 16:08 bska

Jenkins build this serial rocm hipify please

kjetilly avatar Aug 19 '25 09:08 kjetilly

Jenkins build this serial rocm hipify please

kjetilly avatar Aug 19 '25 11:08 kjetilly

Jenkins build this serial rocm hipify please

kjetilly avatar Aug 20 '25 08:08 kjetilly

Jenkins build this serial rocm hipify please

kjetilly avatar Aug 20 '25 09:08 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Aug 20 '25 09:08 kjetilly

It seems clear that the use of null pointer here is undefined behaviour. I have an idea for a different approach that also may be useful for transforming other parts of the code to be GPU-friendly vs. the fluid system. Will experiment.

atgeirr avatar Sep 12 '25 07:09 atgeirr

It seems clear that the use of null pointer here is undefined behaviour.

Not clear at all, in fact, it is well-defined, but I will change

kjetilly avatar Sep 12 '25 09:09 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Sep 12 '25 12:09 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Sep 15 '25 09:09 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Sep 15 '25 09:09 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Sep 15 '25 12:09 kjetilly

Jenkins build this opm-simulators=5971 serial rocm hipify please

kjetilly avatar Sep 15 '25 12:09 kjetilly

All green and good, merging.

atgeirr avatar Sep 15 '25 13:09 atgeirr