Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] Fwd: Bug in MPI.MINLOC with Java binding
From: Ralph Castain (rhc_at_[hidden])
Date: 2013-11-12 14:46:09


This was resolved off-list, but I'm reposting it here so it (a) resides in our archives, and (b) is available for others with similar questions about the revised Java bindings.

Ralph

Begin forwarded message:

> From: "Jose E. Roman" <jroman_at_[hidden]>
> Subject: Fwd: [OMPI devel] Bug in MPI.MINLOC with Java binding
> Date: November 11, 2013 at 11:05:12 PM PST
> To: Ralph Castain <rhc_at_[hidden]>
>
>
>
> Inicio del mensaje reenviado:
>
>> De: Oscar Vega-Gisbert <ovega_at_[hidden]>
>> Fecha: 12 de noviembre de 2013 00:08:41 GMT+01:00
>> Para: esaliya_at_[hidden]
>> Cc: Jose Roman <jroman_at_[hidden]>, Jeff Squyres <jsquyres_at_[hidden]>
>> Asunto: Re: Fwd: [OMPI devel] Bug in MPI.MINLOC with Java binding
>>
>> Hi Saliya,
>>
>> In the in the previous versions of the library, MAXLOC and MINLOC were implemented in Java and it was possible to use Java int arrays. But now the implementation is native and you can not use Java int because on some platforms the int size (in the C side) may be different.
>>
>> You must use the struct 'mpi.Int2' as you can see in your corrected example.
>>
>> Regards,
>> Oscar
>>
>>
>>> From: Saliya Ekanayake <esaliya_at_[hidden]<mailto:esaliya_at_[hidden]>>
>>> Subject: [OMPI devel] Bug in MPI.MINLOC with Java binding
>>> Date: November 11, 2013 3:35:23 PM EST
>>> To: <devel_at_[hidden]<mailto:devel_at_[hidden]>>
>>> Reply-To: Open MPI Developers <devel_at_[hidden]<mailto:devel_at_[hidden]>>
>>>
>>> Hi,
>>>
>>> I've been using nightly tarball openmpi-1.9a1r28919 with Java binding and it had a bug in its MINLOC implementation (Minloc.java). Essentially, the following line,
>>>
>>> out_array [outdisp + 1] = in_array [outdisp + 1] ;
>>>
>>> should be changed to
>>>
>>> out_array [outdisp + 1] = in_array [indisp + 1] ;
>>>
>>> The same should be done for MAXLOC (Maxloc.java) implementation as well. I tested with the change and both MINLOC and MAXLOC worked as expected afterwards.
>>>
>>> However, these files are no longer available in the latest trunk and it seems the API for collective operations have changed as well. Still MINLOC (and MAXLOC) does not work as expected. I've attached a sample code to reproduce the issue and an output from it (for MINLOC).
>>>
>>> I am running on 64bit Ubuntu 12.04.
>>>
>>> Any suggestions?
>>>
>>> Thank you in advance,
>>> Saliya
>>>
>>> --
>>> Saliya Ekanayake esaliya_at_[hidden]<mailto:esaliya_at_[hidden]>
>>> http://saliya.org>
>>> _______________________________________________
>>> devel mailing list
>>> devel_at_[hidden]<mailto:devel_at_[hidden]>
>>>
http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>
>>>
>>> --
>>> Jeff Squyres
>>> jsquyres_at_[hidden]<mailto:jsquyres_at_[hidden]>
>>> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/
>>>
>>>
>>
>>
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>