-3

I have a problem concerning running mpi programs. All processes claims that their rank is 0.

I have searched a lot around, and found out that this is caused by communication between the openMP version and something else, and that I have to check which mpi I invoke. But no one explains properly, in a way that works, how to fix this.

  1. Do I have to uninstall something? In that case, what should I uninstall and how do I do it?
  2. Do I have to install something? What and how?
  3. If the answer is no to the previous questions, how can I then fix it?
  4. How could this problem occur as I only did what my lecturer told me, I think?
Gilles Gouaillardet
  • 8,193
  • 11
  • 24
  • 30
Anna Madsen
  • 384
  • 3
  • 15

1 Answers1

1

This typically occurs when you are mixing two MPI libraries.

For example, you are using mpirun from MPICH but your app is using the libraries from Open MPI.

You should first double check that, for example

$ which mpirun
$ mpirun -np 1 ldd a.out

both should point to the same directory (e.g. same vendor and version)

Gilles Gouaillardet
  • 8,193
  • 11
  • 24
  • 30
  • First output: /usr/bin/mpirun Second output: linux-vdso.so.1 => (0x...) libmpich.so.12 => /usr/lib/x86_64-linux-gnu/libmpich.so.12 (0x...) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x...) libcr.so.0 => /usr/lib/libcr.so.0 (0x...) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x...) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x...) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x...) /lib64/ld-linux-x86-64.so.2 (0x...) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x...) – Anna Madsen May 13 '18 at 01:04
  • I am sorry about the last comment, but SO wouldn't let me split it in nice paragraphs. And I posted it in order to hear if anyone reads anything out of it. As I do not know enough to understand what I should look for – Anna Madsen May 13 '18 at 01:06
  • Your app is clearly using `MPICH` library, so assuming `mpirun` is provided by Open MPI, that cannot work. You can either rebuild your app with Open MPI, or use MPICH’s mpirun. – Gilles Gouaillardet May 13 '18 at 03:42
  • Generally speaking, you should edit your question with this kind of new information (so you can format it) and drop a comment so notifications are sent. – Gilles Gouaillardet May 13 '18 at 03:43