You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing a very strange "freeze". Originally in a larger application, I have reduced my test case to the code below. The "freeze" occurred with JTransforms-3.1-with-dependencies. To pinpoint where the freeze occurs, I downloaded the source of both JTransforms and JLargeArrays from github / gitlab on January 9th and created fresh jars. I added a couple of "println"s to JTransforms and JLargeArrays. Aside from pinpointing the location of the freeze, these also confirm that these jars are being used instead of another version potentially lurking in my classpath (to the best of my knowledge I removed all versions of JTransforms/JLargeArrays from the classpath).
The test code is:
importpl.edu.icm.jlargearrays.*;
importorg.jtransforms.fft.*;
importjava.util.Arrays;
publicclassJttest {
publicstaticvoidmain(String[] args) {
test();
}
publicstaticvoidtest() {
intdims[] = { 4097, 4097 };
FloatLargeArrayextra[] = newFloatLargeArray[3];
intix=0;
while( true ) {
intnel = 2*dims[0]*dims[1];
FloatLargeArraydata = newFloatLargeArray(nel);
// allocate a few extra arrays to show that we have not run out of memory.// the behaviour is the same with the following lines in place or notfor ( intii=0; ii<extra.length; ii++ ){
extra[ii] = newFloatLargeArray(nel);
}
// this is the size that is reported just before the code hangs.// I allocated a same-size array here to verify it is not the specific// size that is the issueFloatLargeArraydummy = newFloatLargeArray(16793604);
System.out.format("data length=%d dims=%s\n",data.length(),Arrays.toString(dims));
FloatFFT_2Ddft2d = newFloatFFT_2D( dims[0], dims[1] );
System.out.println("Invoking dft2d");
dft2d.realForwardFull( data );
System.out.println("Done");
// alternatingly increase the x- or y-size of the 2D arraydims[ix]+=1;
ix=1-ix;
}
}
}
On my machine, this code freezes as soon as dims reaches [4098,4097]. Suspiciously close to the nice power-of-two size [4096,4096] of course, but nothing indicates that this in fact has anything to do with it. The output is:
...
allocating 16789506
new FloatLargeArray done
allocated pl.edu.icm.jlargearrays.FloatLargeArray@7023090a
Done
...
data length=33579012 dims=[4098, 4097]
Invoking dft2d
JT: RFF
JT: RFF (mixed)
allocating 16793604
new FloatLargeArray done
Interestingly, I am pretty sure the process was shown as idle before ("0% cpu") one every attemp yesterday, but as I tried it just now it shows "100% cpu". Top also states "12.1% memory", so again the process cannot be running out of memory.
If successful, the last line outputs something like allocated pl.edu.icm.jlargearrays.FloatLargeArray@7023090a. However, when the code freezes, it does so before reaching the second System.out.format statement.
Checking the output of the code, it appears that the FloatLargeArray constructor works up to and including the println I added, but the code then freezes.
Finally, system details, Fedora 27 64bit Linux, 8Gb memory, with:
java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
Any idea what might be going on?
Can anyone reproduce this behaviour?
Let me know if any extra information is required
Regards, Michael
The text was updated successfully, but these errors were encountered:
jmpFCE2
changed the title
Strange freeze in FloatFFT_2D.realForwardFull when arrays reaches certain size
Strange freeze in FloatFFT_2D.realForwardFull when array reaches certain size
Jan 10, 2018
I am experiencing a very strange "freeze". Originally in a larger application, I have reduced my test case to the code below. The "freeze" occurred with JTransforms-3.1-with-dependencies. To pinpoint where the freeze occurs, I downloaded the source of both JTransforms and JLargeArrays from github / gitlab on January 9th and created fresh jars. I added a couple of "println"s to JTransforms and JLargeArrays. Aside from pinpointing the location of the freeze, these also confirm that these jars are being used instead of another version potentially lurking in my classpath (to the best of my knowledge I removed all versions of JTransforms/JLargeArrays from the classpath).
The test code is:
On my machine, this code freezes as soon as
dims
reaches[4098,4097]
. Suspiciously close to the nice power-of-two size[4096,4096]
of course, but nothing indicates that this in fact has anything to do with it. The output is:Interestingly, I am pretty sure the process was shown as idle before ("0% cpu") one every attemp yesterday, but as I tried it just now it shows "100% cpu". Top also states "12.1% memory", so again the process cannot be running out of memory.
The key "print" statements are in:
FloatFFT2D.java:
If successful, the last line outputs something like
allocated pl.edu.icm.jlargearrays.FloatLargeArray@7023090a
. However, when the code freezes, it does so before reaching the second System.out.format statement.In FloatLargeArray.java:
Checking the output of the code, it appears that the FloatLargeArray constructor works up to and including the println I added, but the code then freezes.
Finally, system details, Fedora 27 64bit Linux, 8Gb memory, with:
Regards, Michael
The text was updated successfully, but these errors were encountered: