Disabling Groebner basis memory parses

jocaps
Messages : 120
Inscription : lun. avr. 17, 2017 4:32 pm

Disabling Groebner basis memory parses

Message par jocaps » sam. avr. 06, 2024 2:56 pm

Hello,

Is there a way to disable memory parses from the Groebner basis computation of giac when calling it via giacpy? If I call gbasis from giacpy I always get

Code : Tout sélectionner

// Groebner basis computation time 6.3e-005 Memory -1e-006M
These parses are not ideal if I query for Groebner basis a lot of time. For instance, I use the Groebner basis in an objetive function for scipy.optimize. So Groebner basis is called and parsed a lot of times.

Jose

parisse
Messages : 5744
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Disabling Groebner basis memory parses

Message par parisse » lun. avr. 08, 2024 12:59 pm

This message should only appear if the computation takes more than 5 seconds. If it's not enough, I can add an environment variable to control that.

jocaps
Messages : 120
Inscription : lun. avr. 17, 2017 4:32 pm

Re: Disabling Groebner basis memory parses

Message par jocaps » jeu. avr. 18, 2024 4:49 am

Sorry for the late reply. I got a bit busy with teaching. Thank you Bernard. Though, I wouldn't want you to go through the trouble if I'm the only one asking for it. I got the job done nevertheless. But maybe I can help debug or improve the codebase:

It seems that the time that is parsed is different from the wallclock. For instance, in my last example it says Groebner basis took 6.3e-5 seconds and it felt that it took at least 5 seconds or more (which is why the message appeared I think). Maybe the way time is being computed in windows is different. I couldn't imagine the python wrapper to take so much time. I can try some more experiments (e.g. comparing with linux) and see what is the matter here.

parisse
Messages : 5744
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Disabling Groebner basis memory parses

Message par parisse » ven. avr. 26, 2024 6:40 pm

Actually, the time taken in account was the CPU time used by giac since the beginning of the session, not the time since the beginning of computing the gbasis. This is now fixed in source.

Répondre