[mpich-discuss] Issue in MPI_Win_get_attr(MPI_WIN_SIZE)
Hajime Fujita
hfujita at uchicago.edu
Mon Feb 9 13:13:55 CST 2015
Ah, I see, I totally missed that sentence in the specification. Now it works fine if I interpret the returned value as a pointer.
Thank you,
Hajime
> On Feb 9, 2015, at 1:09 PM, Junchao Zhang <jczhang at mcs.anl.gov> wrote:
>
>
>
> On Mon, Feb 9, 2015 at 12:29 PM, Hajime Fujita <hfujita at uchicago.edu> wrote:
> Hello,
>
> I think I found an issue in MPI_Win_get_attr, when MPI_WIN_SIZE is specified. It is supposed to return the size of the window, but it seems to give a random number.
>
> Just wanted to confirm one thing: I think MPI_Win_get_attr is supposed to return a value of type MPI_Aint, when MPI_WIN_SIZE is specified. Is it correct?
>
> No. According to p415 of MPI-3.0 spec, in C bindings, MPI_Win_get_attr(..., MPI_WIN_SIZE, &size, ...) return in size "pointer" to the size of the window. In Fortran bindings, it returns a value instead.
>
>
>
> Test program:
> See the attached file
>
> Result I got:
> hfujita at lssg-lp-00:~/work/mpi_win_size_test$ ./win_size_test
> Got size=140729394560728, while expecting 1024
> hfujita at lssg-lp-00:~/work/mpi_win_size_test$ ./win_size_test
> Got size=139994694213336, while expecting 1024
> hfujita at lssg-lp-00:~/work/mpi_win_size_test$ ./win_size_test
> Got size=139739628887768, while expecting 1024
> hfujita at lssg-lp-00:~/work/mpi_win_size_test$ ./win_size_test
> Got size=140131810524888, while expecting 1024
> hfujita at lssg-lp-00:~/work/mpi_win_size_test$ ./win_size_test
> Got size=139859819581144, while expecting 1024
>
> Expected result:
> If the MPI library works as I expected, the test program won’t show any message.
>
> MPICH version and configuration:
> $ mpichversion
> MPICH Version: 3.2a2
> MPICH Release date: unreleased development copy
> MPICH Device: ch3:nemesis
> MPICH configure: CC=gcc CXX=g++ FC=gfortran F77=gfortran CFLAGS=-O0 --prefix=/home/hfujita/opt/mpich-3.2 --disable-mpe --disable-romio --enable-g=all --enable-spawn --enable-maintainer-mode --enable-error-checking=all --with-pm=hydra --with-pmi=simple --disable-cxx --enable-fortran --enable-strict=noopt --disable-fast --disable-perftest --no-create --no-recursion
> MPICH CC: gcc -O0 -Wall -Wextra -Wno-missing-field-initializers -Wmissing-prototypes -DGCC_WALL -Wno-unused-parameter -Wno-unused-label -Wshadow -Wmissing-declarations -Wno-long-long -Wundef -Wno-endif-labels -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wnested-externs -Winvalid-pch -Wno-pointer-sign -Wvariadic-macros -Wno-format-zero-length -Wtype-limits -Werror-implicit-function-declaration -D_POSIX_C_SOURCE=200112L -std=c99 -D_STDC_C99= -g -O0
> MPICH CXX: no -g
> MPICH F77: gfortran -g -O0
> MPICH FC: gfortran -g -O0
>
> Git revision info:
> I got the MPI source from git (http://git.mpich.org/mpich.git master) and the id is 7dfe2840
>
> Platform:
> Ubuntu 12.04 amd64
>
>
> Thanks,
> Hajime
>
> --
> Hajime Fujita
> Postdoctoral Scholar, Large-Scale Systems Group
> Department of Computer Science, The University of Chicago
> http://www.cs.uchicago.edu/people/hfujita
>
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
> _______________________________________________
> discuss mailing list discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
_______________________________________________
discuss mailing list discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss
More information about the discuss
mailing list