← Back to team overview

ffc team mailing list archive

Re: Not writing generated code to file

 

On Wed, Aug 03, 2011 at 08:49:24PM -0700, Johan Hake wrote:
> Hello!
>
> Why do we write generated code to file when the jit compilation is used? This
> introduce a cause of error which has annoyed me for some time now. Instead of
> writing the code to file and then in ufc.build we just read the file again, we
> could just pass the code as a single str.
>
> This would save us for a lot of hassle with file access during server run.
> When several runs are commited and executed at one time I experience a lot of
> runs that stops prematurely because of file access problem. This "should" have
> been fixed by some file locking mechanism which really is not working.
>
> If you think this is a cool thing to do I can do the work. We just have to add
> a parameter, or an extra argument to some ffc functions and change the
> interface to ufc.build.

One advantage is that it's possible to inspect the generated code in
~/.instant/cache if it fails.

--
Anders


Follow ups

References