Unverified Commit ad0eb974 authored by Kabelitz, Matthew Edward's avatar Kabelitz, Matthew Edward Committed by GitHub
Browse files

Fixes allreduce call in distr matrix initialization (#333)

Description:
The MPI_IN_PLACE keyword needs to be swapped from the send to recv buffer in the allreduce call.
Current implementation fails to correctly sum data silently on some problems (including 3-mini in the Heavies), though this was not previously observed.
parent 4c868e8a
......@@ -497,7 +497,7 @@ SUBROUTINE init_DistributedBandedMatrixParam(matrix,Params)
CALL validParams%get('MatrixType->nnz',nnz_int)
CALL validParams%get('MatrixType->blockSize',blockSize)
CALL validParams%get('MatrixType->nlocal',nlocal)
nnz=INT(nnz_int,KIND=8)
nnz=INT(nnz_int,KIND=SLK)
IF(nnz_int <= 1) THEN
IF (validParams%has("MatrixType->dnnz") .AND. validParams%has("MatrixType->onnz")) THEN
nnz=0_SLK
......@@ -507,7 +507,7 @@ SUBROUTINE init_DistributedBandedMatrixParam(matrix,Params)
nnz=nnz+INT(onnz(i),KIND=SLK)
nnz=nnz+INT(dnnz(i),KIND=SLK)
ENDDO
CALL MPI_AllReduce(nnz,MPI_IN_PLACE,1,MPI_LONG,MPI_SUM,commID,mpierr)
CALL MPI_AllReduce(MPI_IN_PLACE,nnz,1,MPI_LONG,MPI_SUM,commID,mpierr)
ENDIF
ENDIF
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment