[mpich-discuss] MPI_Allreduce fail. Please help. (UPDATE) (WINDOWS XP 32bit+gfortran) (Yonghui)
Jayesh Krishna
jayesh at mcs.anl.gov
Fri Sep 7 12:00:37 CDT 2012
Your code works fine with the Intel Fortran Compiler on Windows. However as you mentioned in your email it fails with gfortran (MPI_IN_PLACE and large buffer).
I will look into this issue (This will take time since I have to provide a custom fix for you - the Windows build system is not up to date in the trunk).
Regards,
Jayesh
----- Original Message -----
From: "Rajeev Thakur" <thakur at mcs.anl.gov>
To: mpich-discuss at mcs.anl.gov
Sent: Thursday, September 6, 2012 1:04:23 PM
Subject: Re: [mpich-discuss] MPI_Allreduce fail. Please help. (UPDATE) (WINDOWS XP 32bit+gfortran) (Yonghui)
It's taken care of in the Fortran binding. If the first parameter is the address of the Fortran variable MPI_IN_PLACE in the common block, C MPI_IN_PLACE is passed to the C function.
FORT_DLL_SPEC void FORT_CALL mpi_allreduce_ ( void*v1, void*v2, MPI_Fint *v3, MPI_Fint *v4, MPI_Fint *v5, MPI_Fint *v6, MPI_Fint *ierr ){
#ifndef HAVE_MPI_F_INIT_WORKS_WITH_C
if (MPIR_F_NeedInit){ mpirinitf_(); MPIR_F_NeedInit = 0; }
#endif
if (v1 == MPIR_F_MPI_IN_PLACE) v1 = MPI_IN_PLACE;
*ierr = MPI_Allreduce( v1, v2, *v3, (MPI_Datatype)(*v4), *v5, (MPI_Comm)(*v6) );
}
On Sep 6, 2012, at 12:57 PM, Yonghui wrote:
> Thanks Anthony.
>
> That makes more sense. If I am correct the MPI_IN_PLACE for fortran is just a number since there is no way to visit a memory address directly by fortran. And the fortran subroutines are just wrappers of c functions. So if MPI_Allreduce (MPI_IN_PLACE, ……) is used and when the send buf is 0 (MPI_IN_PLACE), the actual parameter which passed to a c function should be 0xffffffff (the MPI_IN_PLACE defined in the c header), right?
>
> Yonghui
> _______________________________________________
> mpich-discuss mailing list mpich-discuss at mcs.anl.gov
> To manage subscription options or unsubscribe:
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
_______________________________________________
mpich-discuss mailing list mpich-discuss at mcs.anl.gov
To manage subscription options or unsubscribe:
https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
More information about the mpich-discuss
mailing list