Skip to content

Should METIS Options start at 1? #52

@dgleich

Description

@dgleich

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions