[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Java Compiler and Swarm
From: |
Tom Wainwright |
Subject: |
Re: GNU Java Compiler and Swarm |
Date: |
Thu, 21 Jun 2001 08:45:14 -0700 |
Wunnerful news, can't wait to try it. Maybe you should take more vacations if
this is what we get when you come back.
--Tom Wainwright
"Marcus G. Daniels" wrote:
>
> With today's Swarm snapshot, it is possible to build models using the
> (just released) native code GNU Java Compiler in GCC 3.0. This is an
> advantage for several reasons:
>
> 1) It can facilitate development of faster models by removing the
> indirection of the Java virtual machine. With GCC, there are
> many more options for controlling the optimization of code.
>
> GCC is a traditional static analysis compiler and thus it can do
> much deeper analysis of code than the common just-in-time compilers
> (JITs).
>
> 2) It unifies debugging with GDB. Current (snapshot) versions of GDB
> available from sources.redhat.com have full Java support. A crash,
> whether in Swarm or in a model are all handled in the same way.
>
> 3) It provides a unified profiling environment.
>
> 4) It provides a way to make C++ look like Java code and vice versa.
>
> 5) It's just the right thing to do. :-)
>
> There is one extra step on the Swarm side, which is that you need
> to make a shared library of the Java Swarm stubs. You can do that
> by making a build done in the usual way, and then, having your PATH
> setup so that gcj from GCC 3.0 is available, run:
>
> $ cd /build/swarm-jdk # your Swarm build area
> $ cd java
> $ make gcjswarm.so
>
> Then, in your model, add a rule like this:
>
> model: $(SOURCES)
> CLASSPATH=/build/swarm-jdk/java gcj -O2 -g --main=StartModel -o model
> $(SOURCES) /build/swarm-jdk/java/gcjswarm.so
>
> StartModel would be the class having the `main' you want to run.
>
> I know this works on Intel Linux, but other architectures may have
> problems. E.g. I know of a bug in the GCJ compiler and the libffi library
> that prevent it working on Sparc. I can't say when I'll have time to
> fix them. (They aren't bugs in Swarm.)
>
> ==================================
> Swarm-Support is for discussion of the technical details of the day
> to day usage of Swarm. For list administration needs (esp.
> [un]subscribing), please send a message to <address@hidden>
> with "help" in the body of the message.
--
Tom Wainwright
NOAA/NMFS/NWFSC
2030 S Marine Science Dr
Newport, OR 97365 USA
address@hidden
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.