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

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

2014-08-22 Thread Oscar Vega-Gisbert
]; Copy the 2D matrix to the buffer: for(int i = 0; i < m; i++) System.arraycopy(matrix[i], 0, buffer, i * n, n); Copy from the buffer to the 2D matrix: for(int i = 0; i < m; i++) System.arraycopy(buffer, i * n, matrix[i], 0, n); On Fri, Aug 22, 2014 at 2:17 PM, Osca

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

2014-08-23 Thread Oscar Vega-Gisbert
as the matrix size is increased. Thank you, Saliya On Fri, Aug 22, 2014 at 3:24 PM, Oscar Vega-Gisbert <ov...@dsic.upv.es <mailto:ov...@dsic.upv.es>> wrote: El 22/08/14 20:44, Saliya Ekanayake escribió: Thank you Oscar for the detailed information, but I'm still w

Re: [OMPI users] Derived data in Java

2014-10-09 Thread Oscar Vega-Gisbert
Hello Atsugua, You can only send contiguous data, i.e. arrays of basic datatypes (byte, char, short, boolean, int, long, float and double) or direct buffers. If you need to send complex data, then you must serialize into an array or a direct buffer. This is made using using the mpi.Struct

Re: [OMPI users] which info is needed for SIGSEGV in Java foropenmpi-dev-124-g91e9686 on Solaris

2014-10-23 Thread Oscar Vega-Gisbert
Hello Siegmar, If your Java program only calls to MPI.Init and MPI.Finalize you don't need debug Java. The JNI layer is very thin, so I think the problem is not in Java. Also, if the process crash is in the JNI side, debugging won't provides you useful information. But if you want debug 2

Re: [OMPI users] which info is needed for SIGSEGV in Java foropenmpi-dev-124-g91e9686on Solaris

2014-10-27 Thread Oscar Vega-Gisbert
Hi Takahiro, Gilles, Siegmar, Thank you very much for all your fix. I don't notice about calling 'mca_base_var_register' before MPI_Init. I'm sorry for the inconvenience. Regards, Oscar El 27/10/14 07:16, Gilles Gouaillardet escribió: Kawashima-san, thanks a lot for the detailled

Re: [OMPI users] java.lang.ArrayIndexOutOfBoundsException in openmpi-dev-178-ga16c1e4

2014-10-29 Thread Oscar Vega-Gisbert
Hi, There is an error in the program. First you declare a 256 char buffer (BUF_SIZE = 256). When it is executed the line 96: buffer = (MPI.getProcessorName()).toCharArray(); The buffer length becomes less than 256. So, when the next iteration is executed, at line 92 you could get an

Re: [OMPI users] Segfault in mpi-java

2015-01-25 Thread Oscar Vega-Gisbert
Hi, I also reproduce this behaviour. But I think this crash is not related with garbage collector. Java is much better than you think. May be MPI corrupts the Java runtime heap. Regards, Oscar El 22/01/15 a las 08:07, Gilles Gouaillardet escribió: Alexander, i was able to reproduce this

Re: [OMPI users] Segfault in mpi-java

2015-02-01 Thread Oscar Vega-Gisbert
Hi, I created an issue with a simplified example: https://github.com/open-mpi/ompi/issues/369 Regards, Oscar El 25/01/15 a las 19:36, Oscar Vega-Gisbert escribió: Hi, I also reproduce this behaviour. But I think this crash is not related with garbage collector. Java is much better than

Re: [OMPI users] Java MPI and OWL API: segmentation fault

2015-02-12 Thread Oscar Vega-Gisbert
Hi Ricardo, Thanks for your information. Unfortunately, your solution does not work here: https://github.com/open-mpi/ompi/issues/369 Regards, Oscar El 12/02/15 a las 09:53, Riccardo Zese escribió: I have just solved my problem by specifying export LD_PRELOAD=libjvm.so-directory/libjsig.so;

Re: [OMPI users] Several questions about new Java bindings

2013-12-03 Thread Oscar Vega-Gisbert
Hello Ivan, From: Ivan Borisov <68van...@mail.ru> Subject: [OMPI users] Several questions about new Java bindings Date: December 3, 2013 5:22:29 AM EST To: Open MPI users list Reply-To: Open MPI Users Hello everyone. I've installed nightly 1.7.4

[OMPI users] some problems with openmpi-1.9a1r30100

2014-01-01 Thread Oscar Vega-Gisbert
Jeff added a jdoc target in '~/ompi-java/ompi/mpi/java/java/Makefile.am'. Javadoc is created in '~/ompi-java/ompi/mpi/java/java/doc' I think javadoc could be created if you select '--enable-mpi-java', and it could be copied in '~/ompi-install/share/javadoc'. From: Ralph Castain

Re: [OMPI users] How to use non-primitive types with Java binding

2014-01-16 Thread Oscar Vega-Gisbert
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

Re: [OMPI users] How to use non-primitive types with Java binding

2014-01-17 Thread Oscar Vega-Gisbert
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 <ov...@dsic.upv.es>wrote: Hi, If you are talking about types as ArrayList, it is not possi

Re: [OMPI users] warnings and anachronisms in openmpi-1.7.4

2014-02-09 Thread Oscar Vega-Gisbert
Hi, The warnings of type "cast to pointer from integer of different size" are provoked when a jlong (64 bit handle in Java) is copied to a C pointer (32 bit) or vice versa. These warnings could be avoided with methods like these: void* ompi_java_cHandle(jlong handle) {

Re: [OMPI users] warnings and anachronisms in openmpi-1.7.4

2014-02-09 Thread Oscar Vega-Gisbert
Quoting Siegmar Gross : Hi Oscar, The warnings of type "cast to pointer from integer of different size" are provoked when a jlong (64 bit handle in Java) is copied to a C pointer (32 bit) or vice versa. These warnings could be avoided with methods like

Re: [OMPI users] OpenMpi-java Examples

2014-03-17 Thread Oscar Vega-Gisbert
Hi Madhurima, Currently we only have tests which start MPI and check the provided level of thread support: int provided = MPI.InitThread(args, MPI.THREAD_FUNNELED); if(provided < MPI.THREAD_FUNNELED) { throw new MPIException("MPI_Init_thread returned less "+

Re: [OMPI users] SIGSEGV for Java program in openmpi-1.8.2rc2 on Solaris 10

2014-07-25 Thread Oscar Vega-Gisbert
I'm sorry but I can not reproduce the problem. I recompiled all from scratch using Java 8, and it works ok on Debian 7.5. Regards, Oscar El 25/07/14 18:28, Saliya Ekanayake escribió: I too have encountered this as mentioned in one of my previous emails