Skip to content

Commit

Permalink
Merge pull request #601 from Libensemble/release/v_0.7.2
Browse files Browse the repository at this point in the history
Release/v 0.7.2
  • Loading branch information
shuds13 committed May 3, 2021
2 parents 0d699f4 + 2a68955 commit 264cc62
Show file tree
Hide file tree
Showing 193 changed files with 4,539 additions and 1,427 deletions.
10 changes: 8 additions & 2 deletions .flake8
Expand Up @@ -23,7 +23,7 @@ per-file-ignores =
libensemble/libensemble/__init__.py:F401

# worker uses regex with chars that resemble escape sequences
libensemble/libE_worker.py:W605
libensemble/worker.py:W605

# Need to turn of matching probes (before other imports) on some
# systems/versions of MPI:
Expand All @@ -43,4 +43,10 @@ per-file-ignores =
examples/calling_scripts/run_libensemble_on_warpx.py:E402
libensemble/gen_funcs/persistent_aposmm.py:E402, E501
libensemble/tests/regression_tests/test_persistent_aposmm*:E402
libensemble/tests/regression_tests/test_old_aposmm*:E402
libensemble/tests/deprecated_tests/test_old_aposmm*:E402

# Ignoring linelength in test_history.py
libensemble/tests/unit_tests/test_history.py:E501

# Allow undefined name '__version__'
setup.py:F821
143 changes: 143 additions & 0 deletions .github/workflows/libE-ci.yml
@@ -0,0 +1,143 @@
name: libEnsemble-CI
on: [push, pull_request]
jobs:
test-libE:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
comms-type: [m, l, t]
exclude:
- os: macos-latest
python-version: 3.6
- os: macos-latest
python-version: 3.7

env:
HYDRA_LAUNCHER: 'fork'
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- name: Setup conda - Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: condaenv
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: flexible
auto-update-conda: true

- name: Install Ubuntu compilers
if: matrix.os == 'ubuntu-16.04'
run: conda install gcc_linux-64

# Roundabout solution on macos for proper linking with mpicc
- name: Install macOS compilers and older SDK
if: matrix.os == 'macos-latest'
run: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.14.sdk.tar.xz
mkdir ../sdk; tar xf MacOSX10.14.sdk.tar.xz -C ../sdk
conda install clang_osx-64=9.0.1
- name: Install Octave and bc on Ubuntu
if: matrix.os == 'ubuntu-16.04'
run: |
sudo apt-get update
sudo apt-get install octave
sudo apt-get install bc
- name: Install nlopt, scipy, mpich, mpi4py, blas, psutil
run: |
conda install nlopt
conda install scipy
conda install mpich
conda install mpi4py
conda install libblas libopenblas psutil
- name: Install with-batch PETSc and petsc4py
if: matrix.python-version == 3.8
env:
PETSC_CONFIGURE_OPTIONS: '--with-batch'
run: conda install petsc4py

- name: Install mumps-mpi, PETSc, petsc4py
if: matrix.python-version != 3.8
run: |
conda install mumps-mpi
conda install petsc
conda install petsc4py
- name: Install DFO-LS, mpmath, deap, other test dependencies
run: |
python -m pip install --upgrade pip
pip install DFO-LS
pip install mpmath
pip install deap
python -m pip install --upgrade git+https://github.com/mosesyhc/surmise.git@development/PCGPwM
pip install flake8
pip install coverage
pip install pytest
pip install pytest-cov
pip install pytest-timeout
pip install mock
pip install coveralls
- name: Install Tasmanian on Ubuntu
if: matrix.os == 'ubuntu-16.04'
run: |
pip install scikit-build packaging Tasmanian --user
- name: Find MPI, Install libEnsemble, flake8, ulimit adjust
run: |
python install/find_mpi.py
mpiexec --version
pip install -e .
flake8 libensemble
ulimit -Sn 10000
- name: Run tests, Ubuntu
if: matrix.os == 'ubuntu-16.04'
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
# Uncomment the following 2 lines to enable tmate debug sessions
# - name: SSH to GitHub Actions
# uses: P3TERX/ssh2actions@main

