-
Notifications
You must be signed in to change notification settings - Fork 43
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 #680 from DiamondLightSource/py37_local
Savu python37 move
- Loading branch information
Showing
1,620 changed files
with
10,672 additions
and
29,459 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 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,39 +1,24 @@ | ||
dist: bionic | ||
cache: apt | ||
sudo: true | ||
language: python | ||
python: | ||
- "2.7" | ||
# - "3.5" | ||
#addons: | ||
# apt: | ||
# packages: | ||
# - libblas-dev | ||
# - liblapack-dev | ||
# - gfortran | ||
# - libhdf5-serial-dev | ||
# - libboost-all-dev | ||
- 3.7 | ||
|
||
before_install: | ||
- wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- hash -r | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda update -q conda | ||
- conda info -a | ||
- cd $TRAVIS_BUILD_DIR/install/savu_hpc/savu_installer | ||
- ls -lah | ||
# - touch ~/.condarc | ||
# - "echo channel_priority: strict >> ~/.condarc" | ||
|
||
install: | ||
- conda env create --file environment.yml | ||
- source activate test-environment | ||
- PREFIX=$HOME bash savu_installer.sh --local --no_prompts | ||
- export PATH=$HOME/miniconda/bin:$PATH | ||
- export FACILITY=dls | ||
- cd $TRAVIS_BUILD_DIR | ||
- python setup.py install | ||
|
||
script: | ||
- py.test scripts/configurator_tests/ -v | ||
- py.test savu/test/travis -v --cov savu --cov-report term-missing | ||
|
||
after_script: | ||
- coveralls | ||
|
||
#allow_failures: | ||
# - python: "3.5" | ||
|
||
- pip install coverage pytest-cov | ||
- cd $TRAVIS_BUILD_DIR | ||
- pytest scripts/configurator_tests/ --cov=scripts | ||
- pytest savu/test/travis --cov=savu --cov-report term-missing |
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 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 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 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 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,59 @@ | ||
#!/bin/bash | ||
|
||
# This script should be used to test Local MPI runs on | ||
# DEVELOPMENT versions of Savu. It takes the path to the | ||
# Savu source to be used as its first argument, and the rest | ||
# are forwarded to Savu itself. | ||
# | ||
# The Python environment containing all the dependencies of Savu | ||
# must already be activated. | ||
# | ||
# Example usage with full paths: | ||
# /scratch/dev/savu/bin/savu_mpi_dev.sh /scratch/dev/savu /scratch/dev/savu/test_data/data/24737.nxs /scratch/dev/savu/test_data/process_lists/ica_test.nxs /scratch/output | ||
# | ||
# Example usage while inside the repository root: | ||
# bin/savu_mpi_local_dev.sh . test_data/data/24737.nxs test_data/process_lists/ica_test.nxs /scratch/output | ||
|
||
echo "SAVU_MPI_LOCAL:: Running Job with Savu at $1" | ||
|
||
nNodes=1 | ||
nCoresPerNode=`lscpu --all --parse=CORE,SOCKET | grep -E "^[0-9]" | wc -l` | ||
nGPUs=$(nvidia-smi -L | wc -l) | ||
|
||
echo "***********************************************" | ||
echo -e "\tRunning on $nCoresPerNode CPUs and $nGPUs GPUs" | ||
echo "***********************************************" | ||
|
||
savupath=$1 | ||
datafile=$2 | ||
processfile=$3 | ||
outpath=$4 | ||
shift 4 | ||
options=$@ | ||
|
||
DIR="$(cd "$(dirname "$0")" && pwd)" | ||
echo "savupath is:" $savupath | ||
|
||
nCPUs=$((nNodes*nCoresPerNode)) | ||
|
||
# launch mpi job | ||
filename=$savupath/savu/tomo_recon.py | ||
|
||
echo "running on host: "$HOSTNAME | ||
echo "Processes running are : ${nCPUs}" | ||
|
||
processes=`bc <<< "$nCPUs"` | ||
|
||
for i in $(seq 0 $((nGPUs-1))); do GPUs+="GPU$i " ; done | ||
for i in $(seq 0 $((nCPUs-1-nGPUs))); do CPUs+="CPU$i " ; done | ||
CPUs=$(echo $GPUs$CPUs | tr ' ' ,) | ||
|
||
echo "running the savu mpi local job with process parameters: $CPUs" | ||
|
||
echo "Using python at $(which python)" | ||
|
||
OMPI_MCA_opal_cuda_support=true PYTHONPATH=$savupath:$PYTHONPATH mpirun -np $nCPUs --use-hwthread-cpus \ | ||
-mca btl self,vader -mca orte_forward_job_control 1 \ | ||
python $filename $datafile $processfile $outpath -n $CPUs -v $options | ||
|
||
echo "SAVU_MPI_LOCAL:: Process complete" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.