Skip to content

Commit

Permalink
Merge branch 'develop' into feature/warn_on_nested_mpi
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnav committed Jun 29, 2023
2 parents c9a59d7 + f8f1636 commit e2969eb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 24 deletions.
7 changes: 0 additions & 7 deletions docs/advanced_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ To install the latest PyPI release::

pip install libensemble

The above comes with required dependencies only. To install with some
common user function dependencies (as used in the examples and tests)::

pip install libensemble[extras]

Note that since ``PETSc`` will build from source, this may take a while.

To pip install libEnsemble from the latest develop branch::

python -m pip install --upgrade git+https://github.com/Libensemble/libensemble.git@develop
Expand Down
2 changes: 1 addition & 1 deletion libensemble/gen_funcs/persistent_fd_param_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def fd_param_finder(H, persis_info, gen_specs, libE_info):
for k in range(nf + 1):
if k != nf / 2:
logical_conds = (calc_in["x_ind"] == i, calc_in["f_ind"] == j, calc_in["n_ind"] == k)
Fhist0[i, j, k] = calc_in["f_val"][np.logical_and.reduce(logical_conds)]
Fhist0[i, j, k] = calc_in["f_val"][np.logical_and.reduce(logical_conds)][0]

# Compute noise for (i, j):
# [Fnoise(i, j), ~, inform(i, j)] = ECnoise(nf-1, Fhist0(i, j, 2:nf));
Expand Down
2 changes: 1 addition & 1 deletion libensemble/sim_funcs/borehole.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def borehole_func(x):
denom1 = 2 * L * Tu / (np.log(r / rw) * rw**2 * Kw)
denom2 = Tu / Tl

return (numer / (np.log(r / rw) * (1 + denom1 + denom2))).reshape(-1)
return ((numer / (np.log(r / rw) * (1 + denom1 + denom2))).reshape(-1))[0]


def gen_borehole_input(n):
Expand Down
2 changes: 1 addition & 1 deletion libensemble/sim_funcs/rosenbrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def EvaluateFunction(x, component):
x2 = x[2 * i + 1]
f = 100 * (x1**2 - x2) ** 2 + (x1 - 1) ** 2

return f
return f[0]


def EvaluateJacobian(x, component, const):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# TESTSUITE_COMMS: mpi local tcp
# TESTSUITE_NPROCS: 2 4

import warnings

import numpy as np

from libensemble.alloc_funcs.give_pregenerated_work import give_pregenerated_sim_work as alloc_f
Expand All @@ -24,6 +26,8 @@
from libensemble.sim_funcs.borehole import borehole_func, gen_borehole_input
from libensemble.tools import parse_args, save_libE_output

warnings.filterwarnings("ignore", category=DeprecationWarning)

# Main block is necessary only when using local comms with spawn start method (default on macOS and Windows).
if __name__ == "__main__":
nworkers, is_manager, libE_specs, _ = parse_args()
Expand Down
1 change: 1 addition & 0 deletions libensemble/tests/regression_tests/test_ytopt_heffte.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
warnings.filterwarnings("ignore", category=ImportWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
warnings.filterwarnings("ignore", category=RuntimeWarning)
warnings.filterwarnings("ignore", category=DeprecationWarning)

import os
import secrets
Expand Down
14 changes: 0 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def run_tests(self):
"libensemble.tests.unit_tests",
"libensemble.tests.regression_tests",
],
package_data={"libensemble.sim_funcs.branin": ["known_minima_and_func_values"]},
install_requires=["numpy", "psutil", "setuptools", "pydantic", "tomli", "pyyaml"],
# If run tests through setup.py - downloads these but does not install
tests_require=[
Expand All @@ -80,19 +79,6 @@ def run_tests(self):
"mock",
],
extras_require={
"extras": [
"ax-platform",
"DFO-LS",
"dragonfly-opt",
"funcx",
"mpi4py",
"mpmath",
"nlopt",
"petsc",
"petsc4py",
"pyyaml",
"scipy",
],
"docs": [
"autodoc_pydantic",
"sphinx",
Expand Down

0 comments on commit e2969eb

Please sign in to comment.