eschnett / MPItrampoline

A forwarding MPI implementation that can use any other MPI implementation via an MPI ABI
MIT License
44 stars 4 forks source link

Unclear usage instructions and sparse documentation #40

Open freemin7 opened 1 year ago

freemin7 commented 1 year ago

The steps to compile get a program running via MPItrampoline are incomplete. I encountered several issues which are due to my inexperience with MPI.

When setting up MPIwrapper if do:

cmake -S . -B build -DMPIEXEC_EXECUTABLE=mpiexec -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/mpiwrapper
cmake --build build
cmake --install build

the resulting mpiwrapper will look for an mpiexec in the source folder:

/home/user/mpiwrapper/bin/mpiwrapperexec: line 2: /home/user/Downloads/MPIwrapper-main/mpiexec: No such file or directory

I suspect that i am supposed to replace mpiexec with the path to the vendors mpiexec.

There are no instructions how to build MPItrampoline itself. Even if they are obvious it greatly increases approachability if such instructions existed.

Similarily "Build your application as usual, using MPItrampline as MPI library." is not actionable if one relied on the vendor mpicc until now.

I am aware that a build example exists however that makes use of a lot of abstrations like toolchain files which makes an straightforward adaption impossible.

eschnett commented 1 year ago

Thanks for the feedback! I will add respective examples and pointers.

Does it work when you pass the full path to mpiexec when you call cmake for the first time?

freemin7 commented 1 year ago

I have no idea whether it works yet. I've been struggling with this for 8 hours (with small breaks). I also have no way to test it as i have no idea how to compile an application against whatever i produce.

freemin7 commented 1 year ago

Does it work when you pass the full path to mpiexec when you call cmake for the first time?

Yes.

freemin7 commented 1 year ago

So i got it working a time ago for NECs MPI for the NEC VectorEngine. I was able to run cross ISA (MPI running on the x86 host and on the VectorEngine) MPI demos where both sides use MPI trampoline. Also the syntax for launching separate processes worked with the trampoline. However host and VectorEngine might have needed separate load paths for the two types of trampoline for two different ISAs involved. I don't recall all the details any more but thought I should tell you this.

eschnett commented 1 year ago

Thanks for the heads-up!