docs(cluster): commands that exist, a plain answer on SSH logins, and how to size a fit to the processors reserved (#622) - #634
Merged
Conversation
…er which runs log in anywhere, and says how to size a fit to the processors reserved (#622) `docs/cluster.rst` is the only guidance a user has for running PyBNF on a cluster, and parts of it described a program that no longer exists, answered a failure with advice that cannot fix it, and said nothing about the setting that decides whether an allocation is used at all. The command names were corrected when the launcher was (#615, #631); this is the rest of #622. **Which ways of starting a run log in to other machines.** The old "Troubleshooting: SSH access to nodes" treated every multi-machine failure as a missing key. On the cluster in #614 keys were not the obstacle: logging in by hand already worked, and the run still failed, because `dask ssh` does not run `ssh` -- it logs in through paramiko, which can offer a public key or a typed password and nothing else, so a cluster that authenticates its nodes by host-based or Kerberos SSH refuses a login the user can make by hand. A table now says plainly which of the five ways of starting a run involves a login at all (`-t slurm` and `scheduler_node`/`worker_nodes` do; `-t slurm-srun`, `-s cluster.json` and a single-machine run do not), and the section hands the reader the login PyBNF actually attempts, as a one-line paramiko connection that mirrors `distributed.deploy.old_ssh` argument for argument. Its three outcomes are separated: it succeeds, so `-t slurm` will work; it raises `AuthenticationException` where plain `ssh` succeeds, so no key will help and `-t slurm-srun` is the answer; or it asks for a password, which is the one case `ssh-keygen` fixes. **Sizing a run.** Nothing on the page connected the processors a user reserves to the number PyBNF can keep busy, which is the choice that decides whether a run is worth its queue time. A new section gives the two numbers -- the workers, which is what the job was granted, and the simulations in flight, which is `population_size` for almost every algorithm -- and a table of what each `fit_type` can actually run at once: `population_size` for the population methods and the samplers, `population_size` x (`population_size` - 1) for scatter search, min(`population_size`, N-1) per start for Simplex, one per start for Powell, two walks per parameter for profile likelihood, and none at all for `hmc`, whose chains never reach a worker. The wave arithmetic of a synchronized algorithm is stated (129 parameter sets on 128 workers costs what 256 would), and the shipped tcr example is walked through, since its `population_size = 9` is exactly the 72 processors its batch script reserves. **Where simulation files are written.** The `simulation_dir` advice read as general when it is not: on the ordinary network filesystem most clusters give you the default is right, and the key is for a parallel filesystem such as Lustre or GPFS. The new section says which case is which, and adds the requirement that made it worth writing down -- the directory has to be visible from the node PyBNF runs on, because that is where the best fit's output is copied from when `delete_old_files = 0`. **Example batch scripts.** The nine scripts that told the reader to load Anaconda for "Python 3.5" now carry a marked line to edit for a Python 3.11 or newer environment. The tcr and tlbr scripts additionally reserve processors that match their own configs (4 x 18 = 72 for scatter search with a reference set of 9; 5 x 30 = 150 for 250 parameter sets x 3 smoothing replicates), so the two examples the page points at demonstrate the sizing section rather than contradicting it. Also corrected in passing: `docs/algorithms.rst` claimed Simplex fans out to `parallel_count` processors and could use N+1 of them. It uses min(`population_size`, N-1) per start, times `n_starts` concurrent starts, and has since #498. Prose only -- no key changes meaning and no code is touched. `sphinx-build -W --keep-going` is clean. Signed-off-by: Bill Hlavacek <hlavacek@lanl.gov>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #622.
docs/cluster.rstis the only guidance for running PyBNF on a cluster, and parts of it described a program that no longer exists, answered a failure with advice that cannot fix it, and said nothing about the setting that decides whether an allocation gets used. This is a prose-only change: no key changes meaning, no code is touched, andsphinx-build -W --keep-goingis clean.The command names
Already corrected on
mainby #631, which renamed them in the code and the docs together. Verified here that nodask-scheduler/dask-worker/dask-sshspelling survives outside the CHANGELOG, the ADR, and the tests that pin the old names on purpose.Which ways of starting a run log in to other machines
The old "Troubleshooting: SSH access to nodes" treated every multi-machine failure as a missing key. On the cluster in #614 that was not the obstacle: logging in by hand worked and the run still failed, because
dask sshdoes not runssh— it logs in through paramiko, which offers a public key or a typed password and nothing else.The section now opens with a table of which ways involve a login at all:
-t slurmdask sshto every allocated nodescheduler_node/worker_nodes-t slurm-srun-s cluster.jsonand then hands the reader the login PyBNF actually attempts, as a one-line paramiko connection mirroring
distributed.deploy.old_sshargument for argument, with its three outcomes separated: it succeeds; it raisesAuthenticationExceptionwhere plainsshsucceeds (no key will help — use-t slurm-srun); or it asks for a password, which is the one casessh-keygenfixes.Sizing a run
New section connecting the processors reserved to the number PyBNF can keep busy: the workers (what the job was granted) against the simulations in flight (
population_sizefor almost every algorithm), with a table of what eachfit_typecan really run at once —population_sizefor the population methods and samplers,population_size × (population_size − 1)for scatter search,min(population_size, N−1)per start for Simplex, one per start for Powell, two walks per parameter for profile likelihood, and none forhmc, whose chains never reach a worker. Includes the wave arithmetic for synchronized algorithms (129 parameter sets on 128 workers costs what 256 would) and a walk-through of the shipped tcr example, whosepopulation_size = 9is exactly the 72 processors its batch script reserves.Where simulation files are written
The
simulation_diradvice read as general when it is not. The new section says the default is right on the ordinary network filesystem most clusters give you, that the key exists for a parallel filesystem such as Lustre or GPFS, and adds the requirement worth writing down: the directory must be visible from the node PyBNF runs on, since that is where the best fit's output is copied from whendelete_old_files = 0.Example batch scripts
The nine scripts telling the reader to load Anaconda for "Python 3.5" now carry a marked line to edit for a Python 3.11+ environment.
examples/tcr/tcr_batch.shandexamples/tlbr/tlbr_batch.shalso reserve processors matching their own configs (4 × 18 = 72 for a reference set of 9; 5 × 30 = 150 for 250 parameter sets × 3 smoothing replicates), so the examples the page points at demonstrate the sizing section rather than contradicting it.Also corrected in passing
docs/algorithms.rstclaimed Simplex fans out toparallel_countprocessors and could use N+1 of them. It usesmin(population_size, N−1)per start, timesn_startsconcurrent starts, and has since #498.