[OMPI users] know which CPU has the maximum value

2018-08-10 Thread Diego Avesani
Dear all,

I have a problem:
In my parallel program each CPU compute a value, let's say eff.

First of all, I would like to know the maximum value. This for me is quite
simple,
I apply the following:

CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX,
MPI_MASTER_COMM, MPIworld%iErr)


However, I would like also to know to which CPU that value belongs. Is it
possible?

I have set-up a strange procedure but it works only when all the CPUs has
different values but fails when two of then has the same eff value.

Is there any intrinsic MPI procedure?
in anternative,
do you have some idea?

really, really thanks.
Diego


Diego
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Reuti
Hi,

> Am 10.08.2018 um 16:39 schrieb Diego Avesani :
> 
> Dear all,
> 
> I have a problem:
> In my parallel program each CPU compute a value, let's say eff.
> 
> First of all, I would like to know the maximum value. This for me is quite 
> simple,
> I apply the following:
> 
> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
> MPI_MASTER_COMM, MPIworld%iErr)

Would MPI_MAXLOC be sufficient?

-- Reuti


> However, I would like also to know to which CPU that value belongs. Is it 
> possible?
> 
> I have set-up a strange procedure but it works only when all the CPUs has 
> different values but fails when two of then has the same eff value.
> 
> Is there any intrinsic MPI procedure?
> in anternative,
> do you have some idea?
> 
> really, really thanks.
> Diego
> 
> 
> Diego
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Ray Sheppard
As a dumb scientist, I would just bcast the value I get back to the 
group and ask whoever owns it to kindly reply back with its rank.

 Ray

On 8/10/2018 10:49 AM, Reuti wrote:

Hi,


Am 10.08.2018 um 16:39 schrieb Diego Avesani :

Dear all,

I have a problem:
In my parallel program each CPU compute a value, let's say eff.

First of all, I would like to know the maximum value. This for me is quite 
simple,
I apply the following:

CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
MPI_MASTER_COMM, MPIworld%iErr)

Would MPI_MAXLOC be sufficient?

-- Reuti



However, I would like also to know to which CPU that value belongs. Is it 
possible?

I have set-up a strange procedure but it works only when all the CPUs has 
different values but fails when two of then has the same eff value.

Is there any intrinsic MPI procedure?
in anternative,
do you have some idea?

really, really thanks.
Diego


Diego

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Diego Avesani
Deal all,
I do not understand how MPI_MINLOC works. it seem locate the maximum in a
vector and not the CPU to which the valur belongs to.

@ray: and if two has the same value?

thanks


Diego


On 10 August 2018 at 17:03, Ray Sheppard  wrote:

> As a dumb scientist, I would just bcast the value I get back to the group
> and ask whoever owns it to kindly reply back with its rank.
>  Ray
>
>
> On 8/10/2018 10:49 AM, Reuti wrote:
>
>> Hi,
>>
>> Am 10.08.2018 um 16:39 schrieb Diego Avesani :
>>>
>>> Dear all,
>>>
>>> I have a problem:
>>> In my parallel program each CPU compute a value, let's say eff.
>>>
>>> First of all, I would like to know the maximum value. This for me is
>>> quite simple,
>>> I apply the following:
>>>
>>> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX,
>>> MPI_MASTER_COMM, MPIworld%iErr)
>>>
>> Would MPI_MAXLOC be sufficient?
>>
>> -- Reuti
>>
>>
>> However, I would like also to know to which CPU that value belongs. Is it
>>> possible?
>>>
>>> I have set-up a strange procedure but it works only when all the CPUs
>>> has different values but fails when two of then has the same eff value.
>>>
>>> Is there any intrinsic MPI procedure?
>>> in anternative,
>>> do you have some idea?
>>>
>>> really, really thanks.
>>> Diego
>>>
>>>
>>> Diego
>>>
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Diego Avesani
 Dear all,
I have probably understood.
The trick is to use a real vector and to memorize also the rank.

Have I understood correctly?
thanks

Diego


On 10 August 2018 at 17:19, Diego Avesani  wrote:

> Deal all,
> I do not understand how MPI_MINLOC works. it seem locate the maximum in a
> vector and not the CPU to which the valur belongs to.
>
> @ray: and if two has the same value?
>
> thanks
>
>
> Diego
>
>
> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
>
>> As a dumb scientist, I would just bcast the value I get back to the group
>> and ask whoever owns it to kindly reply back with its rank.
>>  Ray
>>
>>
>> On 8/10/2018 10:49 AM, Reuti wrote:
>>
>>> Hi,
>>>
>>> Am 10.08.2018 um 16:39 schrieb Diego Avesani :

 Dear all,

 I have a problem:
 In my parallel program each CPU compute a value, let's say eff.

 First of all, I would like to know the maximum value. This for me is
 quite simple,
 I apply the following:

 CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX,
 MPI_MASTER_COMM, MPIworld%iErr)

>>> Would MPI_MAXLOC be sufficient?
>>>
>>> -- Reuti
>>>
>>>
>>> However, I would like also to know to which CPU that value belongs. Is
 it possible?

 I have set-up a strange procedure but it works only when all the CPUs
 has different values but fails when two of then has the same eff value.

 Is there any intrinsic MPI procedure?
 in anternative,
 do you have some idea?

 really, really thanks.
 Diego


 Diego

 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users

>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>>
>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread George Reeke
On Fri, 2018-08-10 at 11:03 -0400, Ray Sheppard wrote:
> As a dumb scientist, I would just bcast the value I get back to the 
> group and ask whoever owns it to kindly reply back with its rank.
>   Ray
> 
Depends how many times one needs to run this--your solution involves
quite a bit of extra communication.  It should be easy to write a
little function that does a binary reduction (loop over bits in the
rank numbers) where each node sends its value and rank to its neighbor,
each recipient picks the larger and in the next round of the reduction
(the nodes with ones in the last dimension drop out) sends that value
and rank to the neighbor in the next dimension, until the value and rank
of the highest value all end up at rank 0 (or wherever you program it).
George Reeke


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread George Bosilca
You will need to create a special variable that holds 2 entries, one for
the max operation (with whatever type you need) and an int for the rank of
the process. The MAXLOC is described on the OMPI man page [1] and you can
find an example on how to use it on the MPI Forum [2].

George.


