Workspace support
Hi, does libgap support GAP Workspace (http://www.gap-system.org/Manuals/doc/ref/chap3.html#X7CB282757ACB1C09) ?
From the system.c, libGAP_options array it seems it does. But if i had 2 arguments in the argv array of the init function in test.c :
char* argv[14];
....
argv[12] = "-L";
argv[13] = "/tmp/test";
....
int argc=13;
I have a segfault. Maybe i missed something ?
Comments (12)
-
repo owner -
the path i used point to a saved workspace. The point is workspace speeds up the loading time of GAP. Do you plan to add this feature ?
-
repo owner Yes but its not a priority right now.
-
Do you think it's a hard task ? if not, maybe i can have a look this summer
-
repo owner Its probably not that hard, presumably one just has to see what gap does during startup with the workspace directory argument. It would be great if you could look into it. Feel free to ask if you have any problems.
-
Please also see http://trac.sagemath.org/ticket/16380, which is most likely closely related.
-
Good news! It's not a real bug, or at least it's something one can live with. One just have to create the workspace from the libGAP. Such a workspace loads into libGAP just fine! (And it does not load into the "normal" GAP).
-
Volker, would you like any special code (a function to do workspace saving, and a parameter, filename of the workspace to be loaded, passed to a libGAP startup function) for handling workspaces implemented in libGAP itself? Or you rather leave it as it is, and only do workspace handling on the Sage side?
-
repo owner I don't think we need anything in libgap (could be wrong). Just pass the right argument in sage.libs.gap.util.initialize() if there is a saved workspace. Do you want to work on it?
-
Well, I promised to either speed up libGAP startup time, or rework a libGAP-based patch into "normal" GAP one. :-) Of course I'd rather work on the former.
A dedicated libGAP function to generate a workspace might make sense, unless one achieves workspace interoperability with "normal" GAP. No idea how hard the latter is. The issue shows that the workspace layouts are not identical, and this is something I don't feel like trying to figure out myself.
-
repo owner The naive -L <workspace_name> worked for me. Of course you need to save the workspace from libgap. Details at http://trac.sagemath.org/ticket/16380
-
repo owner - changed status to resolved
- Log in to comment
I haven't tried to figure out how to use the saved workspace feauture. Presumably the path has to point to an actual saved workspace, perhaps more.