homalg-project / CddInterface

Gap Interface to Cdd
https://homalg-project.github.io/CddInterface
Other
1 stars 5 forks source link

CddInterface functional after successful installation? #23

Open HereAround opened 3 years ago

HereAround commented 3 years ago

I am trying to use CddInterface from Julia. After successful installation, I am having trouble executing operations, such as the ones in https://github.com/homalg-project/CddInterface/blob/master/examples/FourierProjection.g. My system is Ubuntu 18.04 and I have a fresh installation of Julia 1.5.2 (2020-09-23).

Here is the output from installing CddInterface:

I Getting PackageInfo URLs...

I Retrieving PackageInfo.g from https://homalg-project.github.io/CddInterface/PackageInfo.g ...

I Downloading archive from URL https://github.com/homalg-project/CddInterface/releases/download/v2020.06.24/CddInterface-2020.06.24.tar.gz ...

I Saved archive to /tmp/tmmjXG6y/CddInterface-2020.06.24.tar.gz

I Extracting to /home/i/.julia/gaproot/v4.11/pkg/CddInterface-2020.06.24 ...

I Checking dependencies for CddInterface...

I GAPDoc >= 1.5: true

I Running compilation script on /home/i/.julia/gaproot/v4.11/pkg/CddInterface-2020.06.24 ...

true

I can load CddInterface without error via:

using CapAndHomalg LoadPackage( "CddInterface" )

Now I try the first operations in the above example:

P = Cdd_PolyhedronByGenerators( [ [ 1, 1, 2 ], [ 1, 4, 5 ] ] ); H = Cdd_H_Rep( P );

This leads to:

ERROR: Error thrown by GAP: Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `Cdd_H_Rep' on 1 arguments at /home/i/.julia/artifacts/8dd2012d4ef66568b7667a066059847825d8a1f2/share/gap/lib/methsel2.g:249 called from <function "HANDLE_METHOD_NOT_FOUND">( ) called from read-eval loop at stdin:1

Am I missing something?

kamalsaleh commented 3 years ago

Yes, the lists should be converted to GapObjects, See for example homalg_project/Julia.gi.

You can also install convenient methods as in Algebroids

HereAround commented 3 years ago

Thank you @kamalsaleh. I extend my example as follows:

using CapAndHomalg LoadPackage( "CddInterface" ) LoadPackage( "ToolsForHomalg" ) l = ConvertJuliaToGAP( [[1,1,2],[1,4,5]] ) P = Cdd_PolyhedronByGenerators( l ) H = Cdd_H_Rep( P )

This now triggers the following error:

julia: symbol lookup error: /home/i/.julia/gaproot/v4.11/pkg/CddInterface-2020.06.24/bin/x86_64-pc-linux-gnu-julia64-kv7/CddInterface.so: undefined symbol: dd_set_global_constants

Julia terminates after this operation.

mohamed-barakat commented 3 years ago

I think that neither CddInterface nor NormalizInterface is ready to be loaded from GAP.jl yet. We need help from @fingolfin to get both packages running under GAP.jl. For me, it does not even compile

CddInterface-2020.06.24.log

kamalsaleh commented 3 years ago

I can reproduce the error the Martin mentioned: undefined symbol: dd_set_global_constants. Let us see if Max has a quick solution. @mohamed-barakat the log file means that cdd is not available on the system (not installed or not compiled). Did this occur after running ./install.sh?

mohamed-barakat commented 3 years ago

@mohamed-barakat the log file means that cdd is not available on the system (not installed or not compiled). Did this occur after running ./install.sh?

No, this occurred after running

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.3 (2020-11-09)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using GAP

julia> GAP.Packages.install("CddInterface")
#I  Getting PackageInfo URLs...
#I  Retrieving PackageInfo.g from https://homalg-project.github.io/CddInterface/PackageInfo.g ...
#I  Downloading archive from URL https://github.com/homalg-project/CddInterface/releases/download/v2020.06.24/CddInterface-2020.06.24.tar.gz ...
#I  Saved archive to /var/folders/z7/br6dwhjj5xn8691ygcnbzxc40000gs/T//tmUL7PVj/CddInterface-2020.06.24.tar.gz
#I  Extracting to /Users/mo/.julia/gaproot/v4.11/pkg/CddInterface-2020.06.24 ...
#I  Checking dependencies for CddInterface...
#I    GAPDoc >= 1.5: true
#I  Running compilation script on /Users/mo/.julia/gaproot/v4.11/pkg/CddInterface-2020.06.24 ...
#I  Checking dependencies for CddInterface...
#I    GAPDoc >= 1.5: true
#I  Package availability test failed
#I  (for CddInterface 2020.06.24)
#I  Removed directory /Users/mo/.julia/gaproot/v4.11/pkg/CddInterface-2020.06.24
false

julia>