Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-23 Thread Oscar Vega-Gisbert
El 22/08/14 21:31, Saliya Ekanayake escribió: My apologies, I think I wasn't clear on my question. My question was, given that copying of data is necessary in both approaches (either by the system with arrays or by programmer with buffers), is there a foreseeable performance difference in

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Saliya Ekanayake
Please find inline comments. On Fri, Aug 22, 2014 at 3:45 PM, Rob Latham wrote: > > > On 08/22/2014 02:40 PM, Saliya Ekanayake wrote: > >> Yes, these are all MPI_DOUBLE >> > > well, yeah, but since you are talking about copying into a "direct buffer" > there must be

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Rob Latham
On 08/22/2014 02:40 PM, Saliya Ekanayake wrote: Yes, these are all MPI_DOUBLE well, yeah, but since you are talking about copying into a "direct buffer" there must be something tricker about the layout than just N*M doubles. sometimes people allocate 2d arrays by allocating one array of

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Saliya Ekanayake
Yes, these are all MPI_DOUBLE On Fri, Aug 22, 2014 at 3:38 PM, Rob Latham wrote: > > > On 08/22/2014 10:10 AM, Saliya Ekanayake wrote: > >> Hi, >> >> I've a quick question about the usage of Java binding. >> >> Say there's a 2 dimensional double array (size m x n) that needs

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Rob Latham
On 08/22/2014 10:10 AM, Saliya Ekanayake wrote: Hi, I've a quick question about the usage of Java binding. Say there's a 2 dimensional double array (size m x n) that needs to be sent to another rank. I see two options to get this done, 1. Copy values to a direct buffer of size m*n and send

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Saliya Ekanayake
My apologies, I think I wasn't clear on my question. My question was, given that copying of data is necessary in both approaches (either by the system with arrays or by programmer with buffers), is there a foreseeable performance difference in terms of performance considering the time it takes for

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Oscar Vega-Gisbert
El 22/08/14 20:44, Saliya Ekanayake escribió: Thank you Oscar for the detailed information, but I'm still wondering how would the copying in 2 would be different than what's done here with copying to a buffer. If you have a buffer array like this: double buffer[] = new double[m * n];

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Saliya Ekanayake
Thank you Oscar for the detailed information, but I'm still wondering how would the copying in 2 would be different than what's done here with copying to a buffer. On Fri, Aug 22, 2014 at 2:17 PM, Oscar Vega-Gisbert wrote: > El 22/08/14 17:10, Saliya Ekanayake escribió: > >

Re: [OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Oscar Vega-Gisbert
El 22/08/14 17:10, Saliya Ekanayake escribió: Hi, I've a quick question about the usage of Java binding. Say there's a 2 dimensional double array (size m x n) that needs to be sent to another rank. I see two options to get this done, 1. Copy values to a direct buffer of size m*n and send it

[OMPI users] Best way to communicate a 2d array with Java binding

2014-08-22 Thread Saliya Ekanayake
Hi, I've a quick question about the usage of Java binding. Say there's a 2 dimensional double array (size m x n) that needs to be sent to another rank. I see two options to get this done, 1. Copy values to a direct buffer of size m*n and send it 2. Copy values to a 1D array of size m*n and send