TeamCOMPAS / COMPAS

COMPAS rapid binary population synthesis code
http://compas.science
MIT License
64 stars 66 forks source link

Some options not showing up in COMPAS --help #508

Closed reinhold-willcox closed 3 years ago

reinhold-willcox commented 3 years ago

Describe the bug There are some options which COMPAS will happily read in, but which do not show up in the output of COMPAS --help. I noticed --pisn-lower-limit and --pisn-upper-limit, by comparing the compas help to the python submit options. There may be others though. I'm not sure if COMPAS treats these parameters as expected, or if it quietly ignores them.

Label the issue urgency_low - This issue is not urgent severity_minor - This is a minor bug with minimal impact

To Reproduce Run COMPAS --pisn-upper-limit 6 and there should be no error, but the parameter is not in help.

Expected behavior Available options should all be in the help.

Versioning (please complete the following information):

reinhold-willcox commented 3 years ago

Also, --ppi-lower-limit --ppi-upper-limit

SimonStevenson commented 3 years ago

For me these options appear at the top of the help

`spstevenson$ ./COMPAS --help

COMPAS v02.18.01 Compact Object Mergers: Population Astrophysics and Statistics by Team COMPAS (http://compas.science/index.html) A binary star simulator

Options: --PISN-lower-limit Minimum core mass for PISN (default = 60.000000) --PISN-upper-limit Maximum core mass for PISN (default = 135.000000) --PPI-lower-limit Minimum core mass for PPI (default = 35.000000) --PPI-upper-limit Maximum core mass for PPI (default = 60.000000)`

jeffriley commented 3 years ago

@SimonStevenson is right. Well, I see what he sees (see below) - if @reinhold-willcox doesn't then there is a problem. I print the options in the order that Boost gives them to me - see Options::PrintOptionHelp(). It looks like the Boost map is in ASCII order, so the uppercase alphabet comes before the lowercase alphabet, and some of our options have uppercase strings in them (the ones that are the subject of this issue).

Three possible solutions:

( i) close this issue as not an issue - the options are printed in the HELP output ( ii) change the option names in the COMPAS source code to be lowercase only (iii) change Options::PrintOptionHelp() so that it sorts the output and ignores case

(ii) is probably a good compromise.

./compas -h

COMPAS v02.18.02 Compact Object Mergers: Population Astrophysics and Statistics by Team COMPAS (http://compas.science/index.html) A binary star simulator

Options: --PISN-lower-limit --PISN-upper-limit --PPI-lower-limit --PPI-upper-limit --allow-rlof-at-birth --allow-touching-at-birth --angular-momentum-conservation-during-circularisation --black-hole-kicks --case-BB-stability-prescription --check-photon-tiring-limit --chemically-homogeneous-evolution --circularise-binary-during-mass-transfer --common-envelope-allow-main-sequence-survive --common-envelope-alpha --common-envelope-alpha-thermal --common-envelope-lambda --common-envelope-lambda-multiplier --common-envelope-lambda-prescription --common-envelope-mass-accretion-constant --common-envelope-mass-accretion-max --common-envelope-mass-accretion-min --common-envelope-mass-accretion-prescription --common-envelope-recombination-energy-density --common-envelope-slope-kruckow --cool-wind-mass-loss-multiplier --debug-classes --debug-level --debug-to-file --detailed-output --eccentricity [ -e ] --eccentricity-distribution --eccentricity-max --eccentricity-min --eddington-accretion-factor --enable-warnings --envelope-state-prescription --errors-to-file --evolve-pulsars --evolve-unbound-systems --fix-dimensionless-kick-magnitude --fryer-supernova-engine --grid --hdf5-buffer-size --hdf5-chunk-size --help [ -h ] --initial-mass --initial-mass-1 --initial-mass-2 --initial-mass-function [ -i ] --initial-mass-max --initial-mass-min --initial-mass-power --kick-direction --kick-direction-power --kick-magnitude --kick-magnitude-1 --kick-magnitude-2 --kick-magnitude-distribution --kick-magnitude-max --kick-magnitude-random --kick-magnitude-random-1 --kick-magnitude-random-2 --kick-magnitude-sigma-CCSN-BH --kick-magnitude-sigma-CCSN-NS --kick-magnitude-sigma-ECSN --kick-magnitude-sigma-USSN --kick-mean-anomaly-1 --kick-mean-anomaly-2 --kick-phi-1 --kick-phi-2 --kick-scaling-factor --kick-theta-1 --kick-theta-2 --log-classes --log-level --logfile-common-envelopes --logfile-definitions --logfile-detailed-output --logfile-double-compact-objects --logfile-name-prefix --logfile-pulsar-evolution --logfile-rlof-parameters --logfile-supernovae --logfile-switch-log --logfile-system-parameters --logfile-type --luminous-blue-variable-multiplier --luminous-blue-variable-prescription --mass-loss-prescription --mass-ratio [ -q ] --mass-ratio-distribution --mass-ratio-max --mass-ratio-min --mass-transfer --mass-transfer-accretion-efficiency-prescription --mass-transfer-angular-momentum-loss-prescription --mass-transfer-fa --mass-transfer-jloss --mass-transfer-rejuvenation-prescription --mass-transfer-thermal-limit-C --mass-transfer-thermal-limit-accretor --maximum-evolution-time --maximum-mass-donor-nandez-ivanova --maximum-neutron-star-mass --maximum-number-timestep-iterations --mcbur1 --metallicity [ -z ] --metallicity-distribution --metallicity-max --metallicity-min --minimum-secondary-mass --mode --muller-mandel-kick-multiplier-BH --muller-mandel-kick-multiplier-NS --neutrino-mass-loss-BH-formation --neutrino-mass-loss-BH-formation-value --neutron-star-equation-of-state --number-of-systems [ -n ] --orbital-period --orbital-period-distribution --orbital-period-max --orbital-period-min --output-container [ -c ] --output-path [ -o ] --overall-wind-mass-loss-multiplier --pair-instability-supernovae --population-data-printing --print-bool-as-string --pulsar-birth-magnetic-field-distribution --pulsar-birth-magnetic-field-distribution-max --pulsar-birth-magnetic-field-distribution-min --pulsar-birth-spin-period-distribution --pulsar-birth-spin-period-distribution-max --pulsar-birth-spin-period-distribution-min --pulsar-magnetic-field-decay-massscale --pulsar-magnetic-field-decay-timescale --pulsar-minimum-magnetic-field --pulsational-pair-instability --pulsational-pair-instability-prescription --quiet --random-seed --remnant-mass-prescription --revised-energy-formalism-nandez-ivanova --rlof-printing --rotational-velocity-distribution --semi-major-axis [ -a ] --semi-major-axis-distribution --semi-major-axis-max --semi-major-axis-min --stellar-zeta-prescription --switch-log --timestep-multiplier --use-mass-loss --version [ -v ] --wolf-rayet-multiplier --zeta-adiabatic-arbitrary --zeta-main-sequence --zeta-radiative-envelope-giant

reinhold-willcox commented 3 years ago

Ah, that's on me. PythonSubmit uses the lower case version, while COMPAS --help uses uppercase. I think COMPAS can take both, so there's not really an issue. But it might be good to set all option flags to lowercase in the future.