Skip to content
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

METIS_OPTION_NUMBERING is essentially undocumented #58

Open
thk686 opened this issue Dec 23, 2022 · 6 comments
Open

METIS_OPTION_NUMBERING is essentially undocumented #58

thk686 opened this issue Dec 23, 2022 · 6 comments

Comments

@thk686
Copy link

thk686 commented Dec 23, 2022

For such an important value (a sure-fire way to segfault if you get it wrong), it is remarkable how difficult it is to figure out the default value of this parameter in the documentation and even when searching the code.

@Fabian188
Copy link

Fabian188 commented Jan 14, 2023

I'm quite lost with the defaults. I thought it works like

        idx_t options[METIS_NOPTIONS];
        METIS_SetDefaultOptions(options);

But all values I check, including options[METIS_OPTION_NUMBERING], are set to -1?!

@thk686
Copy link
Author

thk686 commented Jan 14, 2023

Indeed:

int METIS_SetDefaultOptions(idx_t *options) 
{
  iset(METIS_NOPTIONS, -1, options);
  return METIS_OK;
}

@thk686
Copy link
Author

thk686 commented Jan 14, 2023

Looks like its zero:

ctrl->numflag   = GETOPTION(options, METIS_OPTION_NUMBERING, 0);

@thk686
Copy link
Author

thk686 commented Jan 14, 2023

So It appears that -1 in the options indicates to use the default rather than being the default. The confusing part is that all the options are copied into the ctrl structure.

@Fabian188
Copy link

That makes indeed sense if the defaults are selected depending on the actual data (now or in the future).

@Fabian188
Copy link

Thanks for the clarifications via code quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants