KaHIP icon indicating copy to clipboard operation
KaHIP copied to clipboard

64bit edges not reflected in the headers

Open olesenm opened this issue 5 years ago • 12 comments

If I compile with 64bit edges, I'd expect a modified of the kaHIP_interface.h file to reflect this, but it only seems to be unaffected. The kaffpa() call uses int*

olesenm avatar Oct 28 '19 11:10 olesenm

thanks, will integrate it with the next version.

schulzchristian avatar Nov 12 '19 14:11 schulzchristian

Would it be possible/reasonable to define a typedef such as kahip_idxtype and possibly parkahip_idxtype in the headers. This would make it possible to extract some sizing information from the header and then compare this to the expectations. Eg, let us build a widening container for the indices and adjacency list. Could then always compile in 64bit and link with our 32-bit or 64-bit addressing.

olesenm avatar Nov 12 '19 17:11 olesenm

Hey Mark, I am currently looking into this. Could you explain a little bit more what you need? Maybe I am able to integrate it in the current sprint.

schulzchristian avatar Jul 30 '20 13:07 schulzchristian

Hi,

I still meet this problem with the latest master branch. The type in kaHIP_interface.h is still int when compiling with 64BITMODE

VoVAllen avatar Dec 28 '21 10:12 VoVAllen

Hi, I am happy if you issue a pull request.

schulzchristian avatar Dec 28 '21 10:12 schulzchristian

@schulzchristian I feel it's complicated. The signatures in https://github.com/KaHIP/KaHIP/blob/2158c5b6c07ae1b5755bcda6ea7adbca1a3618a2/interface/kaHIP_interface.cpp are all int. Is it safe to replace them with EdgeID or NodeID?

VoVAllen avatar Dec 28 '21 10:12 VoVAllen

@VoVAllen nice that you are looking at this. I ran out of time to pursue it further...

olesenm avatar Dec 28 '21 17:12 olesenm

I will look into it next week.

Best Christian

schulzchristian avatar Dec 29 '21 08:12 schulzchristian

Along these lines if a typedef is added would it be possible to also add a function to query the size? Something like

int kahip_idx_size();

This is extremely useful for ABI purposes as it means given libkahip.so we do not need to guess what the index type size is. A good example of this is SCOTCH_numSizeof in SCOTCH which fulfils a similar role.

FreddieWitherden avatar Mar 25 '24 23:03 FreddieWitherden

Hi @FreddieWitherden, I am happy to add this through a pull request.

schulzchristian avatar Mar 27 '24 10:03 schulzchristian

Perfect! I will work on something over the next few days and submit for feedback.

FreddieWitherden avatar Mar 27 '24 11:03 FreddieWitherden

First attempt at this is in #148

FreddieWitherden avatar Apr 02 '24 22:04 FreddieWitherden