[mpich-discuss] MPI_Allreduce fail. Please help. (UPDATE) (WINDOWS XP 32bit+gfortran) (Yonghui)

Yonghui lyh03259.aps at gmail.com
Fri Sep 7 14:18:09 CDT 2012


Thanks a lot Jayesh. I haven't try it with intel compiler since I don't have one installed. I appreciate your response. 
The ticket is created. https://trac.mcs.anl.gov/projects/mpich2/ticket/1691

I suggest you update the libfmpich2g.a in the installation file with your fix since I think it could be a general case when using MinGW (I test it with 32 and 64 bit build MinGW on a 32bit windows xp and 2 64 bit windows 7 and a virtual windows xp, and they all failed). 

Again, thanks a lot Jayesh.

Yonghui

-----Original Message-----
From: Jayesh Krishna [mailto:jayesh at mcs.anl.gov] 
Sent: Friday, September 07, 2012 12:02 PM
To: mpich-discuss at mcs.anl.gov
Cc: lyh03259 aps
Subject: Re: [mpich-discuss] MPI_Allreduce fail. Please help. (UPDATE) (WINDOWS XP 32bit+gfortran) (Yonghui)

 Can you create a ticket for this issue?

-Jayesh

----- Original Message -----
From: "Jayesh Krishna" <jayesh at mcs.anl.gov>
To: mpich-discuss at mcs.anl.gov
Cc: "lyh03259 aps" <lyh03259.aps at gmail.com>
Sent: Friday, September 7, 2012 12:00:37 PM
Subject: Re: [mpich-discuss] MPI_Allreduce fail. Please help.	(UPDATE)	(WINDOWS XP 32bit+gfortran) (Yonghui)

 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
_______________________________________________
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