- name: Run tests, macOS
if: matrix.os == 'macos-latest'
env:
CONDA_BUILD_SYSROOT: /Users/runner/work/libensemble/sdk/MacOSX10.14.sdk
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
- name: Merge coverage, run Coveralls
env:
COVERALLS_PARALLEL: true
run: |
mv libensemble/tests/.cov* .
coveralls --service=github
coveralls:
name: Notify coveralls of all jobs completing
needs: test-libE
if: always()
runs-on: ubuntu-16.04
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,9 @@ code/tests/regression_tests/output/
libensemble.egg-info
docs/_build
x.log

build/

dist/

.spyproject/
58 changes: 6 additions & 52 deletions .travis.yml
@@ -1,7 +1,6 @@
language: python
dist: xenial
python:
- 3.5
- 3.6
- 3.7
- 3.8
Expand All @@ -12,54 +11,22 @@ env:
global:
- HYDRA_LAUNCHER=fork
- OMPI_MCA_rmaps_base_oversubscribe=yes
jobs:
- MPI=mpich
matrix:
- COMMS_TYPE=m # mpi
- COMMS_TYPE=l # local
- COMMS_TYPE=t # tcp

jobs:
include:
- os: osx
osx_image: xcode11.3
env: MPI=mpich PY=3.7 COMMS_TYPE=m # mpi
language: generic
python: 3.7
- os: osx
osx_image: xcode11.3
env: MPI=mpich PY=3.7 COMMS_TYPE=l # local
language: generic
python: 3.7
- os: osx
osx_image: xcode11.3
env: MPI=mpich PY=3.7 COMMS_TYPE=t # tcp
language: generic
python: 3.7
- os: osx
osx_image: xcode11.3
env: MPI=mpich PY=3.8 COMMS_TYPE=m # mpi
language: generic
python: 3.8
- os: osx
osx_image: xcode11.3
env: MPI=mpich PY=3.8 COMMS_TYPE=l # local
language: generic
python: 3.8
- os: osx
osx_image: xcode11.3
env: MPI=mpich PY=3.8 COMMS_TYPE=t # tcp
language: generic
python: 3.8
fast_finish: true
allow_failures:
- python: 3.8
- os: osx
env: MPI=mpich PY=3.8 COMMS_TYPE=m # mpi
- os: osx
env: MPI=mpich PY=3.8 COMMS_TYPE=l # mpi
- os: osx
env: MPI=mpich PY=3.8 COMMS_TYPE=t # mpi

services:
- postgresql
Expand All @@ -70,9 +37,9 @@ cache:

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-4.7.12.1-MacOSX-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh -O miniconda.sh;
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
Expand All @@ -94,32 +61,22 @@ install:
else
COMPILERS=gcc_linux-64;
MUMPS=mumps-mpi=5.1.2=h5bebb2f_1007;
sudo add-apt-repository -y ppa:octave/stable;
sudo apt-get update -qq;
sudo apt install -y octave;
fi

- conda install $COMPILERS
- conda install libblas libopenblas # Prevent 'File exists' error

- if [[ "$TRAVIS_PYTHON_VERSION" == "3.8" ]]; then
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.8" ]] || [[ "$PY" == "3.8" ]]; then
conda install nlopt mpi4py scipy mpich;
export PETSC_CONFIGURE_OPTIONS='--with-batch';
conda install petsc4py;
else
conda install nlopt petsc4py petsc $MUMPS mpi4py scipy $MPI;
fi

# Begin: Dependencies only for regression tests
- pip install DFO-LS
- pip install deap
- conda install psutil
- pip install mpmath
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install scikit-build packaging Tasmanian --user;
fi
# End: dependencies only for regression tests
#
- pip install DFO-LS
- pip install flake8
- pip install coverage==4.5.4
- pip install pytest
Expand All @@ -130,19 +87,16 @@ install:
- python install/find_mpi.py # Locate compilers. Confirm MPI library
- mpiexec --version # Show MPI library details
- pip install -e . # Installing libEnsemble
- wget https://github.com/balsam-alcf/balsam/archive/0.3.8.tar.gz
- wget https://github.com/argonne-lcf/balsam/archive/0.3.8.tar.gz
- mkdir ../balsam; tar xf 0.3.8.tar.gz -C ../balsam;
- python install/configure_balsam_install.py

before_script:
- flake8 libensemble
- echo "export BALSAM_DB_PATH=~/test-balsam" > setbalsampath.sh
- source setbalsampath.sh # Imperfect method for env var persist after setup
- ulimit -Sn 10000 # More concurrent file descriptors (for persis aposmm)

