Skip to content

Commit 86619a7

Browse files
authored
Merge pull request #680 from DiamondLightSource/py37_local
Savu python37 move
2 parents 0c3d52d + d89312f commit 86619a7

File tree

1,620 files changed

+10672
-29459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,620 files changed

+10672
-29459
lines changed

.gitignore

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
# Built documenation
88
/doc/build
9-
/doc/source/_autosummary
10-
scripts/config_generator/test_processes
11-
scripts/config_generator/test_processes_2
9+
/doc/source/_autosummary
10+
scripts/config_generator/test_processes
11+
scripts/config_generator/test_processes_2
1212

1313
# Python egg metadata, regenerated from source files by setuptools.
1414
/*.egg-info
@@ -22,5 +22,11 @@ scripts/config_generator/test_processes_2
2222

2323
# nfs failures
2424
.nfs*
25-
# vim swap files
26-
*.swp
25+
# vim swap files
26+
*.swp
27+
# conda build directory
28+
build/
29+
30+
# VSCode settings
31+
.vscode
32+
.vscode/

.travis.yml

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,24 @@
1+
dist: bionic
12
cache: apt
2-
sudo: true
33
language: python
44
python:
5-
- "2.7"
6-
# - "3.5"
7-
#addons:
8-
# apt:
9-
# packages:
10-
# - libblas-dev
11-
# - liblapack-dev
12-
# - gfortran
13-
# - libhdf5-serial-dev
14-
# - libboost-all-dev
5+
- 3.7
156

167
before_install:
17-
- wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
18-
- bash miniconda.sh -b -p $HOME/miniconda
19-
- export PATH="$HOME/miniconda/bin:$PATH"
20-
- hash -r
21-
- conda config --set always_yes yes --set changeps1 no
22-
- conda update -q conda
23-
- conda info -a
8+
- cd $TRAVIS_BUILD_DIR/install/savu_hpc/savu_installer
9+
- ls -lah
10+
# - touch ~/.condarc
11+
# - "echo channel_priority: strict >> ~/.condarc"
2412

2513
install:
26-
- conda env create --file environment.yml
27-
- source activate test-environment
14+
- PREFIX=$HOME bash savu_installer.sh --local --no_prompts
15+
- export PATH=$HOME/miniconda/bin:$PATH
16+
- export FACILITY=dls
17+
- cd $TRAVIS_BUILD_DIR
2818
- python setup.py install
2919

3020
script:
31-
- py.test scripts/configurator_tests/ -v
32-
- py.test savu/test/travis -v --cov savu --cov-report term-missing
33-
34-
after_script:
35-
- coveralls
36-
37-
#allow_failures:
38-
# - python: "3.5"
39-
21+
- pip install coverage pytest-cov
22+
- cd $TRAVIS_BUILD_DIR
23+
- pytest scripts/configurator_tests/ --cov=scripts
24+
- pytest savu/test/travis --cov=savu --cov-report term-missing

GUI/GUI_comparison/PyQt/create_plugin_template_v4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def CreateModule(self):
9696

9797

9898
f.close
99-
print 'done, go to : '+ os.path.dirname(os.path.realpath(__file__)) + '/' + modname
99+
print('done, go to : '+ os.path.dirname(os.path.realpath(__file__)) + '/' + modname)
100100

101101

102102
# creates the GUI window, with specifications given above

GUI/GUI_comparison/qml/plugin_template_v6.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def on_create_template(plugin_info):
4848
f.write("\n\n def get_max_frames(self):\n return 'multiple'")
4949

5050
f.close
51-
print 'done, go to : '+ os.path.dirname(os.path.realpath(__file__)) + '/' + modname
51+
print('done, go to : '+ os.path.dirname(os.path.realpath(__file__)) + '/' + modname)
5252

5353
QGuiApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
5454
myApp = QApplication(sys.argv)

GUI/plugin_template_wizard/auto_plugin_wizard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from PyQt5.QtGui import QGuiApplication
1414
from PyQt5.QtQml import QQmlApplicationEngine
1515

16-
from template import Template
16+
from .template import Template
1717

1818
current_template = Template()
1919

GUI/plugin_template_wizard/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ def write_template(self,plugin_info):
8989

9090

9191
f.close
92-
print 'done, go to : '+ os.path.dirname(os.path.realpath(__file__)) + '/' + modname
92+
print('done, go to : '+ os.path.dirname(os.path.realpath(__file__)) + '/' + modname)

Jenkinsfile

Lines changed: 0 additions & 87 deletions
This file was deleted.

bin/savu.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

bin/savu_mpi_dev.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
3+
# This script should be used to test Local MPI runs on
4+
# DEVELOPMENT versions of Savu. It takes the path to the
5+
# Savu source to be used as its first argument, and the rest
6+
# are forwarded to Savu itself.
7+
#
8+
# The Python environment containing all the dependencies of Savu
9+
# must already be activated.
10+
#
11+
# Example usage with full paths:
12+
# /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
13+
#
14+
# Example usage while inside the repository root:
15+
# bin/savu_mpi_local_dev.sh . test_data/data/24737.nxs test_data/process_lists/ica_test.nxs /scratch/output
16+
17+
echo "SAVU_MPI_LOCAL:: Running Job with Savu at $1"
18+
19+
nNodes=1
20+
nCoresPerNode=`lscpu --all --parse=CORE,SOCKET | grep -E "^[0-9]" | wc -l`
21+
nGPUs=$(nvidia-smi -L | wc -l)
22+
23+
echo "***********************************************"
24+
echo -e "\tRunning on $nCoresPerNode CPUs and $nGPUs GPUs"
25+
echo "***********************************************"
26+
27+
savupath=$1
28+
datafile=$2
29+
processfile=$3
30+
outpath=$4
31+
shift 4
32+
options=$@
33+
34+
DIR="$(cd "$(dirname "$0")" && pwd)"
35+
echo "savupath is:" $savupath
36+
37+
nCPUs=$((nNodes*nCoresPerNode))
38+
39+
# launch mpi job
40+
filename=$savupath/savu/tomo_recon.py
41+
42+
echo "running on host: "$HOSTNAME
43+
echo "Processes running are : ${nCPUs}"
44+
45+
processes=`bc <<< "$nCPUs"`
46+
47+
for i in $(seq 0 $((nGPUs-1))); do GPUs+="GPU$i " ; done
48+
for i in $(seq 0 $((nCPUs-1-nGPUs))); do CPUs+="CPU$i " ; done
49+
CPUs=$(echo $GPUs$CPUs | tr ' ' ,)
50+
51+
echo "running the savu mpi local job with process parameters: $CPUs"
52+
53+
echo "Using python at $(which python)"
54+
55+
OMPI_MCA_opal_cuda_support=true PYTHONPATH=$savupath:$PYTHONPATH mpirun -np $nCPUs --use-hwthread-cpus \
56+
-mca btl self,vader -mca orte_forward_job_control 1 \
57+
python $filename $datafile $processfile $outpath -n $CPUs -v $options
58+
59+
echo "SAVU_MPI_LOCAL:: Process complete"

bin/savu_mpijob.sh

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)