Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from Libensemble/release/v0.4.1
Release/v0.4.1
- Loading branch information
Showing
59 changed files
with
1,690 additions
and
370 deletions.
There are no files selected for viewing
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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,27 +1,62 @@ | ||
#!/usr/bin/env bash | ||
|
||
#Note - This assumes miniconda - with anaconda some will already be installed | ||
#You must have installed miniconda: https://conda.io/docs/install/quick.html | ||
# Install dependencies for libEnsemble and tests in Conda. | ||
# Note: libEnsemble itself is currently not in Conda | ||
# To replicate travis builds - see directory run_travis_locally/ | ||
|
||
#To create and activate new environment called py3.6 | ||
#> conda create --name py3.6 python=3.6 | ||
#> source activate py3.6 | ||
# Note - This assumes miniconda - with anaconda some will already be installed | ||
# You must have installed miniconda: https://conda.io/docs/install/quick.html | ||
|
||
#To come out of env: source deactivate | ||
#To see envs: conda info --envs | ||
# To isolate from local installs run this before activating environment | ||
# export PYTHONNOUSERSITE=1 | ||
|
||
# To create and activate new environment called py3.6 | ||
# > conda create --name py3.6 python=3.6 | ||
# > source activate py3.6 | ||
# To enable running this script without prompts: | ||
# > conda config --set always_yes yes | ||
# Then source this script: . ./conda-install-deps.sh | ||
|
||
# To come out of env: source deactivate | ||
# To see envs: conda info --envs | ||
|
||
# You may need to add the conda-forge chanel | ||
# conda config --add channels conda-forge | ||
|
||
#-------------------------------------------------------------------------- | ||
|
||
#Install packages for libensemble. Do in this order!!! | ||
conda install --yes mpi4py | ||
conda install --yes -c conda-forge petsc4py | ||
conda install --yes -c conda-forge nlopt | ||
conda install --yes pytest pytest-cov | ||
conda install --yes scipy | ||
|
||
#To use dev version of mpi4py | ||
#conda install --yes cython | ||
#pip install git+https://bitbucket.org/mpi4py/mpi4py.git@master | ||
|
||
echo -e "\nDo 'conda list' to see installed packages" | ||
echo -e "Do './run-tests.sh' to run the tests\n" | ||
# Install packages for libensemble. Do in this order!!! | ||
|
||
# This should work for mpich as of v0.4.1 | ||
# For other MPI libraries, some packages, such as mpi4py and PETSc may | ||
# need to be pip installed. | ||
|
||
export MPI=MPICH | ||
export LIBE_BRANCH=master | ||
|
||
conda install gcc_linux-64 || return | ||
conda install $MPI || return | ||
#conda install numpy || return #scipy includes numpy | ||
conda install --no-update-deps scipy || return | ||
conda install --no-update-deps mpi4py || return | ||
conda install --no-update-deps petsc4py petsc || return | ||
conda install --no-update-deps nlopt || return | ||
|
||
# pip install these as the conda installs downgrade pytest on python3.4 | ||
pip install pytest || return | ||
pip install pytest-cov || return | ||
pip install pytest-timeout || return | ||
pip install mock || return | ||
# pip install coveralls || return # for online | ||
|
||
# Install libEnsemble | ||
|
||
# From source | ||
git clone -b $LIBE_BRANCH https://github.com/Libensemble/libensemble.git || return | ||
cd libensemble/ || return | ||
pip install -e . || return | ||
# OR | ||
# pip install libEnsemble | ||
|
||
echo -e "\nDo 'conda list' to see installed packages" | ||
echo -e "Do 'libensemble/tests/run-tests.sh' to run the tests\n" |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Conda build of dependencies using mpich. | ||
# Source script to maintain environment after running. Script stops if installs fail. | ||
# Note for other MPIs may need to install some packages from source (eg. petsc) | ||
|
||
# -x echo commands | ||
set -x # problem with this - loads of conda internal commands shown - overwhelming. | ||
|
||
export PYTHON_VERSION=3.7 # default - override with -p <version> | ||
export LIBE_BRANCH="develop" # default - override with -b <branchname> | ||
|
||
export MPI=MPICH | ||
export HYDRA_LAUNCHER=fork | ||
|
||
# Allow user to optionally set python version and branch | ||
# E.g: ". ./build_mpich_libE.sh -p 3.4 -b feature/myfeature" | ||
while getopts ":p:b:" opt; do | ||
case $opt in | ||
p) | ||
echo "Parameter supplied for Python version: $OPTARG" >&2 | ||
PYTHON_VERSION=$OPTARG | ||
;; | ||
b) | ||
echo "Parameter supplied for branch name: $OPTARG" >&2 | ||
LIBE_BRANCH=${OPTARG} | ||
;; | ||
\?) | ||
echo "Invalid option supplied: -$OPTARG" >&2 | ||
exit 1 | ||
;; | ||
:) | ||
echo "Option -$OPTARG requires an argument." >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
echo -e "\nBuilding libE with python $PYTHON_VERSION and branch ${LIBE_BRANCH}\n" | ||
|
||
sudo apt-get update | ||
|
||
# This works if not sourced but if sourced its no good. | ||
# set -e | ||
|
||
sudo apt install gfortran || return | ||
sudo apt install libblas-dev || return | ||
sudo apt-get install liblapack-dev || return | ||
|
||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || return | ||
bash miniconda.sh -b -p $HOME/miniconda || return | ||
export PATH="$HOME/miniconda/bin:$PATH" || return | ||
conda update -q -y conda | ||
|
||
conda config --add channels conda-forge || return | ||
conda config --set always_yes yes --set changeps1 no || return | ||
conda create --yes --name condaenv python=$PYTHON_VERSION || return | ||
|
||
source activate condaenv || return | ||
wait | ||
|
||
conda install gcc_linux-64 || return | ||
conda install $MPI || return | ||
#conda install numpy || return #scipy includes numpy | ||
conda install --no-update-deps scipy || return | ||
conda install --no-update-deps mpi4py || return | ||
conda install --no-update-deps petsc4py petsc || return | ||
conda install --no-update-deps nlopt || return | ||
|
||
# pip install these as the conda installs downgrade pytest on python3.4 | ||
pip install pytest || return | ||
pip install pytest-cov || return | ||
pip install pytest-timeout || return | ||
pip install mock || return | ||
pip install coveralls || return | ||
|
||
# Not required on travis | ||
git clone -b $LIBE_BRANCH https://github.com/Libensemble/libensemble.git || return | ||
cd libensemble/ || return | ||
pip install -e . || return | ||
|
||
libensemble/tests/run-tests.sh | ||
|
||
echo -e "\n\nScript completed...\n\n" | ||
set +ex |
Oops, something went wrong.