[1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
[2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html

On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani 
wrote:

>  Dear all,
> I have probably understood.
> The trick is to use a real vector and to memorize also the rank.
>
> Have I understood correctly?
> thanks
>
> Diego
>
>
> On 10 August 2018 at 17:19, Diego Avesani  wrote:
>
>> Deal all,
>> I do not understand how MPI_MINLOC works. it seem locate the maximum in a
>> vector and not the CPU to which the valur belongs to.
>>
>> @ray: and if two has the same value?
>>
>> thanks
>>
>>
>> Diego
>>
>>
>> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
>>
>>> As a dumb scientist, I would just bcast the value I get back to the
>>> group and ask whoever owns it to kindly reply back with its rank.
>>>  Ray
>>>
>>>
>>> On 8/10/2018 10:49 AM, Reuti wrote:
>>>
 Hi,

 Am 10.08.2018 um 16:39 schrieb Diego Avesani :
>
> Dear all,
>
> I have a problem:
> In my parallel program each CPU compute a value, let's say eff.
>
> First of all, I would like to know the maximum value. This for me is
> quite simple,
> I apply the following:
>
> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX,
> MPI_MASTER_COMM, MPIworld%iErr)
>
 Would MPI_MAXLOC be sufficient?

 -- Reuti


 However, I would like also to know to which CPU that value belongs. Is
> it possible?
>
> I have set-up a strange procedure but it works only when all the CPUs
> has different values but fails when two of then has the same eff value.
>
> Is there any intrinsic MPI procedure?
> in anternative,
> do you have some idea?
>
> really, really thanks.
> Diego
>
>
> Diego
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users

>>>
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>>
>>
>>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Nathan Hjelm via users
The problem is minloc and maxloc need to go away. better to use a custom op. 

> On Aug 10, 2018, at 9:36 AM, George Bosilca  wrote:
> 
> You will need to create a special variable that holds 2 entries, one for the 
> max operation (with whatever type you need) and an int for the rank of the 
> process. The MAXLOC is described on the OMPI man page [1] and you can find an 
> example on how to use it on the MPI Forum [2].
> 
> George.
> 
> 
> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
> [2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
> 
>> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani  
>> wrote:
>>  Dear all,
>> I have probably understood.
>> The trick is to use a real vector and to memorize also the rank.
>> 
>> Have I understood correctly?
>> thanks
>> 
>> Diego
>> 
>> 
>>> On 10 August 2018 at 17:19, Diego Avesani  wrote:
>>> Deal all,
>>> I do not understand how MPI_MINLOC works. it seem locate the maximum in a 
>>> vector and not the CPU to which the valur belongs to.
>>> 
>>> @ray: and if two has the same value?
>>> 
>>> thanks 
>>> 
>>> 
>>> Diego
>>> 
>>> 
 On 10 August 2018 at 17:03, Ray Sheppard  wrote:
 As a dumb scientist, I would just bcast the value I get back to the group 
 and ask whoever owns it to kindly reply back with its rank.
  Ray
 
 
> On 8/10/2018 10:49 AM, Reuti wrote:
> Hi,
> 
>> Am 10.08.2018 um 16:39 schrieb Diego Avesani :
>> 
>> Dear all,
>> 
>> I have a problem:
>> In my parallel program each CPU compute a value, let's say eff.
>> 
>> First of all, I would like to know the maximum value. This for me is 
>> quite simple,
>> I apply the following:
>> 
>> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
>> MPI_MASTER_COMM, MPIworld%iErr)
> Would MPI_MAXLOC be sufficient?
> 
> -- Reuti
> 
> 
>> However, I would like also to know to which CPU that value belongs. Is 
>> it possible?
>> 
>> I have set-up a strange procedure but it works only when all the CPUs 
>> has different values but fails when two of then has the same eff value.
>> 
>> Is there any intrinsic MPI procedure?
>> in anternative,
>> do you have some idea?
>> 
>> really, really thanks.
>> Diego
>> 
>> 
>> Diego
>> 
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
 
 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users
>>> 
>> 
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Reuti


> Am 10.08.2018 um 17:24 schrieb Diego Avesani :
> 
>  Dear all,
> I have probably understood.
> The trick is to use a real vector and to memorize also the rank.

Yes, I thought of this:

https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html

-- Reuti


> Have I understood correctly?
> thanks
> 
> Diego
> 
> 
> On 10 August 2018 at 17:19, Diego Avesani  wrote:
> Deal all,
> I do not understand how MPI_MINLOC works. it seem locate the maximum in a 
> vector and not the CPU to which the valur belongs to.
> 
> @ray: and if two has the same value?
> 
> thanks 
> 
> 
> Diego
> 
> 
> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
> As a dumb scientist, I would just bcast the value I get back to the group and 
> ask whoever owns it to kindly reply back with its rank.
>  Ray
> 
> 
> On 8/10/2018 10:49 AM, Reuti wrote:
> Hi,
> 
> Am 10.08.2018 um 16:39 schrieb Diego Avesani :
> 
> Dear all,
> 
> I have a problem:
> In my parallel program each CPU compute a value, let's say eff.
> 
> First of all, I would like to know the maximum value. This for me is quite 
> simple,
> I apply the following:
> 
> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
> MPI_MASTER_COMM, MPIworld%iErr)
> Would MPI_MAXLOC be sufficient?
> 
> -- Reuti
> 
> 
> However, I would like also to know to which CPU that value belongs. Is it 
> possible?
> 
> I have set-up a strange procedure but it works only when all the CPUs has 
> different values but fails when two of then has the same eff value.
> 
> Is there any intrinsic MPI procedure?
> in anternative,
> do you have some idea?
> 
> really, really thanks.
> Diego
> 
> 
> Diego
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
> 
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Diego Avesani
Dear all,
I have just implemented MAXLOC, why should they  go away?
it seems working pretty well.

thanks

Diego


On 10 August 2018 at 17:39, Nathan Hjelm via users  wrote:

> The problem is minloc and maxloc need to go away. better to use a custom
> op.
>
> On Aug 10, 2018, at 9:36 AM, George Bosilca  wrote:
>
> You will need to create a special variable that holds 2 entries, one for
> the max operation (with whatever type you need) and an int for the rank of
> the process. The MAXLOC is described on the OMPI man page [1] and you can
> find an example on how to use it on the MPI Forum [2].
>
> George.
>
>
> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
> [2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
>
> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani 
> wrote:
>
>>  Dear all,
>> I have probably understood.
>> The trick is to use a real vector and to memorize also the rank.
>>
>> Have I understood correctly?
>> thanks
>>
>> Diego
>>
>>
>> On 10 August 2018 at 17:19, Diego Avesani 
>> wrote:
>>
>>> Deal all,
>>> I do not understand how MPI_MINLOC works. it seem locate the maximum in
>>> a vector and not the CPU to which the valur belongs to.
>>>
>>> @ray: and if two has the same value?
>>>
>>> thanks
>>>
>>>
>>> Diego
>>>
>>>
>>> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
>>>
 As a dumb scientist, I would just bcast the value I get back to the
 group and ask whoever owns it to kindly reply back with its rank.
  Ray


 On 8/10/2018 10:49 AM, Reuti wrote:

> Hi,
>
> Am 10.08.2018 um 16:39 schrieb Diego Avesani > >:
>>
>> Dear all,
>>
>> I have a problem:
>> In my parallel program each CPU compute a value, let's say eff.
>>
>> First of all, I would like to know the maximum value. This for me is
>> quite simple,
>> I apply the following:
>>
>> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION,
>> MPI_MAX, MPI_MASTER_COMM, MPIworld%iErr)
>>
> Would MPI_MAXLOC be sufficient?
>
> -- Reuti
>
>
> However, I would like also to know to which CPU that value belongs. Is
>> it possible?
>>
>> I have set-up a strange procedure but it works only when all the CPUs
>> has different values but fails when two of then has the same eff value.
>>
>> Is there any intrinsic MPI procedure?
>> in anternative,
>> do you have some idea?
>>
>> really, really thanks.
>> Diego
>>
>>
>> Diego
>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>

 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users

>>>
>>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

[OMPI users] MPI group and stuck in communication

2018-08-10 Thread Diego Avesani
Dear all,

I have a MPI program with three groups with some CPUs in common.

I have some problem with MPI_barrier.

I try to make my self clear. I have three communicator:
INTEGER  :: MPI_GROUP_WORLD
INTEGER  :: MPI_LOCAL_COMM
INTEGER  :: MPI_MASTER_COMM

when I apply:
 IF(MPIworld%rank.EQ.0) WRITE(*,*)

 CALL MPI_Barrier(MPI_COMM_WORLD,MPIworld%iErr)

 IF(MPI_COMM_NULL .NE. MPI_MASTER_COMM)THEN
   WRITE(*,'(A12,I3,A4,F10.5)') 'master rank',MPImaster%rank,'eff',eff
 ENDIF

 CALL MPI_Barrier(MPI_COMM_WORLD,MPIworld%iErr)

 IF(MPIworld%rank.EQ.0) WRITE(*,*)

What could be the problem?
Thanks a lot,
Diego
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Diego Avesani
Dear all,
I did it, but I am still afraid about Nathan concern.

What do you think?

thanks again

Diego


On 10 August 2018 at 17:41, Reuti  wrote:

