instant team mailing list archive
-
instant team
-
Mailing list archive
-
Message #00491
Re: Instant cache problem
Anders Logg wrote:
> If we can't figure this out now, I suggest we comment out that unit
> test and make a new release. It fixes a memory leak (which may well be
> the fault of FFC) but let's look at it after the release.
>
I don't think that it's an FFC problem. Instant inserted the memory
address of an object that has a signature string into the cache
dictionary. Doesn't make sense to me. The naming of objects in the
Instant function are questionable, which increases the likelihood that
it's an error.
Garth
> --
> Anders
>
>
> On Fri, Feb 12, 2010 at 10:50:12AM +0100, Anders Logg wrote:
>> The following unit test is failing for Instant:
>>
>> python -c "import instant; assert
>> instant.import_module('((test19_signature_module))', 'test19_cache')
>> is not None"
>> t = 1.497633 ((1) With signature)
>> t = 1.499479 ((2) With signature)
>> Traceback (most recent call last):
>> File "test19.py", line 120, in <module>
>> assert t1 > t2
>>
>> The following test seems to fail:
>>
>> # Build and rebuild with generic signature object
>> sig = Sig("((test19_signature_module))")
>> tic()
>> module = build_module(code=c_code, signature=sig, cache_dir=cache_dir)
>> assert module is not None
>> t1 = toc("(1) With signature")
>> tic()
>> module = build_module(code=c_code, signature=sig, cache_dir=cache_dir)
>> assert module is not None
>> t2 = toc("(2) With signature")
>> assert t1 > t2
>> tic()
>> module = import_module(sig, cache_dir)
>> assert module is not None
>> t3 = toc("(3) import_module")
>> assert t1 > t3
>>
>> When I run the test, I get t1 = t2 = t3 (approximately). Which one is
>> larger is somewhat random so the buildbot will fail sometimes but
>> sometimes not.
>>
>> If I uncomment the lines that Garth commented out, I get
>>
>> t = 2.003596 ((1) With signature)
>> t = 0.501644 ((2) With signature)
>> t = 0.500951 ((3) import_module)
>>
>> Does anyone know what this test does and what it should do?
>>
>
>
>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~instant
>> Post to : instant@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~instant
>> More help : https://help.launchpad.net/ListHelp
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mailing list: https://launchpad.net/~instant
> Post to : instant@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~instant
> More help : https://help.launchpad.net/ListHelp
References