-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Functions not found when calling KaHIP from python #136
Comments
Hi, I am on vacation till the end of the month. Will look at it after that.
Best
Christian
…On Fri, 15 Sep 2023, 16:47 mtraube, ***@***.***> wrote:
Hello there,
I have trouble understanding how to call different methods of kahip in
python. When running
` import kahip
#build adjacency array representation of the graph
xadj = [0,2,5,7,9,12]
adjncy = [1,4,0,2,4,1,3,2,4,0,1,3]
vwgt = [1,1,1,1,1]
adjcwgt = [1,1,1,1,1,1,1,1,1,1,1,1]
supress_output = 0
imbalance = 0.03
nblocks = 2
seed = 0
# set mode
#const int FAST = 0;
#const int ECO = 1;
#const int STRONG = 2;
#const int FASTSOCIAL = 3;
#const int ECOSOCIAL = 4;
#const int STRONGSOCIAL = 5;
mode = 2
edgecut, blocks = kahip.node_separator(vwgt, xadj, adjcwgt,
adjncy, nblocks, imbalance,
supress_output, seed, mode)
print(edgecut)
print(blocks)`
I get the error
`AttributeError: module 'kahip' has no attribute 'node_separator'
How do I call functions other than kaffpa through the python interface?
Best,
Matthias
—
Reply to this email directly, view it on GitHub
<#136>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLP7SXE55T5YYINID23U3DX2RS6JANCNFSM6AAAAAA4Z5UIWI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The problem is that the function is currently not implemented in the python wrapper (here is a link to the wrapper https://github.com/KaHIP/KaHIP/blob/fd4273cf132b1512d1242085f603e6b3952bf372/misc/pymodule/kahip.cpp). Adding this for the node separator function is not hard (almost the same as for the kaffpa function). If you need this urgently this should manageable, and I am happy to take a pull request. Otherwise, I can do it in October. Please let me know. Thanks |
Hello there,
I have trouble understanding how to call different methods of kahip in python. When running
I get the error
AttributeError: module 'kahip' has no attribute 'node_separator
How do I call functions other than
kaffpa
through the python interface?Best,
Matthias
The text was updated successfully, but these errors were encountered: