-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segment fault/Bus error from CreateHomalgMatrixFromSparseString in Singular #307
Comments
This is a Singular problem. You can use
(before creating the ring) to instruct homalg to dump the communication in a Singular-readable ifle. |
Thanks for the suggestion. I have just tried this on Plesken: LoadPackage( "RingsForHomalg" ); Unfortunately, this leads to the same error as above. |
Yes, but you now have the Singular-dump :) So now you can take the dump with the needed file entries.txt and open an issue on Singular/Sources. |
What is the state of this issue? |
Andreas Steenpass suggested, that this is likely linked to insufficient RAM. Moreover, it seems possible to save RAM by changing the code supplied to Singular by the CASForHomalg-Interface. Whilst I believe that this is likely to fix the issue, I have unfortunately not yet been able to investigate in more detail for time reasons. |
Good, then we leave it open until you report on it. |
Let me comment more on the above. I have just tried to run the above code again, and it is working now. Still, it typically requires about 40GB of RAM. Hence, as suggested above, this code will likely fail in case there is fewer RAM available.
Maybe we can discuss, if all of this can be resolved uniformly by a package "SparseMatricesForHomalg", which provides SparseMatrices interfaces to Singular, Magma, Spasms... Or (if not already happened?) we extend the existing MatricesForHomalgPackage by this functionality. |
This is not as easy as it seems since |
Yes, this would be great but should happen in coordination with the new matrixobj interface in GAP. On the long run, I would like to outsource the handling of matrices/sparse-matrices to GAP/Julia/Oscar. |
I suppose a specialized/additional `homalgSendBlocking'-method, which initializes objects with zeros, is too involved (e.g. for architectural reasons)? |
I agree. Best to solve this once in one place. |
homallgSendBlocking is a global function that does the complex analysis internally, which would be far too complicated for GAP's simplistic method selection. If this a really a pressing serious issue for you I can invest some time and resolve it for you. |
Thank you Mohamed. No, I think the current support for matrices is sufficient (and has been for years). Let us consider this a feature request. |
I create a large (56.426 x 48.018) spare matrix over the rationals in Singular. For convenience, the entries are saved as a list in the following .txt file:
entries.txt
Now I issue the following code, to crease the corresponding matrix:
LoadPackage( "RingsForHomalg" );
rationals := HomalgFieldOfRationalsInSingular();
Read( "entries.txt" );
matrix := CreateHomalgMatrixFromSparseString( String( entries ), 56426, 48018, rationals );
On Plesken, this leads to the following error message:
Error, the external CAS Singular (running with PID 406990) returned the following error:
Singular : signal 11 (v: 4122):
current line:>>homalg_variable_5[38059,42739]=1;<<
Segment fault/Bus error occurred at 7f11f1c2ce68 because of 10a82 (r:1579015574)
please inform the authors
trying to restart...
at /opt/gap/gap_pkg/pkg/homalg_project/HomalgToCAS/gap/homalgSendBlocking.gi:812 called from
homalgSendBlocking( [ M, "[", c, r, "]=", s ], "need_command", HOMALG_IO.Pictograms.SetMatElm ); at /opt/gap/gap_pkg/pkg/homalg_project/RingsForHomalg/gap/Singular.gi:2113 called from
SetMatElm( M, Int( a[1] ), Int( a[2] ), a[3], R ); at /opt/gap/gap_pkg/pkg/homalg_project/MatricesForHomalg/gap/HomalgMatrix.gi:2139 called from
f( x ); at /opt/gap/gap-stable-4.11/lib/coll.gi:2189 called from
Perform( s, function ( a )
SetMatElm( M, Int( a[1] ), Int( a[2] ), a[3], R );
return;
end ); at /opt/gap/gap_pkg/pkg/homalg_project/MatricesForHomalg/gap/HomalgMatrix.gi:2139 called from
<function "CreateHomalgMatrixFromSparseString constructor for homalg matrices">( )
called from read-eval loop at Error.gi:14
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
Any suggestion on how this can be fixed?
The text was updated successfully, but these errors were encountered: