Project

General

Profile

Faq » History » Version 2

« Previous - Version 2/3 (diff) - Next » - Current version
Celso Reyes, 06/18/2013 10:19 AM


Frequently Asked Questions

Installation

Do I really need to have the IRIS-WS library installed?

Although irisFetch will run "out of the box" by accessing an online version of the java library, it is highly recommended that you download the latest library, and add it to the MATLAB java class path.

Which versions of MATLAB are supported?

irisFetch was developed using MATLAB r2011b. irisFetch is expected to run on R2009b and greater. However, IrisFetch has been able to successfully run on R2009a on the Solaris System.

Is there an Octave version of irisFetch.m?

No. An attempt to port irisFetch into the octave environment was unsuccessful. Octave was unable to properly interact with the IRIS-WS java library. This may be re-examined in the future.

Troubleshooting

Error message "java.lang.OutOfMemoryError: Java heap space" when retrieving traces / events / stations

The "heap space" is where java stores objects variables and data that it creates. When irisFetch retrieves information from a data center, it interacts using a Java library. All the information that is retrieved from web services is first stored in the "heap" memory that has been specifically set aside for Java. Once all the data has been retrieved, it is then converted into MATLAB structs. At this point, the memory in the heap becomes available again.

MATLAB may have a limited heap to begin with. For example, R2011a running on Mac OSX allows the heap to be set between 0 and 256Mb. Even when the heap is set at 256 Mb, it doesn't take too much time series data before Java run out of memory. Ideally, you could go to the MATLAB preferences, and under "General" -> "Java Heap Memory", increase the heap size. If you see this error message, and MATLAB does not allow the heap to be enlarged further, then you may be able to increase it by following the advice of this article:

http://www.mathworks.com/support/solutions/en/data/1-18I2C/

The article, in short, suggests modifyng the java.opts file located in a system-specific directory. For my Mac with R2011b, java.opts was located at /Applications/MATLAB_R011b.app/bin/maci64/java.opts
I only had to add the line specifying that the MATLAB should set the max heap memory to 2 gigs:
-Xmx2048m

Setting the heap to a larger value (for example, 2048 Mb) allows MATLAB and irisFetch to retrieve more data before running out of memory.

I get an Invalid file or directory message when trying to add the IRIS-WS.jar with javaaddpath

>> javaaddpath('IRIS-WS-1.5.jar')
Warning: Invalid file or directory
. . .


It is likely that MATLAB is looking in the wrong place for the .jar.

These few lines of code should ensure that MATLAB is reading exactly the file from wherever it exists. It provides a file-selection box where you can navigate to the .jar, and then uses that info to call javaaddpath.

[f , d] = uigetfile({'.jar'}); 
thefile = fullfile(d,f); %build the complete path accurately  (works independent of linux/unix/mac/windows)
javaaddpath(thefile); 

If this works, then, in the future, call javaaddpath using the entire path, as contained in variable thefile.