-
Notifications
You must be signed in to change notification settings - Fork 32
Docs/generator section refactor #1501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
097cea1
bump some dev dependencies, add some missing docs dependencies
jlnav 13f1d82
trying to reduce some of the listed example gen funcs in some section…
jlnav bfe1a46
some simplifying language in aposmm.rst
jlnav dfeb9a0
some cleanup, including replacing some single-quotes with double-quot…
jlnav 52ee430
Merge branch 'develop' into docs/generator_section_refactor
jlnav 64ddfca
decrement matplotlib in pyproject.toml, add links to community exampl…
jlnav af3896c
some rearranging, including having index under Examples, will fill wi…
jlnav 771db72
Merge remote-tracking branch 'origin/develop' into docs/generator_sec…
shuds13 8a4f2c7
New intro line focussed on supercomputers
shuds13 81e6813
Fix gpCAM rst file
shuds13 40b2725
Alternative layout of gen examples
shuds13 695c3ea
update gens
shuds13 88366cf
update gens
shuds13 6f37765
Update wording for uniform_or_localopt
shuds13 d08462d
Add examples to tasmanian
shuds13 c7c10c4
Add missing kill_canceled_sims
shuds13 9789fd2
Add examples to Surmise
shuds13 d223383
Update gen docs
shuds13 e2cd95c
Update APOSMM docs
shuds13 728a246
Update sampling generator docs
shuds13 b1b0b22
cleanup gen funcs
shuds13 0c0e949
Remove mistaken file
shuds13 a2839fa
Add correct var resources doc file
shuds13 900584b
Update sim funcs examples
shuds13 d3e050e
Add info to sim funcs docs
shuds13 86a2995
Split forces sim func examples
shuds13 8763292
Add multi-app sim to docs and update links
shuds13 cf63cf8
Make Ax>=0.5.0 required
shuds13 904c06e
Prevent failure to build docs from Ax warning
shuds13 41c0b53
Minor fixes for docs
shuds13 43f927a
Mock pyre_extensions
shuds13 d2061c4
Mock torch
shuds13 c1e3d69
Update forces calling script example
shuds13 8df89d4
Stop # noqa appearing in docs
shuds13 f171db8
Highlight start_only_persistent
shuds13 3661ea4
Add alloc funcs in examples
shuds13 04d35b6
alloc docstring fixes
shuds13 da5dc59
Formatting fix
shuds13 1fe7221
Merge pull request #1519 from Libensemble/docs/alt_gen_refactor
shuds13 93f0846
Formatting fixes
shuds13 a14d045
Update examples intro
shuds13 d237c65
Merge branch 'develop' into docs/generator_section_refactor
jlnav 3e97272
bump dev dependencies, "fix" noqa strip line
jlnav 90ced44
specify Community Examples repository alongside regression tests for …
jlnav 7716696
Add sim func for forces with input file
shuds13 c8bfdaa
Reorder build_forces lines and link from examples
shuds13 8c06276
Add example usage to mock sim docs
shuds13 ee9cbf6
Format mock_sim
shuds13 cba6ff6
Revert parameter formatting in start_only_persistent
shuds13 437cab3
Re-sorting for gens
jmlarson1 cdd6b33
Cleanup
jmlarson1 78c6d1f
Cleanup
jmlarson1 0060992
isort
jmlarson1 4e12bad
blacken-docs
jmlarson1 67dc2e8
Sim functions re-works
jmlarson1 9f28095
Sim functions re-works
jmlarson1 39cd732
Newer tagline as suggested by wildsm
jlnav 9302d17
modify bebop-distributed example script to use pbs instead, presumabl…
jlnav 7de8534
try removing overview of examples from left toctree, fix filenames fo…
jlnav c8ecc09
Merge branch 'develop' into docs/generator_section_refactor
jlnav fb8c609
Update submission script examples
shuds13 9bb1c4b
Add simple LSF script
shuds13 2f7001c
Mirror submission scripts to examples section
shuds13 2fbde00
Add example submit scripts perlmutter/frontier
shuds13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,4 +36,3 @@ updates: | |
| submodule-updates: | ||
| patterns: | ||
| - "*" | ||
|
|
||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,16 @@ APOSMM | |
| ------ | ||
|
|
||
| Asynchronously Parallel Optimization Solver for finding Multiple Minima | ||
| (APOSMM) coordinates concurrent local optimization runs in order to identify | ||
| many local minima. | ||
| (APOSMM) coordinates concurrent local optimization runs to identify | ||
| many local minima faster on parallel hardware. | ||
|
|
||
| Supported local optimization routines include: | ||
|
|
||
| - DFO-LS_ Derivative-free solver for (bound constrained) nonlinear least-squares minimization | ||
| - NLopt_ Library for nonlinear optimization, providing a common interface for various methods | ||
| - `scipy.optimize`_ Open-source solvers for nonlinear problems, linear programming, | ||
| constrained and nonlinear least-squares, root finding, and curve fitting. | ||
| - `PETSc/TAO`_ Routines for the scalable (parallel) solution of scientific applications | ||
|
|
||
| Required: mpmath_, SciPy_ | ||
|
|
||
|
|
@@ -12,32 +20,26 @@ Optional (see below): petsc4py_, nlopt_, DFO-LS_ | |
| Configuring APOSMM | ||
| ^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| APOSMM works with a choice of optimizers, some requiring external packages. To | ||
| import the optimization packages (and their dependencies) at a global level | ||
| (recommended), add the following lines in the calling script before importing | ||
| APOSMM:: | ||
| APOSMM works with a choice of optimizers, some requiring external packages. Specify | ||
| them on a global level before importing APOSMM:: | ||
|
|
||
| import libensemble.gen_funcs | ||
| libensemble.gen_funcs.rc.aposmm_optimizers = <optimizers> | ||
|
|
||
| where ``optimizers`` is a string (or list of strings) from the available options: | ||
| where ``optimizers`` is a string (or list-of-strings) from: | ||
|
|
||
| ``"petsc"``, ``"nlopt"``, ``"dfols"``, ``"scipy"``, ``"external"`` | ||
|
|
||
| .. dropdown:: Issues with ensemble hanging or failed simulations? | ||
|
|
||
| Note that if using **mpi4py** comms, PETSc must be imported at the global | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed? |
||
| level or the ensemble may hang. | ||
| .. dropdown:: Issues with ensemble hanging or failed simulations with PETSc? | ||
|
|
||
| Exception: In the case that you are using the MPIExecutor or other MPI inside | ||
| a user function and you are using Open MPI, then you must: | ||
| If using the MPIExecutor or other MPI routines | ||
| and your MPI backend is Open MPI, then you must: | ||
|
|
||
| - Use ``local`` comms for libEnsemble (not ``mpi4py``) | ||
| - Must **NOT** include the *rc* line above | ||
| - Use ``local`` comms for libEnsemble (no ``mpirun``, ``mpiexec``, ``aprun``, etc.). | ||
| - Must **NOT** include the *aposmm_optimizers* line above. | ||
|
|
||
| This is because PETSc imports MPI, and a global import of PETSc would result | ||
| in nested MPI (which is not supported by Open MPI). When the above line is | ||
| not used, an import local to the optimization function will happen. | ||
| This is because PETSc imports MPI, and a global import of PETSc results | ||
| in nested MPI (which is not supported by Open MPI). | ||
|
|
||
| To see the optimization algorithms supported, see `LocalOptInterfacer`_. | ||
|
|
||
|
|
@@ -49,17 +51,19 @@ Persistent APOSMM | |
| ^^^^^^^^^^^^^^^^^ | ||
|
|
||
| .. automodule:: persistent_aposmm | ||
| :members: | ||
| :members: aposmm | ||
| :undoc-members: | ||
|
|
||
| LocalOptInterfacer | ||
| ^^^^^^^^^^^^^^^^^^ | ||
| .. automodule:: aposmm_localopt_support | ||
| :members: | ||
| :members: LocalOptInterfacer | ||
| :undoc-members: | ||
|
|
||
| .. _DFO-LS: https://github.com/numericalalgorithmsgroup/dfols | ||
| .. _mpmath: https://pypi.org/project/mpmath | ||
| .. _nlopt: https://nlopt.readthedocs.io/en/latest/ | ||
| .. _petsc4py: https://bitbucket.org/petsc/petsc4py | ||
| .. _SciPy: https://pypi.org/project/scipy | ||
| .. _PETSc/TAO: http://www.mcs.anl.gov/petsc | ||
| .. _scipy.optimize: https://docs.scipy.org/doc/scipy/reference/optimize.html | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,18 @@ | ||
| persistent_ax_multitask | ||
| ----------------------- | ||
|
|
||
| Required: Ax_ version <=0.4.0 | ||
| Required: `ax-platform`_>=0.5.0 | ||
|
|
||
| Example usage: gp_multitask_ax_ | ||
|
|
||
| To install:: | ||
|
|
||
| pip install "ax-platform<=0.4.0" | ||
| pip install ax-platform | ||
|
|
||
| An example of the Ax multitask GP. | ||
|
|
||
| .. automodule:: persistent_ax_multitask | ||
| :members: | ||
| :no-undoc-members: | ||
|
|
||
| .. _Ax: https://github.com/facebook/Ax | ||
| .. _`ax-platform`: https://github.com/facebook/Ax | ||
| .. _gp_multitask_ax: https://github.com/Libensemble/libensemble/blob/main/libensemble/tests/regression_tests/test_persistent_gp_multitask_ax.py |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are occasions where we cant do this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know of cases were we can't import the external local opt before APOSMM
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1064
If you import PETSc globally when running with openMPI (and using the executor) you have nested MPI (as PETSC imports MPI). So it must be imported in the function in those cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a note to point to this issue with PETSc?