ECP-copa / Cabana

Performance-portable library for particle-based simulations
Other
193 stars 51 forks source link

MPI Dependency #45

Closed sslattery closed 5 years ago

sslattery commented 5 years ago

Adds an optional MPI dependency to the build and open-mpi to the Travis CI. This PR has no code that uses MPI - just adds the library and test infrastructure.

sslattery commented 5 years ago

@junghans Gave this an initial try. Looks like its failing to link on the C++ standard library in Travis.

Can you see anything obvious I did wrong? Basically, I added openmpi to the environment and then set the compiler under the MPI wrapper to be whichever we are using (GCC or clang).

junghans commented 5 years ago

@sslattery setting CXX to mpicxx isn't the CMake way, let me see if I can fix it.

junghans commented 5 years ago

@sslattery ok that seemed to have fixed it!

codecov-io commented 5 years ago

Codecov Report

Merging #45 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #45   +/-   ##
======================================
  Coverage    98.2%   98.2%           
======================================
  Files          13      13           
  Lines         401     401           
======================================
  Hits          394     394           
  Misses          7       7

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 839dd98...80cbd9b. Read the comment docs.

junghans commented 5 years ago

From which CMake version on is the MPI::MPI_CXX Target supported?

dalg24 commented 5 years ago

From which CMake version on is the MPI::MPI_CXX Target supported?

I am not sure from what version it started but I see that Cabana requires 3.9 and I looked at the FindMPI documentation for 3.9.x

junghans commented 5 years ago

Good point, then we should use the imported target!

sslattery commented 5 years ago

So on Travis it looks like it is still using g++ or clang to do the compiling. Does the way you have linked in the CMake supersede the use of mpicxx?

sslattery commented 5 years ago

OK just verified with myself that this works by injecting some MPI code into the unit tests to try it out. This is all I wanted to do on this PR. I'll work on package structure and then start on the communication PRs next. If both of you are fine with this please give a review and then we can merge. @junghans @dalg24 thanks for the help.

sslattery commented 5 years ago

Also once we merge I will update the build instructions

sslattery commented 5 years ago

@dalg24 do you approve?