Here's what I found:

In Java, a long is always 64 bits. In C and Objective-C, a long might be 64 bits, or it might be 32 bits, or (in less common cases) it might be something else entirely; the C standard doesn't specify an exact bit width.

So we may need a configure test to map the Java "long" data type to the right thing to get int64_t?

On Feb 20, 2013, at 7:41 AM, Jeff Squyres (jsquyres) <> wrote:

I guess the question is whether a java "long" is equivalent to a C "long", "long long", or "long int"...

Do you know?  (I'm not much of a Java guy)

On Feb 19, 2013, at 7:22 PM, Steve Angelovich <> wrote:


We ran into a  problem using openmpi from java with a Java data type of long when doing bcast and reduce operations.

*** An error occurred in MPI_Allreduce: the reduction operation MPI_MIN is not defined on the MPI_LONG_INT datatype
*** reported by process [211105480705,0]
*** on communicator MPI COMMUNICATOR 4 DUP FROM 0
*** MPI_ERR_OP: invalid reduce operation
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
***    and potentially your MPI job)
3 more processes have sent help message help-mpi-errors.txt / mpi_errors_are_fatal
Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

Looking at ompi/mpi/java/c/mpi_Datatype.c it looks like an MPI_LONG_INT type is being used.  It seems this should be an MPI_LONG_LONG.  If I change this data type I'm able to do bcast and reduce operations via the java interface.  Does this look like a bug or am I missing something else?

--- openmpi-1.7rc6/ompi/mpi/java/c/mpi_Datatype.c       2013-02-19 15:44:13.299046000 -0600
+++ openmpi-1.9a1r28069/ompi/mpi/java/c/mpi_Datatype.c  2013-02-17 20:00:14.000000000 -0600
@@ -60,7 +60,7 @@

                       MPI_SHORT,         MPI_BYTE,  MPI_INT,
-                       MPI_LONG_LONG,      MPI_FLOAT, MPI_DOUBLE,
+                       MPI_LONG_INT,      MPI_FLOAT, MPI_DOUBLE,
                       MPI_PACKED,        MPI_LB,    MPI_UB,
                       MPI_BYTE };


This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.

devel mailing list

Jeff Squyres
For corporate legal information go to:

devel mailing list