# Run test (-z show output)
script:
- ./libensemble/tests/run-tests.sh -A "-W error" -z -$COMMS_TYPE
- ./libensemble/tests/run-tests.sh -y 'test_balsam*' -z -$COMMS_TYPE

# Track code coverage
after_success:
Expand Down
61 changes: 56 additions & 5 deletions CHANGELOG.rst
Expand Up @@ -4,6 +4,57 @@ Release Notes

Below are the notes from all libEnsemble releases.

GitHub issues are referenced, and can be viewed with hyperlinks on the `github releases page`_.

.. _`github releases page`: https://github.com/Libensemble/libensemble/releases

Release 0.7.2
-------------

:Date: May 03, 2021

API additions:

* Active receive option added that allows irregular manager/worker communication patterns. (#527 / #595)
* A mechanism is added for the cancellation/killing of previously issued evaluations. (#528 / #595 / #596)
* A submit function is added in the base ``Executor`` class that runs a serial application locally. (#531 / #595)
* Added libEnsemble history array protected fields: `returned_time`, `last_given_time`, and `last_gen_time`. (#590)
* Updated libE_specs options (``mpi_comm`` and ``profile``). (#547 / #548)
* Explicit seeding of random streams in ``add_unique_random_streams()`` is now possible. (#542 / #545)

Updates to example functions:

* Added Surmise calibration generator function and two examples (regression tests). (#595)

Other changes:

* Better support for uneven worker to node distribution (including at sub-node level). (#591 / #600)
* Fixed crash when running on Windows. (#534)
* Fixed crash when running with empty `persis_info`. (#571 / #578)
* Error handling has been made more robust. (#592)
* Improve ``H0`` processing (esp. for pre-generated, but not evaluated points). (#536 / #537)
* A global ``sim_id`` is now given, rather than a local count, in _libE_stats.txt_. Also a global gen count is given. (#587, #588)
* Added support for Python 3.9. (#532 / Removed support for Python 3.5. (#562)
* Improve SLURM nodelist detection (more robust). (#560)
* Add check that user does not change protected history fields (Disable via ``libE_specs['safe_mode'] = False``). (#541)
* Added ``print_fields.py`` script for better interrogating the output history files. (#558)
* In examples, ``is_master`` changed to ``is_manager`` to be consistent with manager/worker nomenclature. (#524)

Documentation:

* Added tutorial **Borehole Calibration with Selective Simulation Cancellation**. (#581 / #595)

:Note:

* Tested platforms include Linux, MacOS, Theta (Cray XC40/Cobalt), Summit (IBM Power9/LSF), Bebop (Cray CS400/Slurm).
* Tested Python versions: (Cpython) 3.6, 3.7, 3.8, 3.9.

:Known issues:

* OpenMPI does not work with direct MPI job launches in ``mpi4py`` comms mode, since it does not support nested MPI launches
(Either use local mode or Balsam Executor).
* See known issues section in the documentation for more issues.

Release 0.7.1
-------------

Expand All @@ -17,9 +68,9 @@ API additions:

* Executor updates:

* Addition of a zero-resource worker option for persistent gens (does not allocate nodes to gen). (#500)
* Multiple applications can be registered to the Executor (and submitted) by name. (#498)
* Wait function added to Tasks. (#499)
* Addition of a zero-resource worker option for persistent gens (does not allocate nodes to gen). (#500)
* Multiple applications can be registered to the Executor (and submitted) by name. (#498)
* Wait function added to Tasks. (#499)

* Gen directories can now be created with options analogous to those for sim dirs. (#349 / #489)

Expand Down Expand Up @@ -47,9 +98,9 @@ Documentation:

:Known issues:

* We currently recommended running in Central mode on Bridges as distributed runs are experiencing hangs.
* We currently recommend running in Central mode on Bridges, as distributed runs are experiencing hangs.
* OpenMPI does not work with direct MPI job launches in mpi4py comms mode, since it does not support nested MPI launches
(Either use local mode or Balsam job controller).
(Either use local mode or Balsam Executor).
* See known issues section in the documentation for more issues.

Release 0.7.0
Expand Down

0 comments on commit 264cc62

Please sign in to comment.