Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

mpi_reduce issue with mpi_f08

Todor_K_
Novice
1,323 Views

I am running the following test code on intel mpi 5.1.2 and compilng with ifort 16.0.1

program testreduce
  use mpi_f08
  implicit none
  integer :: ierr,id, nnodes

  real(kind(1.d0)),allocatable :: a(:),b(:)

  call mpi_init(ierr)
 
  call MPI_COMM_RANK( MPI_COMM_WORLD, id, iErr )
  call MPI_COMM_SIZE( MPI_COMM_WORLD, nnodes, iErr )

  allocate(a(nnodes*10),b(nnodes*10))

  a=7
  b=8
  call mpi_reduce(a,b,size(a),MPI_DOUBLE_PRECISION,MPI_SUM,0,MPI_COMM_WORLD,ierr)


  
  if (id==0) print *, b(3)


  call mpi_finalize(ierr)

end program

Running it across two nodes with 16 cores each results in, Fatal error in PMPI_Reduce: Invalid MPI_Op, error stack: PMPI_Reduce(2064).......: MPI_Reduce(sbuf=0x7fde50, rbuf=0x7fe860, count=1, dtype=USER, MPI_SUM, root=0, MPI_COMM_WORLD) failed MPIR_SUM_check_dtype(97): MPI_Op MPI_SUM operation not defined for this datatype I am at loss about what is going on.

0 Kudos
6 Replies
James_T_Intel
Moderator
1,323 Views

Hi Todor,

This appears to be corrected in Intel® MPI Library 5.1 Update 3.  Can you try running with this version and see if you're still getting the error?

James.
Intel Developer Support

0 Kudos
Todor_K_
Novice
1,323 Views

I guess I'll need to ask my sysOp. I suppose the mpif.h interface should work as advertised? Or, was this bug at some deeper level? 

 

Thanks,

 

Todor

0 Kudos
James_T_Intel
Moderator
1,323 Views

This was lower down in the runtime.  I got the same error when I compiled with 5.1 Update 3 and ran linked to 5.1 Update 2.

You can also install the Intel® MPI Library in your user folder without needing root permissions.

0 Kudos
Todor_K_
Novice
1,323 Views

Hi, I can confirm that I do not encounter these problems with 5.1.3

0 Kudos
ukirde__Monika_Baban
1,323 Views

or stack:
PMPI_Reduce(2064)........: MPI_Reduce(sbuf=0x7ffe105f19b0, rbuf=0x7ffe105f19b8, count=1, dtype=0x4e980010, MPI_MAX, root=0, MPI_COMM_WORLD) failed
MPIR_MAXF_check_dtype(72): MPI_Op MPI_MAX operation no

 

how can i solve this error

0 Kudos
ahmad__haseeb
Beginner
1,323 Views

Dear all, I am getting the following error: I am using Intel(R) Parallel Studio XE 2019 Update 1 for Linux*

 

Abort(873015042) on node 0 (rank 0 in comm 0): Fatal error in PMPI_Allreduce: Invalid count, error stack:
PMPI_Allreduce(448): MPI_Allreduce(sbuf=0x7fbfd76533c0, rbuf=0x7fc8a3046ce0, count=-2104727296, MPI_COMPLEX, MPI_SUM, MPI_COMM_WORLD) failed
PMPI_Allreduce(389): Negative count, value is -2104727296
Abort(537470722) on node 1 (rank 1 in comm 0): Fatal error in PMPI_Allreduce: Invalid count, error stack:
PMPI_Allreduce(448): MPI_Allreduce(sbuf=0x7f4e694e53c0, rbuf=0x7f5734ee2ce0, count=-2104727296, MPI_COMPLEX, MPI_SUM, MPI_COMM_WORLD) failed
PMPI_Allreduce(389): Negative count, value is -2104727296
Abort(336144130) on node 2 (rank 2 in comm 0): Fatal error in PMPI_Allreduce: Invalid count, error stack:
PMPI_Allreduce(448): MPI_Allreduce(sbuf=0x7fc33fc4d3c0, rbuf=0x7fcc0b646ce0, count=-2104727296, MPI_COMPLEX, MPI_SUM, MPI_COMM_WORLD) failed
PMPI_Allreduce(389): Negative count, value is -2104727296
Abort(599810) on node 3 (rank 3 in comm 0): Fatal error in PMPI_Allreduce: Invalid count, error stack:
PMPI_Allreduce(448): MPI_Allreduce(sbuf=0x7f5ef26613c0, rbuf=0x7f67bde5ace0, count=-2104727296, MPI_COMPLEX, MPI_SUM, MPI_COMM_WORLD) failed
PMPI_Allreduce(389): Negative count, value is -2104727296
[cli_2]: readline failed
 

 

Thanks,

Haseeb Ahmad

0 Kudos
Reply