Skip to content

Vectorized (GPU) cfd solver#14412

Open
RiccardoRossi wants to merge 102 commits into
masterfrom
vectorized_cfd_solver
Open

Vectorized (GPU) cfd solver#14412
RiccardoRossi wants to merge 102 commits into
masterfrom
vectorized_cfd_solver

Conversation

@RiccardoRossi
Copy link
Copy Markdown
Member

📝 Description

this PR adds a semi explicit CFD solver which can either run on the CPU or GPU. Myself and @rubenzorrilla we have been working on this for quite a while and it is currently in a reasonable state.

it requires the library cupy and pyamg

python3 - m pip install cupy 
python3 -m pip install pyamg

The solver is entirely written in python but leverages blas calls to be efficient.
With the current version and using a mid-tier GPU it is about 10 times faster than the gpu.
Having said this, honestly the style is a good fit to the gpu but probably not for use on cpu. Efficient and parallel use of the CPU will depend on the undetying blas.

user can set gpu or OpenMP as:

    "problem_data": {
        "problem_name": "Drywell_CFD_Only",
        "parallel_type": "gpu", //"OpenMP"
	"precision" : "float32",
        "echo_level": 0,
        "start_time": 0.0,
        //"end_time": 0.02
        "end_time": 4.0
    },

RiccardoRossi and others added 30 commits January 22, 2026 14:20
…unidentified problem with dirichlet conditions
@RiccardoRossi RiccardoRossi requested review from a team as code owners April 29, 2026 11:52
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chery pick this into an independent PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I woukd prefer to ñeave this together as it is needed for this pr.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep it here, but can be cherry-piced and merged in advance there, so it simplifies review here and keeps it simple

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree @loumalouomega. Indeed, I had this pending to be done. @RiccardoRossi I can do it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I just saw that Charlie did it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the test as well

Copy link
Copy Markdown
Member

@loumalouomega loumalouomega left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment related to changes that can be cherry-picked to another PR

@roigcarlo
Copy link
Copy Markdown
Member

I've move the changes to #14413 but they will not work without part of the changes in the solver...

@loumalouomega
Copy link
Copy Markdown
Member

I've move the changes to #14413 but they will not work without part of the changes in the solver...

Well, only what is actully standalone can be ported...Anyway, CI is failing...

@loumalouomega
Copy link
Copy Markdown
Member

FYI: https://www.modular.com/open-source/mojo, is python GPU accelerated

roigcarlo added a commit that referenced this pull request May 11, 2026
qn-tang pushed a commit that referenced this pull request May 21, 2026
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

Successfully merging this pull request may close these issues.

4 participants