Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] mpi/java question
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-02-20 14:34:18


On Feb 20, 2013, at 12:37 PM, Ralph Castain <rhc_at_[hidden]> wrote:

>> 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?

I think we might have to end up doing what we did for fortran: a bunch of configure tests to map Java types to their corresponding C types.

I have no idea how to write such configure tests, though, because it involves writing java code. The way it works in the Fortran tests is that we write a simple program (that's usually a combination of Fortran and C) to figure out the size of a given fortran datatype. Then we have shell/m4 code to match that with a corresponding C type.

If someone could write some generic java code to figure out the size of a java type (and either printf it out, or write it to a file, or otherwise be able to give that value to a shell script), that would be a good start.

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/