Re: [OMPI users] How to use non-primitive types with Java binding
Thank you, this is exactly what I was hoping for!! Saliya On Jan 18, 2014 2:40 AM, "Siegmar Gross" < siegmar.gr...@informatik.hs-fulda.de> wrote: > Hi, > > > Anyway I wonder if there are some samples illustrating the use > > of complex structures in OpenMPI > > I'm not sure if my small programs are helpful, but perhaps you get > an idea how to use the new interface. > > > Kind regards > > Siegmar > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users >
Re: [OMPI users] How to use non-primitive types with Java binding
Hi, > Anyway I wonder if there are some samples illustrating the use > of complex structures in OpenMPI I'm not sure if my small programs are helpful, but perhaps you get an idea how to use the new interface. Kind regards Siegmar BcastStructMain.java Description: BcastStructMain.java BcastStructArrayMain.java Description: BcastStructArrayMain.java ScatterStructArrayMain.java Description: ScatterStructArrayMain.java MyStruct.java Description: MyStruct.java
Re: [OMPI users] How to use non-primitive types with Java binding
Thank you and this makes sense. In fact we've been trying to avoid serialization as much as possible because we found it to be a bottleneck. Anyway I wonder if there are some samples illustrating the use of complex structures in OpenMPI Thank you, Saliya On Jan 17, 2014 5:20 PM, "Oscar Vega-Gisbert"wrote: > MPI.OBJECT is no longer supported because of it was based on > serialization, and it made the java bindings more complicated. It brought > more problems than benefits. For example, it was necessary a shadow > communicator... > > You can define complex struct data using direct buffers and avoiding > serialization. MPI.OBJECT could be implemented in a higher level layer, but > serialization is very bad for performance... > > Regards, > Oscar > > Quoting Saliya Ekanayake : > > Thank you Oscar. I was using an earlier nightly tarball and in it there >> was >> MPI.OBJECT datatype, which I could use with any serializable complex >> object. It seems this is no longer supported as per your answer or did I >> get it wrong? >> >> Thank you, >> Saliya >> >> >> On Thu, Jan 16, 2014 at 5:22 PM, Oscar Vega-Gisbert > >wrote: >> >> Hi, >>> >>> If you are talking about types as ArrayList, it is not possible, >>> because the Double (D uppercase) is an object which encapsulates a >>> double. >>> And the elements of an ArrayList are references (pointers) to Java >>> objects. >>> >>> You can use complex types but you must create them with the Datatype >>> methods (createVector, createStruct,...). And the buffers that hold the >>> data must be arrays of a primitive type or direct buffers. >>> >>> Regards, >>> Oscar >>> >>> >>> Quoting Saliya Ekanayake : >>> >>> Hi, >>> Is it possible to use non-primitive types with MPI operations in OpenMPI's Java binding? At the moment in the trunk I only see Datatypes for primitive kinds. Thank you, Saliya -- Saliya Ekanayake esal...@gmail.com >>> >>> >>> This message was sent using IMP, the Internet Messaging Program. >>> >>> >>> ___ >>> users mailing list >>> us...@open-mpi.org >>> http://www.open-mpi.org/mailman/listinfo.cgi/users >>> >>> >> >> >> -- >> Saliya Ekanayake esal...@gmail.com >> Cell 812-391-4914 Home 812-961-6383 >> http://saliya.org >> >> > > > > This message was sent using IMP, the Internet Messaging Program. > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users >
Re: [OMPI users] How to use non-primitive types with Java binding
MPI.OBJECT is no longer supported because of it was based on serialization, and it made the java bindings more complicated. It brought more problems than benefits. For example, it was necessary a shadow communicator... You can define complex struct data using direct buffers and avoiding serialization. MPI.OBJECT could be implemented in a higher level layer, but serialization is very bad for performance... Regards, Oscar Quoting Saliya Ekanayake: Thank you Oscar. I was using an earlier nightly tarball and in it there was MPI.OBJECT datatype, which I could use with any serializable complex object. It seems this is no longer supported as per your answer or did I get it wrong? Thank you, Saliya On Thu, Jan 16, 2014 at 5:22 PM, Oscar Vega-Gisbert wrote: Hi, If you are talking about types as ArrayList, it is not possible, because the Double (D uppercase) is an object which encapsulates a double. And the elements of an ArrayList are references (pointers) to Java objects. You can use complex types but you must create them with the Datatype methods (createVector, createStruct,...). And the buffers that hold the data must be arrays of a primitive type or direct buffers. Regards, Oscar Quoting Saliya Ekanayake : Hi, Is it possible to use non-primitive types with MPI operations in OpenMPI's Java binding? At the moment in the trunk I only see Datatypes for primitive kinds. Thank you, Saliya -- Saliya Ekanayake esal...@gmail.com This message was sent using IMP, the Internet Messaging Program. ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- Saliya Ekanayake esal...@gmail.com Cell 812-391-4914 Home 812-961-6383 http://saliya.org This message was sent using IMP, the Internet Messaging Program.
Re: [OMPI users] How to use non-primitive types with Java binding
Thank you Oscar. I was using an earlier nightly tarball and in it there was MPI.OBJECT datatype, which I could use with any serializable complex object. It seems this is no longer supported as per your answer or did I get it wrong? Thank you, Saliya On Thu, Jan 16, 2014 at 5:22 PM, Oscar Vega-Gisbertwrote: > Hi, > > If you are talking about types as ArrayList, it is not possible, > because the Double (D uppercase) is an object which encapsulates a double. > And the elements of an ArrayList are references (pointers) to Java objects. > > You can use complex types but you must create them with the Datatype > methods (createVector, createStruct,...). And the buffers that hold the > data must be arrays of a primitive type or direct buffers. > > Regards, > Oscar > > > Quoting Saliya Ekanayake : > > Hi, >> >> Is it possible to use non-primitive types with MPI operations in OpenMPI's >> Java binding? At the moment in the trunk I only see Datatypes for >> primitive >> kinds. >> >> Thank you, >> Saliya >> >> -- >> Saliya Ekanayake esal...@gmail.com >> >> > > > > This message was sent using IMP, the Internet Messaging Program. > > > ___ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users > -- Saliya Ekanayake esal...@gmail.com Cell 812-391-4914 Home 812-961-6383 http://saliya.org
Re: [OMPI users] How to use non-primitive types with Java binding
Hi, If you are talking about types as ArrayList, it is not possible, because the Double (D uppercase) is an object which encapsulates a double. And the elements of an ArrayList are references (pointers) to Java objects. You can use complex types but you must create them with the Datatype methods (createVector, createStruct,...). And the buffers that hold the data must be arrays of a primitive type or direct buffers. Regards, Oscar Quoting Saliya Ekanayake: Hi, Is it possible to use non-primitive types with MPI operations in OpenMPI's Java binding? At the moment in the trunk I only see Datatypes for primitive kinds. Thank you, Saliya -- Saliya Ekanayake esal...@gmail.com This message was sent using IMP, the Internet Messaging Program.
[OMPI users] How to use non-primitive types with Java binding
Hi, Is it possible to use non-primitive types with MPI operations in OpenMPI's Java binding? At the moment in the trunk I only see Datatypes for primitive kinds. Thank you, Saliya -- Saliya Ekanayake esal...@gmail.com