>
> > Am 10.08.2018 um 17:24 schrieb Diego Avesani :
> >
> >  Dear all,
> > I have probably understood.
> > The trick is to use a real vector and to memorize also the rank.
>
> Yes, I thought of this:
>
> https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
>
> -- Reuti
>
>
> > Have I understood correctly?
> > thanks
> >
> > Diego
> >
> >
> > On 10 August 2018 at 17:19, Diego Avesani 
> wrote:
> > Deal all,
> > I do not understand how MPI_MINLOC works. it seem locate the maximum in
> a vector and not the CPU to which the valur belongs to.
> >
> > @ray: and if two has the same value?
> >
> > thanks
> >
> >
> > Diego
> >
> >
> > On 10 August 2018 at 17:03, Ray Sheppard  wrote:
> > As a dumb scientist, I would just bcast the value I get back to the
> group and ask whoever owns it to kindly reply back with its rank.
> >  Ray
> >
> >
> > On 8/10/2018 10:49 AM, Reuti wrote:
> > Hi,
> >
> > Am 10.08.2018 um 16:39 schrieb Diego Avesani :
> >
> > Dear all,
> >
> > I have a problem:
> > In my parallel program each CPU compute a value, let's say eff.
> >
> > First of all, I would like to know the maximum value. This for me is
> quite simple,
> > I apply the following:
> >
> > CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX,
> MPI_MASTER_COMM, MPIworld%iErr)
> > Would MPI_MAXLOC be sufficient?
> >
> > -- Reuti
> >
> >
> > However, I would like also to know to which CPU that value belongs. Is
> it possible?
> >
> > I have set-up a strange procedure but it works only when all the CPUs
> has different values but fails when two of then has the same eff value.
> >
> > Is there any intrinsic MPI procedure?
> > in anternative,
> > do you have some idea?
> >
> > really, really thanks.
> > Diego
> >
> >
> > Diego
> >
> > ___
> > users mailing list
> > users@lists.open-mpi.org
> > https://lists.open-mpi.org/mailman/listinfo/users
> > ___
> > users mailing list
> > users@lists.open-mpi.org
> > https://lists.open-mpi.org/mailman/listinfo/users
> >
> > ___
> > users mailing list
> > users@lists.open-mpi.org
> > https://lists.open-mpi.org/mailman/listinfo/users
> >
> >
> > ___
> > users mailing list
> > users@lists.open-mpi.org
> > https://lists.open-mpi.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Ray Sheppard

Hi Diego,
  if they are float/reals, the error (overflow) bits will likely make 
them unique.  If you are looking at integers, I would use isends and 
just capture the first one.  You could make a little round robin and 
poll everyone, saving the ranks that match, but if you are using 
hundreds/thousands of ranks, that could slow everything down a little.

   Ray

On 8/10/2018 11:19 AM, Diego Avesani wrote:

Deal all,
I do not understand how MPI_MINLOC works. it seem locate the maximum 
in a vector and not the CPU to which the valur belongs to.


@ray: and if two has the same value?

thanks


Diego


On 10 August 2018 at 17:03, Ray Sheppard > wrote:


As a dumb scientist, I would just bcast the value I get back to
the group and ask whoever owns it to kindly reply back with its rank.
 Ray


On 8/10/2018 10:49 AM, Reuti wrote:

Hi,

Am 10.08.2018 um 16:39 schrieb Diego Avesani
mailto:diego.aves...@gmail.com>>:

Dear all,

I have a problem:
In my parallel program each CPU compute a value, let's say
eff.

First of all, I would like to know the maximum value. This
for me is quite simple,
I apply the following:

CALL MPI_ALLREDUCE(eff, effmaxWorld, 1,
MPI_DOUBLE_PRECISION, MPI_MAX, MPI_MASTER_COMM, MPIworld%iErr)

Would MPI_MAXLOC be sufficient?

-- Reuti


However, I would like also to know to which CPU that value
belongs. Is it possible?

I have set-up a strange procedure but it works only when
all the CPUs has different values but fails when two of
then has the same eff value.

Is there any intrinsic MPI procedure?
in anternative,
do you have some idea?

really, really thanks.
Diego


Diego

___
users mailing list
users@lists.open-mpi.org 
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org 
https://lists.open-mpi.org/mailman/listinfo/users



___
users mailing list
users@lists.open-mpi.org 
https://lists.open-mpi.org/mailman/listinfo/users





___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Nathan Hjelm via users
They do not fit with the rest of the predefined operations (which operate on a 
single basic type) and can easily be implemented as user defined operations and 
get the same performance. Add to that the fixed number of tuple types and the 
fact that some of them are non-contiguous (MPI_SHORT_INT) plus the terrible 
names. If I could kill them in MPI-4 I would. 

> On Aug 10, 2018, at 9:47 AM, Diego Avesani  wrote:
> 
> Dear all,
> I have just implemented MAXLOC, why should they  go away?
> it seems working pretty well.
> 
> thanks
> 
> Diego
> 
> 
>> On 10 August 2018 at 17:39, Nathan Hjelm via users 
>>  wrote:
>> The problem is minloc and maxloc need to go away. better to use a custom op. 
>> 
>>> On Aug 10, 2018, at 9:36 AM, George Bosilca  wrote:
>>> 
>>> You will need to create a special variable that holds 2 entries, one for 
>>> the max operation (with whatever type you need) and an int for the rank of 
>>> the process. The MAXLOC is described on the OMPI man page [1] and you can 
>>> find an example on how to use it on the MPI Forum [2].
>>> 
>>> George.
>>> 
>>> 
>>> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
>>> [2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
>>> 
 On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani  
 wrote:
  Dear all,
 I have probably understood.
 The trick is to use a real vector and to memorize also the rank.
 
 Have I understood correctly?
 thanks
 
 Diego
 
 
> On 10 August 2018 at 17:19, Diego Avesani  wrote:
> Deal all,
> I do not understand how MPI_MINLOC works. it seem locate the maximum in a 
> vector and not the CPU to which the valur belongs to.
> 
> @ray: and if two has the same value?
> 
> thanks 
> 
> 
> Diego
> 
> 
>> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
>> As a dumb scientist, I would just bcast the value I get back to the 
>> group and ask whoever owns it to kindly reply back with its rank.
>>  Ray
>> 
>> 
>>> On 8/10/2018 10:49 AM, Reuti wrote:
>>> Hi,
>>> 
 Am 10.08.2018 um 16:39 schrieb Diego Avesani :
 
 Dear all,
 
 I have a problem:
 In my parallel program each CPU compute a value, let's say eff.
 
 First of all, I would like to know the maximum value. This for me is 
 quite simple,
 I apply the following:
 
 CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
 MPI_MASTER_COMM, MPIworld%iErr)
>>> Would MPI_MAXLOC be sufficient?
>>> 
>>> -- Reuti
>>> 
>>> 
 However, I would like also to know to which CPU that value belongs. Is 
 it possible?
 
 I have set-up a strange procedure but it works only when all the CPUs 
 has different values but fails when two of then has the same eff value.
 
 Is there any intrinsic MPI procedure?
 in anternative,
 do you have some idea?
 
 really, really thanks.
 Diego
 
 
 Diego
 
 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>> 
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
> 
 
 ___
 users mailing list
 users@lists.open-mpi.org
 https://lists.open-mpi.org/mailman/listinfo/users
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>> 
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Diego Avesani
I agree about the names, it is very similar to MIN_LOC and MAX_LOC in
fortran 90.
However, I find difficult to define some algorithm able to do the same
things.



Diego


On 10 August 2018 at 19:03, Nathan Hjelm via users  wrote:

