From c347e2163d0a1a990073e415a2c1733956be768e Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 1 Oct 2021 13:20:12 -0500 Subject: [PATCH] Update ci.yml, Dockerfile, install instructions --- .github/workflows/ci.yml | 42 ++++++++++++++---------------- Dockerfile | 2 +- docs/source/quickinstall.rst | 2 +- docs/source/usersguide/install.rst | 9 +++++++ docs/source/usersguide/plots.rst | 27 +++++-------------- 5 files changed, 37 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1673af5319..e65e630b15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,6 @@ env: COVERALLS_PARALLEL: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - jobs: main: runs-on: ubuntu-20.04 @@ -61,10 +60,10 @@ jobs: python-version: 3.8 omp: n mpi: y - name: 'Python ${{ matrix.python-version }} (omp=${{ matrix.omp }}, + name: "Python ${{ matrix.python-version }} (omp=${{ matrix.omp }}, mpi=${{ matrix.mpi }}, dagmc=${{ matrix.dagmc }}, libmesh=${{ matrix.libmesh }}, event=${{ matrix.event }} - vectfit=${{ matrix.vectfit }})' + vectfit=${{ matrix.vectfit }})" env: MPI: ${{ matrix.mpi }} @@ -78,24 +77,23 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - - name: Environment Variables + + - name: Environment Variables run: | echo "DAGMC_ROOT=$HOME/DAGMC" echo "OPENMC_CROSS_SECTIONS=$HOME/nndc_hdf5/cross_sections.xml" >> $GITHUB_ENV echo "OPENMC_ENDF_DATA=$HOME/endf-b-vii.1" >> $GITHUB_ENV - - - name: Apt dependencies + - name: Apt dependencies shell: bash run: | sudo apt -y update - sudo apt install -y libmpich-dev \ + sudo apt install -y libpng-dev \ + libmpich-dev \ libnetcdf-dev \ libpnetcdf-dev \ libhdf5-serial-dev \ @@ -105,23 +103,21 @@ jobs: 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 + - name: install shell: bash run: | echo "$HOME/NJOY2016/build" >> $GITHUB_PATH $GITHUB_WORKSPACE/tools/ci/gha-install.sh - - - name: before + + - name: before shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-before-script.sh - - - name: test + + - name: test shell: bash run: $GITHUB_WORKSPACE/tools/ci/gha-script.sh - - - name: after_success + - name: after_success shell: bash run: | cpp-coveralls -i src -i include --exclude-pattern "/usr/*" --dump cpp_cov.json @@ -131,8 +127,8 @@ jobs: needs: main runs-on: ubuntu-latest steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.github_token }} - parallel-finished: true + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true diff --git a/Dockerfile b/Dockerfile index 89fec615ef..67ff84a5c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ RUN apt-get update -y && \ apt-get install -y \ python3-pip python-is-python3 wget git gfortran g++ cmake \ mpich libmpich-dev libhdf5-serial-dev libhdf5-mpich-dev \ - imagemagick && \ + libpng-dev && \ apt-get autoremove # Update system-provided pip diff --git a/docs/source/quickinstall.rst b/docs/source/quickinstall.rst index e416b3efd9..e3138a53b0 100644 --- a/docs/source/quickinstall.rst +++ b/docs/source/quickinstall.rst @@ -100,7 +100,7 @@ directly from the package manager: .. code-block:: sh - sudo apt install g++ cmake libhdf5-dev + sudo apt install g++ cmake libhdf5-dev libpng-dev After the packages have been installed, follow the instructions below for building and installing OpenMC from source. diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 5fc1fe639f..3090ae69e5 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -219,6 +219,15 @@ Prerequisites .. admonition:: Optional :class: note + * libpng_ official reference PNG library + + OpenMC's built-in plotting capabilities use the libpng library to produce + compressed PNG files. In the absence of this library, OpenMC will fallback + to writing PPM files, which are uncompressed and only supported by select + image viewers. libpng can be installed on Ddebian derivates with:: + + sudo apt install libpng-dev + * An MPI implementation for distributed-memory parallel runs To compile with support for parallel runs on a distributed-memory diff --git a/docs/source/usersguide/plots.rst b/docs/source/usersguide/plots.rst index 109a8b5492..d57917a3df 100644 --- a/docs/source/usersguide/plots.rst +++ b/docs/source/usersguide/plots.rst @@ -80,26 +80,13 @@ assign them to a :class:`openmc.Plots` collection and export it to XML:: plots += [plot2, plot3] plots.export_to_xml() -To actually generate the plots, run the :func:`openmc.plot_geometry` -function. Alternatively, run the :ref:`scripts_openmc` executable with the -``--plot`` command-line flag. When that has finished, you will have one or more -``.ppm`` files, i.e., `portable pixmap -`_ files. On some Linux -distributions, these ``.ppm`` files are natively viewable. If you find that -you're unable to open them on your system (or you don't like the fact that they -are not compressed), you may want to consider converting them to another format. -This is easily accomplished with the ``convert`` command available on most Linux -distributions as part of the `ImageMagick -`_ package. (On Debian -derivatives: ``sudo apt install imagemagick``). Images are then converted like: - -.. code-block:: sh - - convert myplot.ppm myplot.png - -Alternatively, if you're working within a `Jupyter `_ -Notebook or QtConsole, you can use the :func:`openmc.plot_inline` to run OpenMC -in plotting mode and display the resulting plot within the notebook. +To actually generate the plots, run the :func:`openmc.plot_geometry` function. +Alternatively, run the :ref:`scripts_openmc` executable with the ``--plot`` +command-line flag. When that has finished, you will have one or more ``.png`` +files. Alternatively, if you're working within a `Jupyter +`_ Notebook or QtConsole, you can use the +:func:`openmc.plot_inline` to run OpenMC in plotting mode and display the +resulting plot within the notebook. .. _usersguide_voxel: