Subject: [Instant-dev] md5sum on what?

From: Anders Logg <[email-masked]>
Date: Tue, 1 Jan 2008 23:04:31 +0100

It seems Instant does not ignore the name of the module when
looking for previously built modules in the cache.

Here's a simple example:

  foo = create_extension(wrap_headers=["foo.h"], module="foo", ...)
  bar = create_extension(wrap_headers=["foo.h"], module="bar", ...)

Here, I want Instant to realize that the code for both modules is the
same (the file foo.h) so it should only need to build the module once.

This does not seem to be the case. Can it be fixed?

This is important when running time-dependent problems where the form
(and the code) remains the same but the system needs to be assembled
in each time step.

-- 
Anders

---

From: Anders Logg <[email-masked]>
Date: Wed, 2 Jan 2008 00:53:42 +0100

> (and the code) remains the same but the system needs to be assembled

Never mind. The FFC JIT compiler now uses it's own cache, since we can
then use the md5sum of the signature of the form (not the generated
code) which is faster (the code does not need to be generated).

-- 
Anders

---

From: Kent-Andre Mardal <[email-masked]>
Date: Wed, 02 Jan 2008 11:32:22 +0100

> code) which is faster (the code does not need to be generated).

ok, but is the signature of the form unique ? 

Kent

---

From: Anders Logg <[email-masked]>
Date: Wed, 2 Jan 2008 13:39:07 +0100

> ok, but is the signature of the form unique ? 

I thought so. But now when I think about it, it's not enough to just
look at the signature of the forms since the spaces may be different.
So I need to include the signatures of the spaces when computing the
checksum. That should fix it.

-- 
Anders

---

From: Anders Logg <[email-masked]>
Date: Wed, 2 Jan 2008 13:46:52 +0100

On Wed, Jan 02, 2008 at 02:43:21PM +0100, Kent-Andre Mardal wrote:
> ons, 02.01.2008 kl. 13.39 +0100, skrev Anders Logg:
> ok, I could also fix instant, if you like. 
> 
> Kent

Maybe one could send a signature to Instant as well, but I will still
need to handle it in FFC (since I also need to look at the signature
to know if I should generate code before calling Instant), so it
wouldn't help much.

-- 
Anders