Skip to content

Commit 86a1baa

Browse files
authored
Merge pull request #68 from daavid00/dev
Docs brew formulas for flow and resinsight
2 parents 73ad113 + 522be6b commit 86a1baa

File tree

12 files changed

+127
-69
lines changed

12 files changed

+127
-69
lines changed

docs/_sources/examples.rst.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ Examples
33
********
44

55
For additional examples demonstrating the applicability of **pycopm**, see the `tests <https://github.com/cssr-tools/pycopm/tree/main/tests>`_.
6+
67
`ResInsight <https://resinsight.org>`_ and `plopm <https://github.com/cssr-tools/plopm>`_ are used for the visualization of the results.
78

89
.. note::
910

10-
For macOS users, you could try to install ResInsight following `this <https://github.com/SoilRos/homebrew-OPM>`_. If you have issues
11-
installing ResInsight, `ParaView <https://www.paraview.org>`_ can be also used. However, you need to add the flag **\-\-enable-vtk-output=true**
11+
There are binary packages for Linux and Windows to install Resinsight, see the `ResInsight Documentation <https://resinsight.org/releases/>`_. For macOS users, you could try to install it using `brew <https://brew.sh>`_ by executing:
12+
13+
.. code-block:: bash
14+
15+
brew install cssr-tools/opm/resinsight
16+
17+
Then, you should be able to open resinsight by typing in the terminal **resinsight**. If you have issues installing ResInsight, `ParaView <https://www.paraview.org>`_ can be also used. However, you need to add the flag **\-\-enable-vtk-output=true**
1218
to OPM Flow.
1319

1420
=======================
@@ -24,7 +30,7 @@ to perform HM studies in drogon and norne using `ERT <https://ert.readthedocs.io
2430
cd examples/configurations/drogon
2531
pycopm -i input.toml -o drogon_coarser
2632
27-
The following are the drogon model from `opm-tests <https://github.com/OPM/opm-tests/tree/master/drogon>`_ and coarsened model generated using **pycopm**:
33+
The following are the drogon model from `opm-tests <https://github.com/OPM/opm-tests/tree/master/drogon>`_ and coarsened model generated using **pycopm** using ResInsight for the visualization:
2834

2935
.. figure:: figs/drogon_coarser.png
3036

docs/_sources/installation.rst.txt

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Installation
33
============
44

5-
The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using brew or macports.
5+
The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using `brew <https://brew.sh>`_ or `macports <https://www.macports.org>`_.
66
While using package managers such as Anaconda, Miniforge, or Mamba might work, these are not tested.
77
The supported Python versions are 3.11 to 3.13. We will update the documentation when Python3.14 is supported
88
(e.g., the ert Python package is not yet available via pip install in Python 3.14).
@@ -60,6 +60,13 @@ You also need to install:
6060

