# XIOS compilation errors

**URL:** <https://nemo-ocean.discourse.group/t/xios-compilation-errors/306>\
**Category:** Uncategorized\
**Tags:** XIOS\
**Created:** [6 June 2022 01:33 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306 "2022-06-06T01:33:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangy](https://avatars.discourse-cdn.com/v4/letter/w/dec6dc/32.png) [@wangy](https://nemo-ocean.discourse.group/u/wangy)\
**Post date:** [6 June 2022 01:33 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/1 "2022-06-06T01:33:32Z")

</div>

Dear all  
I am a beginner and I tried to run the NEMO (ver 4.0.6) test case (GYRE\_PISCES) with a LINUX-GCC environment during this time. A _GYRE\_testing_ directory can be created after executing `./makenemo -m linux_gfortran -r GYRE_PISCES -n GRYE_testing -j4`, but some error occurred when I ran the command `mpirun -n 1 ./nemo`. The error information is listed below:

> **error log**
>
> ```nohighlight
> terminate called after throwing an instance of 'std::logic_error'
> what(): basic_string::_M_construct null not valid
> 
> Program received signal SIGABRT: Process abort signal.
> 
> Backtrace for this error:
> #0 0x2B5CF1FEFB97
> #1 0x2B5CF1FEED90
> #2 0x3D46C3269F
> #3 0x3D46C32625
> #4 0x3D46C33E04
> #5 0x2B5CF1609B4C
> #6 0x2B5CF1607BA5
> #7 0x2B5CF1607BF0
> #8 0x2B5CF1607E08
> #9 0x2B5CF163463E
> #10 0x14038A3 in _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag.isra.39 at xml_parser_decl.cpp:0
> #11 0x1406BA1 in void xios::xml::CXMLParser::ParseInclude<xios::CGroupTemplate<xios::CField, xios::CFieldGroup, xios::CFieldAttributes> >(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, xios::CGroupTemplate<xios::CField, xios::CFieldGroup, xios::CFieldAttributes>&)
> #12 0x1212E22 in xios::CGroupTemplate<xios::CField, xios::CFieldGroup, xios::CFieldAttributes>::parse(xios::xml::CXMLNode&, bool)
> #13 0x1081992 in xios::CContext::parse(xios::xml::CXMLNode&)
> #14 0x1404693 in void xios::xml::CXMLParser::ParseInclude<xios::CContext>(std::istream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, xios::CContext&)
> #15 0x1081436 in xios::CContext::parse(xios::xml::CXMLNode&)
> #16 0x13FFDA8 in xios::xml::CXMLParser::ParseStream(std::istream&, std:: __cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::set<std::__ cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std:: __cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__ cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)
> #17 0x1401DF6 in xios::xml::CXMLParser::ParseFile(std:: __cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::set<std::__ cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std:: __cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__ cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)
> #18 0x108FC2B in xios::CXios::parseFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
> #19 0x1090B4B in xios::CXios::initialize()
> #20 0x1090B71 in xios::CXios::initClientSide(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int&, int&)
> #21 0x122D288 in cxios_init_client
> #22 0xEB9475 in __idata_MOD_xios_initialize
> #23 0x48502D in __nemogcm_MOD_nemo_init
> #24 0x4864E5 in __nemogcm_MOD_nemo_gcm
> 
> ===================================================================================
> = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
> = PID 16121 RUNNING AT lon61
> = EXIT CODE: 134
> = CLEANING UP REMAINING PROCESSES
> = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
> ===================================================================================
> YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
> This typically refers to a problem with your application.
> Please see the FAQ page for debugging suggestions
> 
> ```

The results are the same whether xios 2.0 or xios 2.5 is used to run this test case. The information of my arch file:

> **NEMO arch file**
>
> ```nohighlight
> %NCDF_HOME /WORK/sio_xmzhang_4/install
> %HDF5_HOME /WORK/sio_xmzhang_4/install
> %XIOS_HOME /WORK/sio_xmzhang_4/Build_NEMO/xios-2.5
> 
> %NCDF_INC -I%NCDF_HOME/include -I%HDF5_HOME/include
> %NCDF_LIB -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lstdc++
> %XIOS_INC -I%XIOS_HOME/inc
> %XIOS_LIB -L%XIOS_HOME/lib -lxios
> 
> %CPP cpp -Dkey_nosignedzero
> %FC /WORK/app/MPI/Gnu/MPICH/3.2-gcc5.4.0-dyn/bin/mpif90
> %FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -cpp -ffree-line-length-none
> 
> %FFLAGS %FCFLAGS
> #%LD /usr/bin/mpif90 -Wl,-rpath=$HOME/INSTALL/lib:/usr/lib
> %LD /WORK/app/MPI/Gnu/MPICH/3.2-gcc5.4.0-dyn/bin/mpif90 -Wl,-rpath=/WORK/sio_xmzhang_4/install/lib:/usr/lib
> %LDFLAGS
> %FPPFLAGS -P -C -traditional
> %AR ar
> %ARFLAGS -rs
> %MK make
> %USER_INC %XIOS_INC %NCDF_INC
> %USER_LIB %XIOS_LIB %NCDF_LIB
> 
> %CC cc
> %CFLAGS -O0
> 
> ```

> **libhdf5.setting**
>
> ```auto
> 
> AM C Flags:
> Shared C Library: yes
> Static C Library: yes
> 
> Fortran: yes
> Fortran Compiler: /WORK/app/MPI/Gnu/MPICH/3.2-gcc5.4.0-dyn/bin/mpif90 ( MPICH version 3.2.1 built with gcc version 5.4.0 (GCC))
> Fortran Flags: -O3 -fPIC
> H5 Fortran Flags: -std=f2008ts -Waliasing -Wall -Wcharacter-truncation -Wextra -Wimplicit-interface -Wsurprising -Wunderflow -pedantic -Warray-temporaries -Wintrinsics-std -Wimplicit-procedure -Wreal-q-constant -Wfunction-elimination -Wrealloc-lhs -Wrealloc-lhs-all -Wno-c-binding-type -Wuse-without-only -s -O3
> AM Fortran Flags:
> Shared Fortran Library: yes
> Static Fortran Library: yes
> 
> C++: no
> 
> Java: no
> 
> Features:
> ---------
> Parallel HDF5: yes
> Parallel Filtered Dataset Writes: yes
> Large Parallel I/O: yes
> High-level library: yes
> Build HDF5 Tests: yes
> Build HDF5 Tools: yes
> Threadsafety: no (recursive RW locks: no)
> Default API mapping: v18
> With deprecated public symbols: yes
> I/O filters (external): deflate(zlib)
> MPE:
> Map (H5M) API: no
> Direct VFD: no
> Mirror VFD: no
> (Read-Only) S3 VFD: no
> (Read-Only) HDFS VFD: no
> dmalloc: no
> Packages w/ extra debug output: none
> API tracing: no
> Using memory checker: no
> Memory allocation sanity checks: no
> Function stack tracing: no
> Use file locking: best-effort
> Strict file format checks: no
> Optimization instrumentation: no
> 
> ```
> 
> The information of the libnetcdf.setting:
> 
> ```auto
> # NetCDF C Configuration Summary
> ==============================
> 
> # General
> -------
> NetCDF Version: 4.8.0
> Dispatch Version: 3
> Configured On: Sun Jun 5 21:38:20 CST 2022
> Host System: x86_64-pc-linux-gnu
> Build Directory: /WORK/sio_xmzhang_4/gccbuild/build/netcdf-c-4.8.0
> Install Prefix: /WORK/sio_xmzhang_4/install
> 
> # Compiling Options
> -----------------
> C Compiler: /WORK/app/MPI/Gnu/MPICH/3.2-gcc5.4.0-dyn/bin/mpicc
> CFLAGS: -O3 -fPIC
> CPPFLAGS: -I/WORK/sio_xmzhang_4/install/include
> LDFLAGS: -L/WORK/sio_xmzhang_4/install/lib
> AM_CFLAGS:
> AM_CPPFLAGS:
> AM_LDFLAGS:
> Shared Library: yes
> Static Library: yes
> Extra libraries: -lhdf5_hl -lhdf5 -lm -lcurl
> 
> # Features
> --------
> NetCDF-2 API: yes
> HDF4 Support: no
> HDF5 Support: yes
> NetCDF-4 API: yes
> NC-4 Parallel Support: yes
> PnetCDF Support: no
> DAP2 Support: yes
> DAP4 Support: yes
> Byte-Range Support: no
> Diskless Support: yes
> MMap Support: no
> JNA Support: no
> CDF5 Support: yes
> ERANGE Fill Support: no
> Relaxed Boundary Check: yes
> SZIP Support: no
> SZIP Write Support: no
> Parallel Filters: yes
> NCZarr Support: no
> Multi-Filter Support: yes
> 
> ```

> **libnetcdff.setting**
>
> ```auto
> # NetCDF Fortran Configuration Summary
> ==============================
> 
> # General
> -------
> Library Version: 4.5.3
> Configured On: Sun Jun 5 21:44:50 CST 2022
> Host System: x86_64-pc-linux-gnu
> Build Directory: /WORK/sio_xmzhang_4/gccbuild/build/netcdf-fortran-4.5.3
> Install Prefix: /WORK/sio_xmzhang_4/install
> 
> # Compiling Options
> -----------------
> Fortran Compiler: /WORK/app/MPI/Gnu/MPICH/3.2-gcc5.4.0-dyn/bin/mpif90
> FFLAGS: -O3 -fPIC
> LDFLAGS: -L/WORK/sio_xmzhang_4/install/lib
> AM_LDFLAGS:
> Shared Library: yes
> Static Library: yes
> Extra libraries: -lnetcdf -lm
> 
> # Features
> --------
> F03: yes
> Dap Support: yes
> Logging Support: yes
> NetCDF-2 API: yes
> NetCDF-4 API: yes
> CDF5 Support: yes
> Parallel IO: yes
> NetCDF4 Parallel IO: yes
> PnetCDF Parallel IO: no
> SZIP Write Support: no
> 
> ```

I’d appreciate any suggestions as to how to solve this problem.  
Thanks

wangy

---

<div class="post-metadata">

**Author:** ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)\
**Post date:** [7 June 2022 06:47 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/2 "2022-06-07T06:47:43Z")

