comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » java-idl connector & memory issues
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
java-idl connector & memory issues [message #60240] Sat, 10 May 2008 12:36
Jelle is currently offline  Jelle
Messages: 19
Registered: May 2008
Junior Member
Hi All,

Currently I am working on a processing line for eumetsat MPE data,
which comes in the very userfriendly -ahum- adjusted GRIB2 format. I
managed to find a java library that reads the files, and gives me an
array of raw doubles. I use the idl-java bridge to export this data to
IDL, where I project, subset, warp and save my data subsets.

The java retrieval in itself (without actually calling IDL) runs fine.
The IDL script in itself run fine. Combined.. THey run fine for 20-30
files. Then the scripts starts to tos me errors:

Caught an error
e:\MSG1-SEVI-MSGMPEG-0100-0100-20070421184500.000000000Z-907 242-9.grb
com.idl.javaidl.JIDLException[iErr=-1 sMsg=Could not get IDL error
information.]
at com.idl.javaidl.JIDLPAL.nativeThrowJIDLException(Native
Method)
at com.idl.javaidl.JIDLPAL.throwSpecificException(JIDLPAL.java:
1039)
at com.idl.javaidl.JIDLPAL.throwJIDLException(JIDLPAL.java:
1068)
Caught an error
at com.idl.javaidl.JIDLPAL.setIDLVariable(JIDLPAL.jav
a:702)
at com.idl.javaidl.JIDLObject.setIDLVariable(JIDLObject.java:
588)
at GMPE.arrays_example.arrayManipulation(arrays_example.java:
54)
at GMPE.arrays_example.main(arrays_example.java:137
e:\MSG1-SEVI-MSGMPEG-0100-0100-20070421190000.000000000Z-907 242-9.grb
)
com.idl.javaidl.JIDLException[iErr=0 sMsg=]
at com.idl.javaidl.JIDLPAL.nativeThrowJIDLException(Native
Method)
at com.idl.javaidl.JIDLPAL.throwSpecificException(JIDLPAL.java:
1039)
at com.idl.javaidl.JIDLPAL.throwJIDLException(JIDLPAL.java:
1068)
at com.idl.javaidl.JIDLPAL.setIDLVariable(JIDLPAL.java:702)
at com.idl.javaidl.JIDLObject.setIDLVariable(JIDLObject.java:
588)
at GMPE.arrays_example.arrayManipulation(arrays_example.java:
54)
at GMPE.arrays_example.main(arrays_example.java:137)

At that point java just continues reading files, but skips the IDL
bridge. I am running this in windows, and in my memory overview I see
that when I include the IDL processing, memory fills a little more
with each file. I am not sure what specifically coul be going wrong.

The function called to do the IDL work:

======>
private void arrayManipulation(String TheName, float[] Data)
{
try {
String a = "dataarray";
String b = "envi";
String d = "filename";
String g = "D:\\_software\\IDL_libraries\\MyScripts\
\Grib_javaIDlbridge\\_SettingsFiles";
String c = "doprestimate, dataarray, '"+TheName+"', '"+g
+"'";
ostock.setIDLVariable(a, new JIDLArray(Data));
ostock.executeString(b);
ostock.executeString(c);
}

catch ( JIDLException e ) {
System.out.println( "Caught an error" );
e.printStackTrace( );
}
}
<======

The way I call this function from the .main() routine:

====>
for(int j=0; j<children.length; j++)
{
// Get filename of file or directory
String filename = children[j];

try {
progInstance.SetCreateFileIndex(true);
progInstance.SetInFile(dir+filename);
float[] theData = progInstance.GetData();
example.arrayManipulation(filename, theData);
theData = null;
}
catch (IOException ex) {

Logger.getLogger(arrays_example.class.getName()).log(Level.S EVERE,
null, ex);
} catch (NotSupportedException ex) {

Logger.getLogger(arrays_example.class.getName()).log(Level.S EVERE,
null, ex);
}
}
<====

Am I missing something crucial & simple to fix to make this run? I
have 14000 (!) files to run, so just running 20 files at a time and
adjusting the loop is no option..

Thanks so much,

Jelle
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: A heartfelt thank you for MPFIT
Next Topic: storing in array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:14:50 PDT 2025

Total time taken to generate the page: 1.04353 seconds