Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for newer MPI datatypes #204

Closed
lukasdreyer opened this issue Sep 24, 2024 · 4 comments
Closed

Support for newer MPI datatypes #204

lukasdreyer opened this issue Sep 24, 2024 · 4 comments

Comments

@lukasdreyer
Copy link
Contributor

Description
Support for MPI datatypes that were introduced in newer standards. (>1.3), like MPI_INT8 and MPI_UNSIGNED_LONG_LONG

Proposed solution
This proposed solution in #173 (comment) would check for features available in the provided MPI implementation. But sc should also be able to be compiled for serial use without MPI, so we'd like to introduce an option similar to desired_MPI_version. If sc is built with MPI, the provided MPI needs to be at least of that standard.

If sc is built without MPI, the wrapper functionality provides serial support for the specified standard (as best as possible).

We are willing to put some implementation effort into this, but wanted to get your input beforehand to discuss the optimal way to go forward.

@cburstedde
Copy link
Owner

This sounds fine, and we may make this very simple depending on how many types you add.

For autoconf, writing an m4 macro to compile-and-link with a given type, and calling the macro for each new type, would work. Each test would #define a CPP-macro or not depending on the result, and we can switch on this macro in sc_mpi.h. Without MPI, the macros would just default to undefined.

Is there an analogous way to make it work with CMake?

What do we do if a type is not found (rare situation) -- define to the closest approximation?

@cburstedde
Copy link
Owner

We have merged a simple approach to individually test three needed types.

@cburstedde
Copy link
Owner

Please comment if anything is left to be desired on the libsc/p4est side.

@cburstedde
Copy link
Owner

This appears to be merged. Is there anything left to be desired?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants