← Back to team overview

ffc team mailing list archive

Re: Not writing generated code to file

 

On Mon, Aug 08, 2011 at 10:38:37AM -0500, Andy Ray Terrel wrote:
> On Mon, Aug 8, 2011 at 10:27 AM, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> > On Monday August 8 2011 04:33:41 Anders Logg wrote:
> >> 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.
> >
> > That is true. But this can be accomplished by looking into the generated .i
> > file instead.
>
> As FEniCS tries to run on bigger machines, the need to not write to
> files becomes more important.  Many of the top machines do not have
> disk and other things.  I think this feature would be necessary for
> those machines.

But isn't the problem still there? We still need to write the .i file,
and gcc spits out a .so file. And other files are still being written
to the cache directory, so I don't see the big benefit in removing
only one of those files.

--
Anders


> -- Andy
>
> >
> > Johan
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~ffc
> > Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~ffc
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ffc
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References