error with mpi_comm_rank and mpi_comm_size

Issue #44 closed
Junteng Jia created an issue

I downloaded the code today and tried the example in demo/wrap-f2py, and I get wrong result.

  1. I build mpi4py from source with mpich3 (wrapping ifort).

  2. I compiled helloworld.f90 code with -fcompiler=intelem, which successfully generated helloworld.so.

  3. However, when I do make test, there is what I got:

mpiexec -n 5 python test.py
You passed MPI_COMM_NULL !!!
 Hello, World! I am process            5  of            0  on Dell.
You passed MPI_COMM_NULL !!!
 Hello, World! I am process            5  of            0  on Dell.
You passed MPI_COMM_NULL !!!
 Hello, World! I am process            5  of            0  on Dell.
You passed MPI_COMM_NULL !!!
 Hello, World! I am process            5  of            0  on Dell.
You passed MPI_COMM_NULL !!!
 Hello, World! I am process            5  of            0  on Dell.

-------------------------------------------more information-----------------------------------

  1. I also tried the example in demo/wrap-c, I got the similar answer.
/home/junteng/lib/mpich-3.2-install/bin/mpiexec -n 5 python test.py
You passed MPI_COMM_NULL !!!
Hello, World! I am process 5 of 0 on Dell.
You passed MPI_COMM_NULL !!!
Hello, World! I am process 5 of 0 on Dell.
You passed MPI_COMM_NULL !!!
Hello, World! I am process 5 of 0 on Dell.
You passed MPI_COMM_NULL !!!
Hello, World! I am process 5 of 0 on Dell.
You passed MPI_COMM_NULL !!!
Hello, World! I am process 5 of 0 on Dell.

However, if I use the environment and mpi4py package installed from anaconda, then the demo/wrap-c example runs successfully.


Would you help me with this ?

Thanks a million !!!

(my only change is the makefile, -fcompiler=intelem)

Comments (10)

  1. Junteng Jia reporter

    The error is "I am process 5 of 0 on Dell", well it should be "I am process x of 5 on Dell"

  2. Lisandro Dalcin

    Well, if you changeed compiler, that may explain it. I guess the Intel compiler picks an MPI implementation (i.e Intel MPI) that is different from the one you used to build mpi4py.

  3. Junteng Jia reporter

    I don't think so

    By using the distribution out on 2015-10 the code works correctly

    I know for sure I am using mpich instead of Intel mpi

  4. Log in to comment