Marko,

i wrote a test program based on your code snippet and it works for me.

could you please :
- post a standalone test case that is ready to be compiled and ran
- which version of OpenMPI are you using ?
- which JVM are you using ? (vendor and version)
- post your full command line

Cheers,

Gilles

On 1/25/2016 8:23 AM, Marko Blatzheim wrote:
String filename = "testfile";
        byte[] readbuf;

        File myfile = new File(MPI.COMM_SELF, filename, MPI.MODE_RDONLY);
        int filesize = (int) myfile.getSize();
        readbuf = new byte[filesize];

        byte[] copyarray = new byte[filesize];
        Status status = myfile.read(readbuf, filesize, MPI.BYTE);
        Object test = null;
        if (myrank == 0) {
            ByteArrayInputStream in = new ByteArrayInputStream(readbuf);
            ObjectInputStream is = new ObjectInputStream(in);
test = is.readObject(); // This line causes a segmnentation fault }

Reply via email to