6161
* OPM Flow (https://opm-project.org, Release 2025.10 or current master branches)
6262

63+
Binary packages
64+
+++++++++++++++
65+
66+
See the `downloading and installing <https://opm-project.org/?page_id=36>`_ OPM Flow online documentation for
67+
instructions to install the binary packages in Ubuntu and Red Hat Enterprise Linux, and for other platforms which are
68+
supported either via source builds or through running a virtual machine.
69+
6370
.. tip::
6471

6572
See the `ci_pycopm_ubuntu.yml <https://github.com/cssr-tools/pycopm/blob/main/.github/workflows/ci_pycopm_ubuntu.yml>`_ script
@@ -97,30 +104,40 @@ in the terminal the following lines (which in turn should build flow in the fold
97104

98105
.. _macOS:
99106

107+
Brew formula for macOS
108+
++++++++++++++++++++++
109+
For macOS, there are no available binary packages, so OPM Flow needs to be built from source. Recently, a formula to build flow using brew has
110+
been added in `https://github.com/cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm>`_.
111+
Then, you can try to install flow (v2025.10) by simply typing:
112+
113+
.. code-block:: console
114+
115+
brew install cssr-tools/opm/opm-simulators
116+
117+
You can check if the installation of OPM Flow succeded by typing in the terminal **flow \-\-help**.
118+
119+
.. tip::
120+
See the actions in the `cssr-tools/homebrew-opm <https://github.com/cssr-tools/homebrew-opm/actions>`_ repository.
121+
100122
Source build in macOS
101123
+++++++++++++++++++++
102-
For macOS, there are no available binary packages, so OPM Flow needs to be built from source, in addition to the dune libraries
103-
(see the `prerequisites <https://opm-project.org/?page_id=239>`_, which can be installed using macports or brew). For example,
104-
with brew the prerequisites can be installed by:
124+
If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:
105125

106126
.. code-block:: console
107127
108128
brew install boost openblas suite-sparse python@3.13 cmake
109129
110130
In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
111-
worked for macOS Tahoe 26.0.1 with Apple clang version 17.0.0).
112-
After the prerequisites are installed and the vpyocpm Python environment is created (see :ref:`vpycopm`),
113-
then building OPM Flow can be achieved with the following bash lines:
131+
worked for macOS Tahoe 26.2.0 with Apple clang version 17.0.0). After the prerequisites are installed, then building OPM Flow
132+
can be achieved with the following bash lines:
114133

115134
.. code-block:: console
116135
117136
CURRENT_DIRECTORY="$PWD"
118137
119-
deactivate
120-
source vpycopm/bin/activate
121-
122138
for module in common geometry grid istl
123-
do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.1
139+
do git clone https://gitlab.dune-project.org/core/dune-$module.git
140+
cd dune-$module && git checkout v2.10.0 && cd ..
124141
./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1
125142
./dune-common/bin/dunecontrol --only=dune-$module make -j5
126143
done
@@ -129,8 +146,7 @@ then building OPM Flow can be achieved with the following bash lines:
129146
130147
for repo in common grid simulators
131148
do git clone https://github.com/OPM/opm-$repo.git
132-
mkdir build/opm-$repo
133-
cd build/opm-$repo
149+
mkdir build/opm-$repo && cd build/opm-$repo
134150
cmake -DUSE_MPI=0 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid" $CURRENT_DIRECTORY/opm-$repo
135151
if [[ $repo == simulators ]]; then
136152
make -j5 flow
@@ -140,10 +156,8 @@ then building OPM Flow can be achieved with the following bash lines:
140156
cd ../..
141157
done
142158
143-
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> $CURRENT_DIRECTORY/vpycopm/bin/activate
144-
145-
deactivate
146-
source vpycopm/bin/activate
159+
echo "export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin" >> ~/.zprofile
160+
source ~/.zprofile
147161
148162
This builds OPM Flow, and it exports the path to the flow executable.
149163

docs/examples.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,15 @@
9595

