What is mpif-common.h? You need to include mpif.h and provide the path to the mpich include directory. The problem you are seeing is caused because the wrong mpif.h is being picked up. Rajeev On Jul 16, 2014, at 2:45 AM, maurice van putten <[email protected]> wrote:
Hi,
Perhaps someone can provide a solution to what seems to be a problem with installation of mpich.
I installed ifort (intel) and mpich (via port install), compile a basic test program mpif90 -I/usr/local/include -o tst tst.f (here "I/usr/local/include" is included to find mpif-common.h),
PROGRAM mpitest integer ierr,my_rank,nm_prcs include "mpif-common.h" call MPI_INIT(ierr) write(*,*)MPI_INTEGER,MPI_REAL,MPI_DOUBLE_PRECISION call MPI_COMM_RANK(MPI_COMM_WORLD,my_rank,ierr) call MPI_COMM_SIZE(MPI_COMM_WORLD,nm_prcs,ierr) write(*,*)'MPI:',my_rank,nm_prcs,ierr call MPI_FINALIZE(ierr) end
and do mpirun -np 2 ./tst. The result is
7 13 17 MPI: 0 1 0 7 13 17 MPI: 0 1 0
It shows that nm_prcs = 1 and both processes show the same my_rank = 0, even though ierr =0.
The initialization in mpirun seem to fail, to assign a proper process count 2.
Any ideas on what's amiss?
Many thanks,
Henry. _______________________________________________ discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mpich.org/mailman/listinfo/discuss