> They do not fit with the rest of the predefined operations (which operate
> on a single basic type) and can easily be implemented as user defined
> operations and get the same performance. Add to that the fixed number of
> tuple types and the fact that some of them are non-contiguous
> (MPI_SHORT_INT) plus the terrible names. If I could kill them in MPI-4 I
> would.
>
> On Aug 10, 2018, at 9:47 AM, Diego Avesani 
> wrote:
>
> Dear all,
> I have just implemented MAXLOC, why should they  go away?
> it seems working pretty well.
>
> thanks
>
> Diego
>
>
> On 10 August 2018 at 17:39, Nathan Hjelm via users <
> users@lists.open-mpi.org> wrote:
>
>> The problem is minloc and maxloc need to go away. better to use a custom
>> op.
>>
>> On Aug 10, 2018, at 9:36 AM, George Bosilca  wrote:
>>
>> You will need to create a special variable that holds 2 entries, one for
>> the max operation (with whatever type you need) and an int for the rank of
>> the process. The MAXLOC is described on the OMPI man page [1] and you can
>> find an example on how to use it on the MPI Forum [2].
>>
>> George.
>>
>>
>> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
>> [2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
>>
>> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani 
>> wrote:
>>
>>>  Dear all,
>>> I have probably understood.
>>> The trick is to use a real vector and to memorize also the rank.
>>>
>>> Have I understood correctly?
>>> thanks
>>>
>>> Diego
>>>
>>>
>>> On 10 August 2018 at 17:19, Diego Avesani 
>>> wrote:
>>>
 Deal all,
 I do not understand how MPI_MINLOC works. it seem locate the maximum in
 a vector and not the CPU to which the valur belongs to.

 @ray: and if two has the same value?

 thanks


 Diego


 On 10 August 2018 at 17:03, Ray Sheppard  wrote:

> As a dumb scientist, I would just bcast the value I get back to the
> group and ask whoever owns it to kindly reply back with its rank.
>  Ray
>
>
> On 8/10/2018 10:49 AM, Reuti wrote:
>
>> Hi,
>>
>> Am 10.08.2018 um 16:39 schrieb Diego Avesani >> >:
>>>
>>> Dear all,
>>>
>>> I have a problem:
>>> In my parallel program each CPU compute a value, let's say eff.
>>>
>>> First of all, I would like to know the maximum value. This for me is
>>> quite simple,
>>> I apply the following:
>>>
>>> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION,
>>> MPI_MAX, MPI_MASTER_COMM, MPIworld%iErr)
>>>
>> Would MPI_MAXLOC be sufficient?
>>
>> -- Reuti
>>
>>
>> However, I would like also to know to which CPU that value belongs.
>>> Is it possible?
>>>
>>> I have set-up a strange procedure but it works only when all the
>>> CPUs has different values but fails when two of then has the same eff 
>>> value.
>>>
>>> Is there any intrinsic MPI procedure?
>>> in anternative,
>>> do you have some idea?
>>>
>>> really, really thanks.
>>> Diego
>>>
>>>
>>> Diego
>>>
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>


>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>>
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>>
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Jeff Squyres (jsquyres) via users
It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time soon.

As far as I know, Nathan hasn't advanced a proposal to kill them in MPI-4, 
meaning that they'll likely continue to be in MPI for at least another 10 
years.  :-)

(And even if they did get killed in MPI-4, implementations like Open MPI would 
continue to keep them in our implementations for quite a while -- i.e., years)


> On Aug 10, 2018, at 1:13 PM, Diego Avesani  wrote:
> 
> I agree about the names, it is very similar to MIN_LOC and MAX_LOC in fortran 
> 90.
> However, I find difficult to define some algorithm able to do the same things.
> 
> 
> 
> Diego
> 
> 
> On 10 August 2018 at 19:03, Nathan Hjelm via users  
> wrote:
> They do not fit with the rest of the predefined operations (which operate on 
> a single basic type) and can easily be implemented as user defined operations 
> and get the same performance. Add to that the fixed number of tuple types and 
> the fact that some of them are non-contiguous (MPI_SHORT_INT) plus the 
> terrible names. If I could kill them in MPI-4 I would. 
> 
> On Aug 10, 2018, at 9:47 AM, Diego Avesani  wrote:
> 
>> Dear all,
>> I have just implemented MAXLOC, why should they  go away?
>> it seems working pretty well.
>> 
>> thanks
>> 
>> Diego
>> 
>> 
>> On 10 August 2018 at 17:39, Nathan Hjelm via users 
>>  wrote:
>> The problem is minloc and maxloc need to go away. better to use a custom op. 
>> 
>> On Aug 10, 2018, at 9:36 AM, George Bosilca  wrote:
>> 
>>> You will need to create a special variable that holds 2 entries, one for 
>>> the max operation (with whatever type you need) and an int for the rank of 
>>> the process. The MAXLOC is described on the OMPI man page [1] and you can 
>>> find an example on how to use it on the MPI Forum [2].
>>> 
>>> George.
>>> 
>>> 
>>> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
>>> [2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
>>> 
>>> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani  
>>> wrote:
>>>  Dear all,
>>> I have probably understood.
>>> The trick is to use a real vector and to memorize also the rank.
>>> 
>>> Have I understood correctly?
>>> thanks
>>> 
>>> Diego
>>> 
>>> 
>>> On 10 August 2018 at 17:19, Diego Avesani  wrote:
>>> Deal all,
>>> I do not understand how MPI_MINLOC works. it seem locate the maximum in a 
>>> vector and not the CPU to which the valur belongs to.
>>> 
>>> @ray: and if two has the same value?
>>> 
>>> thanks 
>>> 
>>> 
>>> Diego
>>> 
>>> 
>>> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
>>> As a dumb scientist, I would just bcast the value I get back to the group 
>>> and ask whoever owns it to kindly reply back with its rank.
>>>  Ray
>>> 
>>> 
>>> On 8/10/2018 10:49 AM, Reuti wrote:
>>> Hi,
>>> 
>>> Am 10.08.2018 um 16:39 schrieb Diego Avesani :
>>> 
>>> Dear all,
>>> 
>>> I have a problem:
>>> In my parallel program each CPU compute a value, let's say eff.
>>> 
>>> First of all, I would like to know the maximum value. This for me is quite 
>>> simple,
>>> I apply the following:
>>> 
>>> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
>>> MPI_MASTER_COMM, MPIworld%iErr)
>>> Would MPI_MAXLOC be sufficient?
>>> 
>>> -- Reuti
>>> 
>>> 
>>> However, I would like also to know to which CPU that value belongs. Is it 
>>> possible?
>>> 
>>> I have set-up a strange procedure but it works only when all the CPUs has 
>>> different values but fails when two of then has the same eff value.
>>> 
>>> Is there any intrinsic MPI procedure?
>>> in anternative,
>>> do you have some idea?
>>> 
>>> really, really thanks.
>>> Diego
>>> 
>>> 
>>> Diego
>>> 
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>> 
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>> 
>>> 
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>>> ___
>>> users mailing list
>>> users@lists.open-mpi.org
>>> https://lists.open-mpi.org/mailman/listinfo/users
>> 
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
>> 
>> ___
>> users mailing list
>> users@lists.open-mpi.org
>> https://lists.open-mpi.org/mailman/listinfo/users
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
> 
> ___
> users m

Re: [OMPI users] MPI group and stuck in communication

2018-08-10 Thread Jeff Squyres (jsquyres) via users
I'm not quite clear what the problem is that you're running in to -- you just 
said that there is "some problem with MPI_barrier".

What problem, exactly, is happening with your code?  Be as precise and specific 
as possible.

It's kinda hard to tell what is happening in the code snippet below because 
there's a lot of variables used that are not defined in your snippet -- so we 
have no way of knowing what is going on just from these few lines of code.



