[mpich-discuss] MPI comm attributes not working?

Jeff Hammond jeff.science at gmail.com
Tue Apr 5 14:38:40 CDT 2016


Thanks, Ken.  When I set *flag=1 in the copyfn, the output becomes:

$ ./a.out

In ibcast_copy: keyval = -1539309568
In ibcast_delete: keyval = -1539309568
In ibcast_delete: keyval = -1539309568

Jeff

On Tue, Apr 5, 2016 at 11:08 AM, Kenneth Raffenetti <raffenet at mcs.anl.gov>
wrote:
>
> I think in the example, it's undefined if the attribute will be set on
the duped communicator. See pg. 269 in MPI-3.1. If the callback does not
set the output flag to true/false, how will the implementation know what to
do?
>
> Ken
>
> On 04/05/2016 11:05 AM, Jeff Hammond wrote:
>>
>> I guess I don't know what the right answer is for MPI_COMM_WORLD.  I'll
>> try that test again with attributes set only on subcomms to see how it
>> behaves.
>>
>> Jeff
>>
>> On Tue, Apr 5, 2016 at 10:24 AM, Balaji, Pavan <balaji at anl.gov
>> <mailto:balaji at anl.gov>> wrote:
>>
>>
>>     Hmm.  I would think the mpich output is correct: the attributed
>>     should only be deleted once.  But I could be wrong.
>>
>>       -- Pavan
>>
>>      > On Apr 5, 2016, at 8:10 AM, Jeff Hammond <jeff.science at gmail.com
>>     <mailto:jeff.science at gmail.com>> wrote:
>>      >
>>      > My concern is the number of times the string "ibcast_delete"
>>     appears in the output (2 vs 1)...
>>      >
>>      > Jeff
>>      >
>>      > On Mon, Apr 4, 2016 at 10:02 PM, Balaji, Pavan <balaji at anl.gov
>>     <mailto:balaji at anl.gov>> wrote:
>>      >
>>      > You are printing a number that's generated by the MPI
>>     implementation.  It's value will be different for different MPI
>>     implementations.
>>      >
>>      >  -- Pavan
>>      >
>>      >> On Apr 4, 2016, at 11:56 PM, Jeff Hammond
>>     <jeff.science at gmail.com <mailto:jeff.science at gmail.com>> wrote:
>>      >>
>>      >> I am trying to understand how communicator attributes work, so I
>>     found
>>
http://stackoverflow.com/questions/25198353/callbacks-provided-in-mpi-comm-create-keyval-are-not-called
,
>>     which contains a nice example (the code in
>>     http://stackoverflow.com/a/25205611/2189128).
>>      >>
>>      >> However, the posted output of this code is:
>>      >>
>>      >> $ mpirun -np 1 ./comm-attr
>>      >> In ibcast_copy: keyval = 10
>>      >> In ibcast_delete: keyval = 10
>>      >> In ibcast_delete: keyval = 10
>>      >>
>>      >> Whereas I observe:
>>      >>
>>      >> $ mpirun -np 1 ./a.out
>>      >> In ibcast_copy: keyval = -1539309568
>>      >> In ibcast_delete: keyval = -1539309568
>>      >>
>>      >> Can anyone help me understand what the correct output of this
>>     program is?  If it is not what I am seeing, is this a bug in MPICH
>>     or am I doing something wrong?
>>      >>
>>      >> I am using MPICH git from November 2015, so I will git pull &&
>>     ./autogen.sh && $CONFIGUREMAKEINSTALL and try again just to be sure.
>>      >>
>>      >> Thanks,
>>      >>
>>      >> Jeff
>>      >>
>>      >> $ mpirun --version
>>      >> HYDRA build details:
>>      >>    Version:                                 3.2
>>      >>    Release Date:                            unreleased
>>     development copy
>>      >>    CC:                              icc
>>      >>    CXX:                             icpc
>>      >>    F77:                             ifort
>>      >>    F90:                             ifort
>>      >>    Configure options:
>>       '--disable-option-checking'
>>     '--prefix=/opt/mpich/dev/intel/default' 'CC=icc' 'CXX=icpc'
>>     'FC=ifort' 'F77=ifort' '--enable-cxx' '--enable-fortran'
>>     '--enable-threads=runtime' '--enable-g=dbg' '--with-pm=hydra'
>>     '--enable-wrapper-rpath' '--enable-static' '--enable-shared'
>>     '--cache-file=/dev/null' '--srcdir=../../../../src/pm/hydra'
>>     'CFLAGS= -g -O2' 'LDFLAGS=' 'LIBS=-lpthread ' 'CPPFLAGS=
>>     -I/Users/jrhammon/Work/MPI/MPICH/git/build/src/mpl/include
>>     -I/Users/jrhammon/Work/MPI/MPICH/git/src/mpl/include
>>     -I/Users/jrhammon/Work/MPI/MPICH/git/src/openpa/src
>>     -I/Users/jrhammon/Work/MPI/MPICH/git/build/src/openpa/src
>>     -D_REENTRANT
>>     -I/Users/jrhammon/Work/MPI/MPICH/git/build/src/mpi/romio/include'
>>      >>    Process Manager:                         pmi
>>      >>    Launchers available:                     ssh rsh fork slurm
>>     ll lsf sge manual persist
>>      >>    Topology libraries available:            hwloc
>>      >>    Resource management kernels available:   user slurm ll lsf
>>     sge pbs cobalt
>>      >>    Checkpointing libraries available:
>>      >>    Demux engines available:                 poll select
>>      >>
>>      >>
>>      >> --
>>      >> Jeff Hammond
>>      >> jeff.science at gmail.com <mailto:jeff.science at gmail.com>
>>      >> http://jeffhammond.github.io/
>>      >> _______________________________________________
>>      >> discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>>      >> To manage subscription options or unsubscribe:
>>      >> https://lists.mpich.org/mailman/listinfo/discuss
>>      >
>>      > _______________________________________________
>>      > discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>>      > To manage subscription options or unsubscribe:
>>      > https://lists.mpich.org/mailman/listinfo/discuss
>>      >
>>      >
>>      >
>>      > --
>>      > Jeff Hammond
>>      > jeff.science at gmail.com <mailto:jeff.science at gmail.com>
>>      > http://jeffhammond.github.io/
>>      > _______________________________________________
>>      > discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>>      > To manage subscription options or unsubscribe:
>>      > https://lists.mpich.org/mailman/listinfo/discuss
>>
>>     _______________________________________________
>>     discuss mailing list discuss at mpich.org <mailto:discuss at mpich.org>
>>     To manage subscription options or unsubscribe:
>>     https://lists.mpich.org/mailman/listinfo/discuss
>>
>>
>>
>>
>> --
>> Jeff Hammond
>> jeff.science at gmail.com <mailto:jeff.science at gmail.com>
>> http://jeffhammond.github.io/
>>
>>
>> _______________________________________________
>> 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




--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20160405/651bd18d/attachment.html>
-------------- next part --------------
_______________________________________________
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