ghex-org / GHEX

Generic exascale-ready library for halo-exchange operations on variety of grids/meshes
Other
8 stars 14 forks source link

Refactor Python bindings #151

Closed stubbiali closed 6 months ago

stubbiali commented 11 months ago

Profound restructuring and refining of the Python bindings. Since this effort is driven by the needs of the FVM model, the focus has primarily been on structured grids so far.

The code has been tested on Mac (M2 processor), Piz Daint and LUMI.

boeschf commented 10 months ago

Hi @stubbiali ! Thanks for all the work - looks good! I'll try to give you extended feedback today or tomorrow. Could you maybe merge with master and resolve conflicts?

boeschf commented 10 months ago

allows to customize the build process using environment variables and so allows to e.g. enable GPU support and specify the transport backend;

Is there any other/additional way to customize the build process? Environment variables are fine, but maybe command line arguments would be more ergonomic/more explicit.

boeschf commented 10 months ago

A small thing that rubs me the wrong way is that the build directory is created in the source tree next to setup.py (build_dir = os.path.abspath(os.path.join(this_dir, "build"))) - do you think we can change this? Not sure where it should be, maybe in tmp or somewhere else (or be configurable)?

stubbiali commented 10 months ago

Is there any other/additional way to customize the build process? Environment variables are fine, but maybe command line arguments would be more ergonomic/more explicit.

I tend to agree that command line arguments would be more elegant. The only way I know to accomplish this would be through config settings. To be honest, I've never used this feature, but to me it doesn't look like it makes the customization of the build process either more explicit or easier to read. So I would stick to environment variables, which is a more common approach.

stubbiali commented 10 months ago

A small thing that rubs me the wrong way is that the build directory is created in the source tree next to setup.py (build_dir = os.path.abspath(os.path.join(this_dir, "build"))) - do you think we can change this? Not sure where it should be, maybe in tmp or somewhere else (or be configurable)?

We could use a temporary folder as the build directory with build_dir = tempfile.mkdtemp(). Configuration via env variable is also possible, e.g. the build directory could be created under GHEX_BUILD_ROOT, rather than in the system-wide temporary directory.

boeschf commented 6 months ago

closing this as it is superseded by #156