iqtree / iqtree2

NEW location of IQ-TREE software for efficient phylogenomic software by maximum likelihood http://www.iqtree.org
GNU General Public License v2.0
246 stars 57 forks source link

Document in help string that `--nt`/`-c`/`-T`/`--threads` are synonyms, print always `-T` instead of `-nt` #273

Open corneliusroemer opened 4 months ago

corneliusroemer commented 4 months ago

The current iqtree2 -h help string mentions -T as the option to use to set threads.

 iqtree2 -h       
IQ-TREE multicore version 2.3.5 for MacOS ARM 64-bit built Jul 10 2024
...snip...
GENERAL OPTIONS:
...snip...
  -T NUM|AUTO          No. cores/threads or AUTO-detect (default: 1)
  --threads-max NUM    Max number of threads for -T AUTO (default: all cores)

I remember setting -nt in the past, e.g. with v2.1, and was wondering whether there had been a breaking change.

It turns out these options are all synonyms (as far as I can tell): https://github.com/iqtree/iqtree2/blob/74da454bbd98d6ecb8cb955975a50de59785fbde/utils/tools.cpp#L4867-L4868

It might be nice to mention all options in the -h string, for example - potentially adding that they all but -T are deprecated (if that's the case).

Is it true that these are exact synonyms?

The code seems to output -nt to the user on stderr, maybe these should also be unified to use -T to be less confusing to users (if a user sees that message and looks at help, they won't find anything called -nt)

corneliusroemer commented 4 months ago

There seems to have been a general renaming effort from -nt to -T but this might have been left over:

Similarly, -ntmax appears to be a synonym of --threads-max per https://github.com/iqtree/iqtree2/blob/74da454bbd98d6ecb8cb955975a50de59785fbde/utils/tools.cpp#L4882-L4883