Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > java-idl connec...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 5727 of 5734
Post > Topic >>

java-idl connector & memory issues

by Jelle <post@[EMAIL PROTECTED] > May 10, 2008 at 12:36 PM

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-907242-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-907242-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.SEVERE,
null, ex);
            } catch (NotSupportedException ex) {
 
Logger.getLogger(arrays_example.class.getName()).log(Level.SEVERE,
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




 2 Posts in Topic:
java-idl connector & memory issues
Jelle <post@[EMAIL PRO  2008-05-10 12:36:19 
Re: java-idl connector & memory issues
abraham@[EMAIL PROTECTED]  2008-05-12 07:00:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 2:41:44 CDT 2008.