-
Notifications
You must be signed in to change notification settings - Fork 19
Description
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?