9696
<section id="examples">
9797
<h1>Examples<a class="headerlink" href="#examples" title="Link to this heading"></a></h1>
98-
<p>For additional examples demonstrating the applicability of <strong>pycopm</strong>, see the <a class="reference external" href="https://github.com/cssr-tools/pycopm/tree/main/tests">tests</a>.
99-
<a class="reference external" href="https://resinsight.org">ResInsight</a> and <a class="reference external" href="https://github.com/cssr-tools/plopm">plopm</a> are used for the visualization of the results.</p>
98+
<p>For additional examples demonstrating the applicability of <strong>pycopm</strong>, see the <a class="reference external" href="https://github.com/cssr-tools/pycopm/tree/main/tests">tests</a>.</p>
99+
<p><a class="reference external" href="https://resinsight.org">ResInsight</a> and <a class="reference external" href="https://github.com/cssr-tools/plopm">plopm</a> are used for the visualization of the results.</p>
100100
<div class="admonition note">
101101
<p class="admonition-title">Note</p>
102-
<p>For macOS users, you could try to install ResInsight following <a class="reference external" href="https://github.com/SoilRos/homebrew-OPM">this</a>. If you have issues
103-
installing ResInsight, <a class="reference external" href="https://www.paraview.org">ParaView</a> can be also used. However, you need to add the flag <strong>--enable-vtk-output=true</strong>
102+
<p>There are binary packages for Linux and Windows to install Resinsight, see the <a class="reference external" href="https://resinsight.org/releases/">ResInsight Documentation</a>. For macOS users, you could try to install it using <a class="reference external" href="https://brew.sh">brew</a> by executing:</p>
103+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>brew<span class="w"> </span>install<span class="w"> </span>cssr-tools/opm/resinsight
104+
</pre></div>
105+
</div>
106+
<p>Then, you should be able to open resinsight by typing in the terminal <strong>resinsight</strong>. If you have issues installing ResInsight, <a class="reference external" href="https://www.paraview.org">ParaView</a> can be also used. However, you need to add the flag <strong>--enable-vtk-output=true</strong>
104107
to OPM Flow.</p>
105108
</div>
106109
<section id="via-configuration-files">
@@ -112,7 +115,7 @@ <h2>Via configuration files<a class="headerlink" href="#via-configuration-files"
112115
pycopm<span class="w"> </span>-i<span class="w"> </span>input.toml<span class="w"> </span>-o<span class="w"> </span>drogon_coarser
113116
</pre></div>
114117
</div>
115-
<p>The following are the drogon model from <a class="reference external" href="https://github.com/OPM/opm-tests/tree/master/drogon">opm-tests</a> and coarsened model generated using <strong>pycopm</strong>:</p>
118+
<p>The following are the drogon model from <a class="reference external" href="https://github.com/OPM/opm-tests/tree/master/drogon">opm-tests</a> and coarsened model generated using <strong>pycopm</strong> using ResInsight for the visualization:</p>
116119
<figure class="align-default">
117120
<img alt="_images/drogon_coarser.png" src="_images/drogon_coarser.png" />
118121
</figure>

docs/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ <h1>Welcome to pycopm’s documentation!<a class="headerlink" href="#welcome-to-
100100
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
101101
<li class="toctree-l2"><a class="reference internal" href="installation.html#python-package">Python package</a></li>
102102
<li class="toctree-l2"><a class="reference internal" href="installation.html#opm-flow">OPM Flow</a><ul>
103+
<li class="toctree-l3"><a class="reference internal" href="installation.html#binary-packages">Binary packages</a></li>
103104
<li class="toctree-l3"><a class="reference internal" href="installation.html#source-build-in-linux-windows">Source build in Linux/Windows</a></li>
105+
<li class="toctree-l3"><a class="reference internal" href="installation.html#brew-formula-for-macos">Brew formula for macOS</a></li>
104106
<li class="toctree-l3"><a class="reference internal" href="installation.html#source-build-in-macos">Source build in macOS</a></li>
105107
</ul>
106108
</li>

docs/installation.html

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
5151
<li class="toctree-l2"><a class="reference internal" href="#python-package">Python package</a></li>
5252
<li class="toctree-l2"><a class="reference internal" href="#opm-flow">OPM Flow</a><ul>
53+
<li class="toctree-l3"><a class="reference internal" href="#binary-packages">Binary packages</a></li>
5354
<li class="toctree-l3"><a class="reference internal" href="#source-build-in-linux-windows">Source build in Linux/Windows</a></li>
55+
<li class="toctree-l3"><a class="reference internal" href="#brew-formula-for-macos">Brew formula for macOS</a></li>
5456
<li class="toctree-l3"><a class="reference internal" href="#source-build-in-macos">Source build in macOS</a></li>
5557
</ul>
5658
</li>
@@ -91,7 +93,7 @@
9193

9294
<section id="installation">
9395
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
94-
<p>The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using brew or macports.
96+
<p>The following steps work installing the dependencies in Ubuntu via apt-get or in macOS using <a class="reference external" href="https://brew.sh">brew</a> or <a class="reference external" href="https://www.macports.org">macports</a>.
9597
While using package managers such as Anaconda, Miniforge, or Mamba might work, these are not tested.
9698
The supported Python versions are 3.11 to 3.13. We will update the documentation when Python3.14 is supported
9799
(e.g., the ert Python package is not yet available via pip install in Python 3.14).</p>
@@ -139,11 +141,17 @@ <h1>Installation<a class="headerlink" href="#installation" title="Link to this h
139141
<ul class="simple">
140142
<li><p>OPM Flow (<a class="reference external" href="https://opm-project.org">https://opm-project.org</a>, Release 2025.10 or current master branches)</p></li>
141143
</ul>
144+
<section id="binary-packages">
145+
<h3>Binary packages<a class="headerlink" href="#binary-packages" title="Link to this heading"></a></h3>
146+
<p>See the <a class="reference external" href="https://opm-project.org/?page_id=36">downloading and installing</a> OPM Flow online documentation for
147+
instructions to install the binary packages in Ubuntu and Red Hat Enterprise Linux, and for other platforms which are
148+
supported either via source builds or through running a virtual machine.</p>
142149
<div class="admonition tip">
143150
<p class="admonition-title">Tip</p>
144151
<p>See the <a class="reference external" href="https://github.com/cssr-tools/pycopm/blob/main/.github/workflows/ci_pycopm_ubuntu.yml">ci_pycopm_ubuntu.yml</a> script
145152
for installation of OPM Flow (binary packages) and the pycopm package in Ubuntu.</p>
146153
</div>
154+
</section>
147155
<section id="source-build-in-linux-windows">
148156
<h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-linux-windows" title="Link to this heading"></a></h3>
149157
<p>If you are a Linux user (including the Windows subsystem for Linux, see <a class="reference external" href="https://learn.microsoft.com/en-us/windows/python/web-frameworks">this link</a>
@@ -172,25 +180,34 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
172180
<p>You can create a .sh file (e.g., build_opm_mpi.sh), copy the previous lines, and run in the terminal <strong>source build_opm_mpi.sh</strong></p>
173181
</div>
174182
</section>
183+
<section id="brew-formula-for-macos">
184+
<span id="macos"></span><h3>Brew formula for macOS<a class="headerlink" href="#brew-formula-for-macos" title="Link to this heading"></a></h3>
185+
<p>For macOS, there are no available binary packages, so OPM Flow needs to be built from source. Recently, a formula to build flow using brew has
186+
been added in <a class="reference external" href="https://github.com/cssr-tools/homebrew-opm">https://github.com/cssr-tools/homebrew-opm</a>.
187+
Then, you can try to install flow (v2025.10) by simply typing:</p>
188+
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">brew install cssr-tools/opm/opm-simulators</span>
189+
</pre></div>
190+
</div>
191+
<p>You can check if the installation of OPM Flow succeded by typing in the terminal <strong>flow --help</strong>.</p>
192+
<div class="admonition tip">
193+
<p class="admonition-title">Tip</p>
194+
<p>See the actions in the <a class="reference external" href="https://github.com/cssr-tools/homebrew-opm/actions">cssr-tools/homebrew-opm</a> repository.</p>
195+
</div>
196+
</section>
175197
<section id="source-build-in-macos">
176-
<span id="macos"></span><h3>Source build in macOS<a class="headerlink" href="#source-build-in-macos" title="Link to this heading"></a></h3>
177-
<p>For macOS, there are no available binary packages, so OPM Flow needs to be built from source, in addition to the dune libraries
178-
(see the <a class="reference external" href="https://opm-project.org/?page_id=239">prerequisites</a>, which can be installed using macports or brew). For example,
179-
with brew the prerequisites can be installed by:</p>
198+
<h3>Source build in macOS<a class="headerlink" href="#source-build-in-macos" title="Link to this heading"></a></h3>
199+
<p>If you would like to build the latest OPM Flow from the master branch, then you can first install the prerequisites using brew:</p>
180200
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">brew install boost openblas suite-sparse python@3.13 cmake</span>
181201
</pre></div>
182202
</div>
183203
<p>In addition, it is recommended to uprade and update your macOS to the latest available versions (the following steps have
184-
worked for macOS Tahoe 26.0.1 with Apple clang version 17.0.0).
185-
After the prerequisites are installed and the vpyocpm Python environment is created (see <a class="reference internal" href="#vpycopm"><span class="std std-ref">Python package</span></a>),
186-
then building OPM Flow can be achieved with the following bash lines:</p>
204+
worked for macOS Tahoe 26.2.0 with Apple clang version 17.0.0). After the prerequisites are installed, then building OPM Flow
205+
can be achieved with the following bash lines:</p>
187206
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">CURRENT_DIRECTORY=&quot;$PWD&quot;</span>
188207

189-
<span class="go">deactivate</span>
190-
<span class="go">source vpycopm/bin/activate</span>
191-
192208
<span class="go">for module in common geometry grid istl</span>
193-
<span class="go">do git clone https://gitlab.dune-project.org/core/dune-$module.git --branch v2.9.1</span>
209+
<span class="go">do git clone https://gitlab.dune-project.org/core/dune-$module.git</span>
210+
<span class="go"> cd dune-$module &amp;&amp; git checkout v2.10.0 &amp;&amp; cd ..</span>
194211
<span class="go"> ./dune-common/bin/dunecontrol --only=dune-$module cmake -DCMAKE_DISABLE_FIND_PACKAGE_MPI=1</span>
195212
<span class="go"> ./dune-common/bin/dunecontrol --only=dune-$module make -j5</span>
196213
<span class="go">done</span>
@@ -199,8 +216,7 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
199216

200217
<span class="go">for repo in common grid simulators</span>
201218
<span class="go">do git clone https://github.com/OPM/opm-$repo.git</span>
202-
<span class="go"> mkdir build/opm-$repo</span>
203-
<span class="go"> cd build/opm-$repo</span>
219+
<span class="go"> mkdir build/opm-$repo &amp;&amp; cd build/opm-$repo</span>
204220
<span class="go"> cmake -DUSE_MPI=0 -DWITH_NDEBUG=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=&quot;$CURRENT_DIRECTORY/dune-common/build-cmake;$CURRENT_DIRECTORY/dune-grid/build-cmake;$CURRENT_DIRECTORY/dune-geometry/build-cmake;$CURRENT_DIRECTORY/dune-istl/build-cmake;$CURRENT_DIRECTORY/build/opm-common;$CURRENT_DIRECTORY/build/opm-grid&quot; $CURRENT_DIRECTORY/opm-$repo</span>
205221
<span class="go"> if [[ $repo == simulators ]]; then</span>
206222
<span class="go"> make -j5 flow</span>
@@ -210,10 +226,8 @@ <h3>Source build in Linux/Windows<a class="headerlink" href="#source-build-in-li
210226
<span class="go"> cd ../..</span>
211227
<span class="go">done</span>
212228

213-
<span class="go">echo &quot;export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin&quot; &gt;&gt; $CURRENT_DIRECTORY/vpycopm/bin/activate</span>
214-
215-
<span class="go">deactivate</span>
216-
<span class="go">source vpycopm/bin/activate</span>
229+
<span class="go">echo &quot;export PATH=\$PATH:$CURRENT_DIRECTORY/build/opm-simulators/bin&quot; &gt;&gt; ~/.zprofile</span>
230+
<span class="go">source ~/.zprofile</span>
217231
</pre></div>
218232
</div>
219233
<p>This builds OPM Flow, and it exports the path to the flow executable.</p>

docs/objects.inv

4 Bytes
Binary file not shown.

docs/searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)