[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] HDF5
From: |
Remy Bresson |
Subject: |
[Swarm-Support] HDF5 |
Date: |
Thu, 08 Jul 2004 16:14:46 +0100 |
Hello everybody,
I am Remy Bresson. I develop a free software for ecological researcher. To do
this I use the swarm library. I need to use HDF5 to save the result of my
simulation because HDF5 seems to be usable with R.
But I have some problemes with HDF5 support in swarm. I just try a simple code
following.
To resume what do this code, I create a object 'item' and try to save it both
in scheme and with HDF5. With scheme there is no probleme. But when I use HDF5,
a file item.hdf is created but when I run again the code, the archiver seems to
be unable to read the hdf5 file.
So I try to open the file with a windows utility : h5ls.exe ==> unable to open
file.
I think that I need to install a library but I am not sure.
Information : I develop in Java with windows, because my laboratory provide me
good tools to work under windows, but my software will be used under UNIX super
computer.
MY QUESTION IS : Need I to install something more than swarm to use hdf5
serialization with swarm? ( For windows and Unix platform )
Thanks.
PS : sorry for my poor english but I just begin to use english.
import swarm.Globals;
import swarm.defobj.HDF5ArchiverImpl;
import swarm.defobj.LispArchiverImpl;
import swarm.defobj.Archiver;
import swarm.defobj.Zone;
class Item
{
public boolean a;
public int b;
public float c;
public double d;
Item ()
{
}
Item (boolean a, int b, float c, double d)
{
this.a = a;
this.b = b;
this.c = c;
this.d = d;
}
}
public class ArchivedItem
{
public Item item;
public ArchivedItem ()
{
super ();
item = new Item (true, 1, 2.0f, 3.0);
item = new Item ();
}
void toFile (Archiver archiver)
{
System.out.println (archiver.getObject ("item"));
archiver.putShallow$object ("item", item);
archiver.sync ();
System.out.println (archiver.getObject ("item"));
}
void load(Archiver archiver)
{
item = (Item)archiver.getObject( "item" );
}
static public void main (String args[])
{
Globals.env.initSwarm ("ArchivedItem", "0.0", "address@hidden", args);
Zone aZone = Globals.env.globalZone;
ArchivedItem item = new ArchivedItem ();
item.toFile (new HDF5ArchiverImpl (aZone, "item.hdf"));
item.load(new HDF5ArchiverImpl (aZone, "item.hdf"));
item.toFile (new LispArchiverImpl (aZone, "item.scm"));
item.load(new LispArchiverImpl (aZone, "item.scm"));
System.out.println( item.item.a + "/" + item.item.b + "/"
+ item.item.c + "/" + item.item.d );
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Swarm-Support] HDF5,
Remy Bresson <=