[mpiwg-rma] [MPIWG Fortran] "small count" variants of RMA functions
Jeff Hammond
jeff.science at gmail.com
Mon Nov 29 08:39:38 CST 2021
I don't think it's worth a plenary. It really comes down to whether the
Fortran Wizards (Rolf, Bill, Hubert) accept this. The implementation of
this change is easy.
Jeff
On Mon, Nov 29, 2021 at 4:03 PM Wesley Bland <work at wesbland.com> wrote:
> As long as we’re having remote meetings, we’re not setting up WG time
> during the meeting itself. So each WG is just having its usual con calls on
> their own schedule (or in the case of Fortran, not). If you folks want to
> throw together a plenary, we can still put that on the agenda though.
>
> Thanks,
> Wes
>
> On Nov 29, 2021, at 3:45 AM, Jeff Hammond via mpiwg-fortran <
> mpiwg-fortran at lists.mpi-forum.org> wrote:
>
> I created https://github.com/mpi-forum/mpi-issues/issues/528.
>
> Normally, we would have a Fortran WG meeting during the quarterly
> meeting. Is there going to be a Fortran WG session at the December meeting?
>
> Jeff
>
> On Sat, Nov 27, 2021 at 9:14 PM William Gropp <wgropp at illinois.edu> wrote:
>
>> I agree with Jeff here. This is a good enhancement; I believe the only
>> reason that we hadn’t done this before is that we’ve stuck closely to the
>> original Fortran look-and-feel - which was pre-Fortran 90. We could have
>> done this earlier, and now that there are explicit interfaces that are only
>> available in Fortran08, there is no reason not to do this.
>>
>> Bill
>>
>> William Gropp
>> Director, NCSA
>> Thomas M. Siebel Chair in Computer Science
>> University of Illinois Urbana-Champaign
>> IEEE-CS President-Elect
>>
>>
>>
>>
>> On Nov 25, 2021, at 4:42 AM, Jeff Hammond via mpiwg-fortran <
>> mpiwg-fortran at lists.mpi-forum.org> wrote:
>>
>> RMA absolutely did the right thing with MPI_Aint size and displacement
>> arguments.
>>
>> In C, it is no problem to pass 32b integers to these arguments when AINT
>> is 64b, because C type promotion rules just work.
>>
>> In Fortran, I cannot do this, because an integer literal is not
>> compatible with an AINT argument. I find it tedious to have to declare a
>> variable just for this, or to explicitly cast with integer(100,
>> MPI_ADDRESS_KIND).
>>
>> Since Fortran does polymorphism right and can have subroutine
>> declarations for both default integer and AINT integer scalar arguments, is
>> there a good reason not to add the former?
>>
>> This proposal applies not to just MPI_Win_allocate but any RMA function
>> that uses AINT scalar arguments.
>>
>> Thanks,
>>
>> Jeff
>>
>> % mpifort y.F90
>> y.F90:20:60:
>>
>> 20 | call MPI_Win_allocate(100, 1, MPI_INFO_NULL, comm, XA, WA)
>> | 1
>> Error: There is no specific subroutine for the generic 'mpi_win_allocate'
>> at (1)
>>
>> % cat y.F90
>> ! USE mpi_f08
>> ! MPI_Win_allocate(size, disp_unit, info, comm, baseptr, win, ierror)
>> ! USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR
>> ! INTEGER(KIND=MPI_ADDRESS_KIND), INTENT(IN) :: size
>> ! INTEGER, INTENT(IN) :: disp_unit
>> ! TYPE(MPI_Info), INTENT(IN) :: info
>> ! TYPE(MPI_Comm), INTENT(IN) :: comm
>> ! TYPE(C_PTR), INTENT(OUT) :: baseptr
>> ! TYPE(MPI_Win), INTENT(OUT) :: win
>> ! INTEGER, OPTIONAL, INTENT(OUT) :: ierror
>> program main
>> use iso_fortran_env
>> use mpi_f08
>> implicit none
>> integer(kind=MPI_ADDRESS_KIND) :: as = 100
>> type(c_ptr) :: XA
>> type(MPI_Win) :: WA
>> TYPE(MPI_Comm) :: comm = MPI_COMM_WORLD
>> call MPI_Win_allocate(as, 1, MPI_INFO_NULL, comm, XA, WA)
>> call MPI_Win_allocate(100, 1, MPI_INFO_NULL, comm, XA, WA)
>> end program main
>>
>> % mpicc y.c && echo SUCCESS
>> SUCCESS
>>
>> % cat y.c
>> #include <mpi.h>
>> int main(void)
>> {
>> MPI_Aint as = 100;
>> int * XA;
>> MPI_Win WA;
>> MPI_Win_allocate(as, 1, MPI_INFO_NULL, MPI_COMM_WORLD, XA, &WA);
>> MPI_Win_allocate(100, 1, MPI_INFO_NULL, MPI_COMM_WORLD, XA, &WA);
>> }
>>
>>
>> --
>> Jeff Hammond
>> jeff.science at gmail.com
>> http://jeffhammond.github.io/
>> <https://urldefense.com/v3/__http://jeffhammond.github.io/__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jab6YK9fw$>
>> _______________________________________________
>> mpiwg-fortran mailing list
>> mpiwg-fortran at lists.mpi-forum.org
>>
>> https://urldefense.com/v3/__https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran__;!!DZ3fjg!rCl1MJjLBm7CR4j1i2TYIuosrHBzzhChv0RVTrxnOAOtUZyYsqrBQtmV0jZut-fk-w$
>>
>>
>>
>>
>
> --
> Jeff Hammond
> jeff.science at gmail.com
> http://jeffhammond.github.io/
> _______________________________________________
> mpiwg-fortran mailing list
> mpiwg-fortran at lists.mpi-forum.org
> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-fortran
>
>
>
--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-rma/attachments/20211129/7fdb8ce9/attachment-0001.html>
More information about the mpiwg-rma
mailing list