> On Aug 10, 2018, at 11:52 AM, Diego Avesani  wrote:
> 
> Dear all,
> 
> I have a MPI program with three groups with some CPUs in common.
> 
> I have some problem with MPI_barrier.
> 
> I try to make my self clear. I have three communicator:
> INTEGER  :: MPI_GROUP_WORLD
> INTEGER  :: MPI_LOCAL_COMM
> INTEGER  :: MPI_MASTER_COMM
> 
> when I apply:
>  IF(MPIworld%rank.EQ.0) WRITE(*,*)
> 
>  CALL MPI_Barrier(MPI_COMM_WORLD,MPIworld%iErr)
> 
>  IF(MPI_COMM_NULL .NE. MPI_MASTER_COMM)THEN
>WRITE(*,'(A12,I3,A4,F10.5)') 'master rank',MPImaster%rank,'eff',eff
>  ENDIF
> 
>  CALL MPI_Barrier(MPI_COMM_WORLD,MPIworld%iErr)
> 
>  IF(MPIworld%rank.EQ.0) WRITE(*,*)
> 
> What could be the problem?
> Thanks a lot,
> Diego
> 
> 
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users


-- 
Jeff Squyres
jsquy...@cisco.com

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Jeff Hammond
This thread is a perfect illustration of why MPI Forum participants should
not flippantly discuss feature deprecation in discussion with users.  Users
who are not familiar with the MPI Forum process are not able to evaluate
whether such proposals are serious or have any hope of succeeding and
therefore may be unnecessarily worried about their code breaking in the
future, when that future is 5 to infinity years away.

If someone wants to deprecate MPI_{MIN,MAX}LOC, they should start that
discussion on https://github.com/mpi-forum/mpi-issues/issues or
https://lists.mpi-forum.org/mailman/listinfo/mpiwg-coll.

Jeff

On Fri, Aug 10, 2018 at 10:27 AM, Jeff Squyres (jsquyres) via users <
users@lists.open-mpi.org> wrote:

> It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time soon.
>
> As far as I know, Nathan hasn't advanced a proposal to kill them in MPI-4,
> meaning that they'll likely continue to be in MPI for at least another 10
> years.  :-)
>
> (And even if they did get killed in MPI-4, implementations like Open MPI
> would continue to keep them in our implementations for quite a while --
> i.e., years)
>
>
> > On Aug 10, 2018, at 1:13 PM, Diego Avesani 
> wrote:
> >
> > I agree about the names, it is very similar to MIN_LOC and MAX_LOC in
> fortran 90.
> > However, I find difficult to define some algorithm able to do the same
> things.
> >
> >
> >
> > Diego
> >
> >
> > On 10 August 2018 at 19:03, Nathan Hjelm via users <
> users@lists.open-mpi.org> wrote:
> > They do not fit with the rest of the predefined operations (which
> operate on a single basic type) and can easily be implemented as user
> defined operations and get the same performance. Add to that the fixed
> number of tuple types and the fact that some of them are non-contiguous
> (MPI_SHORT_INT) plus the terrible names. If I could kill them in MPI-4 I
> would.
> >
> > On Aug 10, 2018, at 9:47 AM, Diego Avesani 
> wrote:
> >
> >> Dear all,
> >> I have just implemented MAXLOC, why should they  go away?
> >> it seems working pretty well.
> >>
> >> thanks
> >>
> >> Diego
> >>
> >>
> >> On 10 August 2018 at 17:39, Nathan Hjelm via users <
> users@lists.open-mpi.org> wrote:
> >> The problem is minloc and maxloc need to go away. better to use a
> custom op.
> >>
> >> On Aug 10, 2018, at 9:36 AM, George Bosilca 
> wrote:
> >>
> >>> You will need to create a special variable that holds 2 entries, one
> for the max operation (with whatever type you need) and an int for the rank
> of the process. The MAXLOC is described on the OMPI man page [1] and you
> can find an example on how to use it on the MPI Forum [2].
> >>>
> >>> George.
> >>>
> >>>
> >>> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
> >>> [2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
> >>>
> >>> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani <
> diego.aves...@gmail.com> wrote:
> >>>  Dear all,
> >>> I have probably understood.
> >>> The trick is to use a real vector and to memorize also the rank.
> >>>
> >>> Have I understood correctly?
> >>> thanks
> >>>
> >>> Diego
> >>>
> >>>
> >>> On 10 August 2018 at 17:19, Diego Avesani 
> wrote:
> >>> Deal all,
> >>> I do not understand how MPI_MINLOC works. it seem locate the maximum
> in a vector and not the CPU to which the valur belongs to.
> >>>
> >>> @ray: and if two has the same value?
> >>>
> >>> thanks
> >>>
> >>>
> >>> Diego
> >>>
> >>>
> >>> On 10 August 2018 at 17:03, Ray Sheppard  wrote:
> >>> As a dumb scientist, I would just bcast the value I get back to the
> group and ask whoever owns it to kindly reply back with its rank.
> >>>  Ray
> >>>
> >>>
> >>> On 8/10/2018 10:49 AM, Reuti wrote:
> >>> Hi,
> >>>
> >>> Am 10.08.2018 um 16:39 schrieb Diego Avesani  >:
> >>>
> >>> Dear all,
> >>>
> >>> I have a problem:
> >>> In my parallel program each CPU compute a value, let's say eff.
> >>>
> >>> First of all, I would like to know the maximum value. This for me is
> quite simple,
> >>> I apply the following:
> >>>
> >>> CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX,
> MPI_MASTER_COMM, MPIworld%iErr)
> >>> Would MPI_MAXLOC be sufficient?
> >>>
> >>> -- Reuti
> >>>
> >>>
> >>> However, I would like also to know to which CPU that value belongs. Is
> it possible?
> >>>
> >>> I have set-up a strange procedure but it works only when all the CPUs
> has different values but fails when two of then has the same eff value.
> >>>
> >>> Is there any intrinsic MPI procedure?
> >>> in anternative,
> >>> do you have some idea?
> >>>
> >>> really, really thanks.
> >>> Diego
> >>>
> >>>
> >>> Diego
> >>>
> >>> ___
> >>> users mailing list
> >>> users@lists.open-mpi.org
> >>> https://lists.open-mpi.org/mailman/listinfo/users
> >>> ___
> >>> users mailing list
> >>> users@lists.open-mpi.org
> >>> https://lists.open-mpi.org/mailman/listinfo/users
> >>>
> >>> __

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Gus Correa

Hmmm ... no, no, no!
Keep it secret why!?!?

Diego Avesani's questions and questioning
may have saved us users from getting a
useful feature deprecated in the name of code elegance.
Code elegance may be very cherished by developers,
but it is not necessarily helpful to users,
specially if it strips off useful functionality.

My cheap 2 cents from a user.
Gus Correa


On 08/10/2018 01:52 PM, Jeff Hammond wrote:
This thread is a perfect illustration of why MPI Forum participants 
should not flippantly discuss feature deprecation in discussion with 
users.  Users who are not familiar with the MPI Forum process are not 
able to evaluate whether such proposals are serious or have any hope of 
succeeding and therefore may be unnecessarily worried about their code 
breaking in the future, when that future is 5 to infinity years away.


If someone wants to deprecate MPI_{MIN,MAX}LOC, they should start that 
discussion on https://github.com/mpi-forum/mpi-issues/issues or 
https://lists.mpi-forum.org/mailman/listinfo/mpiwg-coll.


Jeff

On Fri, Aug 10, 2018 at 10:27 AM, Jeff Squyres (jsquyres) via users 
mailto:users@lists.open-mpi.org>> wrote:


It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time
soon.

As far as I know, Nathan hasn't advanced a proposal to kill them in
MPI-4, meaning that they'll likely continue to be in MPI for at
least another 10 years.  :-)

