Opened 2 months ago

Last modified 8 weeks ago

#143 new defect

XIOS2.5, Mojave and GCC8.2

Reported by: acc Owned by: yushan
Priority: major Component: XIOS
Version: 2.0 Keywords:


I've struggled but succeeded to get NEMO with XIOS2.5 (rev 1646) to compile and run on a new iMac Pro running the latest MacOSX (Mojave 10.14.3). The good news is that it is possible but with one caveat that justifies this ticket.

Here's a list of the components that led to a successful build:

gcc version 8.2.0 ( Macports gcc8 8.2.0_3 )
openmpi-3.1.3 (built from source)
netcdf-c-4.6.2 (built from source)
netcdf-fortran-4.4.4 (built from source)
hdf5-1.10.4 (built from source)

Then to compile XIOS I had to use an fcm arch file that differed from the default OSX one only by:

mpiCC -std­c++98 ­D_GLIBCXX_USE_CX11_ABI=0 instead of mpiCC
mpifort instead of mpif90 (not strictly necessary)
cpp-mp-8 instead of cpp-mp-4.5
make instead of gmake

but here is the caveat: everything compiles but all executables abort immediately when launched. The abort (segmentation violation/invalid memory access) seems to happen before any executable line is reached in the first xios routine entered so I had no luck debugging. By 'all executables' I mean test_client.exe, xios_server.exe and a nemo executable linked with xios.

However, if I rebuild XIOS with -O0 instead of -O3 everything compiles and runs and I can start to use the 20 cores in my new machine. Even -O1 is enough to break it so I'm stuck with -O0.

It is difficult to know whether or not this is a compiler bug or something in Boost, Blitz or XIOS that breaks with optimisation. Worth noting though in case anyone else struggles with a similar issue.

Here is a typical crash report (with -O1) in case it provides someone else with more of a clue:

Crashed Thread: 0 Dispatch queue:

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue:
0 libsystem_kernel.dylib 0x00007fff60c1e23e pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff60cd4c1c pthread_kill + 285
2 libsystem_c.dylib 0x00007fff60b871c9 abort + 127
3 libgcc_s.1.dylib 0x0000000108aa7ec5 0x108a9e000 + 40645
4 libgcc_s.1.dylib 0x0000000108aa851b _Unwind_Resume + 55
5 test_client.exe 0x00000001072a51ef xios::CAxis::initializeTransformationMap(std::map<std::string, xios::transformation_type, std::less<std::string>, std::allocator<std::pair<std::string const, xios::transformation_type> > >&) + 553
6 libsystem_c.dylib 0x00007fff60b87d8d
cxa_atexit + 38

Change History (2)

comment:1 Changed 2 months ago by ymipsl

  • Owner changed from ymipsl to yushan

We will try to compile and execute on our X64 intel architecture with GCC8.

comment:2 Changed 8 weeks ago by yushan

Following-up :
Compilation with gcc8 successful.
test_client.exe runs successfully when compiled with -O0
test_client.exe hangs when compiled with -O1. The program does not raise error but hangs before executing any instruction.
To be followed up...

Note: See TracTickets for help on using tickets.