Philippe Elbaz-Vincent on Sun, 29 Oct 2000 00:52:15 +0200 (CEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[PARI] about the behavior of install() |
Dear PARI Experts, I am puzzled by the behavior of the function install(), or should I say its internal mechanism, and I will appreciate any help on this matter. I will illustrate my question with the matexp function given in the examples/ directory. all the following was done on a i686 running linux (ix86 kernel) 32-bit version, with 2.0.21 (beta) [glibc-2.1.3, gcc-2.95.2], but this behavior was observed with previous CVS versions of PARI (also tested against egcs-1.1.2): I open a gp session, and install the function 'mexp' as described (00:40) gp > install(matexp,Gp,mexp,"~pev/PARI-Dev/pari/examples/libmatexp.so") time = 0 ms. I test it (00:40) gp > mexp([0,1;1,0]) time = 0 ms. %2 = [1.543080634815243778477905620 1.175201193643801456882381850] [1.175201193643801456882381850 1.543080634815243778477905620] so far so good. Now, say I'm unhappy with the behavior of the function, I decide to "change it" by adding a kind message like a printf("hello !\n"); Then, I do a 'make clean' and a 'make all' in the dir examples/ In my gp session, I kill the function 'mexp', and install it again, expecting my "new" function (00:40) gp > kill(mexp) time = 0 ms. (00:40) gp > install(matexp,Gp,mexp,"~pev/PARI-Dev/pari/examples/libmatexp.so") time = 0 ms. and I get exactly the same output than above, nothing has changed ! But, if I quit my gp session, re-open it, and install again 'mexp', I get; (00:41) gp > install(matexp,Gp,mexp,"~pev/PARI-Dev/pari/examples/libmatexp.so") time = 0 ms. (00:41) gp > mexp([0,1;1,0]) hello ! time = 0 ms. %1 = [1.543080634815243778477905620 1.175201193643801456882381850] [1.175201193643801456882381850 1.543080634815243778477905620] which is the new 'mexp'... So my question is; does this illustrate the expected behavior of install() ? If yes, what is the correct way to kill and re-install a loadable function ? (because it's quite cumbersome when you're testing/debugging a function) Thanking you in advance. best regards,Ph. detail of the config (if useful); Linux-2.2.17+ReiserFS patch+I2C-2.5.2, p2/450,glibc-2.1.3, readline v4.0 enabled, gcc-2.95.2, compile flag: -O3 -DGCC_INLINE -Wall -Wno-implicit -fexpensive-optimizations -fomit-frame-pointer Laboratoire Geometrie-Topologie et Algebre. UMR CNRS 5030. E-mail: pev@pev.math.univ-montp2.fr | Phone: +33 (0)467143958 http://www.math.univ-montp2.fr/~pev | Fax: +33 (0)467143558