(And even if they did get killed in MPI-4, implementations like Open
MPI would continue to keep them in our implementations for quite a
while -- i.e., years)


 > On Aug 10, 2018, at 1:13 PM, Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >
 > I agree about the names, it is very similar to MIN_LOC and
MAX_LOC in fortran 90.
 > However, I find difficult to define some algorithm able to do the
same things.
 >
 >
 >
 > Diego
 >
 >
 > On 10 August 2018 at 19:03, Nathan Hjelm via users
mailto:users@lists.open-mpi.org>> wrote:
 > They do not fit with the rest of the predefined operations (which
operate on a single basic type) and can easily be implemented as
user defined operations and get the same performance. Add to that
the fixed number of tuple types and the fact that some of them are
non-contiguous (MPI_SHORT_INT) plus the terrible names. If I could
kill them in MPI-4 I would.
 >
 > On Aug 10, 2018, at 9:47 AM, Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >
 >> Dear all,
 >> I have just implemented MAXLOC, why should they  go away?
 >> it seems working pretty well.
 >>
 >> thanks
 >>
 >> Diego
 >>
 >>
 >> On 10 August 2018 at 17:39, Nathan Hjelm via users
mailto:users@lists.open-mpi.org>> wrote:
 >> The problem is minloc and maxloc need to go away. better to use
a custom op.
 >>
 >> On Aug 10, 2018, at 9:36 AM, George Bosilca mailto:bosi...@icl.utk.edu>> wrote:
 >>
 >>> You will need to create a special variable that holds 2
entries, one for the max operation (with whatever type you need) and
an int for the rank of the process. The MAXLOC is described on the
OMPI man page [1] and you can find an example on how to use it on
the MPI Forum [2].
 >>>
 >>> George.
 >>>
 >>>
 >>> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php

 >>> [2]
https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html

 >>>
 >>> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >>>  Dear all,
 >>> I have probably understood.
 >>> The trick is to use a real vector and to memorize also the rank.
 >>>
 >>> Have I understood correctly?
 >>> thanks
 >>>
 >>> Diego
 >>>
 >>>
 >>> On 10 August 2018 at 17:19, Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >>> Deal all,
 >>> I do not understand how MPI_MINLOC works. it seem locate the
maximum in a vector and not the CPU to which the valur belongs to.
 >>>
 >>> @ray: and if two has the same value?
 >>>
 >>> thanks
 >>>
 >>>
 >>> Diego
 >>>
 >>>
 >>> On 10 August 2018 at 17:03, Ray Sheppard mailto:rshep...@iu.edu>> wrote:
 >>> As a dumb scientist, I would just bcast the value I get back to
the group and ask whoever owns it to kindly reply back with its rank.
 >>>      Ray
 >>>
 >>>
 >>> On 8/10/2018 10:49 AM, Reuti wrote:
 >>> Hi,
 >>>
 >>> Am 10.08.2018 um 16:39 schrieb Diego Avesani
mailto:diego.aves...@gmail.com>>:
 >>>
 >>> Dear all,
 >>>
 >>> I have a problem:
 >>> In my parallel program each CPU compute a value, let's say eff.
 >>>
 >>> First of all, I would like to know the maximum value. This for
me

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Gus Correa

On 08/10/2018 01:27 PM, Jeff Squyres (jsquyres) via users wrote:

It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time soon.

As far as I know, Nathan hasn't advanced a proposal to kill them in MPI-4, 
meaning that they'll likely continue to be in MPI for at least another 10 
years.  :-)

(And even if they did get killed in MPI-4, implementations like Open MPI would 
continue to keep them in our implementations for quite a while -- i.e., years)



Yeah!
Two thumbs up!




On Aug 10, 2018, at 1:13 PM, Diego Avesani  wrote:

I agree about the names, it is very similar to MIN_LOC and MAX_LOC in fortran 
90.
However, I find difficult to define some algorithm able to do the same things.



Diego


On 10 August 2018 at 19:03, Nathan Hjelm via users  
wrote:
They do not fit with the rest of the predefined operations (which operate on a 
single basic type) and can easily be implemented as user defined operations and 
get the same performance. Add to that the fixed number of tuple types and the 
fact that some of them are non-contiguous (MPI_SHORT_INT) plus the terrible 
names. If I could kill them in MPI-4 I would.

On Aug 10, 2018, at 9:47 AM, Diego Avesani  wrote:


Dear all,
I have just implemented MAXLOC, why should they  go away?
it seems working pretty well.

thanks

Diego


On 10 August 2018 at 17:39, Nathan Hjelm via users  
wrote:
The problem is minloc and maxloc need to go away. better to use a custom op.

On Aug 10, 2018, at 9:36 AM, George Bosilca  wrote:


You will need to create a special variable that holds 2 entries, one for the 
max operation (with whatever type you need) and an int for the rank of the 
process. The MAXLOC is described on the OMPI man page [1] and you can find an 
example on how to use it on the MPI Forum [2].

George.


