Wavelet Auditory Model gnuplot-java
Brought to you by:
baccala
Curt,
The idea is to run gnuplot in Java and use it to plot Java functions.
You can try pulling from my git repository. It's at:
git://waveletauditory.git.sourceforge.net/gitroot/waveletauditory/gnuplot-java
Dealing with nestedvm is the hardest part (I think). As you'll see, there's a nestedvm submodule that pulls from my nestedvm repository at
git://waveletauditory.git.sourceforge.net/gitroot/waveletauditory/nestedvm
Be aware - it's close to tracking ibex.org, but there are patches in there that you need to apply or the code in the superproject won't build.
Once you've got nestedvm patched and working, it should just be a matter of "make" and then "ant" to build "gnuplot.jar", but the build system is probably still a bit brittle. You have to run both commands by hand, for example - make comes first, then ant.
If you don't want to do all of that, just grab a current snapshot of gnuplot.jar here:
http://www.freesoft.org/bbaccala/gnuplot.jar
You can run gnuplot.jar as an application that should put a gnuplot command window up on your screen and let you plot stuff. Check out "help import" when you do. It's buggy, but the idea is that you can import Java functions into gnuplot and plot with them.
The performance problems can be demonstrated with the test suite:
java -cp gnuplot.jar org.freesoft.gnuplot.Test1
This takes too long to display after the window is up on the screen (about 5 seconds on my laptop). You can also run Test4, which uses the import function and is similarly slow (the function evaluation code doesn't seem to be the problem). Test4 should look like Test1 but doesn't, probably because of a bug in the calljava import interface.
There are Test2 and Test3, but they use CORBA to exchange data between Java and C, don't currently work, and probably won't be working any time soon because I'm trying to use nestedvm instead of CORBA.
OK? So thanks for your interest, and let me know what you think!
brent
On Sat, Jun 30, 2012 at 4:21 PM, Curt Cox <curtcox@gmail.com> wrote:
Brent,
Just out of curiosity, how big are the binaries and what do you ultimately plan on doing with them? If you post binaries along with a simple scripts that show things that you would like to speed up, I might have time to do some profiling and make a suggestion.
The possible fixes depend entirely on the details of the problem.
- Curt
On Sat, Jun 30, 2012 at 6:24 PM, Brent W. Baccala <cosine@freesoft.org> wrote:
Hi -
I've had pretty good luck getting gnuplot to build and run under nestedvm; there are performance issues, however.
I'm thinking about adding profiling support in the hopes of identifying bottlenecks that can be moved into Java with calljava().
Looks like newlib doesn't support profiling, so it will have to be ported in. Doesn't seem terribly complicated, though, especially as I worked on gmon years ago and have a pretty good idea how it works.
The major alternative that I see is to port a different C library, but that seems like too much work.
Any comments or suggestions?
brent