Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] [Open MPI] #3351: JAVA scatter error
From: Siegmar Gross (Siegmar.Gross_at_[hidden])
Date: 2013-01-07 10:09:19


> >> I think the real shortcoming is that there is no Datatype.Resized
> >> function. That can be fixed.
> >
> > Are you sure? That would at least solve one problem.
> Here's a first cut at a patch.
> I don't know if this is fully correct; I don't quite understand
> yet how baseSize is used in the .java files, but it seems
> incorrect to me.

I manually applied your patch to openmpi-1.9a1r27668, because
"patch -i resized.patch" couldn't find ompi/mpi/java/c/mpijava.exp
(it seems that this file isn't available in any tar ball). Furthermore
I modified your version of

tyr Squyres 121 diff*
< Datatype tmp_column_t, column_t;

>       Datatype column_t;
<       tmp_column_t = Datatype.Vector (P, 1, Q, MPI.DOUBLE);
<       column_t     = Datatype.Resized (tmp_column_t, 0, 8);
>       column_t = Datatype.Vector (P, 1, Q, MPI.DOUBLE);
<       tmp_column_t.finalize ();
Now I got the correct column values. Do you know how I can get the
size of MPI.DOUBLE or a different datatype (Java doesn't support
"sizeof" as far as I know)? I will rewrite my programs with 2D arrays
so that they only use 1D arrays if Open MPI cannot provide a solution
for Datatype.Vector which supports Java 2D arrays. Thank you very
much for your help.
Kind regards