From f16ccc9c9f61d785f339480a3570d958791197e8 Mon Sep 17 00:00:00 2001 From: Daniil Kazantsev Date: Sun, 6 Jan 2019 23:16:57 +0000 Subject: adds CudaResetdevice to PatchSelect module --- Core/regularisers_GPU/PatchSelect_GPU_core.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/regularisers_GPU/PatchSelect_GPU_core.cu b/Core/regularisers_GPU/PatchSelect_GPU_core.cu index d173124..98c8488 100644 --- a/Core/regularisers_GPU/PatchSelect_GPU_core.cu +++ b/Core/regularisers_GPU/PatchSelect_GPU_core.cu @@ -449,10 +449,12 @@ extern "C" int PatchSelect_GPU_main(float *A, unsigned short *H_i, unsigned shor checkCudaErrors(cudaMemcpy(H_j, H_j_d, N*M*NumNeighb*sizeof(unsigned short),cudaMemcpyDeviceToHost) ); checkCudaErrors(cudaMemcpy(Weights, Weights_d, N*M*NumNeighb*sizeof(float),cudaMemcpyDeviceToHost) ); + cudaFree(Ad); cudaFree(H_i_d); cudaFree(H_j_d); - cudaFree(Weights_d); + cudaFree(Weights_d); cudaFree(Eucl_Vec_d); + cudaDeviceReset(); return 0; } -- cgit v1.2.3 From 3ee4173bf095696be9e2b5413518452b0512186f Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 7 Jan 2019 16:23:45 +0000 Subject: fixes #83 --- Core/regularisers_CPU/TGV_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/regularisers_CPU/TGV_core.c b/Core/regularisers_CPU/TGV_core.c index edd77b2..477e909 100644 --- a/Core/regularisers_CPU/TGV_core.c +++ b/Core/regularisers_CPU/TGV_core.c @@ -100,6 +100,9 @@ float TGV_main(float *U0, float *U, float lambda, float alpha1, float alpha0, in newU(V1, V1_old, (long)(dimX), (long)(dimY)); newU(V2, V2_old, (long)(dimX), (long)(dimY)); } /*end of iterations*/ + /*freeing*/ + free(P1);free(P2);free(Q1);free(Q2);free(Q3);free(U_old); + free(V1);free(V2);free(V1_old);free(V2_old); return *U; } -- cgit v1.2.3 From 865c3b390641a27ecc8a132ca7bad543756f871f Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 14:30:20 +0000 Subject: ADD: variants, list of files in exported variable REG_FILES --- Wrappers/Python/conda-recipe/meta.yaml | 10 +++++----- build/jenkins-build.sh | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index 808493e..e3258ff 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -1,8 +1,7 @@ package: name: ccpi-regulariser - version: 0.10.3 - - + version: {{CIL_VERSION}} + build: preserve_egg_dir: False number: 0 @@ -16,7 +15,7 @@ test: requirements: build: - python - - numpy x.x + - numpy {{ numpy }} - setuptools - cython - vc 14 # [win and py36] @@ -25,8 +24,9 @@ requirements: - cmake run: + - {{ pin_compatible('numpy', max_pin='x.x') }} - python - - numpy x.x + - numpy - vc 14 # [win and py36] - vc 14 # [win and py35] - vc 9 # [win and py27] diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 0c397b1..1babeab 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -26,4 +26,4 @@ else echo Defining version: $CIL_VERSION fi #cd CCPi-Regularisation-Toolkit # already there by jenkins -conda build Wrappers/Python/conda-recipe +export REG_FILES=`conda build Wrappers/Python/conda-recipe` -- cgit v1.2.3 From b18a7376dc2a369da81edf0605a567bbfdc542a5 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 15:09:52 +0000 Subject: update: disable load conda module --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 1babeab..3632baa 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Script to builds source code in Jenkins environment -module try-load conda +# module try-load conda # install miniconda if the module is not present if hash conda 2>/dev/null; then -- cgit v1.2.3 From 34ac7f67f2a3c2bb3055be2c30357e354df76ac1 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 15:24:33 +0000 Subject: UPDATE: output generated files --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 3632baa..874788a 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -26,4 +26,4 @@ else echo Defining version: $CIL_VERSION fi #cd CCPi-Regularisation-Toolkit # already there by jenkins -export REG_FILES=`conda build Wrappers/Python/conda-recipe` +export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` -- cgit v1.2.3 From ca5c4e281d0b103ebc544a096b5ac90dd74eb215 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 15:34:17 +0000 Subject: ADD: variants --- Wrappers/Python/conda-recipe/conda_build_config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Wrappers/Python/conda-recipe/conda_build_config.yaml diff --git a/Wrappers/Python/conda-recipe/conda_build_config.yaml b/Wrappers/Python/conda-recipe/conda_build_config.yaml new file mode 100644 index 0000000..b7977f3 --- /dev/null +++ b/Wrappers/Python/conda-recipe/conda_build_config.yaml @@ -0,0 +1,7 @@ +python: + - 2.7 # [not win] + - 3.5 + - 3.6 +numpy: + - 1.12 + - 1.15 -- cgit v1.2.3 From 49163d7ebc31c2664d4bf0bb6ecb1fd61018b8b9 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 8 Jan 2019 16:08:41 +0000 Subject: UPDATE: build first, generate output files next --- build/jenkins-build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 874788a..5614b8e 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -26,4 +26,8 @@ else echo Defining version: $CIL_VERSION fi #cd CCPi-Regularisation-Toolkit # already there by jenkins +# need to call first build +conda build Wrappers/Python/conda-recipe +# then need to call the same with --output +#- otherwise no build is done :-(, just fake file names are generated export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` -- cgit v1.2.3 From ddbc32fdcd4f0754b31786d00b2835223109a9d7 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 11:17:45 +0000 Subject: UPDATE: upload within jenkins build script, needs CCPI_CONDA_TOKEN --- build/jenkins-build.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 5614b8e..3bd5016 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -14,7 +14,7 @@ else PATH=$PATH:./bin fi -# presume that git clone is done before this script launch +# presume that git clone is done before this script is launched, if not, uncomment # git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 @@ -31,3 +31,15 @@ conda build Wrappers/Python/conda-recipe # then need to call the same with --output #- otherwise no build is done :-(, just fake file names are generated export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` +# REG_FILES variable should contain output files +echo files created: $REG_FILES +#upload to anaconda +if [[ -n ${CCPI_CONDA_TOKEN}]] +then + conda install anaconda-client + while read -r outfile; do + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + done <<< "$REG_FILES" +else + echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. +fi -- cgit v1.2.3 From 4cf1659f14e58001f715c9fb4ff1734d6ffd8661 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:02:41 +0000 Subject: Fix --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 3bd5016..4a18525 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -34,7 +34,7 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES #upload to anaconda -if [[ -n ${CCPI_CONDA_TOKEN}]] +if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do -- cgit v1.2.3 From 8d872f6d37c73dd1bc2e47f2bdf30058c78679f5 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:07:14 +0000 Subject: UPDATE version 0.10.4 --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4a18525..c660c02 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -22,7 +22,7 @@ if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else - export CIL_VERSION=0.10.3 + export CIL_VERSION=0.10.4 echo Defining version: $CIL_VERSION fi #cd CCPi-Regularisation-Toolkit # already there by jenkins -- cgit v1.2.3 From 73eab3d64f2bf5ad170bea35c4db1d3ae5758c06 Mon Sep 17 00:00:00 2001 From: Kulhanek Date: Wed, 9 Jan 2019 12:45:42 +0000 Subject: version top in script --- build/jenkins-build.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index c660c02..4699e9b 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +if [[ -n ${CIL_VERSION} ]] +then + echo Using defined version: $CIL_VERSION +else + export CIL_VERSION=0.10.4 + echo Defining version: $CIL_VERSION +fi # Script to builds source code in Jenkins environment # module try-load conda @@ -18,13 +25,6 @@ fi # git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 -if [[ -n ${CIL_VERSION} ]] -then - echo Using defined version: $CIL_VERSION -else - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION -fi #cd CCPi-Regularisation-Toolkit # already there by jenkins # need to call first build conda build Wrappers/Python/conda-recipe -- cgit v1.2.3 From da69e9f1074226e3d14faa89a270b4ef1593ee42 Mon Sep 17 00:00:00 2001 From: vagrant Date: Wed, 9 Jan 2019 14:11:05 +0000 Subject: fix --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 3bd5016..4a18525 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -34,7 +34,7 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES #upload to anaconda -if [[ -n ${CCPI_CONDA_TOKEN}]] +if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do -- cgit v1.2.3 From 3b114face28547468da9e1b491c67bd5ea53603b Mon Sep 17 00:00:00 2001 From: vagrant Date: Wed, 9 Jan 2019 14:13:17 +0000 Subject: version in top 0.10.4 --- build/jenkins-build.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4a18525..6da2c56 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +if [[ -n ${CIL_VERSION} ]] +then + echo Using defined version: $CIL_VERSION +else + export CIL_VERSION=0.10.4 + echo Defining version: $CIL_VERSION +fi # Script to builds source code in Jenkins environment # module try-load conda @@ -17,14 +24,6 @@ fi # presume that git clone is done before this script is launched, if not, uncomment # git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build -#export CIL_VERSION=0.10.2 -if [[ -n ${CIL_VERSION} ]] -then - echo Using defined version: $CIL_VERSION -else - export CIL_VERSION=0.10.3 - echo Defining version: $CIL_VERSION -fi #cd CCPi-Regularisation-Toolkit # already there by jenkins # need to call first build conda build Wrappers/Python/conda-recipe -- cgit v1.2.3 From 34d0b9f85c3bc73416f1dc2bb25ef669b9ff8076 Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 15 Jan 2019 15:23:43 +0000 Subject: added jenkins build status --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index cdf823d..70c9e13 100644 --- a/Readme.md +++ b/Readme.md @@ -1,3 +1,4 @@ +[![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) # CCPi-Regularisation Toolkit (CCPi-RGL) **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise the convergence and make the reconstruction problem (inverse problem) more well-posed. The CCPi-RGL software provides 2D/3D and multi-channel regularisation strategies to ensure better performance of IIR methods. The regularisation modules are well-suited to use with [splitting algorithms](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method#Alternating_direction_method_of_multipliers), such as, [ADMM](https://github.com/dkazanc/ADMM-tomo) and [FISTA](https://github.com/dkazanc/FISTA-tomo). Furthermore, the toolkit can be used for simpler inversion tasks, such as, image denoising, inpaiting, deconvolution etc. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** -- cgit v1.2.3 From 3b309224fc4935a8dc627e8863479b3c29349ce8 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 15 Jan 2019 21:33:38 +0000 Subject: ADD: TODOs --- build/jenkins-build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4699e9b..afee0c9 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -1,8 +1,10 @@ #!/usr/bin/env bash +# TODO put git tag recognition if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else +# TODO put git tag recognition, or default export CIL_VERSION=0.10.4 echo Defining version: $CIL_VERSION fi @@ -38,6 +40,8 @@ if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do + #TODO if git tag is defined than call anaconda without --label dev + #TODO if pull request??? do not upload anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev done <<< "$REG_FILES" else -- cgit v1.2.3 From 400894771a9ff54c3f88e84ecc79d97a3e08235f Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 14:18:00 +0000 Subject: UPDATE: detect git version --- build/jenkins-build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index afee0c9..d1a3427 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -5,8 +5,11 @@ then echo Using defined version: $CIL_VERSION else # TODO put git tag recognition, or default - export CIL_VERSION=0.10.4 - echo Defining version: $CIL_VERSION + #export CIL_VERSION=0.10.4 + #get tag, remove first char ('v') and leave rest + export CIL_VERSION_RAW=`git describe --tags | tail -c +2` + + echo Defining version from last git tag and commit: $CIL_VERSION fi # Script to builds source code in Jenkins environment # module try-load conda -- cgit v1.2.3 From be48430f8de0ccb8e64abba4f00c771228ff0df0 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:05:59 +0000 Subject: UPDATE: CIL_VERSION from git tag, dash in version is assumed as dev version --- build/jenkins-build.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index d1a3427..44fd59d 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -7,9 +7,15 @@ else # TODO put git tag recognition, or default #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest - export CIL_VERSION_RAW=`git describe --tags | tail -c +2` - - echo Defining version from last git tag and commit: $CIL_VERSION + export CIL_VERSION=`git describe --tags | tail -c +2` + if [[ $CIL_VERSION == *"-"*]]; then + # detected dash means that it is dev version + # version is then string-string and all after second dash is ignored (usually commit sha) + export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` + echo Building dev version + else + echo Defining version from last git tag and commit: $CIL_VERSION + fi fi # Script to builds source code in Jenkins environment # module try-load conda @@ -27,7 +33,7 @@ else fi # presume that git clone is done before this script is launched, if not, uncomment -# git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit +#git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build #export CIL_VERSION=0.10.2 #cd CCPi-Regularisation-Toolkit # already there by jenkins @@ -45,7 +51,12 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + if [[ $CIL_VERSION == *"-"*]]; then + # upload with dev label + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + else + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force + fi done <<< "$REG_FILES" else echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. -- cgit v1.2.3 From 53695bd509b06de9f0564ceec43b4e5b669fa135 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:11:34 +0000 Subject: typo --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 44fd59d..beb26f7 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,7 +8,7 @@ else #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ $CIL_VERSION == *"-"*]]; then + if [[ $CIL_VERSION == *"-"* ]]; then # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` -- cgit v1.2.3 From 94d1e4b289d9e9ffbf69826337ea05e2a3bb0101 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:13:44 +0000 Subject: echo version --- build/jenkins-build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index beb26f7..d0e9c96 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,11 +8,11 @@ else #export CIL_VERSION=0.10.4 #get tag, remove first char ('v') and leave rest export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ $CIL_VERSION == *"-"* ]]; then + if [[ ${CIL_VERSION} == *"-"* ]]; then # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) - export CIL_VERSION=`echo $C1 | cut -d "-" -f -2` - echo Building dev version + export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + echo Building dev version ${CIL_VERSION} else echo Defining version from last git tag and commit: $CIL_VERSION fi -- cgit v1.2.3 From cf9689e81bb69b7732a168463b17a47de1ef59a5 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:28:12 +0000 Subject: UPDATE: conda build don't like dash in version --- build/jenkins-build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index d0e9c96..b64631f 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -12,6 +12,8 @@ else # detected dash means that it is dev version # version is then string-string and all after second dash is ignored (usually commit sha) export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + # but dash is prohibited for conda build + export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` echo Building dev version ${CIL_VERSION} else echo Defining version from last git tag and commit: $CIL_VERSION @@ -51,7 +53,7 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - if [[ $CIL_VERSION == *"-"*]]; then + if [[ $CIL_VERSION == *"_"*]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev else -- cgit v1.2.3 From e4683c6c7be92ba65b13ef5ea4306948bcbded74 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:43:08 +0000 Subject: UPDATE: version from env --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 550b896..e3e59e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,9 @@ set (CIL_VERSION_MAJOR 0) set (CIL_VERSION_MINOR 10) set (CIL_VERSION_PATCH 2) -set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) +# set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) +# get CIL_VERSION from environment variable +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # set the Python variables for the Conda environment #include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) -- cgit v1.2.3 From 204dc742ee5a8fda3f168b3e84632f5cdb75ce2e Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 15:43:41 +0000 Subject: typo --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index b64631f..6965180 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -53,7 +53,7 @@ then while read -r outfile; do #TODO if git tag is defined than call anaconda without --label dev #TODO if pull request??? do not upload - if [[ $CIL_VERSION == *"_"*]]; then + if [[ $CIL_VERSION == *"_"* ]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev else -- cgit v1.2.3 From 5e436eab5cea50569df9c85159be69d8e88688f0 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 16:41:10 +0000 Subject: UPDATE: propagate CIL_VERSION --- CMakeLists.txt | 3 ++- Core/CMakeLists.txt | 2 +- Wrappers/Python/CMakeLists.txt | 2 +- Wrappers/Python/conda-recipe/build.sh | 1 + Wrappers/Python/conda-recipe/meta.yaml | 2 ++ recipes/regularisers/bld.bat | 2 +- recipes/regularisers/build.sh | 4 ++-- 7 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3e59e9..b95107a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,8 +26,9 @@ set (CIL_VERSION_MINOR 10) set (CIL_VERSION_PATCH 2) # set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE) -# get CIL_VERSION from environment variable +# get CIL_VERSION from environment variable and set it in cmake set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +message(STATUS "CIL_VERSION set to " ${CIL_VERSION}) # set the Python variables for the Conda environment #include(${CMAKE_SOURCE_DIR}/CMake/FindAnacondaEnvironment.cmake) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index d92db82..b3c0dfb 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -6,7 +6,7 @@ project(RGL_core) # The version number. -#set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) +set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build message("CIL_VERSION ${CIL_VERSION}") diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt index d86d0ea..c2ef855 100644 --- a/Wrappers/Python/CMakeLists.txt +++ b/Wrappers/Python/CMakeLists.txt @@ -9,7 +9,7 @@ project(regulariserPython) #set (CIL_VERSION $ENV{CIL_VERSION} CACHE INTERNAL "Core Imaging Library version" FORCE) # conda orchestrated build -message("CIL_VERSION ${CIL_VERSION}") +message("CIL_VERSION: ${CIL_VERSION}") #include (GenerateExportHeader) find_package(PythonInterp REQUIRED) diff --git a/Wrappers/Python/conda-recipe/build.sh b/Wrappers/Python/conda-recipe/build.sh index eec7c2f..39c0f2c 100644 --- a/Wrappers/Python/conda-recipe/build.sh +++ b/Wrappers/Python/conda-recipe/build.sh @@ -5,6 +5,7 @@ cp -rv "$RECIPE_DIR/../../../Core" "$SRC_DIR/Core" cd $SRC_DIR ##cuda=off + cmake -G "Unix Makefiles" $RECIPE_DIR/../../../ -DBUILD_PYTHON_WRAPPER=ON -DCONDA_BUILD=ON -DBUILD_CUDA=ON -DCMAKE_BUILD_TYPE="Release" -DLIBRARY_LIB=$CONDA_PREFIX/lib -DLIBRARY_INC=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index e3258ff..9fe813d 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -5,6 +5,8 @@ package: build: preserve_egg_dir: False number: 0 + script_env: + - CIL_VERSION test: files: diff --git a/recipes/regularisers/bld.bat b/recipes/regularisers/bld.bat index 43a5286..63e7681 100644 --- a/recipes/regularisers/bld.bat +++ b/recipes/regularisers/bld.bat @@ -10,7 +10,7 @@ cd "%SRC_DIR%\build" echo "we should be in %SRC_DIR%\build" -cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF +cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DCIL_VERSION="%CIL_VERSION%" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF ::-DBOOST_LIBRARYDIR="%CONDA_PREFIX%\Library\lib" -DBOOST_INCLUDEDIR="%CONDA_PREFIX%\Library\include" -DBOOST_ROOT="%CONDA_PREFIX%\Library\lib" diff --git a/recipes/regularisers/build.sh b/recipes/regularisers/build.sh index 0b8bce2..aede303 100644 --- a/recipes/regularisers/build.sh +++ b/recipes/regularisers/build.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -echo $CIL_VERSION +echo build.sh CIL_VERSION: $CIL_VERSION #if [ -z "$CIL_VERSION" ]; then # echo "Need to set CIL_VERSION" # exit 1 @@ -13,7 +13,7 @@ mkdir ${SRC_DIR}/build cp -rv ${RECIPE_DIR}/../../Core/ ${SRC_DIR}/build mkdir ${SRC_DIR}/build/build cd ${SRC_DIR}/build/build -cmake -G "Unix Makefiles" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core +cmake -G "Unix Makefiles" -DCIL_VERSION="${CIL_VERSION}" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core make -j2 VERBOSE=1 make install -- cgit v1.2.3 From d0052abf619d327e18791aeefd1b0a0a513c546b Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 16:41:25 +0000 Subject: UPDATE: build --- recipes/regularisers/bld.bat | 2 +- recipes/regularisers/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/regularisers/bld.bat b/recipes/regularisers/bld.bat index 63e7681..43a5286 100644 --- a/recipes/regularisers/bld.bat +++ b/recipes/regularisers/bld.bat @@ -10,7 +10,7 @@ cd "%SRC_DIR%\build" echo "we should be in %SRC_DIR%\build" -cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DCIL_VERSION="%CIL_VERSION%" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF +cmake -G "NMake Makefiles" "%RECIPE_DIR%\..\..\" -DLIBRARY_LIB="%CONDA_PREFIX%\lib" -DLIBRARY_INC="%CONDA_PREFIX%" -DCMAKE_INSTALL_PREFIX="%PREFIX%\Library" -DCONDA_BUILD=ON -DBUILD_WRAPPERS=OFF ::-DBOOST_LIBRARYDIR="%CONDA_PREFIX%\Library\lib" -DBOOST_INCLUDEDIR="%CONDA_PREFIX%\Library\include" -DBOOST_ROOT="%CONDA_PREFIX%\Library\lib" diff --git a/recipes/regularisers/build.sh b/recipes/regularisers/build.sh index aede303..eaa778e 100644 --- a/recipes/regularisers/build.sh +++ b/recipes/regularisers/build.sh @@ -13,7 +13,7 @@ mkdir ${SRC_DIR}/build cp -rv ${RECIPE_DIR}/../../Core/ ${SRC_DIR}/build mkdir ${SRC_DIR}/build/build cd ${SRC_DIR}/build/build -cmake -G "Unix Makefiles" -DCIL_VERSION="${CIL_VERSION}" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core +cmake -G "Unix Makefiles" -DLIBRARY_LIB="${CONDA_PREFIX}/lib" -DLIBRARY_INC="${CONDA_PREFIX}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" ../Core make -j2 VERBOSE=1 make install -- cgit v1.2.3 From b9ee6fad5b3119e738f6999eb4dd78bafb98a7cd Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 17:07:25 +0000 Subject: test --- build/jenkins-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 6965180..8c10484 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -46,6 +46,7 @@ conda build Wrappers/Python/conda-recipe export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES + #upload to anaconda if [[ -n ${CCPI_CONDA_TOKEN} ]] then -- cgit v1.2.3 From 774ed3351991266b0c9289b2b9ba1afe328c3e70 Mon Sep 17 00:00:00 2001 From: vagrant Date: Mon, 21 Jan 2019 17:09:05 +0000 Subject: pr-test --- build/jenkins-build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 6965180..20c97f3 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -33,7 +33,6 @@ else ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . PATH=$PATH:./bin fi - # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build -- cgit v1.2.3 From 6c497653590f6c916496f1eb2f464d97d63b1ae9 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 11:57:50 +0000 Subject: Update jenkins-build.sh --- build/jenkins-build.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index ca5b57a..de22368 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -5,19 +5,19 @@ then echo Using defined version: $CIL_VERSION else - #get tag, remove first char ('v') and leave rest - export CIL_VERSION=`git describe --tags | tail -c +2` - if [[ ${CIL_VERSION} == *"-"* ]]; then - # detected dash means that it is dev version - # version is then string-string and all after second dash is ignored (usually commit sha) - export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` - # but dash is prohibited for conda build - export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` - echo Building dev version ${CIL_VERSION} - else - echo Defining version from last git tag and commit: $CIL_VERSION - fi -fi +#get tag, remove first char ('v') and leave rest +export CIL_VERSION=`git describe --tags | tail -c +2` +if [[ ${CIL_VERSION} == *"-"* ]]; then + # detected dash means that it is dev version + # version is then string-string and all after second dash is ignored (usually commit sha) + export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + # but dash is prohibited for conda build, replace with underscore + export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` + echo Building dev version ${CIL_VERSION} +else + echo Defining version from last git tag and commit: $CIL_VERSION +fi + # Script to builds source code in Jenkins environment # module try-load conda -- cgit v1.2.3 From ec5d74d59a26192288f1430581e2a27567f91b86 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 12:05:16 +0000 Subject: Update jenkins-build.sh --- build/jenkins-build.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index de22368..e440717 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -4,19 +4,20 @@ if [[ -n ${CIL_VERSION} ]] then echo Using defined version: $CIL_VERSION else - -#get tag, remove first char ('v') and leave rest -export CIL_VERSION=`git describe --tags | tail -c +2` -if [[ ${CIL_VERSION} == *"-"* ]]; then - # detected dash means that it is dev version - # version is then string-string and all after second dash is ignored (usually commit sha) - export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` - # but dash is prohibited for conda build, replace with underscore - export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` - echo Building dev version ${CIL_VERSION} -else - echo Defining version from last git tag and commit: $CIL_VERSION -fi + # define CIL_VERSION from last git tag, remove first char ('v') and leave rest + export CIL_VERSION=`git describe --tags | tail -c +2` + # dash means that it's some commit after tag release -thus will be treated as dev + if [[ ${CIL_VERSION} == *"-"* ]]; then + # detected dash means that it is dev version + # version is then string-string and all after second dash is ignored (usually commit sha) + export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` + # but dash is prohibited for conda build, replace with underscore + export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` + echo Building dev version ${CIL_VERSION} + else + echo Defining version from last git tag and commit: $CIL_VERSION + fi +fi # Script to builds source code in Jenkins environment # module try-load conda @@ -49,7 +50,7 @@ then conda install anaconda-client while read -r outfile; do #if 0 commit after tag then call anaconda without --label dev - #TODO if pull request??? do not upload + #TODO pull request not to upload if [[ $CIL_VERSION == *"_"* ]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev -- cgit v1.2.3 From 19fce0003d558b4eb9dadfb6aef7c79deef13489 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 12:13:01 +0000 Subject: Update jenkins-build.sh --- build/jenkins-build.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index e440717..6c863c0 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -8,14 +8,13 @@ else export CIL_VERSION=`git describe --tags | tail -c +2` # dash means that it's some commit after tag release -thus will be treated as dev if [[ ${CIL_VERSION} == *"-"* ]]; then - # detected dash means that it is dev version - # version is then string-string and all after second dash is ignored (usually commit sha) - export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2` - # but dash is prohibited for conda build, replace with underscore - export CIL_VERSION=`echo ${CIL_VERSION} | tr - _` - echo Building dev version ${CIL_VERSION} + # detected dash means that it is dev version, + # get first and second part between first dash and ignore all after other dash (usually sha) + # and as dash is prohibited for conda build, replace with underscore + export CIL_VERSION=`echo ${CIL_VERSION} | cut -d "-" -f -2 | tr - _` + echo Building dev version: ${CIL_VERSION} else - echo Defining version from last git tag and commit: $CIL_VERSION + echo Building release version: $CIL_VERSION fi fi -- cgit v1.2.3 From 84811ac4418fb7f72dfcb7cb8329cf05ed0fb538 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 12:52:34 +0000 Subject: Update jenkins-build.sh --- build/jenkins-build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 6c863c0..a808699 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -43,13 +43,15 @@ conda build Wrappers/Python/conda-recipe export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES -#upload to anaconda + +# upload to anaconda only if token is defined +# and TODO pull request not to upload if [[ -n ${CCPI_CONDA_TOKEN} ]] then conda install anaconda-client while read -r outfile; do #if 0 commit after tag then call anaconda without --label dev - #TODO pull request not to upload + if [[ $CIL_VERSION == *"_"* ]]; then # upload with dev label anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev -- cgit v1.2.3 From 440693750ee94044f4f0bcd7c5e737487bfb6e64 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 13:20:04 +0000 Subject: Update jenkins-build.sh --- build/jenkins-build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index e4a0535..7ac4539 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -23,7 +23,7 @@ fi # install miniconda if the module is not present if hash conda 2>/dev/null; then - echo using conda + echo using installed conda else if [ ! -f Miniconda3-latest-Linux-x86_64.sh ]; then wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh @@ -44,7 +44,6 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` # REG_FILES variable should contain output files echo files created: $REG_FILES - # upload to anaconda only if token is defined # and TODO pull request not to upload -- cgit v1.2.3 From 74bfad3cfa5462856d03872c02229423f9a36b9f Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 14:14:33 +0000 Subject: UPDATE: check git branch, upload master build --- build/jenkins-build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 7ac4539..840afac 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -32,6 +32,7 @@ else ./Miniconda3-latest-Linux-x86_64.sh -u -b -p . PATH=$PATH:./bin fi + # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build @@ -46,8 +47,10 @@ echo files created: $REG_FILES # upload to anaconda only if token is defined # and TODO pull request not to upload +GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` +echo on branch ${GIT_BRANCH} -if [[ -n ${CCPI_CONDA_TOKEN} ]] +if [[ -n ${CCPI_CONDA_TOKEN} && ${GIT_BRANCH}=="master" ]] then conda install anaconda-client while read -r outfile; do @@ -61,5 +64,5 @@ then fi done <<< "$REG_FILES" else - echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. + echo CCPI_CONDA_TOKEN not defined or git branch is not master, will not upload to anaconda. fi -- cgit v1.2.3 From e7f26cab5e6522d521c6b0e42f1991c3e7c0ac7d Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 14:43:14 +0000 Subject: UPDATE 2: check git branch, upload master build --- build/jenkins-build.sh | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 840afac..03de4e6 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -50,19 +50,21 @@ echo files created: $REG_FILES GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` echo on branch ${GIT_BRANCH} -if [[ -n ${CCPI_CONDA_TOKEN} && ${GIT_BRANCH}=="master" ]] -then - conda install anaconda-client - while read -r outfile; do - #if 0 commit after tag then call anaconda without --label dev - - if [[ $CIL_VERSION == *"_"* ]]; then - # upload with dev label - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev - else - anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force - fi - done <<< "$REG_FILES" +if [[ -n ${CCPI_CONDA_TOKEN} ]]; then + if [[ ${GIT_BRANCH}=="master" ]]; then + conda install anaconda-client + while read -r outfile; do + #if >0 commit (some _ in version) then marking as dev build + if [[ $CIL_VERSION == *"_"* ]]; then + # upload with dev label + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force --label dev + else + anaconda -v -t ${CCPI_CONDA_TOKEN} upload $outfile --force + fi + done <<< "$REG_FILES" + else + echo git branch is not master, will not upload to anaconda. + fi else - echo CCPI_CONDA_TOKEN not defined or git branch is not master, will not upload to anaconda. + echo CCPI_CONDA_TOKEN not defined, will not upload to anaconda. fi -- cgit v1.2.3 From b63188fc01a6c0a2bf9637ed1660d0dbdd48e6fe Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 15:03:38 +0000 Subject: UPDATE 2: check git branch, upload master build --- build/jenkins-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 03de4e6..b8b2aef 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -47,7 +47,7 @@ echo files created: $REG_FILES # upload to anaconda only if token is defined # and TODO pull request not to upload -GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` +GIT_BRANCH=`git symbolic-ref --short HEAD` echo on branch ${GIT_BRANCH} if [[ -n ${CCPI_CONDA_TOKEN} ]]; then -- cgit v1.2.3 From 93224f30e5072ec0b19958f053e2f58d07bf1f4b Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 15:29:16 +0000 Subject: UPDATE 3: check git branch --- build/jenkins-build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index b8b2aef..4f96194 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -33,6 +33,9 @@ else PATH=$PATH:./bin fi +GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` +echo on branch ${GIT_BRANCH} + # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit conda install -y conda-build @@ -46,9 +49,7 @@ export REG_FILES=`conda build Wrappers/Python/conda-recipe --output` echo files created: $REG_FILES # upload to anaconda only if token is defined -# and TODO pull request not to upload -GIT_BRANCH=`git symbolic-ref --short HEAD` -echo on branch ${GIT_BRANCH} +# and TODO pull request not to upload if [[ -n ${CCPI_CONDA_TOKEN} ]]; then if [[ ${GIT_BRANCH}=="master" ]]; then -- cgit v1.2.3 From 53cbfdca7373b86fcf2f1a2ae8618265a628bc05 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 16:03:22 +0000 Subject: UPDATE 4: check git branch --- build/jenkins-build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 4f96194..87ca54f 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -35,6 +35,7 @@ fi GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` echo on branch ${GIT_BRANCH} +cat .git/HEAD # presume that git clone is done before this script is launched, if not, uncomment #git clone https://github.com/vais-ral/CCPi-Regularisation-Toolkit @@ -52,7 +53,7 @@ echo files created: $REG_FILES # and TODO pull request not to upload if [[ -n ${CCPI_CONDA_TOKEN} ]]; then - if [[ ${GIT_BRANCH}=="master" ]]; then + if [[ ${GIT_BRANCH} == "master" ]]; then conda install anaconda-client while read -r outfile; do #if >0 commit (some _ in version) then marking as dev build -- cgit v1.2.3 From 450ee88cb6a7dd48cd0911937a8a0ed309b5392d Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 16:24:46 +0000 Subject: UPDATE 5: minor --- build/jenkins-build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 87ca54f..2936fed 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -20,7 +20,6 @@ fi # Script to builds source code in Jenkins environment # module try-load conda - # install miniconda if the module is not present if hash conda 2>/dev/null; then echo using installed conda -- cgit v1.2.3 From 952e9f45b04a42d5b8ef6ce3fbc50046c00e61b9 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Tue, 22 Jan 2019 16:27:06 +0000 Subject: UPDATE 6: minor --- build/jenkins-build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build/jenkins-build.sh b/build/jenkins-build.sh index 2936fed..87ca54f 100755 --- a/build/jenkins-build.sh +++ b/build/jenkins-build.sh @@ -20,6 +20,7 @@ fi # Script to builds source code in Jenkins environment # module try-load conda + # install miniconda if the module is not present if hash conda 2>/dev/null; then echo using installed conda -- cgit v1.2.3 From 00bcc569758d9429ecb3234e64c7ac05b3f8e3c1 Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Wed, 23 Jan 2019 10:08:11 +0000 Subject: Update Readme.md --- Readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 70c9e13..f155c16 100644 --- a/Readme.md +++ b/Readme.md @@ -1,4 +1,5 @@ -[![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) +Master: [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) +Development status (PR, non-master branch): [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/badge/icon)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) # CCPi-Regularisation Toolkit (CCPi-RGL) **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise the convergence and make the reconstruction problem (inverse problem) more well-posed. The CCPi-RGL software provides 2D/3D and multi-channel regularisation strategies to ensure better performance of IIR methods. The regularisation modules are well-suited to use with [splitting algorithms](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method#Alternating_direction_method_of_multipliers), such as, [ADMM](https://github.com/dkazanc/ADMM-tomo) and [FISTA](https://github.com/dkazanc/FISTA-tomo). Furthermore, the toolkit can be used for simpler inversion tasks, such as, image denoising, inpaiting, deconvolution etc. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** -- cgit v1.2.3 From b9b1254ea345330326db3883aafd8a8a66c6c67a Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Wed, 23 Jan 2019 10:09:32 +0000 Subject: Update Readme.md --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index f155c16..e7cc1f0 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,5 @@ Master: [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) -Development status (PR, non-master branch): [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/badge/icon)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) +Development status (PR, non-master branch): [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) # CCPi-Regularisation Toolkit (CCPi-RGL) **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise the convergence and make the reconstruction problem (inverse problem) more well-posed. The CCPi-RGL software provides 2D/3D and multi-channel regularisation strategies to ensure better performance of IIR methods. The regularisation modules are well-suited to use with [splitting algorithms](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method#Alternating_direction_method_of_multipliers), such as, [ADMM](https://github.com/dkazanc/ADMM-tomo) and [FISTA](https://github.com/dkazanc/FISTA-tomo). Furthermore, the toolkit can be used for simpler inversion tasks, such as, image denoising, inpaiting, deconvolution etc. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** -- cgit v1.2.3 From 06771c554d4c1ecd1e4a38a600e530222b86b28d Mon Sep 17 00:00:00 2001 From: Tomas Kulhanek Date: Wed, 23 Jan 2019 10:24:48 +0000 Subject: Update Readme.md --- Readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index e7cc1f0..1745b9e 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,6 @@ -Master: [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) -Development status (PR, non-master branch): [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) +| Master | Development | +|--------|-------------| +| [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) | # CCPi-Regularisation Toolkit (CCPi-RGL) **Iterative image reconstruction (IIR) methods normally require regularisation to stabilise the convergence and make the reconstruction problem (inverse problem) more well-posed. The CCPi-RGL software provides 2D/3D and multi-channel regularisation strategies to ensure better performance of IIR methods. The regularisation modules are well-suited to use with [splitting algorithms](https://en.wikipedia.org/wiki/Augmented_Lagrangian_method#Alternating_direction_method_of_multipliers), such as, [ADMM](https://github.com/dkazanc/ADMM-tomo) and [FISTA](https://github.com/dkazanc/FISTA-tomo). Furthermore, the toolkit can be used for simpler inversion tasks, such as, image denoising, inpaiting, deconvolution etc. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.** -- cgit v1.2.3 From 2694ad1b18d14fcfd7d57ded7290ebd1bf845fda Mon Sep 17 00:00:00 2001 From: Kazantsev Date: Wed, 23 Jan 2019 11:52:40 +0000 Subject: fixes gpu build on windows --- Core/regularisers_GPU/TV_FGP_GPU_core.h | 9 ++++----- Core/regularisers_GPU/TV_SB_GPU_core.h | 10 +++++----- Core/regularisers_GPU/dTV_FGP_GPU_core.h | 9 ++++----- Wrappers/Python/conda-recipe/meta.yaml | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Core/regularisers_GPU/TV_FGP_GPU_core.h b/Core/regularisers_GPU/TV_FGP_GPU_core.h index b28cdf3..bf13508 100755 --- a/Core/regularisers_GPU/TV_FGP_GPU_core.h +++ b/Core/regularisers_GPU/TV_FGP_GPU_core.h @@ -1,10 +1,9 @@ -#include -#include -#include - #ifndef _TV_FGP_GPU_ #define _TV_FGP_GPU_ -extern "C" int TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include + +extern "C" CCPI_EXPORT int TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Core/regularisers_GPU/TV_SB_GPU_core.h b/Core/regularisers_GPU/TV_SB_GPU_core.h index d44ab77..901b90f 100755 --- a/Core/regularisers_GPU/TV_SB_GPU_core.h +++ b/Core/regularisers_GPU/TV_SB_GPU_core.h @@ -1,10 +1,10 @@ -#include -#include -#include - #ifndef _SB_TV_GPU_ #define _SB_TV_GPU_ -extern "C" int TV_SB_GPU_main(float *Input, float *Output, float mu, int iter, float epsil, int methodTV, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include + + +extern "C" CCPI_EXPORT int TV_SB_GPU_main(float *Input, float *Output, float mu, int iter, float epsil, int methodTV, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Core/regularisers_GPU/dTV_FGP_GPU_core.h b/Core/regularisers_GPU/dTV_FGP_GPU_core.h index 9020b1a..f9281e8 100644 --- a/Core/regularisers_GPU/dTV_FGP_GPU_core.h +++ b/Core/regularisers_GPU/dTV_FGP_GPU_core.h @@ -1,10 +1,9 @@ -#include -#include -#include - #ifndef _dTV_FGP_GPU_ #define _dTV_FGP_GPU_ -extern "C" int dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iter, float epsil, float eta, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); +#include "CCPiDefines.h" +#include + +extern "C" CCPI_EXPORT int dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iter, float epsil, float eta, int methodTV, int nonneg, int printM, int dimX, int dimY, int dimZ); #endif diff --git a/Wrappers/Python/conda-recipe/meta.yaml b/Wrappers/Python/conda-recipe/meta.yaml index 9fe813d..9dd5544 100644 --- a/Wrappers/Python/conda-recipe/meta.yaml +++ b/Wrappers/Python/conda-recipe/meta.yaml @@ -12,7 +12,7 @@ test: files: - lena_gray_512.tif requires: - - pillow + - pillow=4.1.1 requirements: build: -- cgit v1.2.3