diff --git a/.github/workflows/test-aarsethzare.yml b/.github/workflows/test-aarsethzare.yml new file mode 100644 index 0000000000..e2cbca50d3 --- /dev/null +++ b/.github/workflows/test-aarsethzare.yml @@ -0,0 +1,77 @@ +name: Test AMUSE aarsethzare + +on: + push: + paths: + # - .github/workflows/test-aarsethzare.yml + - 'src/amuse_aarsethzare/**' + pull_request: + paths: + # - .github/workflows/test-aarsethzare.yml + - 'src/amuse_aarsethzare/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build aarsethzare + run: | + ./setup install amuse-aarsethzare + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test aarsethzare + run: | + ./setup test amuse-aarsethzare + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-adaptb.yml b/.github/workflows/test-adaptb.yml new file mode 100644 index 0000000000..3975389c7f --- /dev/null +++ b/.github/workflows/test-adaptb.yml @@ -0,0 +1,77 @@ +name: Test AMUSE adaptb + +on: + push: + paths: + # - .github/workflows/test-adaptb.yml + - 'src/amuse_adaptb/**' + pull_request: + paths: + # - .github/workflows/test-adaptb.yml + - 'src/amuse_adaptb/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build adaptb + run: | + ./setup install amuse-adaptb + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test adaptb + run: | + ./setup test amuse-adaptb + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-athena.yml b/.github/workflows/test-athena.yml new file mode 100644 index 0000000000..66eced2459 --- /dev/null +++ b/.github/workflows/test-athena.yml @@ -0,0 +1,77 @@ +name: Test AMUSE athena + +on: + push: + paths: + # - .github/workflows/test-athena.yml + - 'src/amuse_athena/**' + pull_request: + paths: + # - .github/workflows/test-athena.yml + - 'src/amuse_athena/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build athena + run: | + ./setup install amuse-athena + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test athena + run: | + ./setup test amuse-athena + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-bhtree.yml b/.github/workflows/test-bhtree.yml new file mode 100644 index 0000000000..f2e16c8b36 --- /dev/null +++ b/.github/workflows/test-bhtree.yml @@ -0,0 +1,77 @@ +name: Test AMUSE bhtree + +on: + push: + paths: + # - .github/workflows/test-bhtree.yml + - 'src/amuse_bhtree/**' + pull_request: + paths: + # - .github/workflows/test-bhtree.yml + - 'src/amuse_bhtree/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build bhtree + run: | + ./setup install amuse-bhtree + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test bhtree + run: | + ./setup test amuse-bhtree + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-brutus.yml b/.github/workflows/test-brutus.yml new file mode 100644 index 0000000000..317a2b4620 --- /dev/null +++ b/.github/workflows/test-brutus.yml @@ -0,0 +1,77 @@ +name: Test AMUSE brutus + +on: + push: + paths: + # - .github/workflows/test-brutus.yml + - 'src/amuse_brutus/**' + pull_request: + paths: + # - .github/workflows/test-brutus.yml + - 'src/amuse_brutus/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build brutus + run: | + ./setup install amuse-brutus + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test brutus + run: | + ./setup test amuse-brutus + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-bse.yml b/.github/workflows/test-bse.yml new file mode 100644 index 0000000000..3484ee4f84 --- /dev/null +++ b/.github/workflows/test-bse.yml @@ -0,0 +1,77 @@ +name: Test AMUSE bse + +on: + push: + paths: + # - .github/workflows/test-bse.yml + - 'src/amuse_bse/**' + pull_request: + paths: + # - .github/workflows/test-bse.yml + - 'src/amuse_bse/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build bse + run: | + ./setup install amuse-bse + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test bse + run: | + ./setup test amuse-bse + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-capreole.yml b/.github/workflows/test-capreole.yml new file mode 100644 index 0000000000..d593d1cd86 --- /dev/null +++ b/.github/workflows/test-capreole.yml @@ -0,0 +1,77 @@ +name: Test AMUSE capreole + +on: + push: + paths: + # - .github/workflows/test-capreole.yml + - 'src/amuse_capreole/**' + pull_request: + paths: + # - .github/workflows/test-capreole.yml + - 'src/amuse_capreole/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build capreole + run: | + ./setup install amuse-capreole + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test capreole + run: | + ./setup test amuse-capreole + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-compat-conda.yml b/.github/workflows/test-compat-conda.yml new file mode 100644 index 0000000000..6827c83d8a --- /dev/null +++ b/.github/workflows/test-compat-conda.yml @@ -0,0 +1,83 @@ +name: Test Conda compatibility and regressions + +on: + schedule: + - cron: "0 2 * * 0" + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies (Linux) + if: ${{ startsWith(matrix.os, 'ubuntu') }} + run: | + conda install c-compiler cxx-compiler fortran-compiler gfortran python-gil pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake openmpi gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Install dependencies (macOS) + if: ${{ startsWith(matrix.os, 'macos') }} + run: | + conda install c-compiler cxx-compiler fortran-compiler gfortran python-gil pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake mpich gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build everything we can + run: | + ./setup install all + + - name: Ensure we test only the installed packages + run: | + ./setup distclean + + - name: Test all + env: + OMPI_MCA_rmaps_base_oversubscribe: 1 + PRTE_MCA_rmaps_base_oversubscribe: 1 + PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe" + OMPI_MCA_mpi_yield_when_idle: 1 + PRTE_MCA_mpi_yield_when_idle: 1 + OMPI_MCA_btl_tcp_if_include: lo,eth0 + PRTE_MCA_btl_tcp_if_include: lo,eth0 + PRTE_MCA_if_include: lo,eth0 + OMPI_MCA_pmix_server_max_wait: 10 + run: | + ./setup test all + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-compat-venv-apt.yml b/.github/workflows/test-compat-venv-apt.yml new file mode 100644 index 0000000000..df1cec1541 --- /dev/null +++ b/.github/workflows/test-compat-venv-apt.yml @@ -0,0 +1,73 @@ +name: Test compatibility on Ubuntu with venv/apt + +on: + schedule: + - cron: "0 3 * * 0" + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-20.04 + - ubuntu-22.04 + - ubuntu-24.04 + - ubuntu-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y gcc g++ gfortran python3 python3-dev pkg-config curl patch tar unzip gzip bzip2 xz-utils perl bison make cmake libopenmpi-dev openmpi-bin libgsl-dev libfftw3-dev libgmp3-dev libmpfr6 libmpfr-dev libhdf5-dev hdf5-tools libnetcdf-dev libqhull-dev libhealpix-cxx-dev liblapack-dev libblas-dev + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Create virtualenv + run: | + python3 -m venv venv + . venv/bin/activate && python3 -m pip install pip wheel pytest + + - name: Check set-up + run: . venv/bin/activate && ./setup + + - name: Build everything we can + run: . venv/bin/activate && ./setup install all + + - name: Ensure we test only the installed package + run: . venv/bin/activate && ./setup distclean + + - name: Test all + env: + OMPI_MCA_rmaps_base_oversubscribe: 1 + PRTE_MCA_rmaps_base_oversubscribe: 1 + PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe" + OMPI_MCA_mpi_yield_when_idle: 1 + PRTE_MCA_mpi_yield_when_idle: 1 + OMPI_MCA_btl_tcp_if_include: lo,eth0 + PRTE_MCA_btl_tcp_if_include: lo,eth0 + PRTE_MCA_if_include: lo,eth0 + OMPI_MCA_pmix_server_max_wait: 10 + run: . venv/bin/activate && ./setup test all + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-compat-venv-homebrew.yml b/.github/workflows/test-compat-venv-homebrew.yml new file mode 100644 index 0000000000..47aa7f5980 --- /dev/null +++ b/.github/workflows/test-compat-venv-homebrew.yml @@ -0,0 +1,63 @@ +name: Test compatibility on macOS with venv/Homebrew + +on: + schedule: + - cron: "0 4 * * 0" + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - macos-14 + - macos-15 + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Install dependencies + run: | + brew install gcc@13 python pkg-config curl gpatch gnu-tar unzip gzip bzip2 xz perl bison make cmake mpich gsl fftw gmp mpfr hdf5 netcdf netcdf-cxx netcdf-fortran qhull healpix openblas lapack zlib + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Create virtualenv + run: | + python3 -m venv venv + . venv/bin/activate && python3 -m pip install pip wheel pytest + + - name: Check set-up + run: | + . venv/bin/activate && FC=/opt/homebrew/bin/gfortran-13 ./setup + cat support/config.log + + - name: Build everything we can + run: . venv/bin/activate && FC=/opt/homebrew/bin/gfortran-13 ./setup install all + + - name: Ensure we test only the installed packages + run: . venv/bin/activate && FC=/opt/homebrew/bin/gfortran-13 ./setup distclean + + - name: Test all + run: . venv/bin/activate && FC=/opt/homebrew/bin/gfortran-13 ./setup test all + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-compat-venv-macports.yml b/.github/workflows/test-compat-venv-macports.yml new file mode 100644 index 0000000000..1c3299b0e0 --- /dev/null +++ b/.github/workflows/test-compat-venv-macports.yml @@ -0,0 +1,74 @@ +name: Test compatibility on macOS with venv/MacPorts + +on: + schedule: + - cron: "0 6 * * 0" + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - macos-14 + - macos-15 + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + + - name: Install MacPorts + uses: melusina-org/setup-macports@v1 + id: macports + + - name: Install dependencies + run: | + sudo port install gcc13 python314 pkgconfig curl gpatch gnutar unzip gzip bzip2 xz perl5 gmake cmake mpich-gcc13 gsl fftw-3 gmp mpfr hdf5 netcdf netcdf-fortran qhull healpix-cxx openblas lapack zlib + sudo port select --set gcc mp-gcc13 + sudo port select --set python3 python314 + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Create virtualenv + run: | + python3 -m venv venv + . venv/bin/activate && python3 -m pip install pip wheel pytest + + - name: Print debug output + run: | + . venv/bin/activate && ./setup + echo "config.mk:" + cat support/config.mk + echo "config.log:" + cat support/config.log + + - name: Build everything we can + run: | + . venv/bin/activate && ./setup install all + + - name: Ensure we test only the installed packages + run: . venv/bin/activate && ./setup distclean + + - name: Test all + run: . venv/bin/activate && ./setup test all + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-evtwin.yml b/.github/workflows/test-evtwin.yml new file mode 100644 index 0000000000..9ee133a069 --- /dev/null +++ b/.github/workflows/test-evtwin.yml @@ -0,0 +1,77 @@ +name: Test AMUSE evtwin + +on: + push: + paths: + # - .github/workflows/test-evtwin.yml + - 'src/amuse_evtwin/**' + pull_request: + paths: + # - .github/workflows/test-evtwin.yml + - 'src/amuse_evtwin/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build evtwin + run: | + ./setup install amuse-evtwin + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test evtwin + run: | + ./setup test amuse-evtwin + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-ext.yml b/.github/workflows/test-ext.yml new file mode 100644 index 0000000000..e61eb73e24 --- /dev/null +++ b/.github/workflows/test-ext.yml @@ -0,0 +1,90 @@ +name: Test AMUSE ic and ext + +on: + push: + paths: + # - .github/workflows/test-ext.yml + - src/amuse/couple + - src/amuse/ext + - src/amuse/ic + - src/amuse/plot + pull_request: + paths: + # - .github/workflows/test-ext.yml + - src/amuse/couple + - src/amuse/ext + - src/amuse/ic + - src/amuse/plot + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' scipy pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_default_mapping_policy = :oversubscribe" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build framework + run: | + ./setup install amuse-framework + + - name: Install required codes + run: | + ./setup install amuse-bhtree amuse-bse amuse-evtwin amuse-fi amuse-fractalcluster amuse-gadget2 amuse-galactics amuse-halogen amuse-hermite amuse-hop amuse-kepler amuse-mesa-r2208 amuse-ph4 amuse-phigrape amuse-seba amuse-sse + + - name: Ensure we test only the installed packages + run: | + ./setup distclean + + - name: Test ext + env: + PYTEST_OPTS: "-s -v -x" + run: | + ./setup test amuse-ext + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-fastkick.yml b/.github/workflows/test-fastkick.yml new file mode 100644 index 0000000000..126b05cd89 --- /dev/null +++ b/.github/workflows/test-fastkick.yml @@ -0,0 +1,77 @@ +name: Test AMUSE fastkick + +on: + push: + paths: + # - .github/workflows/test-fastkick.yml + - 'src/amuse_fastkick/**' + pull_request: + paths: + # - .github/workflows/test-fastkick.yml + - 'src/amuse_fastkick/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build fastkick + run: | + ./setup install amuse-fastkick + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test fastkick + run: | + ./setup test amuse-fastkick + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-fi.yml b/.github/workflows/test-fi.yml new file mode 100644 index 0000000000..bebff2a703 --- /dev/null +++ b/.github/workflows/test-fi.yml @@ -0,0 +1,77 @@ +name: Test AMUSE fi + +on: + push: + paths: + # - .github/workflows/test-fi.yml + - 'src/amuse_fi/**' + pull_request: + paths: + # - .github/workflows/test-fi.yml + - 'src/amuse_fi/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build fi + run: | + ./setup install amuse-fi + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test fi + run: | + ./setup test amuse-fi + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-fractalcluster.yml b/.github/workflows/test-fractalcluster.yml new file mode 100644 index 0000000000..3bac4683e2 --- /dev/null +++ b/.github/workflows/test-fractalcluster.yml @@ -0,0 +1,77 @@ +name: Test AMUSE fractalcluster + +on: + push: + paths: + # - .github/workflows/test-fractalcluster.yml + - 'src/amuse_fractalcluster/**' + pull_request: + paths: + # - .github/workflows/test-fractalcluster.yml + - 'src/amuse_fractalcluster/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build fractalcluster + run: | + ./setup install amuse-fractalcluster + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test fractalcluster + run: | + ./setup test amuse-fractalcluster + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-framework.yml b/.github/workflows/test-framework.yml index 9b69a3e69f..2c6c4c88b8 100644 --- a/.github/workflows/test-framework.yml +++ b/.github/workflows/test-framework.yml @@ -2,11 +2,13 @@ name: Test AMUSE framework on: push: - branches: - - main + paths: + # - .github/workflows/test-framework.yml + - 'src/amuse/**' pull_request: - branches: - - main + paths: + # - .github/workflows/test-framework.yml + - 'src/amuse/**' workflow_dispatch: jobs: @@ -50,13 +52,17 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 100 + fetch-depth: 0 fetch-tags: true - name: Build framework run: | ./setup install amuse-framework + - name: Ensure we test only the installed package + run: | + ./setup distclean + - name: Test framework env: OMPI_MCA_rmaps_base_oversubscribe: 1 @@ -71,12 +77,10 @@ jobs: run: | ./setup test amuse-framework - - name: Save build logs - run: | - tar czf logs-${{ matrix.os }}.tar.gz support/logs - - name: Archive build logs + if: always() uses: actions/upload-artifact@v4 with: - name: logs-${{ matrix.os }}.tar.gz - path: logs-${{ matrix.os }}.tar.gz + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-gadget2.yml b/.github/workflows/test-gadget2.yml new file mode 100644 index 0000000000..cc78bbc5bd --- /dev/null +++ b/.github/workflows/test-gadget2.yml @@ -0,0 +1,77 @@ +name: Test AMUSE gadget2 + +on: + push: + paths: + # - .github/workflows/test-gadget2.yml + - 'src/amuse_gadget2/**' + pull_request: + paths: + # - .github/workflows/test-gadget2.yml + - 'src/amuse_gadget2/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build gadget2 + run: | + ./setup install amuse-gadget2 + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test gadget2 + run: | + ./setup test amuse-gadget2 + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-galactics.yml b/.github/workflows/test-galactics.yml new file mode 100644 index 0000000000..68bc66963b --- /dev/null +++ b/.github/workflows/test-galactics.yml @@ -0,0 +1,77 @@ +name: Test AMUSE galactics + +on: + push: + paths: + # - .github/workflows/test-galactics.yml + - 'src/amuse_galactics/**' + pull_request: + paths: + # - .github/workflows/test-galactics.yml + - 'src/amuse_galactics/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build galactics + run: | + ./setup install amuse-galactics + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test galactics + run: | + ./setup test amuse-galactics + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-galaxia.yml b/.github/workflows/test-galaxia.yml new file mode 100644 index 0000000000..99e9d6ff5a --- /dev/null +++ b/.github/workflows/test-galaxia.yml @@ -0,0 +1,77 @@ +name: Test AMUSE galaxia + +on: + push: + paths: + # - .github/workflows/test-galaxia.yml + - 'src/amuse_galaxia/**' + pull_request: + paths: + # - .github/workflows/test-galaxia.yml + - 'src/amuse_galaxia/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build galaxia + run: | + ./setup install amuse-galaxia + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test galaxia + run: | + ./setup test amuse-galaxia + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-halogen.yml b/.github/workflows/test-halogen.yml new file mode 100644 index 0000000000..f944264a79 --- /dev/null +++ b/.github/workflows/test-halogen.yml @@ -0,0 +1,77 @@ +name: Test AMUSE halogen + +on: + push: + paths: + # - .github/workflows/test-halogen.yml + - 'src/amuse_halogen/**' + pull_request: + paths: + # - .github/workflows/test-halogen.yml + - 'src/amuse_halogen/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build halogen + run: | + ./setup install amuse-halogen + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test halogen + run: | + ./setup test amuse-halogen + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-hermite-grx.yml b/.github/workflows/test-hermite-grx.yml new file mode 100644 index 0000000000..2be735acc9 --- /dev/null +++ b/.github/workflows/test-hermite-grx.yml @@ -0,0 +1,79 @@ +name: Test AMUSE hermite-grx + +on: + push: + paths: + # - .github/workflows/test-hermite-grx.yml + - 'src/amuse_hermite_grx/**' + pull_request: + paths: + # - .github/workflows/test-hermite-grx.yml + - 'src/amuse_hermite_grx/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build hermite-grx + run: | + ./setup install amuse-hermite-grx + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test hermite-grx + run: | + ./setup test amuse-hermite-grx + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: | + ${{ github.workspace }}/support/logs/ + ${{ github.workspace }}/src/amuse_hermite_grx/support/* + if-no-files-found: warn diff --git a/.github/workflows/test-hermite.yml b/.github/workflows/test-hermite.yml new file mode 100644 index 0000000000..caa7d24371 --- /dev/null +++ b/.github/workflows/test-hermite.yml @@ -0,0 +1,77 @@ +name: Test AMUSE hermite + +on: + push: + paths: + # - .github/workflows/test-hermite.yml + - 'src/amuse_hermite/**' + pull_request: + paths: + # - .github/workflows/test-hermite.yml + - 'src/amuse_hermite/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build hermite + run: | + ./setup install amuse-hermite + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test hermite + run: | + ./setup test amuse-hermite + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-hop.yml b/.github/workflows/test-hop.yml new file mode 100644 index 0000000000..689b6a25dc --- /dev/null +++ b/.github/workflows/test-hop.yml @@ -0,0 +1,77 @@ +name: Test AMUSE hop + +on: + push: + paths: + # - .github/workflows/test-hop.yml + - 'src/amuse_hop/**' + pull_request: + paths: + # - .github/workflows/test-hop.yml + - 'src/amuse_hop/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build hop + run: | + ./setup install amuse-hop + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test hop + run: | + ./setup test amuse-hop + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-huayno.yml b/.github/workflows/test-huayno.yml new file mode 100644 index 0000000000..085d5339f7 --- /dev/null +++ b/.github/workflows/test-huayno.yml @@ -0,0 +1,77 @@ +name: Test AMUSE huayno + +on: + push: + paths: + # - .github/workflows/test-huayno.yml + - 'src/amuse_huayno/**' + pull_request: + paths: + # - .github/workflows/test-huayno.yml + - 'src/amuse_huayno/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build huayno + run: | + ./setup install amuse-huayno + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test huayno + run: | + ./setup test amuse-huayno + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-kepler-orbiters.yml b/.github/workflows/test-kepler-orbiters.yml new file mode 100644 index 0000000000..af279bc455 --- /dev/null +++ b/.github/workflows/test-kepler-orbiters.yml @@ -0,0 +1,77 @@ +name: Test AMUSE kepler-orbiters + +on: + push: + paths: + # - .github/workflows/test-kepler-orbiters.yml + - 'src/amuse_kepler_orbiters/**' + pull_request: + paths: + # - .github/workflows/test-kepler-orbiters.yml + - 'src/amuse_kepler_orbiters/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build kepler-orbiters + run: | + ./setup install amuse-kepler-orbiters + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test kepler-orbiters + run: | + ./setup test amuse-kepler-orbiters + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-kepler.yml b/.github/workflows/test-kepler.yml new file mode 100644 index 0000000000..f041e536a6 --- /dev/null +++ b/.github/workflows/test-kepler.yml @@ -0,0 +1,77 @@ +name: Test AMUSE kepler + +on: + push: + paths: + # - .github/workflows/test-kepler.yml + - 'src/amuse_kepler/**' + pull_request: + paths: + # - .github/workflows/test-kepler.yml + - 'src/amuse_kepler/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build kepler + run: | + ./setup install amuse-kepler + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test kepler + run: | + ./setup test amuse-kepler + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-krome.yml b/.github/workflows/test-krome.yml new file mode 100644 index 0000000000..c16d4ad04c --- /dev/null +++ b/.github/workflows/test-krome.yml @@ -0,0 +1,77 @@ +name: Test AMUSE krome + +on: + push: + paths: + # - .github/workflows/test-krome.yml + - 'src/amuse_krome/**' + pull_request: + paths: + # - .github/workflows/test-krome.yml + - 'src/amuse_krome/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build krome + run: | + ./setup install amuse-krome + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test krome + run: | + ./setup test amuse-krome + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mameclot.yml b/.github/workflows/test-mameclot.yml new file mode 100644 index 0000000000..ad07d88b77 --- /dev/null +++ b/.github/workflows/test-mameclot.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mameclot + +on: + push: + paths: + # - .github/workflows/test-mameclot.yml + - 'src/amuse_mameclot/**' + pull_request: + paths: + # - .github/workflows/test-mameclot.yml + - 'src/amuse_mameclot/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mameclot + run: | + ./setup install amuse-mameclot + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mameclot + run: | + ./setup test amuse-mameclot + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mercury.yml b/.github/workflows/test-mercury.yml new file mode 100644 index 0000000000..d690289e27 --- /dev/null +++ b/.github/workflows/test-mercury.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mercury + +on: + push: + paths: + # - .github/workflows/test-mercury.yml + - 'src/amuse_mercury/**' + pull_request: + paths: + # - .github/workflows/test-mercury.yml + - 'src/amuse_mercury/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mercury + run: | + ./setup install amuse-mercury + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mercury + run: | + ./setup test amuse-mercury + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mesa-r15140.yml b/.github/workflows/test-mesa-r15140.yml new file mode 100644 index 0000000000..0be30d1d0d --- /dev/null +++ b/.github/workflows/test-mesa-r15140.yml @@ -0,0 +1,105 @@ +name: Test AMUSE mesa-r15140 + +on: + push: + paths: + # - .github/workflows/test-mesa-r15140.yml + - 'src/amuse_mesa_r15140/**' + pull_request: + paths: + # - .github/workflows/test-mesa-r15140.yml + - 'src/amuse_mesa_r15140/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Cache downloads + uses: actions/cache@v4 + with: + key: mesa-r15140-downloads + path: | + ${{ github.workspace }}/src/amuse_mesa_r15140/src/lapack95.tgz + ${{ github.workspace }}/src/amuse_mesa_r15140/src/crmath-1.2.zip + ${{ github.workspace }}/src/amuse_mesa_r15140/src/crlibm-1.0beta4.tar.gz + ${{ github.workspace }}/src/amuse_mesa_r15140/src/fpx3.tar.gz + ${{ github.workspace }}/src/amuse_mesa_r15140/src/fpx3_deps + ${{ github.workspace }}/src/amuse_mesa_r15140/src/mesa-r15140.zip + + - name: Build mesa-r15140 + run: | + ./setup develop amuse-mesa-r15140 + + - name: Configure OpenMPI for debugging + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + # These help with debugging, but produce lots of output + echo "mpi_yield_when_idle = true" >>"$HOME/.openmpi/mca-params.conf" + # echo "mca_base_verbose = stdout,level:9" >> "$HOME/.openmpi/mca-params.conf" + # echo "mpi_comm_verbose = 100" >> "$HOME/.openmpi/mca-params.conf" + # echo "btl_base_verbose = 100" >> "$HOME/.openmpi/mca-params.conf" + # echo "hwloc_base_verbose = 100" >> "$HOME/.openmpi/mca-params.conf" + # echo "if_base_verbose = 100" >> "$HOME/.openmpi/mca-params.conf" + # echo "pmix_base_verbose = 100" >> "$HOME/.openmpi/mca-params.conf" + + - name: Test mesa-r15140 + if: ${{ matrix.os == 'ubuntu-latest' }} + env: + OMP_NUM_THEADS: '1' + run: | + ./setup test amuse-mesa-r15140 + + - name: Test mesa-r15140 + if: ${{ matrix.os == 'macos-latest' }} + run: | + ./setup test amuse-mesa-r15140 + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mesa-r2208.yml b/.github/workflows/test-mesa-r2208.yml new file mode 100644 index 0000000000..d6efe756d7 --- /dev/null +++ b/.github/workflows/test-mesa-r2208.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mesa-r2208 + +on: + push: + paths: + # - .github/workflows/test-mesa-r2208.yml + - 'src/amuse_mesa_r2208/**' + pull_request: + paths: + # - .github/workflows/test-mesa-r2208.yml + - 'src/amuse_mesa_r2208/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mesa-r2208 + run: | + ./setup install amuse-mesa-r2208 + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mesa-r2208 + run: | + ./setup test amuse-mesa-r2208 + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mi6.yml b/.github/workflows/test-mi6.yml new file mode 100644 index 0000000000..c700143a35 --- /dev/null +++ b/.github/workflows/test-mi6.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mi6 + +on: + push: + paths: + # - .github/workflows/test-mi6.yml + - 'src/amuse_mi6/**' + pull_request: + paths: + # - .github/workflows/test-mi6.yml + - 'src/amuse_mi6/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mi6 + run: | + ./setup install amuse-mi6 + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mi6 + run: | + ./setup test amuse-mi6 + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mikkola.yml b/.github/workflows/test-mikkola.yml new file mode 100644 index 0000000000..ddec5cba48 --- /dev/null +++ b/.github/workflows/test-mikkola.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mikkola + +on: + push: + paths: + # - .github/workflows/test-mikkola.yml + - 'src/amuse_mikkola/**' + pull_request: + paths: + # - .github/workflows/test-mikkola.yml + - 'src/amuse_mikkola/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mikkola + run: | + ./setup install amuse-mikkola + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mikkola + run: | + ./setup test amuse-mikkola + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mmams.yml b/.github/workflows/test-mmams.yml new file mode 100644 index 0000000000..e79612f2ed --- /dev/null +++ b/.github/workflows/test-mmams.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mmams + +on: + push: + paths: + # - .github/workflows/test-mmams.yml + - 'src/amuse_mmams/**' + pull_request: + paths: + # - .github/workflows/test-mmams.yml + - 'src/amuse_mmams/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mmams + run: | + ./setup install amuse-mmams + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mmams + run: | + ./setup test amuse-mmams + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mobse.yml b/.github/workflows/test-mobse.yml new file mode 100644 index 0000000000..cfbc7920b9 --- /dev/null +++ b/.github/workflows/test-mobse.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mobse + +on: + push: + paths: + # - .github/workflows/test-mobse.yml + - 'src/amuse_mobse/**' + pull_request: + paths: + # - .github/workflows/test-mobse.yml + - 'src/amuse_mobse/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mobse + run: | + ./setup install amuse-mobse + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mobse + run: | + ./setup test amuse-mobse + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mocassin.yml b/.github/workflows/test-mocassin.yml new file mode 100644 index 0000000000..d1027c1d80 --- /dev/null +++ b/.github/workflows/test-mocassin.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mocassin + +on: + push: + paths: + # - .github/workflows/test-mocassin.yml + - 'src/amuse_mocassin/**' + pull_request: + paths: + # - .github/workflows/test-mocassin.yml + - 'src/amuse_mocassin/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mocassin + run: | + ./setup install amuse-mocassin + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mocassin + run: | + ./setup test amuse-mocassin + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mosse.yml b/.github/workflows/test-mosse.yml new file mode 100644 index 0000000000..110989778b --- /dev/null +++ b/.github/workflows/test-mosse.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mosse + +on: + push: + paths: + # - .github/workflows/test-mosse.yml + - 'src/amuse_mosse/**' + pull_request: + paths: + # - .github/workflows/test-mosse.yml + - 'src/amuse_mosse/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mosse + run: | + ./setup install amuse-mosse + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mosse + run: | + ./setup test amuse-mosse + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-mpiamrvac.yml b/.github/workflows/test-mpiamrvac.yml new file mode 100644 index 0000000000..fd46480bdf --- /dev/null +++ b/.github/workflows/test-mpiamrvac.yml @@ -0,0 +1,77 @@ +name: Test AMUSE mpiamrvac + +on: + push: + paths: + # - .github/workflows/test-mpiamrvac.yml + - 'src/amuse_mpiamrvac/**' + pull_request: + paths: + # - .github/workflows/test-mpiamrvac.yml + - 'src/amuse_mpiamrvac/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build mpiamrvac + run: | + ./setup install amuse-mpiamrvac + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test mpiamrvac + run: | + ./setup test amuse-mpiamrvac + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-nbody6xx.yml b/.github/workflows/test-nbody6xx.yml new file mode 100644 index 0000000000..01971c469a --- /dev/null +++ b/.github/workflows/test-nbody6xx.yml @@ -0,0 +1,77 @@ +name: Test AMUSE nbody6xx + +on: + push: + paths: + # - .github/workflows/test-nbody6xx.yml + - 'src/amuse_nbody6xx/**' + pull_request: + paths: + # - .github/workflows/test-nbody6xx.yml + - 'src/amuse_nbody6xx/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build nbody6xx + run: | + ./setup install amuse-nbody6xx + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test nbody6xx + run: | + ./setup test amuse-nbody6xx + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-petar.yml b/.github/workflows/test-petar.yml new file mode 100644 index 0000000000..3d115f0fde --- /dev/null +++ b/.github/workflows/test-petar.yml @@ -0,0 +1,77 @@ +name: Test AMUSE petar + +on: + push: + paths: + # - .github/workflows/test-petar.yml + - 'src/amuse_petar/**' + pull_request: + paths: + # - .github/workflows/test-petar.yml + - 'src/amuse_petar/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build petar + run: | + ./setup install amuse-petar + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test petar + run: | + ./setup test amuse-petar + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-ph4.yml b/.github/workflows/test-ph4.yml new file mode 100644 index 0000000000..4f2eb737c5 --- /dev/null +++ b/.github/workflows/test-ph4.yml @@ -0,0 +1,77 @@ +name: Test AMUSE ph4 + +on: + push: + paths: + # - .github/workflows/test-ph4.yml + - 'src/amuse_ph4/**' + pull_request: + paths: + # - .github/workflows/test-ph4.yml + - 'src/amuse_ph4/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build ph4 + run: | + ./setup install amuse-ph4 + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test ph4 + run: | + ./setup test amuse-ph4 + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-phantom.yml b/.github/workflows/test-phantom.yml new file mode 100644 index 0000000000..9a4f471f75 --- /dev/null +++ b/.github/workflows/test-phantom.yml @@ -0,0 +1,77 @@ +name: Test AMUSE phantom + +on: + push: + paths: + # - .github/workflows/test-phantom.yml + - 'src/amuse_phantom/**' + pull_request: + paths: + # - .github/workflows/test-phantom.yml + - 'src/amuse_phantom/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build phantom + run: | + ./setup install amuse-phantom + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test phantom + run: | + ./setup test amuse-phantom + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-phigrape.yml b/.github/workflows/test-phigrape.yml new file mode 100644 index 0000000000..66f10dce85 --- /dev/null +++ b/.github/workflows/test-phigrape.yml @@ -0,0 +1,77 @@ +name: Test AMUSE phigrape + +on: + push: + paths: + # - .github/workflows/test-phigrape.yml + - 'src/amuse_phigrape/**' + pull_request: + paths: + # - .github/workflows/test-phigrape.yml + - 'src/amuse_phigrape/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build phigrape + run: | + ./setup install amuse-phigrape + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test phigrape + run: | + ./setup test amuse-phigrape + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-rebound.yml b/.github/workflows/test-rebound.yml new file mode 100644 index 0000000000..c11837f0ac --- /dev/null +++ b/.github/workflows/test-rebound.yml @@ -0,0 +1,77 @@ +name: Test AMUSE rebound + +on: + push: + paths: + # - .github/workflows/test-rebound.yml + - 'src/amuse_rebound/**' + pull_request: + paths: + # - .github/workflows/test-rebound.yml + - 'src/amuse_rebound/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build rebound + run: | + ./setup install amuse-rebound + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test rebound + run: | + ./setup test amuse-rebound + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-sakura.yml b/.github/workflows/test-sakura.yml new file mode 100644 index 0000000000..7e130e896f --- /dev/null +++ b/.github/workflows/test-sakura.yml @@ -0,0 +1,77 @@ +name: Test AMUSE sakura + +on: + push: + paths: + # - .github/workflows/test-sakura.yml + - 'src/amuse_sakura/**' + pull_request: + paths: + # - .github/workflows/test-sakura.yml + - 'src/amuse_sakura/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build sakura + run: | + ./setup install amuse-sakura + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test sakura + run: | + ./setup test amuse-sakura + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-seba.yml b/.github/workflows/test-seba.yml index ffd9f1eb2e..1c38fb144e 100644 --- a/.github/workflows/test-seba.yml +++ b/.github/workflows/test-seba.yml @@ -1,22 +1,22 @@ -# This workflow will install AMUSE and SeBa and run SeBa tests with a single version of Python - -name: Build and test SeBa +name: Test AMUSE seba on: push: paths: - - src/amuse_seba + # - .github/workflows/test-seba.yml + - 'src/amuse_seba/**' pull_request: - paths: - - src/amuse_seba + paths: + # - .github/workflows/test-seba.yml + - 'src/amuse_seba/**' + workflow_dispatch: jobs: test: - name: Test SeBa on ${{ matrix.os }} - runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - ubuntu-latest @@ -43,42 +43,35 @@ jobs: run: | conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python-gil pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake openmpi gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest - # - name: Configure OpenMPI - # run: | - # mkdir -p "$HOME/.openmpi" - # echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" - # echo "mpi_yield_when_idle = true" >>"$HOME/.openmpi/mca-params.conf" - # mkdir -p "$HOME/.prte" - # echo "rmaps_default_mapping_policy = :oversubscribe" >>"$HOME/.prte/mca-params.conf" - # echo "prte_if_include = lo" >>"$HOME/.prte/mca-params.conf" + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 100 + fetch-depth: 0 fetch-tags: true - - name: Build SeBa + - name: Build seba run: | ./setup install amuse-seba - - name: Test SeBa - # env: - # OMPI_MCA_rmaps_base_oversubscribe: 1 - # PRTE_MCA_rmaps_base_oversubscribe: 1 - # PRTE_MCA_rmaps_default_mapping_policy: ":oversubscribe" - # OMPI_MCA_btl_tcp_if_include: lo - # OMPI_MCA_mpi_yield_when_idle: 1 - # OMPI_MCA_pmix_server_max_wait: 10 + - name: Ensure we test only the installed package run: | - ./setup test amuse-seba + ./setup distclean - - name: Save build logs + - name: Test seba run: | - tar czf logs-${{ matrix.os }}.tar.gz support/logs + ./setup test amuse-seba - name: Archive build logs + if: always() uses: actions/upload-artifact@v4 with: - name: logs-${{ matrix.os }}.tar.gz - path: logs-${{ matrix.os }}.tar.gz + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-secularmultiple.yml b/.github/workflows/test-secularmultiple.yml new file mode 100644 index 0000000000..54d0efbd45 --- /dev/null +++ b/.github/workflows/test-secularmultiple.yml @@ -0,0 +1,77 @@ +name: Test AMUSE secularmultiple + +on: + push: + paths: + # - .github/workflows/test-secularmultiple.yml + - 'src/amuse_secularmultiple/**' + pull_request: + paths: + # - .github/workflows/test-secularmultiple.yml + - 'src/amuse_secularmultiple/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build secularmultiple + run: | + ./setup install amuse-secularmultiple + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test secularmultiple + run: | + ./setup test amuse-secularmultiple + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-sei.yml b/.github/workflows/test-sei.yml new file mode 100644 index 0000000000..8d0de374fa --- /dev/null +++ b/.github/workflows/test-sei.yml @@ -0,0 +1,77 @@ +name: Test AMUSE sei + +on: + push: + paths: + # - .github/workflows/test-sei.yml + - 'src/amuse_sei/**' + pull_request: + paths: + # - .github/workflows/test-sei.yml + - 'src/amuse_sei/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build sei + run: | + ./setup install amuse-sei + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test sei + run: | + ./setup test amuse-sei + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-simplex.yml b/.github/workflows/test-simplex.yml new file mode 100644 index 0000000000..d7ff5c4d8b --- /dev/null +++ b/.github/workflows/test-simplex.yml @@ -0,0 +1,77 @@ +name: Test AMUSE simplex + +on: + push: + paths: + # - .github/workflows/test-simplex.yml + - 'src/amuse_simplex/**' + pull_request: + paths: + # - .github/workflows/test-simplex.yml + - 'src/amuse_simplex/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib healpix_cxx qhull pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build simplex + run: | + ./setup install amuse-simplex + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test simplex + run: | + ./setup test amuse-simplex + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-smalln.yml b/.github/workflows/test-smalln.yml new file mode 100644 index 0000000000..9e4356e42f --- /dev/null +++ b/.github/workflows/test-smalln.yml @@ -0,0 +1,77 @@ +name: Test AMUSE smalln + +on: + push: + paths: + # - .github/workflows/test-smalln.yml + - 'src/amuse_smalln/**' + pull_request: + paths: + # - .github/workflows/test-smalln.yml + - 'src/amuse_smalln/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build smalln + run: | + ./setup install amuse-smalln + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test smalln + run: | + ./setup test amuse-smalln + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-sphray.yml b/.github/workflows/test-sphray.yml new file mode 100644 index 0000000000..4f42dc56b5 --- /dev/null +++ b/.github/workflows/test-sphray.yml @@ -0,0 +1,77 @@ +name: Test AMUSE sphray + +on: + push: + paths: + # - .github/workflows/test-sphray.yml + - 'src/amuse_sphray/**' + pull_request: + paths: + # - .github/workflows/test-sphray.yml + - 'src/amuse_sphray/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build sphray + run: | + ./setup install amuse-sphray + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test sphray + run: | + ./setup test amuse-sphray + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-sse.yml b/.github/workflows/test-sse.yml new file mode 100644 index 0000000000..523b09c546 --- /dev/null +++ b/.github/workflows/test-sse.yml @@ -0,0 +1,77 @@ +name: Test AMUSE sse + +on: + push: + paths: + # - .github/workflows/test-sse.yml + - 'src/amuse_sse/**' + pull_request: + paths: + # - .github/workflows/test-sse.yml + - 'src/amuse_sse/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build sse + run: | + ./setup install amuse-sse + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test sse + run: | + ./setup test amuse-sse + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-symple.yml b/.github/workflows/test-symple.yml new file mode 100644 index 0000000000..02bb0c878a --- /dev/null +++ b/.github/workflows/test-symple.yml @@ -0,0 +1,77 @@ +name: Test AMUSE symple + +on: + push: + paths: + # - .github/workflows/test-symple.yml + - 'src/amuse_symple/**' + pull_request: + paths: + # - .github/workflows/test-symple.yml + - 'src/amuse_symple/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build symple + run: | + ./setup install amuse-symple + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test symple + run: | + ./setup test amuse-symple + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-tupan.yml b/.github/workflows/test-tupan.yml new file mode 100644 index 0000000000..ba1a40fc22 --- /dev/null +++ b/.github/workflows/test-tupan.yml @@ -0,0 +1,77 @@ +name: Test AMUSE tupan + +on: + push: + paths: + # - .github/workflows/test-tupan.yml + - 'src/amuse_tupan/**' + pull_request: + paths: + # - .github/workflows/test-tupan.yml + - 'src/amuse_tupan/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build tupan + run: | + ./setup install amuse-tupan + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test tupan + run: | + ./setup test amuse-tupan + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-twobody.yml b/.github/workflows/test-twobody.yml new file mode 100644 index 0000000000..25990b411d --- /dev/null +++ b/.github/workflows/test-twobody.yml @@ -0,0 +1,77 @@ +name: Test AMUSE twobody + +on: + push: + paths: + # - .github/workflows/test-twobody.yml + - 'src/amuse_twobody/**' + pull_request: + paths: + # - .github/workflows/test-twobody.yml + - 'src/amuse_twobody/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build twobody + run: | + ./setup install amuse-twobody + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test twobody + run: | + ./setup test amuse-twobody + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/.github/workflows/test-vader.yml b/.github/workflows/test-vader.yml new file mode 100644 index 0000000000..52825fb3c0 --- /dev/null +++ b/.github/workflows/test-vader.yml @@ -0,0 +1,77 @@ +name: Test AMUSE vader + +on: + push: + paths: + # - .github/workflows/test-vader.yml + - 'src/amuse_vader/**' + pull_request: + paths: + # - .github/workflows/test-vader.yml + - 'src/amuse_vader/**' + workflow_dispatch: + +jobs: + test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macos-latest + + defaults: + run: + shell: bash -el {0} + + steps: + - name: Set up conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + channels: conda-forge + channel-priority: strict + + - name: Show conda info + run: | + conda info + conda list + + - name: Install dependencies + run: | + conda install c-compiler cxx-compiler fortran-compiler 'gfortran<14' python pkgconfig coreutils patch curl tar unzip gzip bzip2 xz perl bison make cmake 'openmpi<5' gsl fftw gmp mpfr hdf5 netcdf4 libopenblas liblapack zlib pip wheel 'docutils>=0.6' 'mpi4py>=1.1.0' 'numpy>=1.2.2' 'h5py>=1.1.0' pytest + + - name: Configure OpenMPI + if: ${{ matrix.os == 'ubuntu-latest' }} + run: | + mkdir -p "$HOME/.openmpi" + echo "btl_tcp_if_include = lo" >>"$HOME/.openmpi/mca-params.conf" + echo "rmaps_base_oversubscribe = true" >>"$HOME/.openmpi/mca-params.conf" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Build vader + run: | + ./setup install amuse-vader + + - name: Ensure we test only the installed package + run: | + ./setup distclean + + - name: Test vader + run: | + ./setup test amuse-vader + + - name: Archive build logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: logs-${{ matrix.os }} + path: ${{ github.workspace }}/support/logs/ + if-no-files-found: warn diff --git a/src/amuse/ext/concurrent.py b/src/amuse/ext/concurrent.py index 1d5dd4c168..c1a6a0085d 100644 --- a/src/amuse/ext/concurrent.py +++ b/src/amuse/ext/concurrent.py @@ -12,46 +12,46 @@ from mpi4py import MPI except ImportError: MPI = None - + class ConcurrentProcesses(object): pass - + class MPIConcurrentProcesses(object): - + ROOT = 0 @classmethod def is_available(self): return not MPI is None - + def init(self): MpiChannel.ensure_mpi_initialized() self.mpi_comm = MPI.COMM_WORLD self.shared_particles_ids = set([]) - + def share(self, particles = None): sendbuffer = numpy.zeros(1, dtype='int64') if self.mpi_comm == self.ROOT: new_id = random.getrandbits(64) sendbuffer[0] = new_id - + self.mpi_comm.Bcast([sendbuffer, MPI.INTEGER8], root=self.ROOT) shared_id = sendbuffer[0] - + self.shared_particles_ids.add(shared_id) - + return MPISharedParticlesProxy(particles, shared_id, self) - + def is_on_root(self): return self.mpi_comm.rank == self.ROOT - + def on_root(self, callable): if self.mpi_comm.rank == self.ROOT: callable() - + def not_on_root(self, callable): if self.mpi_comm.rank != self.ROOT: callable() - + def call(self, on_root, not_on_root): if self.mpi_comm.rank == self.ROOT: on_root() @@ -63,51 +63,51 @@ def __init__(self, particles, shared_id, concurrent_processes): self.shared_id = shared_id self.particles = particles self.concurrent_processes = concurrent_processes - + def __getattr__(self, name): return self.particles.__getattr__(name) - + def distribute(self): self.concurrent_processes.call( self.distribute_on_root, self.distribute_not_on_root ) - + def distribute_on_root(self): attribute_names = self.particles.get_attribute_names_defined_in_store() - + values = self.particles.get_values_in_store( - self.particles.get_all_indices_in_store(), + self.particles.get_all_indices_in_store(), attribute_names ) units = [x.unit for x in values] units_dump = pickle.dumps(units) attributes_dump = pickle.dumps(attribute_names) - + units_dump = numpy.frombuffer(units_dump,dtype='uint8') attributes_dump = numpy.frombuffer(attributes_dump,dtype='uint8') - + sendbuffer = numpy.zeros(4, dtype='int64') sendbuffer[0] = self.shared_id sendbuffer[1] = len(self.particles) sendbuffer[2] = len(units_dump) sendbuffer[3] = len(attributes_dump) - + self.concurrent_processes.mpi_comm.Bcast([sendbuffer, MPI.INTEGER8], root=self.concurrent_processes.ROOT) - + sendbuffer = self.particles.key self.concurrent_processes.mpi_comm.Bcast([sendbuffer, MPI.INTEGER8], root=self.concurrent_processes.ROOT) - + attribute_names = self.particles.get_attribute_names_defined_in_store() - + self.concurrent_processes.mpi_comm.Bcast([units_dump, MPI.CHARACTER], root=self.concurrent_processes.ROOT) self.concurrent_processes.mpi_comm.Bcast([attributes_dump, MPI.CHARACTER], root=self.concurrent_processes.ROOT) - + for x, unit in zip(values, units): value = x.value_in(unit) self.concurrent_processes.mpi_comm.Bcast([value, MPI.DOUBLE], root=self.concurrent_processes.ROOT) - - + + def distribute_not_on_root(self): sendbuffer = numpy.zeros(4, dtype='int64') self.concurrent_processes.mpi_comm.Bcast([sendbuffer, MPI.INTEGER8], root=self.concurrent_processes.ROOT) @@ -115,16 +115,16 @@ def distribute_not_on_root(self): number_of_particles = sendbuffer[1] units_dump_len = sendbuffer[2] attributes_dump_len = sendbuffer[3] - + sendbuffer = numpy.zeros(number_of_particles, dtype='int64') self.concurrent_processes.mpi_comm.Bcast([sendbuffer, MPI.INTEGER8], root=self.concurrent_processes.ROOT) - + units_dump = numpy.zeros(units_dump_len, dtype='uint8') self.concurrent_processes.mpi_comm.Bcast([units_dump, MPI.CHARACTER], root=self.concurrent_processes.ROOT) - + attributes_dump = numpy.zeros(attributes_dump_len, dtype='uint8') self.concurrent_processes.mpi_comm.Bcast([attributes_dump, MPI.CHARACTER], root=self.concurrent_processes.ROOT) - + units = pickle.loads(units_dump.tobytes()) attributes = pickle.loads(attributes_dump.tobytes()) values = [] @@ -132,26 +132,26 @@ def distribute_not_on_root(self): value = numpy.zeros(number_of_particles, dtype='float64') self.concurrent_processes.mpi_comm.Bcast([value, MPI.DOUBLE], root=self.concurrent_processes.ROOT) values.append(x.new_quantity(value)) - + self.particles = Particles(keys = sendbuffer) self.particles.set_values_in_store(self.particles.get_all_indices_in_store(), attributes, values) - + def potential_energy(self, smoothing_length_squared = zero, G = constants.G): mpi_comm = self.concurrent_processes.mpi_comm - + mass = self.mass x_vector = self.x y_vector = self.y z_vector = self.z sum_of_energies = zero - + number_of_particles = len(self) block_size = (number_of_particles - 1) // mpi_comm.size start = mpi_comm.rank * block_size if mpi_comm.rank == (mpi_comm.size - 1): block_size = (number_of_particles - 1) - start - + for i in range(start, start + block_size): x = x_vector[i] y = y_vector[i] @@ -165,24 +165,24 @@ def potential_energy(self, smoothing_length_squared = zero, G = constants.G): energy_of_this_particle = (m_m / dr).sum() sum_of_energies -= energy_of_this_particle - + value = sum_of_energies.value_in(sum_of_energies.unit) - # for not assume unit is the same accross processes, + # for not assume unit is the same accross processes, # so units are not distributed! - + input = numpy.zeros(1, dtype='float64') output = numpy.zeros(1, dtype='float64') - + input[0] = value - + mpi_comm.Reduce( - [input, MPI.DOUBLE], + [input, MPI.DOUBLE], [output, MPI.DOUBLE], - op=MPI.SUM, + op=MPI.SUM, root=0 ) - + return G * sum_of_energies.unit.new_quantity(output[0]) - + def __len__(self): return len(self.particles) diff --git a/src/amuse/rfi/tools/python_code_script.template b/src/amuse/rfi/tools/python_code_script.template index 7a1cb5615f..4612d576d3 100644 --- a/src/amuse/rfi/tools/python_code_script.template +++ b/src/amuse/rfi/tools/python_code_script.template @@ -13,13 +13,9 @@ if __name__ == '__main__': usempi = True host = None portnumber = -1 - - syspath = ({syspath}) - existing_syspath = set(sys.path) - for x in syspath: - if not x in existing_syspath: - sys.path.append(x) - + + sys.path = [{syspath}] + if usempi: from mpi4py import MPI from amuse.rfi.channel import MpiChannel @@ -35,7 +31,7 @@ if __name__ == '__main__': from amuse.rfi.python_code import PythonImplementation x = PythonImplementation(instance, {interface}) - + if use_sockets: if usempi: x.start_socket_mpi(portnumber, host) diff --git a/src/amuse_aarsethzare/Makefile b/src/amuse_aarsethzare/Makefile index 1492488125..18056b3af8 100644 --- a/src/amuse_aarsethzare/Makefile +++ b/src/amuse_aarsethzare/Makefile @@ -19,7 +19,7 @@ CODELIB = src/libaarsethzare.a $(CODELIB): src/*.f - $(MAKE) -C src all + $(MAKE) -C src all FC=$(FC) # Building the workers diff --git a/src/amuse_adaptb/src/makefile b/src/amuse_adaptb/src/makefile index fc25d24090..9b768c69bb 100644 --- a/src/amuse_adaptb/src/makefile +++ b/src/amuse_adaptb/src/makefile @@ -1,8 +1,3 @@ -# standard amuse configuration include -# config.mk will be made after ./configure has run -AMUSE_DIR?=../../../../.. --include ${AMUSE_DIR}/config.mk - ################################################################### CXX ?= g++ @@ -26,7 +21,7 @@ all: $(OBJS) $(EXEC) $(CODELIB) ################################################################### integrator_MS.exe: $(OBJS) - $(CXX) $(CXXFLAGS) -o $(EXEC) $(OBJS) $(LIBS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) $(LIBS) libadaptb.a: $(OBJS) rm -f $@ diff --git a/src/amuse_fractalcluster/Makefile b/src/amuse_fractalcluster/Makefile index 62423743c4..118999cc30 100644 --- a/src/amuse_fractalcluster/Makefile +++ b/src/amuse_fractalcluster/Makefile @@ -23,7 +23,7 @@ CODELIB=src/libfractal.a interface.o: $(CODELIB) $(CODELIB): src/*.f90 - $(MAKE) -C src amuse_interface FFLAGS="$(FFLAGS)" + $(MAKE) -C src amuse_interface FC="$(FC)" FFLAGS="$(FFLAGS)" fractalcluster_worker.f90: interface.py amusifier --type=f90 interface.py FractalClusterInterface -o $@ diff --git a/src/amuse_gadget2/Makefile b/src/amuse_gadget2/Makefile index d2593b62b3..b90dffa0f9 100644 --- a/src/amuse_gadget2/Makefile +++ b/src/amuse_gadget2/Makefile @@ -84,7 +84,11 @@ package-%: %_contains python3 -m pip install -vv --no-cache-dir --no-deps --no-build-isolation --prefix ${PREFIX} packages/$* test-%: +ifneq ($(CI),) + cd packages/$* && pytest -k 'not noci' +else cd packages/$* && pytest +endif # Cleaning up diff --git a/src/amuse_gadget2/tests/test_gadget2.py b/src/amuse_gadget2/tests/test_gadget2.py index f5ef0d9341..8e5c678974 100644 --- a/src/amuse_gadget2/tests/test_gadget2.py +++ b/src/amuse_gadget2/tests/test_gadget2.py @@ -881,7 +881,7 @@ def test18(self): self.assertAlmostEqual(instance.dm_particles.z, [0., 0., 0.4] | units.kpc, places=6) instance.stop() - def test19(self): + def test19_noci(self): particles = new_plummer_model(31) instance = Gadget2(self.default_converter, number_of_workers=1) diff --git a/src/amuse_galactics/Makefile b/src/amuse_galactics/Makefile index d57841e6bf..807d816495 100644 --- a/src/amuse_galactics/Makefile +++ b/src/amuse_galactics/Makefile @@ -32,7 +32,7 @@ $(EXES) &: | data/bin cp src/bin/* data/bin/ $(GASEXES) &: | data/gbin - $(MAKE) -C gas_src/src all CC="$(CC)" CFLAGS="$(CFLAGS)" F77="$(FC)" FFLAGS="$(FCFLAGS)" FFLAGS2="$(FCFLAGS)" PGSTUB=1 + $(MAKE) -C gas_src/src all CC="$(CC)" CFLAGS="$(CFLAGS)" FC="$(FC)" FFLAGS="$(FCFLAGS)" FFLAGS2="$(FCFLAGS)" PGSTUB=1 $(MAKE) -C gas_src/src install cp gas_src/bin/* data/gbin/ diff --git a/src/amuse_galactics/tests/test_galactics.py b/src/amuse_galactics/tests/test_galactics.py index 5cb897e423..104fbc91e2 100644 --- a/src/amuse_galactics/tests/test_galactics.py +++ b/src/amuse_galactics/tests/test_galactics.py @@ -7,6 +7,7 @@ from amuse_galactics.interface import GalactICsInterface, GalactICs + # Change the default for some GalactICs(-Interface) keyword arguments: default_options = dict() # default_options = dict(redirection = "none") @@ -155,7 +156,7 @@ def test4(self): x_velocities, y_velocities, z_velocities, errors = instance.get_velocity(range(number_of_particles_halo)) self.assertEqual(errors, numpy.zeros(number_of_particles_halo)) self.assertAlmostEqual(numpy.array([numpy.mean(x_velocities), numpy.mean(y_velocities), - numpy.mean(z_velocities)]), numpy.array([0.0]*3)) + numpy.mean(z_velocities)]), numpy.array([0.0]*3), 6) self.assertAlmostRelativeEquals(numpy.array([numpy.mean(abs(x_velocities)), numpy.mean(abs(y_velocities)), numpy.mean(abs(z_velocities))]), expected_mean_vel, 2) diff --git a/src/amuse_hermite/tests/test_hermite.py b/src/amuse_hermite/tests/test_hermite.py index 964c0819b8..04538f54ec 100644 --- a/src/amuse_hermite/tests/test_hermite.py +++ b/src/amuse_hermite/tests/test_hermite.py @@ -579,7 +579,7 @@ def test15(self): instance.stop() - def test16(self): + def test16_noci(self): particles = new_plummer_model(200) particles.scale_to_standard() instance = Hermite() diff --git a/src/amuse_hermite_grx/Makefile b/src/amuse_hermite_grx/Makefile index c72c752e81..d816626223 100644 --- a/src/amuse_hermite_grx/Makefile +++ b/src/amuse_hermite_grx/Makefile @@ -28,13 +28,14 @@ CFLAGS += $(DEPFLAGS) -pthread LDFLAGS += -pthread LDLIBS += $(STOPCOND_LIBS) +$(info libs: $(LDLIBS) sc: $(STOPCOND_LIBS)) CODELIB = src/Hermite_GRX/src/libhermite_grx.a .PHONY: $(CODELIB) $(CODELIB): | src/Hermite_GRX - $(MAKE) -C src/Hermite_GRX/src -j $(CPU_COUNT) all CC_FLAGS='$(CFLAGS)' LD_FLAGS='$(LD_FLAGS)' + $(MAKE) -C src/Hermite_GRX/src -j $(CPU_COUNT) all CC_FLAGS='$(CFLAGS) -std=c++11' LD_FLAGS='$(LD_FLAGS)' # Building the workers diff --git a/src/amuse_krome/Makefile b/src/amuse_krome/Makefile index 01cdfbaf5c..913fa6b1cc 100644 --- a/src/amuse_krome/Makefile +++ b/src/amuse_krome/Makefile @@ -30,7 +30,7 @@ CODELIB = src/libchem.a .PHONY: $(CODELIB) $(CODELIB): | src/krome - $(MAKE) -C src libchem.a + $(MAKE) -C src libchem.a FC="$(FC)" # Building the workers diff --git a/src/amuse_mesa_r15140/Makefile b/src/amuse_mesa_r15140/Makefile index f43a341e1a..8aa503e909 100644 --- a/src/amuse_mesa_r15140/Makefile +++ b/src/amuse_mesa_r15140/Makefile @@ -117,6 +117,7 @@ $(MESA_DIR)/utils/makedepf90-2.8.8: | $(MESA_DIR) touch $(MESA_DIR)/utils/makedepf90-2.8.8/configure src/bin/makedepf90: | $(MESA_DIR)/utils/makedepf90-2.8.8 src/bin + touch $(MESA_DIR)/utils/makedepf90-2.8.8/configure cd $(MESA_DIR)/utils/makedepf90-2.8.8 && ./configure cd $(MESA_DIR)/utils/makedepf90-2.8.8 && $(MAKE) cp $(MESA_DIR)/utils/makedepf90-2.8.8/makedepf90 $@ @@ -224,7 +225,11 @@ package-%: %_contains python3 -m pip install -vv --no-cache-dir --no-deps --no-build-isolation --prefix ${PREFIX} packages/$* test-%: +ifneq ($(CI),) + cd packages/$* && pytest -k 'not noci' +else cd packages/$* && pytest +endif # Cleaning up diff --git a/src/amuse_mesa_r15140/packages/amuse-mesa-r15140/pyproject.toml b/src/amuse_mesa_r15140/packages/amuse-mesa-r15140/pyproject.toml index 1cec2c2b85..ab758841e0 100644 --- a/src/amuse_mesa_r15140/packages/amuse-mesa-r15140/pyproject.toml +++ b/src/amuse_mesa_r15140/packages/amuse-mesa-r15140/pyproject.toml @@ -42,5 +42,5 @@ pythonpath = ["../../../../../", "amuse/community/mesa_r15140/tests/"] testpaths = ["amuse_mesa_r15140/tests"] -addopts = "--import-mode=append" # test the installed package +addopts = "--import-mode=append -k 'not noci'" # test the installed package diff --git a/src/amuse_mesa_r15140/patches/series_mesa b/src/amuse_mesa_r15140/patches/series similarity index 100% rename from src/amuse_mesa_r15140/patches/series_mesa rename to src/amuse_mesa_r15140/patches/series diff --git a/src/amuse_mesa_r15140/tests/test_mesa_15140.py b/src/amuse_mesa_r15140/tests/test_mesa_15140.py index 15054b3561..0038a8736d 100644 --- a/src/amuse_mesa_r15140/tests/test_mesa_15140.py +++ b/src/amuse_mesa_r15140/tests/test_mesa_15140.py @@ -1318,7 +1318,8 @@ def test24(self): self.assertEqual(core_mass_by_species[3], carbon_mass_in_core) self.assertEqual(core_mass_by_species[5], oxygen_mass_in_core) - def test25(self): + def test25_noci(self): + """Disabled on CI due to lack of disk space on Ubuntu""" print("Testing MESA accretion") instance = self.new_instance_of_an_optional_code(MESA) set_mesa_paths_instance(instance) diff --git a/src/amuse_mi6/src/Vector3.h b/src/amuse_mi6/src/Vector3.h index f57753b4f6..c0335fae0b 100644 --- a/src/amuse_mi6/src/Vector3.h +++ b/src/amuse_mi6/src/Vector3.h @@ -114,7 +114,7 @@ class Vector3 } inline Vector3& operator /= (const double b){ - register double binv = 1.0/b; + const double binv = 1.0/b; v[0] *= binv; v[1] *= binv; v[2] *= binv; return *this; } diff --git a/src/amuse_petar/Makefile b/src/amuse_petar/Makefile index b4cebcc132..d050c1feb5 100644 --- a/src/amuse_petar/Makefile +++ b/src/amuse_petar/Makefile @@ -108,11 +108,16 @@ install-%: %_contains package-%: %_contains python3 -m pip install -vv --no-cache-dir --no-deps --no-build-isolation --prefix ${PREFIX} packages/$* + +# The tests use up to 5 workers, each of which will use all the cores via OpenMP, +# slowing things down enormously. By limiting the number of threads, the tests +# run in a reasonable time at least on my 8C/16T laptop. test-%: - # The tests use up to 5 workers, each of which will use all the cores via OpenMP, - # slowing things down enormously. By limiting the number of threads, the tests - # run in a reasonable time at least on my 8C/16T laptop. +ifneq ($(CI),) + cd packages/$* && OMP_NUM_THREADS=1 pytest -k 'not noci' +else cd packages/$* && OMP_NUM_THREADS=2 pytest +endif # Cleaning up diff --git a/src/amuse_petar/tests/test_petar.py b/src/amuse_petar/tests/test_petar.py index 0f56685e66..ee4327439e 100644 --- a/src/amuse_petar/tests/test_petar.py +++ b/src/amuse_petar/tests/test_petar.py @@ -31,7 +31,7 @@ def test_reversed_time_allowed(self): class TestPetar(TestWithMPI): - def test_small_plummer_model(self): + def test_small_plummer_model_noci(self): particles = plummer.new_plummer_model(31) instance = Petar(number_of_workers=1) # , debugger="xterm") diff --git a/src/tests/compile_tests/async_implementation/test_async.py b/src/tests/compile_tests/async_implementation/test_async.py index 405788d2ea..3b1906d0a3 100644 --- a/src/tests/compile_tests/async_implementation/test_async.py +++ b/src/tests/compile_tests/async_implementation/test_async.py @@ -650,6 +650,7 @@ def test30(self): self.assertEqual(request.result(), numpy.arange(1, 11) | units.m) t2 = time.time() self.assertGreater(t2-t1, 1.) + instance1.stop() def test31(self): """ test a grid attribute request, subgrids """ @@ -665,6 +666,7 @@ def test31(self): self.assertEqual(request2.result(), numpy.arange(6, 11) | units.m) t2 = time.time() self.assertGreater(t2-t1, 1.) + instance1.stop() def test32(self): """ test a grid attribute request setter """ @@ -684,6 +686,7 @@ def test32(self): self.assertEqual(instance1.grid.x, (11.+numpy.arange(1, 11)) | units.m) t2 = time.time() self.assertLess(t2-t1, 0.5) + instance1.stop() def test33(self): """ test a grid attribute request, subgrids """ @@ -700,6 +703,7 @@ def test33(self): self.assertGreater(t2-t1, 1.) self.assertEqual(instance1.grid.x[::2], (11.+numpy.arange(1, 11, 2)) | units.m) self.assertEqual(instance1.grid.x[1::2], (numpy.arange(2, 11, 2)) | units.m) + instance1.stop() def test34(self): """ test a grid attribute request, subgrids """ @@ -707,6 +711,7 @@ def test34(self): grid = instance1.grid.copy() request = instance1.grid.request.x self.assertEqual(request.result(), numpy.arange(1, 11) | units.m) + instance1.stop() def test35(self): """ test a grid attribute request setter with state""" @@ -732,6 +737,7 @@ def test35(self): self.assertEqual(instance1.grid.x, (12. + numpy.arange(1, 11)) | units.m) t2 = time.time() self.assertLess(t2-t1, 0.5) + instance1.stop() def test36(self): """ more state tests""" @@ -744,6 +750,7 @@ def test36(self): self.assertEqual(instance1.get_name_of_current_state(), '2') # ie state changes upon completion of call at wait. This is # sort of ok, alternatively state could be changed immediately... + instance1.stop() class TestASyncDistributed(TestASync): diff --git a/src/tests/compile_tests/c_implementation/test_c_implementation.py b/src/tests/compile_tests/c_implementation/test_c_implementation.py index 041465f2fe..69dcc9ba90 100644 --- a/src/tests/compile_tests/c_implementation/test_c_implementation.py +++ b/src/tests/compile_tests/c_implementation/test_c_implementation.py @@ -93,34 +93,28 @@ def test7(self): def test7b(self): instance = ForTestingInterface(self.exefile) - out, error = instance.echo_int(numpy.arange(2000000)) + instance.stop() self.assertEqual(error, [0]*2000000) self.assertEqual(out, numpy.arange(2000000)) - instance.stop() - def test7c(self): instance = ForTestingInterface(self.exefile) - out, error = instance.echo_string(["abc"]*10) + instance.stop() self.assertEqual(error, [0]*10) self.assertEqual(out, ["abc"]*10) - instance.stop() - def test7d(self): instance = ForTestingInterface(self.exefile) - out, error = instance.echo_string(["abc"]*100000) + instance.stop() self.assertEqual(error, [0]*100000) self.assertEqual(out, ["abc"]*100000) - instance.stop() - def test8(self): instance = ForTestingInterface(self.exefile) out1, out2, error = instance.echo_strings("abc", "def") @@ -386,6 +380,8 @@ def test29(self): request2.wait() port_id1, error1 = request1.result() port_id2, error2 = request2.result() + instance1.stop() + instance2.stop() self.assertTrue(port_id1 >= 0) self.assertTrue(port_id2 >= 0) self.assertEqual(error1, 0) diff --git a/src/tests/compile_tests/c_implementation/test_c_implementation_simplified.py b/src/tests/compile_tests/c_implementation/test_c_implementation_simplified.py index 670d695705..518dd69a70 100644 --- a/src/tests/compile_tests/c_implementation/test_c_implementation_simplified.py +++ b/src/tests/compile_tests/c_implementation/test_c_implementation_simplified.py @@ -341,6 +341,8 @@ def test29(self): request2.wait() port_id1, error1 = request1.result() port_id2, error2 = request2.result() + instance1.stop() + instance2.stop() self.assertTrue(port_id1 >= 0) self.assertTrue(port_id2 >= 0) self.assertEqual(error1, 0) diff --git a/src/tests/compile_tests/fortran_implementation/test_fortran_implementation.py b/src/tests/compile_tests/fortran_implementation/test_fortran_implementation.py index 7c7852effb..07fbbf8005 100644 --- a/src/tests/compile_tests/fortran_implementation/test_fortran_implementation.py +++ b/src/tests/compile_tests/fortran_implementation/test_fortran_implementation.py @@ -26,7 +26,7 @@ def define_methods(self, object): units.m, object.ERROR_CODE, ) - ) + ) """ @@ -196,11 +196,13 @@ def test16(self): def test16b(self): instance = ForTesting(self.exefile) output = instance.echo_logical([True, True, False, True, False]*256) + instance.stop() self.assertEqual(output, [True, True, False, True, False]*256) def test16c(self): instance = ForTesting(self.exefile, redirection="none") output = instance.echo_logical2([True, True, False, True, False]*1024) + instance.stop() self.assertEqual(output, [True, True, False, True, False]*1024) def xtest20(self): @@ -296,6 +298,8 @@ def test19(self): request2.wait() port_id1, error1 = request1.result() port_id2, error2 = request2.result() + instance1.stop() + instance2.stop() self.assertTrue(port_id1 >= 0) self.assertTrue(port_id2 >= 0) self.assertEqual(error1, 0) diff --git a/src/tests/compile_tests/fortran_implementation/test_fortran_sockets_implementation.py b/src/tests/compile_tests/fortran_implementation/test_fortran_sockets_implementation.py index 1ec43f5acb..cbcae6bc8e 100644 --- a/src/tests/compile_tests/fortran_implementation/test_fortran_sockets_implementation.py +++ b/src/tests/compile_tests/fortran_implementation/test_fortran_sockets_implementation.py @@ -187,11 +187,13 @@ def test16(self): def test16b(self): instance = ForTesting(self.exefile, channel_type="sockets") output = instance.echo_logical([True, True, False, True, False]) + instance.stop() self.assertEqual(output, [True, True, False, True, False]) def test16c(self): instance = ForTesting(self.exefile, redirection="none") output = instance.echo_logical2([True, True, False, True, False]*1024) + instance.stop() self.assertEqual(output, [True, True, False, True, False]*1024) def xtest20(self): diff --git a/src/tests/compile_tests/test_python_implementation.py b/src/tests/compile_tests/test_python_implementation.py index 095dadc209..ba839d610a 100644 --- a/src/tests/compile_tests/test_python_implementation.py +++ b/src/tests/compile_tests/test_python_implementation.py @@ -418,7 +418,8 @@ def test1(self): x.interface_class = ForTestingInterface script_string = x.new_executable_script_string() - self.assertTrue(script_string.find('syspath = (') > 0) + print(x.new_executable_script_string()) + self.assertTrue(script_string.find('sys.path = [') > 0) self.assertTrue(script_string.find('ForTestingInterface') > 0) self.assertTrue(script_string.find('ForTestingImplementation') > 0) self.assertTrue(script_string.find('test_python_implementation') > 0) @@ -435,7 +436,7 @@ def test2(self): x.interface_class = ForTestingInterface script_string = x.new_executable_script_string() - self.assertTrue(script_string.find('syspath = (') > 0) + self.assertTrue(script_string.find('sys.path = [') > 0) self.assertTrue(script_string.find('ForTestingInterface') > 0) self.assertTrue(script_string.find('ForTestingImplementation') > 0) self.assertTrue(script_string.find('test_python_implementation') > 0) @@ -467,6 +468,7 @@ def test02(self): output_message = python_code.ClientSideMPIMessage(0, 10, 1) x.handle_message(input_message, output_message) + del x self.assertEqual(len(output_message.ints), 1) self.assertEqual(len(output_message.doubles), 1) @@ -484,6 +486,7 @@ def test03(self): output_message = python_code.ClientSideMPIMessage(0, 10, 1) x.handle_message(input_message, output_message) + del x self.assertEqual(len(output_message.ints), 1) self.assertEqual(len(output_message.doubles), 0) @@ -501,6 +504,7 @@ def test04(self): output_message = python_code.ClientSideMPIMessage(0, 10, 4) x.handle_message(input_message, output_message) + del x self.assertEqual(len(output_message.ints), 4) self.assertEqual(len(output_message.doubles), 0) @@ -535,8 +539,6 @@ def test06(self): self.assertEqual(answer[1], 11.0) x.stop() - x.stop() - def test07(self): x = self.ForTestingInterface() @@ -545,8 +547,6 @@ def test07(self): self.assertEqual(int_out, 20) x.stop() - x.stop() - def test08(self): implementation = ForTestingImplementation() x = python_code.PythonImplementation(implementation, ForTestingInterface) @@ -558,6 +558,8 @@ def test08(self): x.handle_message(input_message, output_message) + del x + self.assertEqual(len(output_message.ints), 2) self.assertEqual(output_message.ints[0], 0) self.assertEqual(output_message.ints[1], 20) @@ -565,46 +567,46 @@ def test08(self): def test09(self): x = self.ForTestingInterface() string_out, error = x.echo_string("1234567") + x.stop() self.assertEqual(error, 0) self.assertEqual(string_out, "1234567") - x.stop() def test10(self): x = self.ForTestingInterface() string_out, error = x.echo_string(["aaaaa", "bbbb"]) + x.stop() self.assertEqual(error[0], 0) self.assertEqual(len(string_out), 2) self.assertEqual(string_out[0], "aaaaa") self.assertEqual(string_out[1], "bbbb") - x.stop() def test11(self): x = self.ForTestingInterface() string_out, error = x.echo_string(["", "bbbb"]) + x.stop() self.assertEqual(error[0], 0) self.assertEqual(len(string_out), 2) self.assertEqual(string_out[0], "") self.assertEqual(string_out[1], "bbbb") - x.stop() def test12(self): x = self.ForTestingInterface() str1_out, str2_out, error = x.echo_strings("abc", "def") + x.stop() self.assertEqual(error, 0) self.assertEqual(str1_out, "cba") self.assertEqual(str2_out, "fed") - x.stop() def test13(self): x = self.ForTestingInterface() str1_out, str2_out, error = x.echo_strings(["abc", "def"], ["ghi", "jkl"]) + x.stop() self.assertEqual(error[0], 0) self.assertEqual(error[1], 0) self.assertEqual(str1_out[0], "cba") self.assertEqual(str1_out[1], "fed") self.assertEqual(str2_out[0], "ihg") self.assertEqual(str2_out[1], "lkj") - x.stop() def test14(self): x = self.ForTestingInterface() @@ -945,6 +947,8 @@ def test26(self): request2.wait() port_id1, error1 = request1.result() port_id2, error2 = request2.result() + instance1.stop() + instance2.stop() self.assertTrue(port_id1 >= 0) self.assertTrue(port_id2 >= 0) self.assertEqual(error1, 0) @@ -1056,6 +1060,7 @@ def test30(self): self.assertAlmostRelativeEquals(output, [6.0, 7.0, 8.0]) output = instance.sum_doubles(5, input) self.assertAlmostRelativeEquals(output, [6.0, 7.0, 8.0]) + instance.stop() def test31(self): x = self.ForTesting() diff --git a/src/tests/compile_tests/test_python_sockets_implementation.py b/src/tests/compile_tests/test_python_sockets_implementation.py index e9f07e0aa0..a249c21c5f 100644 --- a/src/tests/compile_tests/test_python_sockets_implementation.py +++ b/src/tests/compile_tests/test_python_sockets_implementation.py @@ -53,6 +53,7 @@ def test2(self): output_message = python_code.SocketMessage(0, 10, 1) x.handle_message(input_message, output_message) + del implementation self.assertEqual(len(output_message.ints), 1) self.assertEqual(len(output_message.doubles), 1) @@ -75,6 +76,7 @@ def test3(self): self.assertEqual(len(output_message.doubles), 0) self.assertEqual(output_message.ints[0], 0) self.assertEqual(implementation.masses[1], 12.0) + del implementation def test4(self): implementation = test_python_implementation.ForTestingImplementation() @@ -96,6 +98,7 @@ def test4(self): self.assertEqual(implementation.masses[2], 13.0) self.assertEqual(implementation.masses[3], 14.0) self.assertEqual(implementation.masses[4], 15.0) + del implementation def test8(self): implementation = test_python_implementation.ForTestingImplementation() @@ -107,6 +110,7 @@ def test8(self): output_message = python_code.SocketMessage(0, 10, 1) x.handle_message(input_message, output_message) + del implementation self.assertEqual(len(output_message.ints), 2) self.assertEqual(output_message.ints[0], 0) diff --git a/src/tests/ext_tests/test_distributed_particles.py b/src/tests/ext_tests/test_distributed_particles.py index 4cdf976dc5..bc047b7172 100644 --- a/src/tests/ext_tests/test_distributed_particles.py +++ b/src/tests/ext_tests/test_distributed_particles.py @@ -8,7 +8,7 @@ from amuse.units import nbody_system from amuse.units import units -from amuse.community import * +from amuse.units.quantities import is_quantity from amuse.support.interface import InCodeComponentImplementation from amuse.io import read_set_from_file, write_set_to_file @@ -630,7 +630,7 @@ def test9(self): self.assertEqual(x[2:6].mass, [3, 10, 11, 12]) - def test10(self): + def test10_noci(self): x = DistributedParticles( size=40, number_of_workers=4 @@ -760,7 +760,7 @@ def test16(self): self.assertEqual(y.index, x.index) self.assertEqual(y.mass, x.mass) - def test17(self): + def test17_noci(self): test_results_path = self.get_path_to_results() filebase = os.path.join(test_results_path, "test_distributed_sets") for i in [0, 1]: @@ -789,7 +789,7 @@ def test17(self): # number of workers > number of files # still problematic, because of non-existing attributes if nothing read - def test18(self): + def test18_noci(self): test_results_path = self.get_path_to_results() filebase = os.path.join(test_results_path, "test_distributed_sets") for i in [0, 1]: @@ -816,7 +816,7 @@ def test18(self): self.assertEqual(x.index, z.index) self.assertEqual(x.mass, z.mass) - def test19(self): + def test19_noci(self): from .test_distributed_particles import distributed_king_generator from amuse.ic.kingmodel import MakeKingModel diff --git a/support/setup/installing.sh b/support/setup/installing.sh index b11933c2f2..d1e19d0cf5 100644 --- a/support/setup/installing.sh +++ b/support/setup/installing.sh @@ -87,6 +87,15 @@ install_framework() { fi fi + # On macos, pip will install an mpi4py wheel by default that uses a binary + # distribution of openmpi or mpich that's been put on PyPI(!), but doesn't seem to + # get installed by default and anyway isn't the version our workers will use. So we + # pre-install it here explicitly from source, so that it'll link to the MPI from the + # environment. + if [ "a${ENV_TYPE}" = "avirtualenv" ] ; then + pip install --no-binary mpi4py mpi4py + fi + ec_file="$(exit_code_file install amuse-framework)" log_file="$(log_file install amuse-framework)" @@ -138,6 +147,30 @@ develop_framework() { announce_activity develop amuse-framework + # if we're in a conda env, install the dependencies using conda first rather than + # leaving it to pip. + if [ "a${ENV_TYPE}" = "aconda" ] ; then + to_install='' + for name_ver in ${FRAMEWORK_CONDA_DEPS} ; do + name=$(echo "${name_ver}" | sed -e "s/'\([a-zA-Z0-9_-]*\).*/\1/") + if ! is_subset "$name" "${INSTALLED_PACKAGES}" ; then + to_install="${to_install} ${name_ver}" + fi + done + if [ -n "${to_install}" ] ; then + conda install -c conda-forge --override-channels -y ${to_install} + fi + fi + + # On macos, pip will install an mpi4py wheel by default that uses a binary + # distribution of openmpi or mpich that's been put on PyPI(!), but doesn't seem to + # get installed by default and anyway isn't the version our workers will use. So we + # pre-install it here explicitly from source, so that it'll link to the MPI from the + # environment. + if [ "a${ENV_TYPE}" = "avirtualenv" ] ; then + pip install --no-binary mpi4py mpi4py + fi + ec_file="$(exit_code_file install amuse-framework)" log_file="$(log_file install amuse-framework)" @@ -187,16 +220,20 @@ install_package() { check_package "${package}" if ! is_subset "amuse-framework" "${INSTALLED_PACKAGES}" ; then + save_cmd="${cmd}" save_package="${package}" install_framework package="${save_package}" + cmd="${save_cmd}" fi if is_subset "${package}" "${NEEDS_SAPPORO_LIGHT}" ; then if ! is_subset "sapporo-light" "${INSTALLED_PACKAGES}" ; then + save_cmd="${cmd}" save_package="${package}" install_sapporo_light package="${save_package}" + cmd="${save_cmd}" fi fi @@ -207,9 +244,11 @@ install_package() { # If the code is e.g. CUDA-only, then there may not be a base package. if is_subset "${base_package}" "${EXTANT_PACKAGES}" ; then if ! is_subset "${base_package}" "${INSTALLED_PACKAGES}" ; then + save_cmd="${cmd}" save_package="${package}" install_package "${cmd}" "${base_package}" "${brief}" package="${save_package}" + cmd="${save_cmd}" fi fi fi diff --git a/support/setup/testing.sh b/support/setup/testing.sh index d47990b251..d5c28144a6 100644 --- a/support/setup/testing.sh +++ b/support/setup/testing.sh @@ -50,7 +50,6 @@ test_framework() { cd src/tests && pytest --import-mode=append core_tests compile_tests --ignore compile_tests/java_implementation -k 'not TestCDistributedImplementationInterface and not TestAsyncDistributed' ${PYTEST_OPTS} else cd src/tests && pytest --import-mode=append core_tests compile_tests --ignore compile_tests/java_implementation -k 'not TestCDistributedImplementationInterface and not TestAsyncDistributed and not noci' ${PYTEST_OPTS} - fi echo $? >"../../${ec_file}" @@ -81,7 +80,7 @@ test_amuse_ext() { log_file="$(log_file test amuse-ext)" ( - cd src/tests && pytest ext_tests --import-mode=append ticket_tests ${PYTEST_OPTS} -k "${bad_ext_tests}" + cd src/tests && pytest ext_tests ticket_tests --import-mode=append ${PYTEST_OPTS} -s -v -x -k "not noci and ${bad_ext_tests}" echo $? >"../../${ec_file}" ) 2>&1 | tee "${log_file}" @@ -127,8 +126,10 @@ test_all() { printf '\nThe following packages failed their tests:\n' printf '%b\n\n' "${COLOR_RED}${FAILED_TESTS}${COLOR_END}" print_getting_help + return 1 else printf '\n%b\n\n' "${COLOR_GREEN}All installed packages completed their tests successfully${COLOR_END}" + return 0 fi }