# NEMO 5.0 - XIOS 3 hangs at initialization

**URL:** <https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858>\
**Category:** Versions\
**Tags:** XIOS\
**Created:** [11 March 2025 17:26 UTC](https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858 "2025-03-11T17:26:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luc](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@Luc](https://nemo-ocean.discourse.group/u/Luc)\
**Post date:** [11 March 2025 17:26 UTC](https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858/1 "2025-03-11T17:26:29Z")

</div>

Hello,  
When I run my NEMO 5.0 config with XIOS 2, it runs fine.  
I’m trying to switch to XIOS 3. My main motivation is to have less writers, as the cluster admins always complain I have too many disk access.  
I copied the XIOS XML files from the new example config X3\_ORCA2\_ICE\_PISCES. In a small test, I modified iodef.xml and I use 4 XIOS processes in 1 pool (Opool): “tgatherer”, “ugatherer”, “twriter”, “uwriter”. I modified file\_def\_nemo-oce.xml and indicated to use the right gatherer and writer, e.g.

> \<file id=“file11” name\_suffix=“\_grid\_T” mode=“write” writer=“twriter” gatherer=“tgatherer” using\_server2=“false” description=“ocean T grid variables”\>

When running my config, the model hangs forever in iom\_init, in particular in iom\_setatt, in the calls to set\_mooring(…). I don’t want to use anything related to moorings, so I commented the 3 related calls. As a side-node, I don’t know if I could have disabled the calls to set\_moorings(…) from a namelist option that I forgot to put to .false., or if they are always there. In that case, it could make sense someday to move these 3 hard-coded vectors of longitude,latitude (TAO, RAMA and PIRATA moorings) out of iom.F90.

With these calls commented out, the model now hangs forever during the call to xios\_close\_context\_definition()

I don’t know if it’s related to these set\_mooring() that I don’t have anymore, or what to try out next.

Some notes:

- I tried XIOS in attached and detached mode. I don’t know what the XIOS option “using\_server2” is, but I tried both true and false (in iodef.xml). In file\_def\_nemo-oce.xml I kept the value at “false” (as in the X3\_ORCA2\_PISCES\_ICE example).
- In iodef.xml, I tried changing info\_level from 0 to 9 but still XIOS does not tell me anything at all. At execution, "xios\_server\_??.err and .out files are created, but they are all empty
- Compiling XIOS in debug mode doesn’t give me any info either when I kill the model. I just exits without any message (either from NEMO or from XIOS)
- I’m working with gcc / gfortran. Given another topic on the forum [[intel] Model hangs on initialization phase at `xios_close_context_definition` call - Versions - NEMO Community Ocean Model](https://nemo-ocean.discourse.group/t/intel-model-hangs-on-initialization-phase-at-xios-close-context-definition-call/190) , I tried changing the version (gfortran 12.2.0-14 → 13.3.0) but the result is the same. I don’t think it’s a compiler bug as in that forum thread, but rather a deadlock in XIOS due to some wrong setting in my config
- I tried AMM12 with XIOS3, but it also hangs forever during initialization. I did not yet start to add write(_,_) in the code where exactly is hangs, because I’m pretty convince it’s the same error.

Thank you !  
Luc

---

<div class="post-metadata">

**Author:** ![atb299](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@atb299](https://nemo-ocean.discourse.group/u/atb299)\
**Post date:** [13 March 2025 18:22 UTC](https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858/2 "2025-03-13T18:22:59Z")

</div>

Hi Luc,

I’ve been running with XIOS3 for a while now. I’ve no idea how ‘optimal’ my setup is, but the eORCA1 and eORCA025 configurations work well writing in one\_file mode. You can see the xml files etc in my repo:

> <https://github.com/NOC-MSM/NOC_Near_Present_Day/blob/main/cfgs/GLOBAL_QCO/eORCA1/iodef.xml>

---

<div class="post-metadata">

**Author:** ![Vas](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Vas](https://nemo-ocean.discourse.group/u/Vas)\
**Post date:** [18 March 2025 10:22 UTC](https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858/3 "2025-03-18T10:22:43Z")

</div>

Hello, I have the same problem, except I can’t produce outputs with either XIOS2 nor XIOS3 (the model hangs after dia\_mlr\_init). I tried both attached and dettached mode, but nothing works. The only way I am able to produce results is if I build my configuration without key\_xios, in which case I have no control over the results. Did you find a solution for your case?

---

<div class="post-metadata">

**Author:** ![acc](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@acc](https://nemo-ocean.discourse.group/u/acc)\
**Post date:** [17 June 2026 11:08 UTC](https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858/4 "2026-06-17T11:08:35Z")

</div>

Luc, Did you get going with XIOS3? You don’t mention what your test configuration is, but since you are trying to reduce the number of writers, I suspect expecting one gatherer and one writer to handle all the T-grid output is asking too much. Try activating the memory use logging:

```auto
    <variable id="log_memory" type="bool">true</variable>

```

inside the variable\_definition section of iodef.xml. This will produce xios\_memory\_XX.csv files that should show the memory use through the various stages. That might give some clue.

---

<div class="post-metadata">

**Author:** ![Franziska](https://avatars.discourse-cdn.com/v4/letter/f/8797f3/32.png) [@Franziska](https://nemo-ocean.discourse.group/u/Franziska)\
**Post date:** [25 September 2026 10:04 UTC](https://nemo-ocean.discourse.group/t/nemo-5-0-xios-3-hangs-at-initialization/858/5 "2026-09-25T10:04:59Z")

</div>

Hi all!

I’m having similar issues, NEMO 5 and XIOS 3 (several branches/revisions tested for both components) hangs at `xios_close_context_definition()` irrespective of running XIOS attached or detached, using pools or not.

However, these only **occur when compiled with gcc** (also different versions tested) while it works fine when compiled with intel (classic as well as oneapi).

With XIOS2 it also works with gcc compilers.

Any idea what might go wrong when using gcc is very much appreciated.

While searching for reasons, I came across [XIOS calls before context initialisation (#696) · Issues · NEMO Workspace / Nemo · GitLab](https://forge.nemo-ocean.eu/nemo/nemo/-/work_items/696) which I also see appearing in some routines. Could this be somehow related?

Thank you!