</div>

Hei,

Obviously you have a problem with xios. Do you have another Nemo configuration running fine in this environment ?

Have a nice day,

---

<div class="post-metadata">

**Author:** ![banmianyu](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@banmianyu](https://nemo-ocean.discourse.group/u/banmianyu)\
**Post date:** [7 June 2022 15:04 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/3 "2022-06-07T15:04:24Z")

</div>

Hi  
Thank you very much for your reply.  
Unfortunately, no other NEMO runs fine in my environment.  
I also guess that this might be a problem with XIOS. For this reason, I downloaded XIOS training tests ([xios\_training in XIOS – XIOS](https://forge.ipsl.jussieu.fr/ioserver/browser/XIOS/xios_training?rev=2331)) and ran the tests. Most of the tests passed (hand-on-1 to hand-on-6), but some tests related to spatial filters (hand-on-7) did not pass. This is the same for both XIOS2.0 and XIOS2.5.  
My compilation environment ：

```nohighlight
[sio_xmzhang_4@lon60%tianhe2-C ~]$ module list
Currently Loaded Modulefiles:
  1) zlib/1.2.11-gcc-5.4.0 4) mpc/0.8.1 7) curl/7.62.0-gcc-5.4.0
  2) gmp/4.3.2 5) gcc/5.4.0
  3) MPFR/2.4.2 6) MPI/Gnu/MPICH/3.2-gcc5.4.0-dyn

```

HDF5-1.12.1, Netcdf-C-4.8.0 and Netcdf-Fortran-4.5.3 were installed in _/WORK/sio\_xmzhang\_4_  
_/install_ directory with same mpicc and mpif90, and all paths were exported in the _.bashrc_ file.

Thanks ~  
wangy

---

<div class="post-metadata">

**Author:** ![ntmlod](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/ntmlod/32/6_2.png) [@ntmlod](https://nemo-ocean.discourse.group/u/ntmlod)\
**Post date:** [7 June 2022 15:54 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/4 "2022-06-07T15:54:01Z")

</div>

Dear wangy,

I’m not sure you encounter an issue with NEMO but you certainly have a problem with XIOS so I suggest you to solve first it before testing NEMO.  
This forum is strictly NEMO-related so you should post your support request related to XIOS on [its users mailing list](https://forge.ipsl.jussieu.fr/mailman/listinfo.cgi/xios-users): [xios-users@forge.ipsl.jussieu.fr](mailto:xios-users@forge.ipsl.jussieu.fr)

---

<div class="post-metadata">

**Author:** ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)\
**Post date:** [8 June 2022 06:31 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/5 "2022-06-08T06:31:02Z")

</div>

Hei Wangy,

Did you change something in your xml files ? If yes, try running with the original files from the GYRE config.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![wangy](https://avatars.discourse-cdn.com/v4/letter/w/dec6dc/32.png) [@wangy](https://nemo-ocean.discourse.group/u/wangy)\
**Post date:** [9 June 2022 02:04 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/6 "2022-06-09T02:04:11Z")

</div>

Hi  
I didn’t change anything in XML file. Anyway, I think you and ntmlod are right, I will recheck the XIOS compilation.  
Thank you very much

---

<div class="post-metadata">

**Author:** ![robinson](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@robinson](https://nemo-ocean.discourse.group/u/robinson)\
**Post date:** [9 June 2022 06:01 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/7 "2022-06-09T06:01:08Z")

</div>

Hei,

Some advice based on experience: make sure you compile xios and nemo with the very same environment (same libraries, same everything…), what you can do for example is open a terminal and first compile xios in it and then nemo.

Hope this helps,

---

<div class="post-metadata">

**Author:** ![wangy](https://avatars.discourse-cdn.com/v4/letter/w/dec6dc/32.png) [@wangy](https://nemo-ocean.discourse.group/u/wangy)\
**Post date:** [8 July 2022 10:54 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/8 "2022-07-08T10:54:42Z")

</div>

Hi  
I seem to have solved this problem after I downloaded NEMO by subversion in Linuxmint instead of Tortoise SVN in Win10. Interestingly, the XIOS download by Tortoise SVN works fine.  
Thanks again for your help ~!  
wangy

---

<div class="post-metadata">

**Author:** ![ntmlod](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/ntmlod/32/6_2.png) [@ntmlod](https://nemo-ocean.discourse.group/u/ntmlod)\
**Post date:** [8 July 2022 16:01 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/9 "2022-07-08T16:01:59Z")

</div>

Dear wangy,

We are far from familiar in using NEMO under Windows but I really doubt that the application used to deal with the sources via SVN is the culprit. In a way or another you have messed with XIOS routines or misconfigured your compilation environment.  
Anyway glad you solved your issue.

---

<div class="post-metadata">

**Author:** ![Phil](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/phil/32/103_2.png) [@Phil](https://nemo-ocean.discourse.group/u/Phil)\
**Post date:** [14 September 2022 13:41 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/10 "2022-09-14T13:41:05Z")

</div>

Good day to all!  
I had another issue due to my XIOS 2.5 compilation. I made everything in accordance to compilation guide ([sites.nemo-ocean.io/user-guide](http://sites.nemo-ocean.io/user-guide) website), changed arch files etc.  
After that I ran:

```shell
$ ./make_xios --full --prod --arch GCC_test -j 2 |& tee compile_log.txt 

```

Finally, I got this error

 ![XIOS_error_22](https://global.discourse-cdn.com/free1/uploads/nemo_ocean/original/1X/358b155333d0112b26dcd20c63451d299b9aa69a.png)

---

<div class="post-metadata">

**Author:** ![jchanut](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/jchanut/32/9_2.png) [@jchanut](https://nemo-ocean.discourse.group/u/jchanut)\
**Post date:** [15 September 2022 12:56 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/11 "2022-09-15T12:56:52Z")

</div>

Hi,

For XIOS related questions, you may also try XIOS forum:  
[https://forge.ipsl.jussieu.fr/mailman/listinfo.cgi/xios-users](https://forge.ipsl.jussieu.fr/mailman/listinfo.cgi/xios-users)

---

<div class="post-metadata">

**Author:** ![Phil](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/phil/32/103_2.png) [@Phil](https://nemo-ocean.discourse.group/u/Phil)\
**Post date:** [15 September 2022 13:38 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/12 "2022-09-15T13:38:08Z")

</div>

Thanks for suggestion

---

<div class="post-metadata">

**Author:** ![ntmlod](https://yyz2.discourse-cdn.com/free1/user_avatar/nemo-ocean.discourse.group/ntmlod/32/6_2.png) [@ntmlod](https://nemo-ocean.discourse.group/u/ntmlod)\
**Post date:** [15 September 2022 15:53 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/13 "2022-09-15T15:53:00Z")

</div>

By the way, you have to compile the trunk version of XIOS if you want to use the last release of NEMO (v4.2).  
See [Essential components — NEMO release-4.2.0 documentation](https://sites.nemo-ocean.io/user-guide/install.html#extract-and-install-xios)

---

<div class="post-metadata">

**Author:** ![jojo](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jojo](https://nemo-ocean.discourse.group/u/jojo)\
**Post date:** [23 March 2023 14:08 UTC](https://nemo-ocean.discourse.group/t/xios-compilation-errors/306/14 "2023-03-23T14:08:31Z")

</div>

Hi Phil,  
I got the same error like you got before. If you remember how to solve this problem, can you give me a hand?  
Thanks a lot!
