Thank you so much for your answers.
Regarding the first problem, thank you for your insights. The xxHash developers apparently had some issues with `vec_mulo`, see lines 3487 and following. However, I have created a PR that just uses the `vec_*` intrinsics on Power, which builds locally for me. Not sure about endianness and correctness here, though, and these are the issues that the devs discuss in the comments in lines 3487 following.
Regarding the second problem, if I do it like you do, it works for me as well. However, I have built a MWE that uses fmt/spdlog as a library:
```
git clone
https://github.com/MaxiBoether/ibm-xlc-crash-mwecd ibm-xlc-crash-mwe
mkdir build
cd build
CXX=/opt/ibm/xlC/16.1.1/bin/xlC CC=/opt/ibm/xlC/16.1.1/bin/xlc cmake ..
CXX=/opt/ibm/xlC/16.1.1/bin/xlC CC=/opt/ibm/xlC/16.1.1/bin/xlc make
```
leads to
```
1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
1500-004: (U) INTERNAL COMPILER ERROR while compiling fmt::v8::detail::dragonbox::remove_trailing_zeros(uint64_t &). Compilation ended. Contact your Service Representative and provide the following information: Internal abort. For more information visit:
http://www.ibm.com/support/docview.wss?uid=swg211108101586-346 (U) An error occurred during code generation. The code generation return code was 1.
make[2]: *** [_deps/spdlog-build/CMakeFiles/spdlog.dir/build.make:153: _deps/spdlog-build/CMakeFiles/spdlog.dir/src/fmt.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
1500-004: (U) INTERNAL COMPILER ERROR while compiling fmt::v8::detail::dragonbox::remove_trailing_zeros(uint64_t &). Compilation ended. Contact your Service Representative and provide the following information: Internal abort. For more information visit:
http://www.ibm.com/support/docview.wss?uid=swg211108101586-346 (U) An error occurred during code generation. The code generation return code was 1.
make[2]: *** [_deps/fmt-build/CMakeFiles/fmt.dir/build.make:75: _deps/fmt-build/CMakeFiles/fmt.dir/src/format.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:145: _deps/fmt-build/CMakeFiles/fmt.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:171: _deps/spdlog-build/CMakeFiles/spdlog.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
```
I am using XL for Linux version 16.01.0001.0003. If I use the `
-qxflag=except` flag, the error is as follows:
```
[ 69%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/fmt.cpp.o
Exception: reason = 1
Traceback:
Line ? Displ 0000000000001F84 as_power
Line ? Displ 0000000000000EF0 as_text
Line ? Displ 00000000000011FC as
Line ? Displ 00000000000004A0 IPRA.$invoke_tobey
Line ? Displ 0000000000000D68 xlator_main
Line ? Displ 00000000000000D8 main
1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
xlator_terminate..000000000000005C main..00000000000001AC
1586-346 (U) An error occurred during code generation. The code generation return code was 1.
make[2]: *** [_deps/spdlog-build/CMakeFiles/spdlog.dir/build.make:153: _deps/spdlog-build/CMakeFiles/spdlog.dir/src/fmt.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Exception: reason = 1
Traceback:
Line ? Displ 0000000000001F84 as_power
Line ? Displ 0000000000000EF0 as_text
Line ? Displ 00000000000011FC as
Line ? Displ 00000000000004A0 IPRA.$invoke_tobey
Line ? Displ 0000000000000D68 xlator_main
Line ? Displ 00000000000000D8 main
1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
xlator_terminate..000000000000005C main..00000000000001AC
1586-346 (U) An error occurred during code generation. The code generation return code was 1.
make[2]: *** [_deps/fmt-build/CMakeFiles/fmt.dir/build.make:75: _deps/fmt-build/CMakeFiles/fmt.dir/src/format.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:145: _deps/fmt-build/CMakeFiles/fmt.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
```
The problem
does not occur in debug builds, i.e., -O0. You can try using `cmake .. -DCMAKE_BUILD_TYPE=DEBUG` instead, this works for me.
Thank you so much for your help so far, I hope we can track the issue down :)
Best,
Maximilian
------------------------------
Maximilian Böther
------------------------------
Original Message:
Sent: Tue May 03, 2022 07:01 AM
From: Rafik Zurob
Subject: Two issues with IBM XLC compiler
For the second problem, what version of the compiler are you using? (You can get it via "xlC -qversion"). Which version of cmake? (You can get it via "cmake --version").
I cloned the library using the instructions from https://cppget.org/spdlog . (Is this the right one?)$ git clone https://github.com/gabime/spdlog.git$ cd spdlog && mkdir build && cd build
I then set CC to point at xlc and CXX to point at xlC and ran cmake 3.17 followed by make. The build was successful.
$ cmake ..
-- The CXX compiler identification is XLClang 16.1.1.11
-- Check for working CXX compiler: /opt/ibm/xlC/16.1.1/bin/xlC
-- Check for working CXX compiler: /opt/ibm/xlC/16.1.1/bin/xlC - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build spdlog: 1.10.0
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Build type: Release
-- Generating example(s)
-- Generating install
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/rzurob/2/spdlog/build
$ make -j 20
Scanning dependencies of target spdlog
[ 20%] Building CXX object CMakeFiles/spdlog.dir/src/color_sinks.cpp.o
[ 20%] Building CXX object CMakeFiles/spdlog.dir/src/spdlog.cpp.o
[ 30%] Building CXX object CMakeFiles/spdlog.dir/src/stdout_sinks.cpp.o
[ 40%] Building CXX object CMakeFiles/spdlog.dir/src/file_sinks.cpp.o
[ 50%] Building CXX object CMakeFiles/spdlog.dir/src/async.cpp.o
[ 70%] Building CXX object CMakeFiles/spdlog.dir/src/fmt.cpp.o
[ 70%] Building CXX object CMakeFiles/spdlog.dir/src/cfg.cpp.o
1500-030: (I) INFORMATION: fmt::v8::detail::format_dragon(fmt::v8::detail::fp, bool, int, buffer<char> &, int &): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
1500-030: (I) INFORMATION: spdlog::pattern_formatter::handle_flag_<spdlog::details::null_scoped_padder>(char, details::padding_info): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
[ 80%] Linking CXX static library libspdlog.a
[ 80%] Built target spdlog
Scanning dependencies of target example
[ 90%] Building CXX object example/CMakeFiles/example.dir/example.cpp.o
1500-030: (I) INFORMATION: fmt::v8::detail::parse_replacement_field<char, format_handler &>(const char *, const char *, format_handler &&): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
[100%] Linking CXX executable example
[100%] Built target example
$
The xlC version I used is 16.01.0001.0011. If this is the right library and the compiler above fails for you, I suggest trying the following:
1. Compile with "-qxflag=except" which should give us more information about where the abort is coming from.
2. Try to reduce the optimization level to -O2 or -O0. (As shown above, -O3 works for me, but this might help by making the compiler back off the optimization that's causing the abort on your system.)
3. I doubt this will help, but just in case: Increase your stack and data limits. "ulimit -s unlimited" and "ulimit -d unlimited"
------------------------------
Rafik Zurob
------------------------------