cornell-zhang / GraphZoom

GraphZoom: A Multi-level Spectral Approach for Accurate and Scalable Graph Embedding
BSD 3-Clause "New" or "Revised" License
113 stars 15 forks source link

How to modify and compile LamgSetup.m? #3

Open NIRVANALAN opened 4 years ago

NIRVANALAN commented 4 years ago

Hi, thanks for your great work; I have been reading your code. As for the code file in mat_coarsen, I wonder if I can modify and cmopile the binary file? Could you provide the instructions for this, thanks ;)

Chenhui1016 commented 4 years ago

Hi, you can modify "LamgSetup.m" and then execute "mcc -m LamgSetup.m" in the Matlab command-line mode. For more details, you can check here: https://www.mathworks.com/help/compiler/mcc.html

NIRVANALAN commented 4 years ago

Thanks for your help, I ll have a try

NIRVANALAN commented 4 years ago

Hi, is the lamg solver integrated in matlab? lamg = Solvers.newSolver('lamg'....)

Chenhui1016 commented 4 years ago

No, you need to run "make.m" file first. You can also change the lamg code in lamg/.

On Sat, Mar 21, 2020 at 11:43 AM NIRVANA notifications@github.com wrote:

Hi, is the lamg solver integrated in matlab? lamg = Solvers.newSolver('lamg'....)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cornell-zhang/GraphZoom/issues/3#issuecomment-602062332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDCMJFNV5JZ4SNKPSZ2Q2TRITODLANCNFSM4LQN3W2Q .

NIRVANALAN commented 4 years ago

Hi, thanks for your help; I have tried mcc -c LamgSetup.m -l which generates c code, while the binary file is still missing.. Actually I want to have access to the spectral affinity matrix and save them, is there anyway I can do that? There are so many files in lamg/..

NIRVANALAN commented 4 years ago

another question, I tried to run LampSetup.m in matlab and here comes the error 函数或变量 'writeMtx' 无法识别。 Does that mean I cannot execute LamgSetup.m in matlab and have to compile it first?

Chenhui1016 commented 4 years ago

Running "mcc -m LamgSetup.m" should give you binary file. You can check affinity matrix here: lamg/main/+amg/+coarse/CoarseSetAffinityMatrix.m

Have you run "make.m" before running "LamgSetup.m"?

NIRVANALAN commented 4 years ago

Thanks for your help, I can generate the LampSetup.exe in Windows now, but seems I need to compile it on linux to get the same binary file as you provide.. Meanwhile, how can I save the affinitymatrix of different level? Call WriteMtx too? Thanks again