Skip to content

Commit 8e46878

Browse files
authored
Merge pull request #1349 from vferat/dev-docs
Add a HPC troubleshooting section to the documentation
2 parents 9c784c9 + 44e17cf commit 8e46878

File tree

1 file changed

+52
-10
lines changed

1 file changed

+52
-10
lines changed

docs/source/usage.rst

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,8 @@ This will separate *DataLad* management from *MRIQC*'s operation,
102102
which can be an effective way of debugging issues and averting
103103
erroneous conditions.
104104

105-
Command line interface
106-
----------------------
107-
.. argparse::
108-
:ref: mriqc.cli.parser._build_parser
109-
:prog: mriqc
110-
:nodefault:
111-
:nodefaultconst:
112-
113-
Running mriqc on HPC clusters
114-
-----------------------------
105+
Running *MRIQC* on HPC with *Singularity*/*Apptainer*
106+
-----------------------------------------------------
115107
We have profiled cores and memory usages with the *resource profiler*
116108
tool of *Nipype*.
117109

@@ -140,6 +132,56 @@ on ds030 of OpenfMRI:
140132
the 1-task example, a rule of thumb may be that each task takes around
141133
1GB of memory.
142134

135+
Known issues with HPC
136+
.....................
137+
138+
#. No internet access
139+
140+
The container needs to download the templates from the internet.
141+
If the container does not have internet access, you can download the
142+
templates manually using the ``templateflow`` library:
143+
144+
.. code-block:: python
145+
146+
import templateflow.api
147+
templateflow.api.TF_S3_ROOT = 'http://templateflow.s3.amazonaws.com'
148+
templateflow.api.get('MNI152NLin2009cAsym') # change template if needed
149+
150+
then provide the templates to the container by mounting the ``templateflow`` home directory and setting the ``TEMPLATEFLOW_HOME`` environment variable:
151+
152+
.. code-block:: bash
153+
154+
apptainer run -v /path/to/templateflow:/path/to/templates --env TEMPLATEFLOW_HOME=/path/to/templates ...
155+
156+
#. Socket error:
157+
158+
When running multiple instances of MRIQC on a HPC, you may encounter the following error:
159+
160+
.. code-block:: python
161+
162+
OSError: [Errno 98] Address already in use
163+
164+
To solve this issue, you can try to isolate the container network from the host network by using the ``--network none`` option.
165+
166+
.. code-block:: bash
167+
168+
apptainer run --net --network none ...
169+
170+
This solution might prevent the container from accessing the internet and downloading templates.
171+
In this case, you can download the templates manually and provide access to the downloaded files as explained in the previous section.
172+
173+
.. code-block:: bash
174+
175+
apptainer run --net --network none -v /path/to/templateflow:/path/to/templates --env TEMPLATEFLOW_HOME=/path/to/templates ...
176+
177+
Command line interface
178+
----------------------
179+
.. argparse::
180+
:ref: mriqc.cli.parser._build_parser
181+
:prog: mriqc
182+
:nodefault:
183+
:nodefaultconst:
184+
143185
.. topic:: References
144186

145187
.. [BIDS] `Brain Imaging Data Structure <http://bids.neuroimaging.io/>`_

0 commit comments

Comments
 (0)