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

Should METIS Options start at 1? #52

Open
dgleich opened this issue Jan 25, 2023 · 0 comments
Open

Should METIS Options start at 1? #52

dgleich opened this issue Jan 25, 2023 · 0 comments

Comments

@dgleich
Copy link

dgleich commented Jan 25, 2023

I spent a few hours tracking down a bug in my own code that was due to METIS options being indexed from 0 instead of indexed by one.

@cenum moptions_et::UInt32 begin
METIS_OPTION_PTYPE = 0
METIS_OPTION_OBJTYPE = 1
METIS_OPTION_CTYPE = 2
METIS_OPTION_IPTYPE = 3
METIS_OPTION_RTYPE = 4
METIS_OPTION_DBGLVL = 5
METIS_OPTION_NITER = 6
METIS_OPTION_NCUTS = 7
METIS_OPTION_SEED = 8
METIS_OPTION_NO2HOP = 9
METIS_OPTION_MINCONN = 10
METIS_OPTION_CONTIG = 11
METIS_OPTION_COMPRESS = 12
METIS_OPTION_CCORDER = 13
METIS_OPTION_PFACTOR = 14
METIS_OPTION_NSEPS = 15
METIS_OPTION_UFACTOR = 16
METIS_OPTION_NUMBERING = 17
METIS_OPTION_HELP = 18
METIS_OPTION_TPWGTS = 19
METIS_OPTION_NCOMMON = 20
METIS_OPTION_NOOUTPUT = 21
METIS_OPTION_BALANCE = 22
METIS_OPTION_GTYPE = 23
METIS_OPTION_UBVEC = 24
end

I was just trying to change the "seed" so I got random results from different runs. But this actually changed the NCUTS variable, which made the code run forever.

Other ideas to help folks avoid bugs like this in the future?

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

1 participant