[1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
[2] https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html

On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani  wrote:
  Dear all,
I have probably understood.
The trick is to use a real vector and to memorize also the rank.

Have I understood correctly?
thanks

Diego


On 10 August 2018 at 17:19, Diego Avesani  wrote:
Deal all,
I do not understand how MPI_MINLOC works. it seem locate the maximum in a 
vector and not the CPU to which the valur belongs to.

@ray: and if two has the same value?

thanks


Diego


On 10 August 2018 at 17:03, Ray Sheppard  wrote:
As a dumb scientist, I would just bcast the value I get back to the group and 
ask whoever owns it to kindly reply back with its rank.
  Ray


On 8/10/2018 10:49 AM, Reuti wrote:
Hi,

Am 10.08.2018 um 16:39 schrieb Diego Avesani :

Dear all,

I have a problem:
In my parallel program each CPU compute a value, let's say eff.

First of all, I would like to know the maximum value. This for me is quite 
simple,
I apply the following:

CALL MPI_ALLREDUCE(eff, effmaxWorld, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 
MPI_MASTER_COMM, MPIworld%iErr)
Would MPI_MAXLOC be sufficient?

-- Reuti


However, I would like also to know to which CPU that value belongs. Is it 
possible?

I have set-up a strange procedure but it works only when all the CPUs has 
different values but fails when two of then has the same eff value.

Is there any intrinsic MPI procedure?
in anternative,
do you have some idea?

really, really thanks.
Diego


Diego

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users





___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users


Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Jeff Squyres (jsquyres) via users
Jeff H. was referring to Nathan's offhand remark about his desire to kill the 
MPI_MINLOC / MPI_MAXLOC operations.  I think Jeff H's point is that this is 
just Nathan's opinion -- as far as I know, there is no proposal in front of the 
MPI Forum to actively deprecate MPI_MINLOC or MPI_MAXLOC.  Speaking this 
opinion on a public mailing list with no other context created a bit of 
confusion.

The Forum is quite transparent in what it does -- e.g., anyone is allowed to 
come to its meetings and hear (and participate in!) all the deliberations, etc. 
 But speaking off-the-cuff about something that *might* happen *someday* that 
would have impact on real users and real codes -- that might have caused a 
little needless confusion.



> On Aug 10, 2018, at 2:11 PM, Gus Correa  wrote:
> 
> Hmmm ... no, no, no!
> Keep it secret why!?!?
> 
> Diego Avesani's questions and questioning
> may have saved us users from getting a
> useful feature deprecated in the name of code elegance.
> Code elegance may be very cherished by developers,
> but it is not necessarily helpful to users,
> specially if it strips off useful functionality.
> 
> My cheap 2 cents from a user.
> Gus Correa
> 
> 
> On 08/10/2018 01:52 PM, Jeff Hammond wrote:
>> This thread is a perfect illustration of why MPI Forum participants should 
>> not flippantly discuss feature deprecation in discussion with users.  Users 
>> who are not familiar with the MPI Forum process are not able to evaluate 
>> whether such proposals are serious or have any hope of succeeding and 
>> therefore may be unnecessarily worried about their code breaking in the 
>> future, when that future is 5 to infinity years away.
>> If someone wants to deprecate MPI_{MIN,MAX}LOC, they should start that 
>> discussion on https://github.com/mpi-forum/mpi-issues/issues or 
>> https://lists.mpi-forum.org/mailman/listinfo/mpiwg-coll.
>> Jeff
>> On Fri, Aug 10, 2018 at 10:27 AM, Jeff Squyres (jsquyres) via users 
>> mailto:users@lists.open-mpi.org>> wrote:
>>It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time
>>soon.
>>As far as I know, Nathan hasn't advanced a proposal to kill them in
>>MPI-4, meaning that they'll likely continue to be in MPI for at
>>least another 10 years.  :-)
>>(And even if they did get killed in MPI-4, implementations like Open
>>MPI would continue to keep them in our implementations for quite a
>>while -- i.e., years)
>> > On Aug 10, 2018, at 1:13 PM, Diego Avesani
>>mailto:diego.aves...@gmail.com>> wrote:
>> >
>> > I agree about the names, it is very similar to MIN_LOC and
>>MAX_LOC in fortran 90.
>> > However, I find difficult to define some algorithm able to do the
>>same things.
>> >
>> >
>> >
>> > Diego
>> >
>> >
>> > On 10 August 2018 at 19:03, Nathan Hjelm via users
>>mailto:users@lists.open-mpi.org>> wrote:
>> > They do not fit with the rest of the predefined operations (which
>>operate on a single basic type) and can easily be implemented as
>>user defined operations and get the same performance. Add to that
>>the fixed number of tuple types and the fact that some of them are
>>non-contiguous (MPI_SHORT_INT) plus the terrible names. If I could
>>kill them in MPI-4 I would.
>> >
>> > On Aug 10, 2018, at 9:47 AM, Diego Avesani
>>mailto:diego.aves...@gmail.com>> wrote:
>> >
>> >> Dear all,
>> >> I have just implemented MAXLOC, why should they  go away?
>> >> it seems working pretty well.
>> >>
>> >> thanks
>> >>
>> >> Diego
>> >>
>> >>
>> >> On 10 August 2018 at 17:39, Nathan Hjelm via users
>>mailto:users@lists.open-mpi.org>> wrote:
>> >> The problem is minloc and maxloc need to go away. better to use
>>a custom op.
>> >>
>> >> On Aug 10, 2018, at 9:36 AM, George Bosilca >> wrote:
>> >>
>> >>> You will need to create a special variable that holds 2
>>entries, one for the max operation (with whatever type you need) and
>>an int for the rank of the process. The MAXLOC is described on the
>>OMPI man page [1] and you can find an example on how to use it on
>>the MPI Forum [2].
>> >>>
>> >>> George.
>> >>>
>> >>>
>> >>> [1] https://www.open-mpi.org/doc/v2.0/man3/MPI_Reduce.3.php
>>
>> >>> [2]
>>https://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node79.html
>>
>> >>>
>> >>> On Fri, Aug 10, 2018 at 11:25 AM Diego Avesani
>>mailto:diego.aves...@gmail.com>> wrote:
>> >>>  Dear all,
>> >>> I have probably understood.
>> >>> The trick is to use a real vector and to memorize also the rank.
>> >>>
>> >>> Have I understood correctly?
>> >>> thanks
>> >>>
>> >>> Diego
>> >>>
>> >>>
>> >>> On 10 August 2018 

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Gus Correa

Hi Jeff S.

OK, then I misunderstood Jeff H.
Sorry about that, Jeff H..

Nevertheless, Diego Avesani has certainly a point.
And it is the point of view of an user,
something that hopefully matters.
I'd add to Diego's arguments
that maxloc, minloc, and friends are part of
Fortran, Matlab, etc.
A science/engineering programmer expects it to be available,
not to have to be reinvented from scratch,
both on the baseline language, as well as in MPI.

In addition,
MPI developers cannot expect the typical MPI user to keep track
of what goes on in the MPI Forum.
I certainly don't have either the skill or the time for it.
However, developers can make an effort to listen to the chatter in the
various MPI user's list, before making any decision of stripping off 
functionality, specially such a basic one as minloc, maxloc.


My two cents from a pedestrian MPI user,
who thinks minloc and maxloc are great,
knows nothing about the MPI Forum protocols and activities,
but hopes the Forum pays attention to users' needs.

Gus Correa

PS - Jeff S.: Please, bring Diego's request to the Forum! Add my vote 
too.  :)



On 08/10/2018 02:19 PM, Jeff Squyres (jsquyres) via users wrote:

Jeff H. was referring to Nathan's offhand remark about his desire to kill the 
MPI_MINLOC / MPI_MAXLOC operations.  I think Jeff H's point is that this is 
just Nathan's opinion -- as far as I know, there is no proposal in front of the 
MPI Forum to actively deprecate MPI_MINLOC or MPI_MAXLOC.  Speaking this 
opinion on a public mailing list with no other context created a bit of 
confusion.

The Forum is quite transparent in what it does -- e.g., anyone is allowed to 
come to its meetings and hear (and participate in!) all the deliberations, etc. 
 But speaking off-the-cuff about something that *might* happen *someday* that 
would have impact on real users and real codes -- that might have caused a 
little needless confusion.




On Aug 10, 2018, at 2:11 PM, Gus Correa  wrote:

Hmmm ... no, no, no!
Keep it secret why!?!?

Diego Avesani's questions and questioning
may have saved us users from getting a
useful feature deprecated in the name of code elegance.
Code elegance may be very cherished by developers,
but it is not necessarily helpful to users,
specially if it strips off useful functionality.

My cheap 2 cents from a user.
Gus Correa


On 08/10/2018 01:52 PM, Jeff Hammond wrote:

This thread is a perfect illustration of why MPI Forum participants should not 
flippantly discuss feature deprecation in discussion with users.  Users who are 
not familiar with the MPI Forum process are not able to evaluate whether such 
proposals are serious or have any hope of succeeding and therefore may be 
unnecessarily worried about their code breaking in the future, when that future 
is 5 to infinity years away.
If someone wants to deprecate MPI_{MIN,MAX}LOC, they should start that 
discussion on https://github.com/mpi-forum/mpi-issues/issues or 
https://lists.mpi-forum.org/mailman/listinfo/mpiwg-coll.
Jeff
On Fri, Aug 10, 2018 at 10:27 AM, Jeff Squyres (jsquyres) via users 
mailto:users@lists.open-mpi.org>> wrote:
It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time
soon.
As far as I know, Nathan hasn't advanced a proposal to kill them in
MPI-4, meaning that they'll likely continue to be in MPI for at
least another 10 years.  :-)
(And even if they did get killed in MPI-4, implementations like Open
MPI would continue to keep them in our implementations for quite a
while -- i.e., years)
 > On Aug 10, 2018, at 1:13 PM, Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >
 > I agree about the names, it is very similar to MIN_LOC and
MAX_LOC in fortran 90.
 > However, I find difficult to define some algorithm able to do the
same things.
 >
 >
 >
 > Diego
 >
 >
 > On 10 August 2018 at 19:03, Nathan Hjelm via users
mailto:users@lists.open-mpi.org>> wrote:
 > They do not fit with the rest of the predefined operations (which
operate on a single basic type) and can easily be implemented as
user defined operations and get the same performance. Add to that
the fixed number of tuple types and the fact that some of them are
non-contiguous (MPI_SHORT_INT) plus the terrible names. If I could
kill them in MPI-4 I would.
 >
 > On Aug 10, 2018, at 9:47 AM, Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >
 >> Dear all,
 >> I have just implemented MAXLOC, why should they  go away?
 >> it seems working pretty well.
 >>
 >> thanks
 >>
 >> Diego
 >>
 >>
 >> On 10 August 2018 at 17:39, Nathan Hjelm via users
mailto:users@lists.open-mpi.org>> wrote:
 >> The problem is minloc and maxloc need to go away. better to use
a custom op.
 >>
 >> On Aug 10, 2018, at 9:36 AM, George Bosilca mailto:bosi...@icl.utk.edu>> wrote:
 >>
 >>> You will need to create a special var

Re: [OMPI users] know which CPU has the maximum value

2018-08-10 Thread Jeff Squyres (jsquyres) via users
I think that your reasons are very valid, and probably why the Forum a) 
invented MPI_MINLOC/MAXLOC in the first place, and b) why no one has put forth 
a proposal to get rid of them.

:-)


> On Aug 10, 2018, at 2:42 PM, Gus Correa  wrote:
> 
> Hi Jeff S.
> 
> OK, then I misunderstood Jeff H.
> Sorry about that, Jeff H..
> 
> Nevertheless, Diego Avesani has certainly a point.
> And it is the point of view of an user,
> something that hopefully matters.
> I'd add to Diego's arguments
> that maxloc, minloc, and friends are part of
> Fortran, Matlab, etc.
> A science/engineering programmer expects it to be available,
> not to have to be reinvented from scratch,
> both on the baseline language, as well as in MPI.
> 
> In addition,
> MPI developers cannot expect the typical MPI user to keep track
> of what goes on in the MPI Forum.
> I certainly don't have either the skill or the time for it.
> However, developers can make an effort to listen to the chatter in the
> various MPI user's list, before making any decision of stripping off 
> functionality, specially such a basic one as minloc, maxloc.
> 
> My two cents from a pedestrian MPI user,
> who thinks minloc and maxloc are great,
> knows nothing about the MPI Forum protocols and activities,
> but hopes the Forum pays attention to users' needs.
> 
> Gus Correa
> 
> PS - Jeff S.: Please, bring Diego's request to the Forum! Add my vote too.  :)
> 
> 
> On 08/10/2018 02:19 PM, Jeff Squyres (jsquyres) via users wrote:
>> Jeff H. was referring to Nathan's offhand remark about his desire to kill 
>> the MPI_MINLOC / MPI_MAXLOC operations.  I think Jeff H's point is that this 
>> is just Nathan's opinion -- as far as I know, there is no proposal in front 
>> of the MPI Forum to actively deprecate MPI_MINLOC or MPI_MAXLOC.  Speaking 
>> this opinion on a public mailing list with no other context created a bit of 
>> confusion.
>> The Forum is quite transparent in what it does -- e.g., anyone is allowed to 
>> come to its meetings and hear (and participate in!) all the deliberations, 
>> etc.  But speaking off-the-cuff about something that *might* happen 
>> *someday* that would have impact on real users and real codes -- that might 
>> have caused a little needless confusion.
>>> On Aug 10, 2018, at 2:11 PM, Gus Correa  wrote:
>>> 
>>> Hmmm ... no, no, no!
>>> Keep it secret why!?!?
>>> 
>>> Diego Avesani's questions and questioning
>>> may have saved us users from getting a
>>> useful feature deprecated in the name of code elegance.
>>> Code elegance may be very cherished by developers,
>>> but it is not necessarily helpful to users,
>>> specially if it strips off useful functionality.
>>> 
>>> My cheap 2 cents from a user.
>>> Gus Correa
>>> 
>>> 
>>> On 08/10/2018 01:52 PM, Jeff Hammond wrote:
 This thread is a perfect illustration of why MPI Forum participants should 
 not flippantly discuss feature deprecation in discussion with users.  
 Users who are not familiar with the MPI Forum process are not able to 
 evaluate whether such proposals are serious or have any hope of succeeding 
 and therefore may be unnecessarily worried about their code breaking in 
 the future, when that future is 5 to infinity years away.
 If someone wants to deprecate MPI_{MIN,MAX}LOC, they should start that 
 discussion on https://github.com/mpi-forum/mpi-issues/issues or 
 https://lists.mpi-forum.org/mailman/listinfo/mpiwg-coll.
 Jeff
 On Fri, Aug 10, 2018 at 10:27 AM, Jeff Squyres (jsquyres) via users 
 mailto:users@lists.open-mpi.org>> wrote:
It is unlikely that MPI_MINLOC and MPI_MAXLOC will go away any time
soon.
As far as I know, Nathan hasn't advanced a proposal to kill them in
MPI-4, meaning that they'll likely continue to be in MPI for at
least another 10 years.  :-)
(And even if they did get killed in MPI-4, implementations like Open
MPI would continue to keep them in our implementations for quite a
while -- i.e., years)
 > On Aug 10, 2018, at 1:13 PM, Diego Avesani
mailto:diego.aves...@gmail.com>> wrote:
 >
 > I agree about the names, it is very similar to MIN_LOC and
MAX_LOC in fortran 90.
 > However, I find difficult to define some algorithm able to do the
same things.
 >
 >
 >
 > Diego
 >
 >
 > On 10 August 2018 at 19:03, Nathan Hjelm via users
mailto:users@lists.open-mpi.org>> wrote:
 > They do not fit with the rest of the predefined operations (which
operate on a single basic type) and can easily be implemented as
user defined operations and get the same performance. Add to that
the fixed number of tuple types and the fact that some of them are
non-contiguous (MPI_SHORT_INT) plus the terrible names. If I could
kill them in MPI-4 I would.
 >
 > On Aug 10, 2018, at 9:47 AM, Diego

Re: [OMPI users] MPI group and stuck in communication

2018-08-10 Thread Diego Avesani
Dear Jeff,
you are right.

The question is:
Is it possible to have a barrier for all CPUs despite they belong to
different group?
If the answer is yes I will go in more details.

Thank a lot

Diego


On 10 August 2018 at 19:49, Jeff Squyres (jsquyres) via users <
users@lists.open-mpi.org> wrote:

> I'm not quite clear what the problem is that you're running in to -- you
> just said that there is "some problem with MPI_barrier".
>
> What problem, exactly, is happening with your code?  Be as precise and
> specific as possible.
>
> It's kinda hard to tell what is happening in the code snippet below
> because there's a lot of variables used that are not defined in your
> snippet -- so we have no way of knowing what is going on just from these
> few lines of code.
>
>
>
> > On Aug 10, 2018, at 11:52 AM, Diego Avesani 
> wrote:
> >
> > Dear all,
> >
> > I have a MPI program with three groups with some CPUs in common.
> >
> > I have some problem with MPI_barrier.
> >
> > I try to make my self clear. I have three communicator:
> > INTEGER  :: MPI_GROUP_WORLD
> > INTEGER  :: MPI_LOCAL_COMM
> > INTEGER  :: MPI_MASTER_COMM
> >
> > when I apply:
> >  IF(MPIworld%rank.EQ.0) WRITE(*,*)
> >
> >  CALL MPI_Barrier(MPI_COMM_WORLD,MPIworld%iErr)
> >
> >  IF(MPI_COMM_NULL .NE. MPI_MASTER_COMM)THEN
> >WRITE(*,'(A12,I3,A4,F10.5)') 'master
> rank',MPImaster%rank,'eff',eff
> >  ENDIF
> >
> >  CALL MPI_Barrier(MPI_COMM_WORLD,MPIworld%iErr)
> >
> >  IF(MPIworld%rank.EQ.0) WRITE(*,*)
> >
> > What could be the problem?
> > Thanks a lot,
> > Diego
> >
> >
> > ___
> > users mailing list
> > users@lists.open-mpi.org
> > https://lists.open-mpi.org/mailman/listinfo/users
>
>
> --
> Jeff Squyres
> jsquy...@cisco.com
>
> ___
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users
>
___
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users