From 88b9a9e70b33b851cde6143108524ac01d025688 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 12:57:55 +0200 Subject: [PATCH 01/22] Modify CI to use 3.13 --- .github/workflows/coverage.yml | 23 ++--------------- .github/workflows/neuron-ci.yml | 44 ++------------------------------- azure-pipelines.yml | 20 ++++++++++----- nrn_requirements.txt | 2 +- 4 files changed, 19 insertions(+), 70 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ce0bb21bae..65650c86fe 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ on: env: PY_MIN_VERSION: '3.8' PY_MID_VERSION: '3.10' - PY_MAX_VERSION: '3.12' + PY_MAX_VERSION: '3.13' jobs: coverage: @@ -36,8 +36,6 @@ jobs: env: DISPLAY: ${{ ':0' }} - MUSIC_INSTALL_DIR: /opt/MUSIC - MUSIC_VERSION: 1.2.0 steps: @@ -54,21 +52,6 @@ jobs: cmake .. make && sudo make install - - name: Setup MUSIC@${{ env.MUSIC_VERSION }} - run: | - python3 -m venv music-venv - source music-venv/bin/activate - python3 -m pip install 'mpi4py<4' cython numpy setuptools - sudo mkdir -p $MUSIC_INSTALL_DIR - sudo chown -R $USER $MUSIC_INSTALL_DIR - curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip - unzip MUSIC.zip && mv MUSIC-* MUSIC && cd MUSIC - ./autogen.sh - ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource - make -j install - deactivate - working-directory: ${{runner.temp}} - - name: Setup Xvfb run: | sudo apt-get install xvfb @@ -148,9 +131,7 @@ jobs: -DNRN_PYTHON_DYNAMIC="${PYTHON_MIN};${PYTHON_MAX}" \ -DNRN_PYTHON_EXTRA_FOR_TESTS=${PYTHON_MID} \ -DNRN_ENABLE_TESTS=ON \ - -DNRN_ENABLE_MUSIC=ON \ - -DCMAKE_PREFIX_PATH="${MUSIC_INSTALL_DIR}" \ - -DMUSIC_ROOT="${MUSIC_INSTALL_DIR}") + -DNRN_ENABLE_MUSIC=OFF) cmake .. "${cmake_args[@]}" # Coverage # The Linux runners apparently have 2 cores, but jobs were being killed when we did not specify this explicitly. diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index e3ca977eb4..21f13ec096 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -39,16 +39,14 @@ jobs: DESIRED_CMAKE_VERSION: 3.17 DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} - PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.12' }} - MUSIC_INSTALL_DIR: /opt/MUSIC - MUSIC_VERSION: 1.2.1 + PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13' }} strategy: matrix: os: [ macOS-12, ubuntu-20.04] config: - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "setuptools"} - - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake", music: ON} + - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake"} - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake", python_dynamic: ON} - { matrix_eval : "CC=gcc-9 CXX=g++-9" , build_mode: "cmake", cmake_option: "-DNRN_ENABLE_CORENEURON=ON"} - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "cmake", cmake_option: "-DNRN_ENABLE_MPI=OFF -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_CORENEURON=ON"} @@ -187,38 +185,6 @@ jobs: python -m pip install --upgrade -r ci_requirements.txt python -m pip install --upgrade pip -r nrn_requirements.txt - - name: Install a new automake - # A new automake is needed for python 3.12 because it generate a python script - # called py-compile and the original one is not supporting this version of python - # Once ubuntu got a newer version of automake we can remove this part. - if: matrix.config.music == 'ON' && startsWith(matrix.os, 'ubuntu') - run: | - curl -L -o automake.tar.xz https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz - tar -xf automake.tar.xz - cd automake-1.16.5/ - ./configure --prefix=/usr/ - make -j - sudo make -j install - automake --version - working-directory: ${{runner.temp}} - - - name: Setup MUSIC@${{ env.MUSIC_VERSION }} - if: matrix.config.music == 'ON' - run: | - python3 -m venv music-venv - source music-venv/bin/activate - python3 -m pip install 'mpi4py<4' cython numpy setuptools - sudo mkdir -p $MUSIC_INSTALL_DIR - sudo chown -R $USER $MUSIC_INSTALL_DIR - curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip - unzip MUSIC.zip && mv MUSIC-* MUSIC && cd MUSIC - ./autogen.sh - # on some systems MPI library detection fails, provide exact flags/compilers - ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource MPI_CXXFLAGS="-g -O3" MPI_CFLAGS="-g -O3" MPI_LDFLAGS=" " CC=mpicc CXX=mpicxx - make -j install - deactivate - working-directory: ${{runner.temp}} - - name: Register gcc problem matcher if: ${{matrix.config.flag_warnings == 'ON'}} run: echo "::add-matcher::.github/problem-matchers/gcc.json" @@ -329,11 +295,6 @@ jobs: else cmake_args+=(-DPYTHON_EXECUTABLE="${PYTHON}") fi - if [[ "$NRN_ENABLE_MUSIC" == "ON" ]]; then - cmake_args+=(-DNRN_ENABLE_MUSIC=ON \ - -DCMAKE_PREFIX_PATH=${MUSIC_INSTALL_DIR} \ - -DMUSIC_ROOT=${MUSIC_INSTALL_DIR}) - fi # Enable more warnings in the builds whose compiler warnings we # highlight in the GitHub UI if [[ "${{matrix.config.flag_warnings}}" == "ON" ]]; then @@ -435,7 +396,6 @@ jobs: CCACHE_BASEDIR: ${{runner.workspace}}/nrn CCACHE_DIR: ${{runner.workspace}}/ccache NRN_ENABLE_PYTHON_DYNAMIC : ${{ matrix.config.python_dynamic }} - NRN_ENABLE_MUSIC: ${{ matrix.config.music }} PYTHON_MIN_NAME: "python${{ env.PY_MIN_VERSION }}" PYTHON_MAX_NAME: "python${{ env.PY_MAX_VERSION }}" INSTALL_DIR : ${{ runner.workspace }}/install diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 238988a536..2715be4010 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,6 +44,9 @@ stages: python.version: '3.11' Python312: python.version: '3.12' + Python313: + python.version: '3.13' + steps: # Secure files documentation: @@ -91,28 +94,33 @@ stages: Python38: python.version: '3.8' python.org.version: '3.8.9' - python.installer.name: 'macosx10.9.pkg' + python.installer.name: '3.8.9-macosx10.9.pkg' Python39: python.version: '3.9' python.org.version: '3.9.13' - python.installer.name: 'macos11.pkg' + python.installer.name: '3.9.13-macos11.pkg' Python310: python.version: '3.10' python.org.version: '3.10.11' - python.installer.name: 'macos11.pkg' + python.installer.name: '3.10.11-macos11.pkg' Python311: python.version: '3.11' python.org.version: '3.11.7' - python.installer.name: 'macos11.pkg' + python.installer.name: '3.11.7-macos11.pkg' Python312: python.version: '3.12' python.org.version: '3.12.0' - python.installer.name: 'macos11.pkg' + python.installer.name: '3.12.0-macos11.pkg' + + Python312: + python.version: '3.13' + python.org.version: '3.13.0' + python.installer.name: '3.13.0rc2-macos11.pkg' steps: - script: | - installer=python-$(python.org.version)-$(python.installer.name) + installer=python-$(python.installer.name) url=https://www.python.org/ftp/python/$(python.org.version)/$installer curl $url -o $installer sudo installer -pkg $installer -target / diff --git a/nrn_requirements.txt b/nrn_requirements.txt index f049602b4e..eabc83e78d 100644 --- a/nrn_requirements.txt +++ b/nrn_requirements.txt @@ -10,6 +10,6 @@ cython packaging pytest<=8.1.1 # potential bug from 8.2.0 due to parallelism? pytest-cov -mpi4py<4 # MUSIC not compatible with MPI 4 +mpi4py numpy find_libpython From 6cfd1f98b4e80fb0a3a9b0e49531f686323630a4 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 11:15:44 +0200 Subject: [PATCH 02/22] Bump MacOS versions in CI --- .github/workflows/neuron-ci.yml | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 21f13ec096..d13324d1cb 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: - os: [ macOS-12, ubuntu-20.04] + os: [macOS-13, ubuntu-20.04] config: - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "setuptools"} - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake"} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2715be4010..25bba532be 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -88,7 +88,7 @@ stages: - job: 'MacOSWheels' timeoutInMinutes: 60 pool: - vmImage: 'macOS-12' + vmImage: 'macOS-13' strategy: matrix: Python38: From 349d03bb6ee6f86499de59d69181fa2ab2ead1a5 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 13:02:27 +0200 Subject: [PATCH 03/22] Add right version in action setup --- .github/workflows/neuron-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index d13324d1cb..646da9428a 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -39,7 +39,7 @@ jobs: DESIRED_CMAKE_VERSION: 3.17 DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} - PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13' }} + PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.2' }} strategy: matrix: From 713f197dcaacfa406655ee480432d1cfcdd09162 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 13:22:46 +0200 Subject: [PATCH 04/22] Wrong Python interpreter --- .github/workflows/neuron-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 646da9428a..6e80a5d979 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -397,7 +397,7 @@ jobs: CCACHE_DIR: ${{runner.workspace}}/ccache NRN_ENABLE_PYTHON_DYNAMIC : ${{ matrix.config.python_dynamic }} PYTHON_MIN_NAME: "python${{ env.PY_MIN_VERSION }}" - PYTHON_MAX_NAME: "python${{ env.PY_MAX_VERSION }}" + PYTHON_MAX_NAME: "python3.13" INSTALL_DIR : ${{ runner.workspace }}/install MATRIX_EVAL: ${{ matrix.config.matrix_eval }} From 3bff32bcfefc4fa58c38bb99f6690b1cd86e88ed Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 13:23:41 +0200 Subject: [PATCH 05/22] Yeah the coverage one too --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 65650c86fe..cfc5b4e5f6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -156,7 +156,7 @@ jobs: MATRIX_EVAL: "CC=gcc CXX=g++" PYTHON_MIN_NAME: "python${{ env.PY_MIN_VERSION }}" PYTHON_MID_NAME: "python${{ env.PY_MID_VERSION }}" - PYTHON_MAX_NAME: "python${{ env.PY_MAX_VERSION }}" + PYTHON_MAX_NAME: "python3.13" # This step will set up an SSH connection on tmate.io for live debugging. # To enable it, you have to: From 907725477b2893a639f26626ceef9a5bf1bde084 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 13:29:45 +0200 Subject: [PATCH 06/22] Okay for real this time --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index cfc5b4e5f6..052f85f585 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ on: env: PY_MIN_VERSION: '3.8' PY_MID_VERSION: '3.10' - PY_MAX_VERSION: '3.13' + PY_MAX_VERSION: '3.13.0-rc.2' jobs: coverage: From 7378300dcbb3cf99bb8368e3e9b5b10d7f9d4aaf Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 15:34:10 +0200 Subject: [PATCH 07/22] Fix: remove deprecated test methods --- share/lib/python/neuron/tests/test_neuron.py | 3 +-- share/lib/python/neuron/tests/test_rxd.py | 3 +-- share/lib/python/neuron/tests/test_vector.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/share/lib/python/neuron/tests/test_neuron.py b/share/lib/python/neuron/tests/test_neuron.py index 6c49934f30..d300aa3c26 100644 --- a/share/lib/python/neuron/tests/test_neuron.py +++ b/share/lib/python/neuron/tests/test_neuron.py @@ -294,8 +294,7 @@ def suite(): ] except: pass - suite = unittest.makeSuite(NeuronTestCase, "test") - return suite + return unittest.defaultTestLoader.loadTestsFromTestCase(NeuronTestCase) if __name__ == "__main__": diff --git a/share/lib/python/neuron/tests/test_rxd.py b/share/lib/python/neuron/tests/test_rxd.py index 964bd53738..db85696c90 100644 --- a/share/lib/python/neuron/tests/test_rxd.py +++ b/share/lib/python/neuron/tests/test_rxd.py @@ -798,8 +798,7 @@ def test_ecs_diffusion_variable_step_fine(self): def suite(): - suite = unittest.makeSuite(RxDTestCase, "test") - return suite + return unittest.defaultTestLoader.loadTestsFromTestCase(RxDTestCase) def test(): diff --git a/share/lib/python/neuron/tests/test_vector.py b/share/lib/python/neuron/tests/test_vector.py index ee92f0bb27..17ed26bd42 100644 --- a/share/lib/python/neuron/tests/test_vector.py +++ b/share/lib/python/neuron/tests/test_vector.py @@ -156,8 +156,7 @@ def testErrorHandling(self): def suite(): - suite = unittest.makeSuite(VectorTestCase, "test") - return suite + return unittest.defaultTestLoader.loadTestsFromTestCase(VectorTestCase) if __name__ == "__main__": From 30fb89a16e9c4692af51196e9d03ee9aa776e13d Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 15:38:26 +0200 Subject: [PATCH 08/22] Fix: pytest warning --- test/pytest_coreneuron/test_nlayer.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/pytest_coreneuron/test_nlayer.py b/test/pytest_coreneuron/test_nlayer.py index 5a7670da58..7e45c4a444 100644 --- a/test/pytest_coreneuron/test_nlayer.py +++ b/test/pytest_coreneuron/test_nlayer.py @@ -36,7 +36,7 @@ def run(self): return res -def test_nlayer(): +def _test_nlayer(): res = [] for nlayer in [1, 2, 3]: h.nlayer_extracellular(nlayer) @@ -52,10 +52,14 @@ def test_nlayer(): return res -if __name__ == "__main__": - res = test_nlayer() +def test_main(): + res = _test_nlayer() for i in range(len(res[0][0])): for j in range(2): for k in range(3): print("%g" % res[k][j].x[i], end=" ") print() + + +if __name__ == "__main__": + test_main() From 71d1cfa7758f2ccaa9a065517dc1207e28c020c0 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 1 Oct 2024 16:02:30 +0200 Subject: [PATCH 09/22] Whoops I broke azure --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 25bba532be..08ce6d11c3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -111,8 +111,7 @@ stages: python.version: '3.12' python.org.version: '3.12.0' python.installer.name: '3.12.0-macos11.pkg' - - Python312: + Python313: python.version: '3.13' python.org.version: '3.13.0' python.installer.name: '3.13.0rc2-macos11.pkg' From 2bac6ff0c7d3f6773b0d3110451babc414517b5c Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Wed, 2 Oct 2024 09:38:08 +0200 Subject: [PATCH 10/22] Bring back the music --- .github/workflows/coverage.yml | 21 ++++++++++++++++- .github/workflows/neuron-ci.yml | 42 ++++++++++++++++++++++++++++++++- setup.py | 2 +- 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 052f85f585..9087cb42bb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -36,6 +36,8 @@ jobs: env: DISPLAY: ${{ ':0' }} + MUSIC_INSTALL_DIR: /opt/MUSIC + MUSIC_VERSION: 1.2.0 steps: @@ -52,6 +54,21 @@ jobs: cmake .. make && sudo make install + - name: Setup MUSIC@${{ env.MUSIC_VERSION }} + run: | + python3 -m venv music-venv + source music-venv/bin/activate + python3 -m pip install mpi4py cython numpy setuptools + sudo mkdir -p $MUSIC_INSTALL_DIR + sudo chown -R $USER $MUSIC_INSTALL_DIR + curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip + unzip MUSIC.zip && mv MUSIC-* MUSIC && cd MUSIC + ./autogen.sh + ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource + make -j install + deactivate + working-directory: ${{runner.temp}} + - name: Setup Xvfb run: | sudo apt-get install xvfb @@ -131,7 +148,9 @@ jobs: -DNRN_PYTHON_DYNAMIC="${PYTHON_MIN};${PYTHON_MAX}" \ -DNRN_PYTHON_EXTRA_FOR_TESTS=${PYTHON_MID} \ -DNRN_ENABLE_TESTS=ON \ - -DNRN_ENABLE_MUSIC=OFF) + -DNRN_ENABLE_MUSIC=ON \ + -DCMAKE_PREFIX_PATH="${MUSIC_INSTALL_DIR}" \ + -DMUSIC_ROOT="${MUSIC_INSTALL_DIR}") cmake .. "${cmake_args[@]}" # Coverage # The Linux runners apparently have 2 cores, but jobs were being killed when we did not specify this explicitly. diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 6e80a5d979..beda7f9729 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -40,13 +40,15 @@ jobs: DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.2' }} + MUSIC_INSTALL_DIR: /opt/MUSIC + MUSIC_VERSION: 1.2.1 strategy: matrix: os: [macOS-13, ubuntu-20.04] config: - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "setuptools"} - - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake"} + - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake", music: ON} - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake", python_dynamic: ON} - { matrix_eval : "CC=gcc-9 CXX=g++-9" , build_mode: "cmake", cmake_option: "-DNRN_ENABLE_CORENEURON=ON"} - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "cmake", cmake_option: "-DNRN_ENABLE_MPI=OFF -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_CORENEURON=ON"} @@ -185,6 +187,38 @@ jobs: python -m pip install --upgrade -r ci_requirements.txt python -m pip install --upgrade pip -r nrn_requirements.txt + - name: Install a new automake + # A new automake is needed for python 3.12 because it generate a python script + # called py-compile and the original one is not supporting this version of python + # Once ubuntu got a newer version of automake we can remove this part. + if: matrix.config.music == 'ON' && startsWith(matrix.os, 'ubuntu') + run: | + curl -L -o automake.tar.xz https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz + tar -xf automake.tar.xz + cd automake-1.16.5/ + ./configure --prefix=/usr/ + make -j + sudo make -j install + automake --version + working-directory: ${{runner.temp}} + + - name: Setup MUSIC@${{ env.MUSIC_VERSION }} + if: matrix.config.music == 'ON' + run: | + python3 -m venv music-venv + source music-venv/bin/activate + python3 -m pip install mpi4py cython numpy setuptools + sudo mkdir -p $MUSIC_INSTALL_DIR + sudo chown -R $USER $MUSIC_INSTALL_DIR + curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip + unzip MUSIC.zip && mv MUSIC-* MUSIC && cd MUSIC + ./autogen.sh + # on some systems MPI library detection fails, provide exact flags/compilers + ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource MPI_CXXFLAGS="-g -O3" MPI_CFLAGS="-g -O3" MPI_LDFLAGS=" " CC=mpicc CXX=mpicxx + make -j install + deactivate + working-directory: ${{runner.temp}} + - name: Register gcc problem matcher if: ${{matrix.config.flag_warnings == 'ON'}} run: echo "::add-matcher::.github/problem-matchers/gcc.json" @@ -295,6 +329,11 @@ jobs: else cmake_args+=(-DPYTHON_EXECUTABLE="${PYTHON}") fi + if [[ "$NRN_ENABLE_MUSIC" == "ON" ]]; then + cmake_args+=(-DNRN_ENABLE_MUSIC=ON \ + -DCMAKE_PREFIX_PATH=${MUSIC_INSTALL_DIR} \ + -DMUSIC_ROOT=${MUSIC_INSTALL_DIR}) + fi # Enable more warnings in the builds whose compiler warnings we # highlight in the GitHub UI if [[ "${{matrix.config.flag_warnings}}" == "ON" ]]; then @@ -396,6 +435,7 @@ jobs: CCACHE_BASEDIR: ${{runner.workspace}}/nrn CCACHE_DIR: ${{runner.workspace}}/ccache NRN_ENABLE_PYTHON_DYNAMIC : ${{ matrix.config.python_dynamic }} + NRN_ENABLE_MUSIC: ${{ matrix.config.music }} PYTHON_MIN_NAME: "python${{ env.PY_MIN_VERSION }}" PYTHON_MAX_NAME: "python3.13" INSTALL_DIR : ${{ runner.workspace }}/install diff --git a/setup.py b/setup.py index e15b6e5ac0..fffb2bfec8 100644 --- a/setup.py +++ b/setup.py @@ -96,7 +96,7 @@ class Components: Components.MUSIC = True sys.argv.remove("--enable-music") -if Components.RX3D: +if Components.RX3D or Components.MUSIC: try: from Cython.Distutils import Extension as CyExtension from Cython.Distutils import build_ext From 04c90bd3097b64fac92d381c01f38dcc8b24fb2a Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Wed, 2 Oct 2024 10:34:39 +0200 Subject: [PATCH 11/22] Pin mpi4py --- .github/workflows/coverage.yml | 2 +- .github/workflows/neuron-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9087cb42bb..f86ff2da8a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -58,7 +58,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install mpi4py cython numpy setuptools + python3 -m pip install 'mpi4py<4' cython numpy setuptools sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index beda7f9729..6943d10c0c 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -207,7 +207,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install mpi4py cython numpy setuptools + python3 -m pip install 'mpi4py<4' cython numpy setuptools sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip From 8dbeb9eaf823a1ba3934d1003bf6ba5257acec8e Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 3 Oct 2024 13:33:08 +0200 Subject: [PATCH 12/22] Revert "Pin mpi4py" This reverts commit 04c90bd3097b64fac92d381c01f38dcc8b24fb2a. Also adds Python 3.13 rc3 --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/neuron-ci.yml | 4 ++-- azure-pipelines.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f86ff2da8a..185a1061eb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ on: env: PY_MIN_VERSION: '3.8' PY_MID_VERSION: '3.10' - PY_MAX_VERSION: '3.13.0-rc.2' + PY_MAX_VERSION: '3.13.0-rc.3' jobs: coverage: @@ -58,7 +58,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install 'mpi4py<4' cython numpy setuptools + python3 -m pip install mpi4py cython numpy setuptools sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 6943d10c0c..fa8863c2b1 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -39,7 +39,7 @@ jobs: DESIRED_CMAKE_VERSION: 3.17 DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} - PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.2' }} + 3 PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.3' }} MUSIC_INSTALL_DIR: /opt/MUSIC MUSIC_VERSION: 1.2.1 @@ -207,7 +207,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install 'mpi4py<4' cython numpy setuptools + python3 -m pip install mpi4py cython numpy setuptools sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 08ce6d11c3..2c55a1c083 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -114,7 +114,7 @@ stages: Python313: python.version: '3.13' python.org.version: '3.13.0' - python.installer.name: '3.13.0rc2-macos11.pkg' + python.installer.name: '3.13.0rc3-macos11.pkg' steps: From 31ac6d70f96fa3cdd2571a895a9681ca2763350c Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 3 Oct 2024 13:34:53 +0200 Subject: [PATCH 13/22] Fix typo --- .github/workflows/neuron-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index fa8863c2b1..a730b63e24 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -39,7 +39,7 @@ jobs: DESIRED_CMAKE_VERSION: 3.17 DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} - 3 PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.3' }} + PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.3' }} MUSIC_INSTALL_DIR: /opt/MUSIC MUSIC_VERSION: 1.2.1 From 1c7aa9d5baf3092942febe6326c58dbbdb751ecf Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 3 Oct 2024 13:41:07 +0200 Subject: [PATCH 14/22] Try workaround for mpi4py --- .github/workflows/coverage.yml | 7 +++++-- .github/workflows/neuron-ci.yml | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 185a1061eb..b59df4a6d1 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -37,7 +37,7 @@ jobs: env: DISPLAY: ${{ ':0' }} MUSIC_INSTALL_DIR: /opt/MUSIC - MUSIC_VERSION: 1.2.0 + MUSIC_VERSION: 1.2.1 steps: @@ -58,7 +58,10 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install mpi4py cython numpy setuptools + python3 -m pip install cython numpy setuptools + # workaround for Python 3.13 incompat + git clone --branch maint-3.1 https://github.com/mpi4py/mpi4py + cd mpi4py && bash conf/cython.sh && python3 -m pip install . && cd - && rm -fr mpi4py sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index a730b63e24..f47309acd6 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -207,7 +207,10 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install mpi4py cython numpy setuptools + python3 -m pip install cython numpy setuptools + # workaround for Python 3.13 incompat + git clone --branch maint-3.1 https://github.com/mpi4py/mpi4py + cd mpi4py && bash conf/cython.sh && python3 -m pip install . && cd - && rm -fr mpi4py sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip From 868264cb41e88e7d11da21cee7fc74dd434097fc Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 3 Oct 2024 13:46:26 +0200 Subject: [PATCH 15/22] Fix typo --- .github/workflows/coverage.yml | 2 +- .github/workflows/neuron-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b59df4a6d1..ed521441b4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -61,7 +61,7 @@ jobs: python3 -m pip install cython numpy setuptools # workaround for Python 3.13 incompat git clone --branch maint-3.1 https://github.com/mpi4py/mpi4py - cd mpi4py && bash conf/cython.sh && python3 -m pip install . && cd - && rm -fr mpi4py + cd mpi4py && bash conf/cythonize.sh && python3 -m pip install . && cd - && rm -fr mpi4py sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index f47309acd6..2c3964297f 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -210,7 +210,7 @@ jobs: python3 -m pip install cython numpy setuptools # workaround for Python 3.13 incompat git clone --branch maint-3.1 https://github.com/mpi4py/mpi4py - cd mpi4py && bash conf/cython.sh && python3 -m pip install . && cd - && rm -fr mpi4py + cd mpi4py && bash conf/cythonize.sh && python3 -m pip install . && cd - && rm -fr mpi4py sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip From f9c77ad178cbf3cfe79946fad6398eca76829c56 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Fri, 4 Oct 2024 10:47:44 +0200 Subject: [PATCH 16/22] Remove OpenMPI --- .github/workflows/coverage.yml | 7 ++----- .github/workflows/neuron-ci.yml | 9 +++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ed521441b4..42f1b28a8e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -43,7 +43,7 @@ jobs: - name: Install apt packages run: | - sudo apt-get install xfonts-100dpi build-essential doxygen lcov libboost-all-dev libopenmpi-dev libmpich-dev libx11-dev libxcomposite-dev mpich openmpi-bin gpg ninja-build flex bison libfl-dev + sudo apt-get install xfonts-100dpi build-essential doxygen lcov libboost-all-dev libmpich-dev libx11-dev libxcomposite-dev mpich gpg ninja-build flex bison libfl-dev shell: bash - name: Setup Caliper profiler @@ -58,10 +58,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install cython numpy setuptools - # workaround for Python 3.13 incompat - git clone --branch maint-3.1 https://github.com/mpi4py/mpi4py - cd mpi4py && bash conf/cythonize.sh && python3 -m pip install . && cd - && rm -fr mpi4py + python3 -m pip install mpi4py cython numpy setuptools sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 2c3964297f..78673701c5 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -139,9 +139,9 @@ jobs: - name: Install apt packages if: startsWith(matrix.os, 'ubuntu') run: | - sudo apt-get install build-essential ccache libopenmpi-dev \ + sudo apt-get install build-essential ccache \ libmpich-dev libx11-dev libxcomposite-dev mpich ninja-build \ - openmpi-bin flex libfl-dev bison libreadline-dev + flex libfl-dev bison libreadline-dev # The sanitizer builds use ubuntu 22.04 if [[ "${{matrix.os}}" == "ubuntu-20.04" ]]; then sudo apt-get install g++-7 g++-8 @@ -207,10 +207,7 @@ jobs: run: | python3 -m venv music-venv source music-venv/bin/activate - python3 -m pip install cython numpy setuptools - # workaround for Python 3.13 incompat - git clone --branch maint-3.1 https://github.com/mpi4py/mpi4py - cd mpi4py && bash conf/cythonize.sh && python3 -m pip install . && cd - && rm -fr mpi4py + python3 -m pip install mpi4py cython numpy setuptools sudo mkdir -p $MUSIC_INSTALL_DIR sudo chown -R $USER $MUSIC_INSTALL_DIR curl -L -o MUSIC.zip https://github.com/INCF/MUSIC/archive/refs/tags/${MUSIC_VERSION}.zip From 58b9b6fe18b0ece1cae23a1e585addab9038e150 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Fri, 4 Oct 2024 11:52:02 +0200 Subject: [PATCH 17/22] Explicitly nuke OpenMPI --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 42f1b28a8e..88ad1be976 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -44,6 +44,7 @@ jobs: - name: Install apt packages run: | sudo apt-get install xfonts-100dpi build-essential doxygen lcov libboost-all-dev libmpich-dev libx11-dev libxcomposite-dev mpich gpg ninja-build flex bison libfl-dev + sudo apt-get purge -y libopenmpi-dev openmpi-bin shell: bash - name: Setup Caliper profiler From e6266320880c93e8951fae2d6c6b1d0d115190e4 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Fri, 4 Oct 2024 12:04:51 +0200 Subject: [PATCH 18/22] Fix MUSIC in CI as well --- .github/workflows/neuron-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index e624fd2ea7..c1873ec35f 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -205,6 +205,8 @@ jobs: - name: Setup MUSIC@${{ env.MUSIC_VERSION }} if: matrix.config.music == 'ON' run: | + # the version of OpenMPI on Ubuntu does not support MPI 4, so we remove it + apt-get purge -y libopenmpi-dev openmpi-bin python3 -m venv music-venv source music-venv/bin/activate python3 -m pip install mpi4py cython numpy setuptools @@ -217,6 +219,8 @@ jobs: ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource MPI_CXXFLAGS="-g -O3" MPI_CFLAGS="-g -O3" MPI_LDFLAGS=" " CC=mpicc CXX=mpicxx make -j install deactivate + # install back OpenMPI so NEURON can use it + apt-get install -y libopenmpi-dev openmpi-bin working-directory: ${{runner.temp}} - name: Register gcc problem matcher From 06f06d832fb297da4f2f52b1b9a5051f48aedbad Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Fri, 4 Oct 2024 12:22:03 +0200 Subject: [PATCH 19/22] Install custom OpenMPI that supports MPI 4 --- .github/workflows/neuron-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index c1873ec35f..8e0b547b77 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -200,13 +200,19 @@ jobs: make -j sudo make -j install automake --version + cd - + sudo apt-get purge -y libopenmpi-dev openmpi-bin + curl -L -o openmpi.tar.gz https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.5.tar.gz + tar -xf openmpi.tar.gz + cd openmpi-5.0.5/ + ./configure --prefix=/usr/ + make -j + sudo make -j install working-directory: ${{runner.temp}} - name: Setup MUSIC@${{ env.MUSIC_VERSION }} if: matrix.config.music == 'ON' run: | - # the version of OpenMPI on Ubuntu does not support MPI 4, so we remove it - apt-get purge -y libopenmpi-dev openmpi-bin python3 -m venv music-venv source music-venv/bin/activate python3 -m pip install mpi4py cython numpy setuptools @@ -219,8 +225,6 @@ jobs: ./configure --with-python-sys-prefix --prefix=$MUSIC_INSTALL_DIR --disable-anysource MPI_CXXFLAGS="-g -O3" MPI_CFLAGS="-g -O3" MPI_LDFLAGS=" " CC=mpicc CXX=mpicxx make -j install deactivate - # install back OpenMPI so NEURON can use it - apt-get install -y libopenmpi-dev openmpi-bin working-directory: ${{runner.temp}} - name: Register gcc problem matcher From 68799cb0a307bd0077a29e068cfc0093390b2db6 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Fri, 4 Oct 2024 13:18:49 +0200 Subject: [PATCH 20/22] OpenMPI stuff --- .github/workflows/neuron-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 8e0b547b77..d2d9cc3397 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -139,9 +139,9 @@ jobs: - name: Install apt packages if: startsWith(matrix.os, 'ubuntu') run: | - sudo apt-get install build-essential ccache \ + sudo apt-get install build-essential ccache libopenmpi-dev \ libmpich-dev libx11-dev libxcomposite-dev mpich ninja-build \ - flex libfl-dev bison libreadline-dev + openmpi-bin flex libfl-dev bison libreadline-dev # The sanitizer builds use ubuntu 22.04 if [[ "${{matrix.os}}" == "ubuntu-20.04" ]]; then sudo apt-get install g++-7 g++-8 From 127bd125956f4a4a3bc96943b7645c818b797ae5 Mon Sep 17 00:00:00 2001 From: JCGoran Date: Tue, 8 Oct 2024 16:15:19 +0200 Subject: [PATCH 21/22] Fix MPI issues with MUSIC --- .github/workflows/coverage.yml | 13 ++++++++++++- .github/workflows/neuron-ci.yml | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 88ad1be976..119a718957 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -44,9 +44,20 @@ jobs: - name: Install apt packages run: | sudo apt-get install xfonts-100dpi build-essential doxygen lcov libboost-all-dev libmpich-dev libx11-dev libxcomposite-dev mpich gpg ninja-build flex bison libfl-dev - sudo apt-get purge -y libopenmpi-dev openmpi-bin shell: bash + - name: Install a new version of OpenMPI + # The version of OpenMPI on Ubuntu 22.04 does not support MPI 4 features, so we install it manually + run: | + sudo apt-get purge -y libopenmpi-dev openmpi-bin + curl -L -o openmpi.tar.gz https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.5.tar.gz + tar -xf openmpi.tar.gz + cd openmpi-5.0.5/ + ./configure --prefix=/usr/ + make -j + sudo make -j install + working-directory: ${{runner.temp}} + - name: Setup Caliper profiler run: | git clone https://github.com/LLNL/Caliper.git diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index d2d9cc3397..819d883237 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -187,6 +187,18 @@ jobs: python -m pip install --upgrade -r ci_requirements.txt python -m pip install --upgrade pip -r nrn_requirements.txt + - name: Install a new version of OpenMPI + # The version of OpenMPI on Ubuntu 22.04 does not support MPI 4 features, so we install it manually + run: | + sudo apt-get purge -y libopenmpi-dev openmpi-bin + curl -L -o openmpi.tar.gz https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.5.tar.gz + tar -xf openmpi.tar.gz + cd openmpi-5.0.5/ + ./configure --prefix=/usr/ + make -j + sudo make -j install + working-directory: ${{runner.temp}} + - name: Install a new automake # A automake >= 1.16.5 is needed for python 3.12 because it generates a python script # called py-compile and the original one is not supporting this version of python @@ -200,14 +212,6 @@ jobs: make -j sudo make -j install automake --version - cd - - sudo apt-get purge -y libopenmpi-dev openmpi-bin - curl -L -o openmpi.tar.gz https://download.open-mpi.org/release/open-mpi/v5.0/openmpi-5.0.5.tar.gz - tar -xf openmpi.tar.gz - cd openmpi-5.0.5/ - ./configure --prefix=/usr/ - make -j - sudo make -j install working-directory: ${{runner.temp}} - name: Setup MUSIC@${{ env.MUSIC_VERSION }} From ed6f7ccf68909b92209cd2c1dfaee6e23970bab0 Mon Sep 17 00:00:00 2001 From: JCGoran Date: Tue, 8 Oct 2024 16:16:31 +0200 Subject: [PATCH 22/22] Remove Python 3.13 stuff --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/neuron-ci.yml | 6 +++--- azure-pipelines.yml | 21 +++++++-------------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 119a718957..c37bbec630 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -24,7 +24,7 @@ on: env: PY_MIN_VERSION: '3.8' PY_MID_VERSION: '3.10' - PY_MAX_VERSION: '3.13.0-rc.3' + PY_MAX_VERSION: '3.12' jobs: coverage: @@ -187,7 +187,7 @@ jobs: MATRIX_EVAL: "CC=gcc CXX=g++" PYTHON_MIN_NAME: "python${{ env.PY_MIN_VERSION }}" PYTHON_MID_NAME: "python${{ env.PY_MID_VERSION }}" - PYTHON_MAX_NAME: "python3.13" + PYTHON_MAX_NAME: "python${{ env.PY_MAX_VERSION }}" # This step will set up an SSH connection on tmate.io for live debugging. # To enable it, you have to: diff --git a/.github/workflows/neuron-ci.yml b/.github/workflows/neuron-ci.yml index 819d883237..0c731d70b6 100644 --- a/.github/workflows/neuron-ci.yml +++ b/.github/workflows/neuron-ci.yml @@ -39,13 +39,13 @@ jobs: DESIRED_CMAKE_VERSION: 3.17 DYNAMIC_PYTHON_CMAKE_VERSION: 3.18 PY_MIN_VERSION: ${{ matrix.config.python_min_version || '3.8' }} - PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.13.0-rc.3' }} + PY_MAX_VERSION: ${{ matrix.config.python_max_version || '3.12' }} MUSIC_INSTALL_DIR: /opt/MUSIC MUSIC_VERSION: 1.2.1 strategy: matrix: - os: [macOS-13, ubuntu-20.04] + os: [ macOS-12, ubuntu-20.04] config: - { matrix_eval : "CC=gcc-9 CXX=g++-9", build_mode: "setuptools"} - { matrix_eval : "CC=gcc-10 CXX=g++-10", build_mode: "cmake", music: ON} @@ -449,7 +449,7 @@ jobs: NRN_ENABLE_PYTHON_DYNAMIC : ${{ matrix.config.python_dynamic }} NRN_ENABLE_MUSIC: ${{ matrix.config.music }} PYTHON_MIN_NAME: "python${{ env.PY_MIN_VERSION }}" - PYTHON_MAX_NAME: "python3.13" + PYTHON_MAX_NAME: "python${{ env.PY_MAX_VERSION }}" INSTALL_DIR : ${{ runner.workspace }}/install MATRIX_EVAL: ${{ matrix.config.matrix_eval }} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2c55a1c083..238988a536 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,9 +44,6 @@ stages: python.version: '3.11' Python312: python.version: '3.12' - Python313: - python.version: '3.13' - steps: # Secure files documentation: @@ -88,38 +85,34 @@ stages: - job: 'MacOSWheels' timeoutInMinutes: 60 pool: - vmImage: 'macOS-13' + vmImage: 'macOS-12' strategy: matrix: Python38: python.version: '3.8' python.org.version: '3.8.9' - python.installer.name: '3.8.9-macosx10.9.pkg' + python.installer.name: 'macosx10.9.pkg' Python39: python.version: '3.9' python.org.version: '3.9.13' - python.installer.name: '3.9.13-macos11.pkg' + python.installer.name: 'macos11.pkg' Python310: python.version: '3.10' python.org.version: '3.10.11' - python.installer.name: '3.10.11-macos11.pkg' + python.installer.name: 'macos11.pkg' Python311: python.version: '3.11' python.org.version: '3.11.7' - python.installer.name: '3.11.7-macos11.pkg' + python.installer.name: 'macos11.pkg' Python312: python.version: '3.12' python.org.version: '3.12.0' - python.installer.name: '3.12.0-macos11.pkg' - Python313: - python.version: '3.13' - python.org.version: '3.13.0' - python.installer.name: '3.13.0rc3-macos11.pkg' + python.installer.name: 'macos11.pkg' steps: - script: | - installer=python-$(python.installer.name) + installer=python-$(python.org.version)-$(python.installer.name) url=https://www.python.org/ftp/python/$(python.org.version)/$installer curl $url -o $installer sudo installer -pkg $installer -target /