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 MS-MPI and Windows #46

Merged
merged 2 commits into from
Sep 30, 2018
Merged

Conversation

AndrewGaspar
Copy link
Contributor

This commit adds support for the MS-MPI implementation, primarily targeting Windows. I add some code to discover for MS-MPI that only run on Windows, and moved the other MPI probing to a separate probe function for Unix.

I inject an msmpi cfg into both mpi-sys and rsmpi. This may be useful to either surface msmpi specifically functionality or, like I do in this commit, to disable certain features that are missing from MS-MPI.

I noticed two issues when building with the MS-MPI headers:

  1. MPI_Comm_create_group was missing.
  2. Bindgen does not seem to pick up the MPI_User_function definition

For both of these issues, I just removed the APIs that called these functions when using MS-MPI. This may not be the best method.

I also disabled portions of any tests that rely on these functionalities.

I recommend building without default features on Windows since libffi is not available by default.

I also swapped the gcc crate with cc, as that seems to be the stable version of gcc.

This commit adds support for the MS-MPI implementation, primarily
targeting Windows. I add some code to discover for MS-MPI that only
run on Windows, and moved the other MPI probing to a separate probe
function for Unix.

I inject an msmpi cfg into both mpi-sys and rsmpi. This may be useful to
either surface msmpi specifically functionality or, like I do in this
commit, to disable certain features that are missing from MS-MPI.

I noticed two issues when building with the MS-MPI headers:
1. MPI_Comm_create_group was missing.
2. Bindgen does not seem to pick up the MPI_User_function definition

For both of these issues, I just removed the APIs that called these
functions when using MS-MPI. This may not be the best method.

I also disabled portions of any tests that rely on these
functionalities.

I recommend building without default features on Windows since libffi is
not available by default.

I also swapped the gcc crate with cc, as that seems to be
the stable version of gcc.
// Adds a cfg to identify MS-MPI
println!("cargo:rustc-cfg=msmpi");
} else {
env::set_var("CC", "mpicc");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm wondering if it would make sense to use the Windows methodology here for all platforms. I believe this is what, for example, FindMPI in CMake does - it doesn't actually compile your program with mpicc, It just uses the compile line from mpicc -show. This has the benefit of being able to use your preferred compiler without having to install an MPI on top of each compiler you'd like to use.

I don't know if the Windows version of this is quite robust enough, though. We'd probably need defines, too.

@bsteinb bsteinb merged commit 7d1dc73 into rsmpi:master Sep 30, 2018
@AndrewGaspar AndrewGaspar deleted the windows-ms-mpi branch December 2, 2018 22:04
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.

None yet

2 participants