r/CFD • • Feb 03 '21

[February] Programming languages for CFD

As per the discussion topic vote, February's monthly topic is "Programming languages for CFD"

User /u/SignificantCell2 asked for Rust experiences, but that sounded overly specific so i op'ed'd it into this.

Talk about your experiences and preferences with various programming languages in the context of CFD programming.

43 Upvotes

72 comments sorted by

View all comments

Show parent comment

0

u/anointed9 Feb 03 '21

My understanding is that python doesn't have parallelism options which makes it unusable for larger cases.

2

u/psharpep Feb 03 '21

Numba has solid, performant parallelization capabilities - see here: https://numba.pydata.org/numba-doc/latest/user/parallel.html

However, I've only seen it used on a local machine so I can't personally vouch for how it may or may not scale to large-scale.

0

u/anointed9 Feb 03 '21

This is not parallelization on the scale that would be required for large CFD problems, where MPI (or in special cases openmp) is used.

1

u/Cynox Feb 03 '21

MPI in Python works just as well as in C++. I believe I've heard that codes such as shenfun beat many other spectral DNS codes, most of which are not coded using mpi4py, but I do not have any personal experience with it. https://github.com/spectralDNS/shenfun

1

u/anointed9 Feb 03 '21

Alright, good to know. I'll take the L.

1

u/hpcwake Feb 03 '21

python has mpi and openmp as packages

1

u/anointed9 Feb 03 '21

When did this happen? And how good are they?

0

u/[deleted] Feb 05 '21

[deleted] — view deleted comment

1

u/anointed9 Feb 05 '21

What is the definition of a power user?

0

u/[deleted] Feb 05 '21

[deleted] — view deleted comment

1

u/anointed9 Feb 05 '21

I guess I'm confused because we were talking about python MPI performance