From c605c33ea1cc2b9fac6ed175f91c09103d2d8bdb Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 20 Apr 2021 09:41:35 -0500 Subject: [PATCH 1/3] Change CI to use Ubuntu 20.04 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15392cde0e..6b917e5a05 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ env: jobs: main: - runs-on: ubuntu-16.04 + runs-on: ubuntu-20.04 strategy: matrix: python-version: [3.8] From 3e769e05b4c0bdb0b28c157e10b0f20de782c581 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 23 Apr 2021 13:26:10 -0500 Subject: [PATCH 2/3] Update MPI alternatives to use MPICH --- .github/workflows/ci.yml | 8 ++++++-- tools/ci/gha-install.sh | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b917e5a05..1673af5319 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,12 +95,16 @@ jobs: shell: bash run: | sudo apt -y update - sudo apt install -y libopenmpi-dev \ + sudo apt install -y libmpich-dev \ libnetcdf-dev \ libpnetcdf-dev \ libhdf5-serial-dev \ - libhdf5-openmpi-dev \ + libhdf5-mpich-dev \ libeigen3-dev + sudo update-alternatives --set mpi /usr/bin/mpicc.mpich + sudo update-alternatives --set mpirun /usr/bin/mpirun.mpich + sudo update-alternatives --set mpi-x86_64-linux-gnu /usr/include/x86_64-linux-gnu/mpich + - name: install shell: bash diff --git a/tools/ci/gha-install.sh b/tools/ci/gha-install.sh index 2ef4ab9925..8c4762e3e4 100755 --- a/tools/ci/gha-install.sh +++ b/tools/ci/gha-install.sh @@ -31,7 +31,7 @@ if [[ $MPI == 'y' ]]; then export CC=mpicc export HDF5_MPI=ON - export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi + export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/mpich pip install --no-binary=h5py h5py fi From e1c47437bbb42fc308de8790f163c6a0bd276680 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 26 Apr 2021 09:22:45 -0500 Subject: [PATCH 3/3] Avoid several Python warnings --- openmc/data/function.py | 2 +- openmc/data/multipole.py | 2 +- openmc/mgxs_library.py | 2 +- openmc/stats/multivariate.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/openmc/data/function.py b/openmc/data/function.py index b6da69d174..b5aa2117d3 100644 --- a/openmc/data/function.py +++ b/openmc/data/function.py @@ -580,7 +580,7 @@ class Sum(EqualityMixin): class Regions1D(EqualityMixin): - """Piecewise composition of multiple functions. + r"""Piecewise composition of multiple functions. This class allows you to create a callable object which is composed of multiple other callable objects, each applying to a specific interval diff --git a/openmc/data/multipole.py b/openmc/data/multipole.py index 17948d50ce..508c76ac43 100644 --- a/openmc/data/multipole.py +++ b/openmc/data/multipole.py @@ -995,7 +995,7 @@ class WindowedMultipole(EqualityMixin): out.windows = group['windows'][()] - out.broaden_poly = group['broaden_poly'][...].astype(np.bool) + out.broaden_poly = group['broaden_poly'][...].astype(bool) if out.broaden_poly.shape[0] != out.windows.shape[0]: raise ValueError(err.format('broaden_poly', 'windows')) diff --git a/openmc/mgxs_library.py b/openmc/mgxs_library.py index 15ad54c43a..00a155142f 100644 --- a/openmc/mgxs_library.py +++ b/openmc/mgxs_library.py @@ -2060,7 +2060,7 @@ class XSdata: Np = self.num_polar Na = self.num_azimuthal - g_out_bounds = np.zeros((Np, Na, G, 2), dtype=np.int) + g_out_bounds = np.zeros((Np, Na, G, 2), dtype=int) for p in range(Np): for a in range(Na): for g_in in range(G): diff --git a/openmc/stats/multivariate.py b/openmc/stats/multivariate.py index 664e760f71..f33427c34d 100644 --- a/openmc/stats/multivariate.py +++ b/openmc/stats/multivariate.py @@ -493,7 +493,7 @@ class SphericalIndependent(Spatial): return cls(r, theta, phi, origin=origin) class CylindricalIndependent(Spatial): - """Spatial distribution represented in cylindrical coordinates. + r"""Spatial distribution represented in cylindrical coordinates. This distribution allows one to specify coordinates whose :math:`r`, :math:`\phi`, and :math:`z` components are sampled independently from