Project

General

Profile

Bug #1896

Linker errors using Cray CCE 8.6.5

Added by Sam White about 1 year ago. Updated about 1 year ago.

Status:
Merged
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
05/04/2018
Due date:
% Done:

0%


Description

Building on Cori. Our CmiAbort uses this, but Cray CCE doesn't seem to support it:

../../../bin/../lib/libconv-machine.a(machine.o): In function `get_gni_nic_address$$CFE_id_d7e6ac3e_039eaea4_clone_11995_1525462314_1':
/global/u1/s/swhite1/charm/src/arch/gni/machine.c:4174: undefined reference to `__builtin_unreachable'
/global/u1/s/swhite1/charm/src/arch/gni/machine.c:4174: undefined reference to `__builtin_unreachable'
../../../bin/../lib/libconv-machine.a(machine.o): In function `send_smsg_message$$CFE_id_d7e6ac3e_039eaea4_clone_11995_1525462314_2':
/global/u1/s/swhite1/charm/src/arch/gni/machine-onesided.c:55: undefined reference to `__builtin_unreachable'
/global/u1/s/swhite1/charm/src/arch/gni/machine-onesided.c:55: undefined reference to `__builtin_unreachable'
/global/u1/s/swhite1/charm/src/arch/gni/machine-onesided.c:55: undefined reference to `__builtin_unreachable'
../../../bin/../lib/libconv-machine.a(machine.o):/global/u1/s/swhite1/charm/src/arch/gni/machine-onesided.c:55: more undefined references to `__builtin_unreachable' follow

History

#1 Updated by Evan Ramos about 1 year ago

#ifndef __has_builtin
# define __has_builtin(x) 0  // Compatibility with non-clang compilers.
#endif
#if defined __GNUC__ || __has_builtin(__builtin_unreachable)
// Technically GCC 4.5 is the minimum for this feature, but we require C++11.
# define CMI_UNREACHABLE_SECTION(...) __builtin_unreachable()
#elif _MSC_VER
# define CMI_UNREACHABLE_SECTION(...) __assume(0)
#else
# define CMI_UNREACHABLE_SECTION(...) __VA_ARGS__
#endif

One option would be #if (defined __GNUC__ || __has_builtin(__builtin_unreachable)) && !defined _CRAYC. Another would be adding a configure test for __builtin_unreachable.

#2 Updated by Sam White about 1 year ago

  • Target version set to 6.9.0
  • Assignee set to Sam White
  • Status changed from New to Implemented

#3 Updated by Sam White about 1 year ago

  • Status changed from Implemented to Merged

Also available in: Atom PDF