Skip to content

Commit

Permalink
Fix conflicting python versions in conda workflow (#62)
Browse files Browse the repository at this point in the history
* Set python version in conda env to 3.10

* Set python version in conda workflow to 3.10

* Try Python 3.11

* Add boost as dep

* Clean CMakefile

* Add gcc as dependency

* Add conda install for libgcc

* Fix the interpreter version

---------

Co-authored-by: Clement Helsens <[email protected]>
  • Loading branch information
sbaldu and clementhelsens authored Jan 16, 2025
1 parent c6531a5 commit 6691bae
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
8 changes: 5 additions & 3 deletions .env/test_env.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: test-with-conda
dependencies:
- python>=3.10
# - gcc_linux-64
# - gxx_linux-64
- libgcc
- python>=3.11
- numpy
- matplotlib
- scikit-learn
- pybind11
- pandas
- pytest
- boost-cpp
9 changes: 6 additions & 3 deletions .github/workflows/python-package-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python 3.11
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.11"
python-version: "3.10"
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
Expand All @@ -36,4 +36,7 @@ jobs:
- name: Test with pytest
working-directory: ${{github.workspace}}/tests
run: |
python3 -m pytest ./*.py
conda install -c conda-forge gcc_linux-64 gxx_linux-64
# strings $(conda info --base)/lib/libstdc++.so.6 | grep GLIBCXX
python3.10 -m pip install pytest numpy matplotlib scikit-learn pandas
python3.10 -m pytest ./*.py
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pybind11_add_module(CLUE_Convolutional_Kernels SHARED
CLUEstering/BindingModules/binding_kernels.cpp)
target_include_directories(
CLUE_Convolutional_Kernels PRIVATE ${alpaka_SOURCE_DIR}/include
${Boost_SOURCE_DIR})
${Boost_INCLUDE_DIR})
# alpaka build flags
target_compile_options(
CLUE_Convolutional_Kernels
Expand All @@ -73,7 +73,7 @@ endforeach()
pybind11_add_module(CLUE_CPU_Serial SHARED
CLUEstering/BindingModules/binding_cpu.cpp)
target_include_directories(CLUE_CPU_Serial PRIVATE ${alpaka_SOURCE_DIR}/include
${Boost_SOURCE_DIR})
${Boost_INCLUDE_DIR})
# alpaka build flags
target_compile_options(
CLUE_CPU_Serial
Expand Down Expand Up @@ -142,7 +142,7 @@ if((NOT ${CPU_ONLY}) AND (NOT ${SERIAL_ONLY}))
pybind11_add_module(CLUE_GPU_CUDA SHARED
CLUEstering/BindingModules/binding_gpu_cuda.cpp)
target_include_directories(
CLUE_GPU_CUDA PRIVATE ${alpaka_SOURCE_DIR}/include ${Boost_SOURCE_DIR})
CLUE_GPU_CUDA PRIVATE ${alpaka_SOURCE_DIR}/include ${Boost_INCLUDE_DIR})
# set the cuda architectures
set_target_properties(CLUE_GPU_CUDA PROPERTIES CUDA_ARCHITECTURES
"50;60;61;62;70")
Expand Down Expand Up @@ -183,7 +183,7 @@ if((NOT ${CPU_ONLY}) AND (NOT ${SERIAL_ONLY}))
pybind11_add_module(CLUE_GPU_HIP SHARED
CLUEstering/BindingModules/binding_gpu_hip.cpp)
target_include_directories(CLUE_GPU_HIP PRIVATE ${alpaka_SOURCE_DIR}/include
${Boost_SOURCE_DIR})
${Boost_INCLUDE_DIR})
# alpaka build flags
target_compile_options(
CLUE_GPU_HIP
Expand Down
6 changes: 0 additions & 6 deletions include/CLUEstering/CLUEstering.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,6 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE_CLUE {
clue::make_device_view(
device, d_points.result_buffer.data() + nPoints, 2 * nPoints),
2 * nPoints);
std::cout << std::accumulate(h_points.isSeed(), h_points.isSeed() + nPoints, 0)
<< std::endl;
std::cout << std::accumulate(d_points.result_buffer.data() + nPoints,
d_points.result_buffer.data() + 3 * nPoints,
0)
<< std::endl;

// Wait for all the operations in the queue to finish
alpaka::wait(queue_);
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup
import subprocess

__version__ = "2.4.0"
__version__ = "2.4.0.1"

this_directory = Path(__file__).parent
long_description = (this_directory/'README.md').read_text()
Expand Down

0 comments on commit 6691bae

Please sign in to comment.